public void SubscribeStateVariables(StateVariableChangedDlgt svChangeDlg)
 {
     UnsubscribeStateVariables();
     if (svChangeDlg != null && _service != null)
     {
         _stateVariableDelegate            = svChangeDlg;
         _service.EventSubscriptionFailed += SubscribeFailed;
         _service.StateVariableChanged    += _stateVariableDelegate;
         _service.SubscribeStateVariables();
     }
 }
 public ServerStateProxy(CpService serviceStub) : base(serviceStub, Consts.SERVICE_NAME)
 {
     serviceStub.StateVariableChanged += OnStateVariableChanged;
     serviceStub.SubscribeStateVariables();
 }
Exemple #3
0
 protected UPnPServiceProxyBase(CpService serviceStub, string serviceName)
 {
     _serviceName = serviceName;
     _serviceStub = serviceStub;
     _serviceStub.SubscribeStateVariables();
 }
 public UPnPServerControllerServiceProxy(CpService serviceStub) : base(serviceStub, "ServerController")
 {
     serviceStub.StateVariableChanged += OnStateVariableChanged;
     serviceStub.SubscribeStateVariables();
 }
 public UPnPContentDirectoryServiceProxy(CpService serviceStub) : base(serviceStub, "ContentDirectory")
 {
     serviceStub.StateVariableChanged += OnStateVariableChanged;
     serviceStub.SubscribeStateVariables();
 }