Extensible Presence Properties

This topic discusses the ability to set extensible presence information in the RTC Client API version 1.2.

The RTC Client API version 1.0 supported setting only Status and Notes presence information. RTC Client 1.2 supports setting extensible presence information, such as the e-mail address, display name, and phone number. The IRTCClientPresence2::put_PresenceProperty property is called to set each of these properties separately. The API also allows the user to set some user-defined data, such as global positioning information, user action, or user capabilities. The application calls the IRTCClientPresence2::SetPresenceData method to set the user-defined presence data. An IRTCPresenceDataEvent is fired when the operation to set the presence data is complete. The following code examples illustrate how to set the extended presence properties.

Example 1: Set the Presence Properties.
// Get the RTC client presence interface.
IRTCClientPresence2 * pPresence = NULL;
 
hr = m_pClient->QueryInterface(uuidof(IRTCClientPresence2),
                               (void **)&pPresence);
// If (hr != S_OK), process the error here.  

// Set the phone number and display name.
hr = pPresence->put_PresenceProperty(RTCPP_PHONENUMBER, bstrPhoneNumber);   
// If (hr != S_OK), process the error here.  

hr = pPresence->put_PresenceProperty(RTCPP_DISPLAYNAME, bstrDisplayName);
// If (hr != S_OK), process the error here.  

pPresence->Release();

FakePre-071a20e7128848399e6821a7c649adee-6ae204b5ef28480696edf3135a04c2c1