Watcher Roaming

This section discusses watcher roaming.

When the application registers to receive watcher events, the server creates two roaming sessions with the client: one to track pending watchers that have not yet been accepted by the application (WPending Roaming), and another to notify the application of current watchers (Watcher Roaming).

WPending roaming and watcher roaming are both enabled when the user logs onto the server by calling the IRTCClientProvisioning2::EnableProfileEx method with the RTCRMF_WATCHER_ROAMING flag specified in the lRoamingFlags parameter. Specifying RTCRMF_WATCHER_ROAMING will also fire two roaming events. One IRTCRoamingEvent is fired with the event type WRTCRET_WPENDING_ROAMING, and another IRTCRoamingEvent is fired with the event type set to RTCRET_WATCHER_ROAMING. The WPending roaming is fired when the roaming session created to track pending watchers starts, stops, or encounters an error. The RTCRMF_WATCHER_ROAMING event is fired when the roaming session to track the list of allpowed/blocked watchers start, stops or encounters an error. The IRTCRoamingEvent::get_StatusCode method returns the status of the roaming request, indicating the success or failure of the roaming.

WPending is the mechanism that the server uses to notify client applications that a new watcher wants to subscribe to their presence information. The client application has not allowed, blocked, or denied the new watcher access to the user’s presence information. If the user is offline when the watcher attempts to access his information, the server holds the watcher’s subscription until the user logs onto the server with watcher roaming enabled. The user then approves, denies, or blocks the watcher. The user is notified that there is a watcher pending with an IRTCWatcherEvent with the watcher state set to RTCWS_OFFERING if watcher roaming is enabled on the client.