object::GetProperty (Windows CE 5.0)
This method retrieves the value of the specified DIDL-Lite property.
bool GetProperty( LPCWSTR pszName, wstring* pValue, unsigned long nIndex = 0);bool GetProperty( LPCWSTR pszName, unsigned long* pValue, unsigned long nIndex = 0);bool GetProperty( LPCWSTR pszName, signed long* pValue, unsigned long nIndex = 0);bool GetProperty( LPCWSTR pszName, bool* pValue, unsigned long nIndex = 0);
Parameters
- pszName
Name of the property to retrieve. For more information about naming properties, see Remarks. - pValue
Pointer to a string or number that will be filled with the value of the property specified using pszName and, optionally, nIndex. - nIndex
Optional parameter used to identify a specific value when the specified property has multiple values.
Return Values
Returns true if the specified property was retrieved correctly. Returns false otherwise.
Remarks
This method is overloaded to handle retrieval of property values with different types: string, unsigned long integer, signed long integer, and boolean.
The ContentDirectory service uses properties identified in three XML namespaces: DIDL-Lite (the default), UPnP (identified by upnp:), and Dublin Core (identified by dc:).
To retrieve properties that are stored in the XML as elements, use the element tag name, prefaced by the XML namespace if the namespace is not DIDL-Lite. For example:
- dc:title
- upnp:class
To retrieve properties that are stored in the XML as attributes, use the element tag name and the attribute name, separated by @, and prefaced by the XML namespace if the namespace is not DIDL-Lite. For example:
- res@size
- res@protocolInfo
- upnp:class@name
If the property is stored as an attribute of a top-level object tag, like container or item, omit the element tag name. For example:
- @id
- @parentID
For more information about the DIDL-Lite schema defined by the UPnP AV DCP, including supported properties, see the ContentDirectory documentation referenced in 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::DIDL_Lite.
See Also
Send Feedback on this topic to the authors