IRTCClientPresence::AddWatcher (Windows CE 5.0)

Send Feedback

This method adds a watcher to the allowed or blocked watcher list.

HRESULT AddWatcher(BSTRbstrPresentityURI,BSTRbstrUserName,BSTRbstrData,VARIANT_BOOLfBlocked,VARIANT_BOOLfPersistent,IRTCWatcher** ppWatcher);

Parameters

  • bstrPresentityURI
    [in] The presentity Universal Resource Identifier (URI) of the new watcher, with or without the sip: namespace prefix.

  • bstrUserName
    [in] The displayable name of the new watcher.

    In RTC 1.2, this parameter can be set to NULL to allow the display name to be used.

  • bstrData
    [in] An optional private data BLOB.

  • fBlocked
    [in] VARIANT_TRUE if the watcher is blocked initially.

    VARIANT_FALSE if the watcher is allowed initially.

  • fPersistent
    [in] VARIANT_TRUE if the watcher is saved in persistent storage.

    VARIANT_FALSE if the watcher is volatile and is lost when the RTC client is shut down.

  • ppWatcher
    [out] Pointer to an IRTCWatcher 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 an additional possible return value.

Value Meaning
E_FAIL Method failed. This can mean that a buddy with this presentity URI already exists.

Remarks

Security Note   This method can send data over the network in unencrypted form. Therefore, someone eavesdropping on the network could read the data. Before using this method in an unencrypted session, consider the security risk of sending the data in clear text. An RTC session can be encrypted by specifying TLS in the profile used for the session.

Security Note   The RTC Client API does not set ACLs on the presence storage file. An application might consider setting an ACL on this file for better security.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Rtccore.h, Rtccore.idl.
Link Library: Uuid.lib.

See Also

IRTCClientPresence | IRTCClientPresence::RemoveWatcher | IRTCWatcher

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.