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

Adds a new buddy to the current user's buddies list. More...

#include <AddBuddyRequest.h>

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

Public Member Functions

 AddBuddyRequest (std::string buddyName)
 Creates a new AddBuddyRequest.

Detailed Description

Adds a new buddy to the current user's buddies list.

In order to add a buddy, the current user must be online in the Buddy List system. If the buddy is added successfully, the operation is confirmed by a event::SFSEvent::BUDDY_ADD event; otherwise the event::SFSEvent::BUDDY_ERROR event is fired.

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

See also
event::SFSEvent::BUDDY_ADD
event::SFSEvent::BUDDY_ERROR
InitBuddyListRequest

Constructor & Destructor Documentation

◆ AddBuddyRequest()

sfs3::requests::buddy::AddBuddyRequest::AddBuddyRequest ( std::string buddyName)
inline

Creates a new AddBuddyRequest.

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

Parameters
buddyNameThe name of the user to be added as a buddy.
See also
SmartFox::send

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