Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This method is called to indicate that a provided IEventSinkpointer should no longer be notified of state variable changes.
Syntax
virtual DWORD Unadvise( IEventSink* pSubscriber ) = 0; |
Parameters
- pSubscriber
-
[in] Pointer to the IEventSinkpointer that should no longer be notified of state variable changes. This pointer should refer to an object that was passed to IEventSource::Advise.
Return Value
Custom implementations can return appropriate error codes. Should return SUCCESS_AV if the method succeeds. Otherwise, should return an error code defined in WinError.h or UPnP.h, or one of the UPnP AV-specific return values specified in UPnPAVError.
Remarks
Control points and other applications call this method, passing the same IEventSinkpointer they passed to Advise, to indicate that IEventSink::OnStateChangedshould no longer be called when state variables change.
Services implement this method by setting their pointer to the passed IEventSinkinstance to NULL.
The implementation of this method provided by the UPnP AV Framework uses UPnP event subscriptions and UPnP event notifications to disconnect control points and device services. Calls to Unadvisein a control point are handled by a proxy that uses UPnP eventing to notify the service of the subscription ending. The provided device proxy receives the UPnP event communication and in turn calls the service's Unadviseimplementation.
This means that the IEventSinkimplementation a control point passes is not the same as the IEventSinkimplementation received by the service. Instead, custom code interacts with proxy classes that communicate with each other.
Although multiple control points can subscribe to events from a single service, and pass multiple IEventSinkimplementations, the UPnP AV Framework device proxy hides the multiple client IEventSinkimplementations and passes a single IEventSinkpointer to the service's Unadviseimplementation.
For more information about state variables defined for each service, see UPnP AV DCP Documentation.
Requirements
Header | av_upnp.h |
Library | Av_upnp.lib |
Windows Embedded CE | Windows CE 5.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |