39 ref class ActionDescription;
42 ref class StateVariable;
43 class ControlPointEventBridge;
52 delegate
void DeviceAddedDelegate(
DeviceData^ dev);
53 delegate
void DeviceRemovedDelegate(
DeviceData^ dev);
55 delegate
void EventNotifyDelegate(
Service^ srv, IEnumerable<StateVariable^>^ vars);
61 List<DeviceData^>^ m_pDevices;
65 property array<DeviceData^>^ Devices
67 array<DeviceData^>^
get()
69 System::Threading::Monitor::Enter(m_pDevices);
71 return m_pDevices->ToArray();
73 System::Threading::Monitor::Exit(m_pDevices);
89 event DeviceAddedDelegate^ DeviceAdded;
90 event DeviceRemovedDelegate^ DeviceRemoved;
91 event ActionResponseDelegate^ ActionResponse;
92 event EventNotifyDelegate^ EventNotify;
99 System::Threading::Monitor::Enter(m_pDevices);
101 m_pDevices->Add(dev);
103 System::Threading::Monitor::Exit(m_pDevices);
106 this->DeviceAdded(dev);
112 this->DeviceRemoved(dev);
115 System::Threading::Monitor::Enter(m_pDevices);
117 m_pDevices->Remove(dev);
119 System::Threading::Monitor::Exit(m_pDevices);
124 this->ActionResponse(error, action);
127 void OnEventNotify(
Service^ srv, IEnumerable<StateVariable^>^ vars)
129 this->EventNotify(srv, vars);
135 void InvokeAction(
Action^ action);
138 void Unsubscribe(
Service^ srv);
142 void RegisterEvents();
146 virtual Boolean Equals(Object^ obj)
override 151 if (!this->GetType()->IsInstanceOfType(obj))
154 return (*m_pHandle == *((
ControlPoint^)obj)->m_pHandle);
162 throw gcnew ArgumentNullException(
"ctlPoint");
180 if (String::IsNullOrEmpty(autoSearcheviceType))
182 throw gcnew ArgumentException(
"null or empty",
"autoSearcheviceType");
188 new PLT_CtrlPoint(c.marshal_as<
const char*>(autoSearcheviceType))
191 m_pDevices =
gcnew List<DeviceData^>();
207 m_pDevices =
gcnew List<DeviceData^>();
Definition: DeviceData.h:88
Definition: ActionDescription.h:44
Definition: ControlPointEventBridge.h:43
Definition: NeptuneException.h:42
Definition: ControlPoint.h:48
bool IsNull() const
Returns whether this references a NULL object.
Definition: NptReferences.h:130
The PLT_CtrlPoint class implements the base functionality of a UPnP ControlPoint. ...
Definition: PltCtrlPoint.h:89