Поделиться через


IRTCClientPresence::AddWatcher (Windows Embedded CE 6.0)

1/6/2010

Note

This method is unsupported in Windows Embedded CE 6.0.

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

Syntax

HRESULT AddWatcher(
  BSTR bstrPresentityURI,
  BSTR bstrUserName,
  BSTR bstrData,
  VARIANT_BOOL fBlocked,
  VARIANT_BOOL fPersistent,
  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 Value

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

Header rtccore.h, rtccore.idl
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

IRTCClientPresence
IRTCClientPresence::RemoveWatcher
IRTCWatcher