SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
Loading...
Searching...
No Matches
sfs3::requests::buddy::GoOnlineRequest Class Reference

Toggles the current user's online/offline state as buddy in other users' buddies lists. More...

#include <GoOnlineRequest.h>

Inheritance diagram for sfs3::requests::buddy::GoOnlineRequest:
[legend]

Public Member Functions

 GoOnlineRequest (bool online)
 Creates a new GoOnlineRequest.

Detailed Description

Toggles the current user's online/offline state as buddy in other users' buddies lists.

All clients who have the current user as buddy in their buddies list will receive the event::SFSEvent::BUDDY_ONLINE_STATE_CHANGE event and see the Buddy::isOnline() property change accordingly. The same event is also dispatched to the current user, who sent the request, so that the application interface can be updated accordingly. Going online/offline as buddy doesn't affect the user connection, the currently joined Zone and Rooms, etc.

The online state of a user in a buddy list is handled by means of a reserved and persistent Buddy Variable.

NOTE: this request can be sent if the Buddy List system was previously initialized only (see the InitBuddyListRequest request description).

See also
core::buddy::BuddyManager::getMyOnlineState()
entities::Buddy::isOnline()
event::SFSEvent::BUDDY_ONLINE_STATE_CHANGE
InitBuddyListRequest

Constructor & Destructor Documentation

◆ GoOnlineRequest()

sfs3::requests::buddy::GoOnlineRequest::GoOnlineRequest ( bool online)
inline

Creates a new GoOnlineRequest.

Pass it to SmartFox::send for the request to be performed.

Parameters
onlinetrue to make the current user available (online) in the Buddy List system; false to make him not available (offline).
See also
SmartFox::send

The documentation for this class was generated from the following files:
  • requests/buddylist/GoOnlineRequest.h
  • requests/buddylist/GoOnlineRequest.cpp