content: package my.project.silisili.cling.service;
  
  import android.content.Intent;
  import android.os.IBinder;
  
  import org.fourthline.cling.UpnpServiceConfiguration;
  import org.fourthline.cling.android.AndroidUpnpServiceImpl;
  import org.fourthline.cling.controlpoint.ControlPoint;
  import org.fourthline.cling.model.meta.LocalDevice;
  import org.fourthline.cling.registry.Registry;
  
  /**
   * 说明：
   * 作者：zhouzhan
   * 日期：17/6/28 16:11
   */
  
  public class ClingUpnpService extends AndroidUpnpServiceImpl {
      private LocalDevice mLocalDevice = null;
  
      @Override
      public void onCreate() {
          super.onCreate();
  
          //LocalBinder instead of binder
          binder = new LocalBinder();
      }
  
      @Override
      public void onDestroy() {
          super.onDestroy();
      }
  
      @Override
      public IBinder onBind(Intent intent) {
          return binder;
      }
  
      public LocalDevice getLocalDevice() {
          return mLocalDevice;
      }
  
      public UpnpServiceConfiguration getConfiguration() {
          return upnpService.getConfiguration();
      }
  
      public Registry getRegistry() {
          return upnpService.getRegistry();
      }
  
      public ControlPoint getControlPoint() {
          return upnpService.getControlPoint();
      }
  
      public class LocalBinder extends Binder {
          public ClingUpnpService getService() {
              return ClingUpnpService.this;
          }
      }
  }
  