次の方法で共有


IRTCClientPresence2::AddWatcherEx (Windows Embedded CE 6.0)

1/6/2010

Note

This method is unsupported in Windows Embedded CE 6.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.

Syntax

HRESULT AddWatcherEx( 
  BSTR bstrPresentityURI, 
  BSTR bstrUserName, 
  BSTR bstrData,
  RTC_WATCHER_STATE enState, 
  VARIANT_BOOL fPersistent, 
  RTC_ACE_SCOPE enScope, 
  IRTCProfile* pProfile, 
  long lFlags, 
  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 Value

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

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

See Also

Reference

IRTCClientPresence2
IRTCClientPresence2::EnablePresenceEx
IRTCProfile
IRTCWatcher2
RTC_ACE_SCOPE
RTC_WATCHER_STATE