IRTCClientPresence2::AddWatcherEx (Windows CE 5.0)
This method adds a new watcher rule object (access control entity). The state of the newly added watcher can be allowed, blocked, prompt, or deny.
If watcher roaming is enabled by passing the RTCRET_WATCHER_ROAMING flag to the IRTCClientProvisioning2::EnableProfileEx method, the newly created watcher is persisted on the server.
HRESULT AddWatcherEx( BSTRbstrPresentityURI,
BSTRbstrUserName,
BSTRbstrData,
RTC_WATCHER_STATEenState,
VARIANT_BOOLfPersistent,
RTC_ACE_SCOPEenScope,
IRTCProfile*pProfile,
longlFlags,
IRTCWatcher2**ppWatcher);
Parameters
bstrPresentityURI
[in] The SIP URI of the new watcher.The sip: prefix is optional when providing the URI.
bstrUserName
[in] The display name of the new watcher.bstrData
[in] Optional string value used as a private data BLOB.enState
[in] RTC_WATCHER_STATE enumeration value specifying the initial watcher state.fPersistent
[in] VARIANT_TRUE if the watcher should be saved in persistent storage.VARIANT_FALSE if the watcher is volatile and will be lost when the RTC client process terminates.
enScope
[in] RTC_ACE_SCOPE enumeration value specifying the specific the scope of the new watcher's access control entry (ACE).pProfile
[in] Pointer to an IRTCProfile interface that specifies a provisioning profile to associate with this watcher.If IRTCClientPresence2::EnablePresenceEx has been used to enable a presence profile, this parameter should be set to NULL.
lFlags
[in] Reserved. This value must be set to zero.ppWatcher
[out] Pointer to an IRTCWatcher2 interface.This parameter can be NULL, indicating that the method should not retrieve an interface.
This method adds a reference to the Watcher object, which the caller is responsible for releasing.
Return Values
This method can return an RTC_E_ constant.
The following table shows additional possible return values.
Value | Meaning |
---|---|
E_INVALIDARG | The bstrPresentityURI is NULL or the enScope enumeration value is not valid. |
E_POINTER | One of the pointers in the parameter list is not valid. |
Requirements
OS Versions: Windows CE .NET 4.2 and later.
Header: Rtccore.h, Rtccore.idl.
Link Library: Uuid.lib.
See Also
IRTCClientPresence2 | IRTCClientPresence2::EnablePresenceEx | IRTCProfile | IRTCWatcher2 | RTC_ACE_SCOPE | RTC_WATCHER_STATE
Send Feedback on this topic to the authors