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.
A version of this page is also available for
4/8/2010

This method returns DIDL-Lite XML that contains the metadata for the specified object.

Syntax

virtual DWORD BrowseMetadata(
  LPCWSTR 
pszObjectID,
  LPCWSTR 
pszFilter,
  wstring* 
pstrResult,
  unsigned long* 
pUpdateID
) = 0;

Parameters

pszObjectID

[in] ID of the object being browsed. The root object in the ContentDirectory service data store has an ID of 0. Corresponds to the A_ARG_TYPE_ObjectID state variable.

pszFilter

[in] Filter string that specifies the metadata properties to be returned in the pstrResultparameter. Corresponds to the A_ARG_TYPE_Filter state variable. For more information about the syntax of strings passed in this parameter, see the documentation referenced in UPnP AV DCP Documentation.

pstrResult

[in, out] Pointer to a string that, upon return, contains DIDL-Lite XML that represents the requested data. Corresponds to the A_ARG_TYPE_Result state variable.

pUpdateID

[in, out] ContainerUpdateID of the container, if the pszObjectIDparameter refers to a container. Corresponds to the A_ARG_TYPE_UpdateID state variable.

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, especially the following errors documented for this action in the ContentDirectory DCP documentation:

  • ERROR_AV_UPNP_ACTION_FAILED

  • ERROR_AV_UPNP_CD_NO_SUCH_OBJECT

Remarks

This method corresponds to the ContentDirectory service's Browse action with the BrowseFlagparameter set to BrowseMetadata. The IContentDirectory::BrowseChildrenmethod enables browsing child objects.

To use the information returned in pstrResult, use the DIDL-Lite functionality provided by the parserclass. The parser::GetFirstObjectmethod accepts a DIDL-Lite string, like that returned in pstrResult, to enable iteration over all DIDL-Lite objects represented by the passed XML.

For more information about the actions, and the syntax expected by actions, in the ContentDirectory 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

See Also