|
SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
|
The standard implementation of Buddy: a buddy in the current user's buddy list. More...
#include <SFSBuddy.h>
Public Member Functions | |
| int32_t | getId () const override |
| The buddy id, equal to the id assigned by SmartFoxServer to the corresponding User. | |
| std::string | getName () const override |
| The name of this buddy, equal to the login name of the corresponding User. | |
| std::string | getDisplayName () const override |
| The nickname of this buddy if one is set, his name otherwise. | |
| bool | isBlocked () const override |
| Indicates whether this buddy is blocked in the current user's buddies list or not. | |
| bool | isOnline () const override |
| Indicates whether this buddy is online in the Buddy List system or not. | |
| bool | isTemp () const override |
| Indicates whether this buddy is temporary (non-persistent) in the current user's buddies list or not. | |
| std::optional< std::string > | getState () const override |
| The custom state of this buddy, such as "Available", "Busy" or "Be right back", or an empty optional if the state is not set. | |
| std::optional< std::string > | getNickName () const override |
| The nickname of this buddy, or an empty optional if the nickname is not set. | |
| std::vector< std::shared_ptr< BuddyVariable > > | getVariables () const override |
| Retrieves all the Buddy Variables associated with this buddy. | |
| std::shared_ptr< BuddyVariable > | getVariable (const std::string &varName) const override |
| Retrieves a Buddy Variable from its name. | |
| bool | containsVariable (const std::string &varName) const override |
| Indicates whether this buddy has the specified Buddy Variable set or not. | |
| std::vector< std::shared_ptr< BuddyVariable > > | getOfflineVariables () const override |
| Retrieves the persistent Buddy Variables of this buddy. | |
| std::vector< std::shared_ptr< BuddyVariable > > | getOnlineVariables () const override |
| Retrieves the non-persistent Buddy Variables of this buddy. | |
The standard implementation of Buddy: a buddy in the current user's buddy list.
NOTE: you never create an SFSBuddy yourself. The API does it for you.
|
inlineoverridevirtual |
The buddy id, equal to the id assigned by SmartFoxServer to the corresponding User.
It is -1 while the corresponding user is not connected, which is why a buddy is identified by name rather than by id.
Implements sfs3::entities::Buddy.
|
inlineoverridevirtual |
The name of this buddy, equal to the login name of the corresponding User.
Implements sfs3::entities::Buddy.
|
overridevirtual |
The nickname of this buddy if one is set, his name otherwise.
Implements sfs3::entities::Buddy.
|
inlineoverridevirtual |
Indicates whether this buddy is blocked in the current user's buddies list or not.
A buddy is blocked with a requests::buddy::BlockBuddyRequest.
Implements sfs3::entities::Buddy.
|
overridevirtual |
The custom state of this buddy, such as "Available", "Busy" or "Be right back", or an empty optional if the state is not set.
The list of available custom states is the one the Buddy Manager holds.
Implements sfs3::entities::Buddy.
|
overridevirtual |
The nickname of this buddy, or an empty optional if the nickname is not set.
Implements sfs3::entities::Buddy.
|
overridevirtual |
Retrieves all the Buddy Variables associated with this buddy.
Implements sfs3::entities::Buddy.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Retrieves the persistent Buddy Variables of this buddy.
Implements sfs3::entities::Buddy.
|
overridevirtual |
Retrieves the non-persistent Buddy Variables of this buddy.
Implements sfs3::entities::Buddy.