IRTCClientPresence::EnablePresence (Windows Embedded CE 6.0)
1/6/2010
Note
This method is unsupported in Windows Embedded CE 6.0.
This method enables the presence functionality for both outgoing and incoming subscriptions. Presence is not enabled until this method is called. This method can be called only once.
Note
The storage used in this method is subject to change and further revisions.
Syntax
HRESULT EnablePresence(
VARIANT_BOOL fUseStorage,
VARIANT varStorage
);
Parameters
fUseStorage
[in] VARIANT_TRUE if the lists load from storage and automatically commit changes back to storage.VARIANT_FALSE enable presence, but not use storage. Presence is enabled with empty buddy and watcher lists.
varStorage
[in] The persistent storage for the buddy list and the allowed and blocked watcher lists. This variant can contain the following:- A file name (BSTR)
- A DOMDocument object
- Any object that supports IStream, ISequentialStream, or IPersistStream
Return Value
This method can return an RTC_E_ constant.
The following table shows an additional possible return value.
Value | Meaning |
---|---|
S_FALSE |
Presence was enabled but failed to load from storage. |
Remarks
The application should call this method only after a PC-to-PC profile has been enabled for presence, using the IRTCClientProvisioning::EnableProfile method.
The application uses this default profile when creating buddies from the presence store (fUseStorage is set to VARIANT_TRUE).
The application must call EnablePresence before callingother presence methods. Subsequent calls to EnablePresence close the existing presence store and the new specified store is opened.
If there is no storage, the buddy list is lost.
The buddy and watcher objects have a persistence property that is set when they are added to the presence list. EnablePresence determines whether they are part of the persistent storage (varStorage).
Security Note: |
---|
The RTC Client API does not set ACLs on the presence storage file. An application might set 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
IRTCClientProvisioning::EnableProfile