Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This topic discusses how buddies and watchers are added in RTC Client API.
For the RTC Client API version 1.0, the list of buddies was stored on the local machine. Starting with RTC Client 1.2, the list of buddies can be stored on the server. Buddies and Watchers can be added to the presence storage only after the presence functionality has been enabled with the IRTCClientPresence2::EnablePresenceEx method. The presence storage for RTC Client 1.2 is added to the presence storage for RTC Client 1.0, which allows applications to add and remove Buddies and Watchers with RTC Client 1.2 and retain the RTC Client 1.0 list of buddies.
The application calls the IRTCClientPresence2::AddBuddyEx method to add a buddy to the buddy roaming. This information is updated to the server if the server supports buddy roaming and the fPersistent parameter in the AddBuddyEx method is true. If the server does not support buddy roaming, this information is stored on the local machine. The RTC Client 1.2 limits the application to one enabled profile. The profile specified in the call to the AddBuddyEx method is the presence profile, and should also be the currently enabled profile.
The presence information for each buddy contains his name and online status and may optionally contain additional information, such as the e-mail address, phone number, and display name. The presence information for each buddy is set and retrieved by various APIs as follows:
For RTC Client 1.0, the IRTCBuddy::get_Notes and IRTCBuddy::get_Status methods retrieve the presence information set in the IRTCClientPresence::SetLocalPresenceInfo method.
Note When the IRTCBuddy::get_Notes and IRTCBuddy::get_Status methods are used with RTC Client 1.2, the server may return an aggregated presence document based on the status and notes set by multiple endpoints for the buddy. These are not necessarily the same notes and status that the buddy set in IRTCClientPresence::SetLocalPresenceInfo.
For RTC Client 1.2, the IRTCBuddy2::get_PresenceProperty method retrieves the presence property that the buddy set when the buddy called IRTCClientPresence2::put_PresenceProperty on their device (not on the client object). The IRTCPresenceDevice::GetPresenceData method retrieves the data set in the IRTCClientPresence2::SetPresenceData method.