IContentDirectory::UpdateObject (Windows CE 5.0)

Send Feedback

This method modifies, inserts, or deletes object metadata.

virtual DWORD UpdateObject(  LPCWSTR pszObjectID,  LPCWSTR pszCurrentTagValue,  LPCWSTR pszNewTagValue) = 0;

Parameters

  • pszObjectID
    [in] ID of the object whose metadata is to be modified. Corresponds to the A_ARG_TYPE_ObjectID state variable.
  • pszCurrentTagValue
    [in] Comma-separated list of existing metadata elements, or empty placeholders. The provided elements must match existing object metadata elements exactly. The number of elements in this parameter must match the number of elements in the pszNewTagValue parameter. Corresponds to the A_ARG_TYPE_TagValueList state variable.
  • pszNewTagValue
    [in] Comma-separated list of new metadata elements, or empty placeholders. The number of elements in this parameter must match the number of elements in the pszCurrentTagValue parameter. Corresponds to the A_ARG_TYPE_TagValueList state variable.

Return Values

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
  • ERROR_AV_UPNP_CD_INVALID_CURRENTTAGVALUE
  • ERROR_AV_UPNP_CD_INVALID_NEWTAGVALUE
  • ERROR_AV_UPNP_CD_REQUIRED_TAG_DELETE
  • ERROR_AV_UPNP_CD_READONLY_TAG_UPDATE
  • ERROR_AV_UPNP_CD_PARAMETER_NUM_MISMATCH
  • ERROR_AV_UPNP_CD_RESTRICTED_OBJECT
  • ERROR_AV_UPNP_CD_BAD_METADATA
  • ERROR_AV_UPNP_CD_RESTRICTED_PARENT_OBJECT

Remarks

This method corresponds to the ContentDirectory service's UpdateObject action.

During processing, the values in the pszCurrentTagValue and pszNewTagValue lists are compared and the object metadata is updated according to the following rules.

  • If an element exists at the same index in both lists, the element in pszNewTagValue replaces the existing element in the object metadata.
  • If an element exists in pszOldTagValue and the corresponding index in pszNewTagValue contains no element, the element in pszOldTagValue is removed from the object metadata.
  • If an element exists in pszNewTagValue and the corresponding index in pszOldTagValue contains no element, the element in pszNewTagValue is inserted in to the object data at the specified location.

The ContentDirectory service does not require that this method be implemented. The IContentDirectoryImpl class therefore overrides this method to return ERROR_AV_UPNP_INVALID_ACTION.

For more information about the actions in the ContentDirectory 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

IContentDirectory | IContentDirectoryImpl | UPnPAVError

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.