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

Blocks or unblocks a buddy in the current user's buddies list. More...

#include <BlockBuddyRequest.h>

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

Public Member Functions

 BlockBuddyRequest (std::string buddyName, bool blocked)
 Creates a new BlockBuddyRequest.

Detailed Description

Blocks or unblocks a buddy in the current user's buddies list.

Blocked buddies won't be able to see if the user who blocked them is online in their buddies list; they also won't be able to send messages or requests to that user.

In order to block a buddy, the current user must be online in the Buddy List system. If the operation is successful, a event::SFSEvent::BUDDY_BLOCK confirmation event is dispatched; 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_BLOCK
event::SFSEvent::BUDDY_ERROR
InitBuddyListRequest

Constructor & Destructor Documentation

◆ BlockBuddyRequest()

sfs3::requests::buddy::BlockBuddyRequest::BlockBuddyRequest ( std::string buddyName,
bool blocked )
inline

Creates a new BlockBuddyRequest.

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

Parameters
buddyNameThe name of the buddy to be blocked or unblocked.
blockedtrue if the buddy must be blocked; false if he must be unblocked.
See also
SmartFox::send

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