Compartir a través de


IEventSink::OnStateChanged (Windows CE 5.0)

Send Feedback

This method is called when a state variable maintained by a service changes.

virtual DWORD OnStateChanged(  LPCWSTR  pszStateVariableName,  LPCWSTR  pszValue) = 0;virtual DWORD OnStateChanged(  LPCWSTR  pszStateVariableName,  long     nValue) = 0;virtual DWORD OnStateChanged(  LPCWSTR  pszStateVariableName,  LPCWSTR  pszChannel,  long     nValue) = 0;

Parameters

  • pszStateVariableName
    [in] Name of the state variable that has changed.
  • pszValue
    [in] New value of the state variable that has changed. Used when the state variable is a string.
  • nValue
    [in] New value of the state variable that has changed. Used when the state variable is a number.
  • pszChannel
    [in] Audio channel associated with the changing state variable. Used with RenderingControl service state variable changes that involve an audio channel.

Return Values

Custom implementations can return appropriate error codes. If this method succeeds, it should return SUCCESS_AV. Otherwise, it 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

This method is overloaded to handle notifications that contain string and long integer data types, as well as to handle notifications that contain channel information.

Control points and other applications implement this method to receive state variable change notifications from services.

Services accept references to IEventSink interfaces (through IEventSource::Advise) and then call OnStateChanged on these accepted references to notify the interested parties of state changes.

The implementation of these methods provided by the UPnP AV Framework uses UPnP event subscriptions and UPnP event notifications to connect control points and devices. From the perspective of code in the control point and device implementation, the device calls OnStateChanged and the corresponding OnStateChanged method is called in the control point's IEventSink implementation. The UPnP AV Framework implements this connection using proxy classes that in turn use UPnP eventing.

For more information about state variables defined for each service, see UPnP AV DCP Documentation.

Requirements

OS Versions: Windows CE 5.0 and later.
Header: Av_upnp.h.
Link Library: Av_upnp.lib.
C++ Namespace: av_upnp.

See Also

IEventSink | Eventing in the UPnP AV Framework | IEventSink | IEventSource::Advise | UPnPAVError

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.