Share via


MediaQueryEngine_t::RegisterContentUpdateCallback (Windows Embedded CE 6.0)

1/5/2010

The RegisterContentUpdateCallback method allows you to setup a sink to receive the content update string from the media server. The content update function receives the string coming from media server. The string contains a container id and its update id separated by semi-colon.

Syntax

bool RegisterContentUpdateCallback (
   const   ContentUpdateCallback_t*   pCallbackObj 
);

Parameters

  • pCallbackObj
    This is the object callback proc of which will be called when server sends content update event.

Return Value

This method returns a bool indicting success/failure of the operation. Possible values include the following:

Value Description

TRUE

The register was successful.

FALSE

There was either an error or wait timed out. Check GetLastError() value for more information about the cause for failure.

Remarks

The following code is an example of a callback function.

class   ContentUpdateCallback_t
{
public:
   virtual void CallbackProc( 
         const   WCHAR* pUpdateString
   ) const = 0;
};

The CallbackProc receives a pointer to the update string. The an example of the format of the update string is: 4, 23, 225, 12. This particular example means that containers 4 and 225 have changed. Their new update IDs are 23 and 12 respectively.

This callback allows you to get complete content update information. Alternatively, Media Query Engine informs all the registered sinks (See the AddSink method) about high level content update via MQE_EVENT_CONTENTUPDATE_MUSIC, MQE_EVENT_CONTENTUPDATE_VIDEO, and MQE_EVENT_CONTENTUPDATE_PICTURE.

Requirements

Header mediaqueryengine.hpp
Library MQELib.lib
Windows Embedded CE Windows CE 5.0 Networked Media Device Feature Pack and later

See Also

Reference

MediaQueryEngine_t
ServerInfoCollection_t