|
SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
|
A buddy in the current user's buddy list. More...
#include <Buddy.h>
Public Member Functions | |
| virtual int32_t | getId () const =0 |
| The buddy id, equal to the id assigned by SmartFoxServer to the corresponding User. | |
| virtual std::string | getName () const =0 |
| The name of this buddy, equal to the login name of the corresponding User. | |
| virtual std::string | getDisplayName () const =0 |
| The nickname of this buddy if one is set, his name otherwise. | |
| virtual bool | isBlocked () const =0 |
| Indicates whether this buddy is blocked in the current user's buddies list or not. | |
| virtual bool | isOnline () const =0 |
| Indicates whether this buddy is online in the Buddy List system or not. | |
| virtual bool | isTemp () const =0 |
| Indicates whether this buddy is temporary (non-persistent) in the current user's buddies list or not. | |
| virtual std::optional< std::string > | getState () const =0 |
| The custom state of this buddy, such as "Available", "Busy" or "Be right back", or an empty optional if the state is not set. | |
| virtual std::optional< std::string > | getNickName () const =0 |
| The nickname of this buddy, or an empty optional if the nickname is not set. | |
| virtual std::vector< std::shared_ptr< BuddyVariable > > | getVariables () const =0 |
| Retrieves all the Buddy Variables associated with this buddy. | |
| virtual std::shared_ptr< BuddyVariable > | getVariable (const std::string &varName) const =0 |
| Retrieves a Buddy Variable from its name. | |
| virtual bool | containsVariable (const std::string &varName) const =0 |
| Indicates whether this buddy has the specified Buddy Variable set or not. | |
| virtual std::vector< std::shared_ptr< BuddyVariable > > | getOfflineVariables () const =0 |
| Retrieves the persistent Buddy Variables of this buddy. | |
| virtual std::vector< std::shared_ptr< BuddyVariable > > | getOnlineVariables () const =0 |
| Retrieves the non-persistent Buddy Variables of this buddy. | |
A buddy in the current user's buddy list.
SFSBuddy is the standard implementation of this interface.
|
pure virtual |
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.
Implemented in sfs3::entities::SFSBuddy.
|
pure virtual |
The name of this buddy, equal to the login name of the corresponding User.
Implemented in sfs3::entities::SFSBuddy.
|
pure virtual |
The nickname of this buddy if one is set, his name otherwise.
Implemented in sfs3::entities::SFSBuddy.
|
pure virtual |
Indicates whether this buddy is blocked in the current user's buddies list or not.
A buddy is blocked with a requests::buddy::BlockBuddyRequest.
Implemented in sfs3::entities::SFSBuddy.
|
pure virtual |
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.
Implemented in sfs3::entities::SFSBuddy.
|
pure virtual |
The nickname of this buddy, or an empty optional if the nickname is not set.
Implemented in sfs3::entities::SFSBuddy.
|
pure virtual |
Retrieves all the Buddy Variables associated with this buddy.
Implemented in sfs3::entities::SFSBuddy.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Retrieves the persistent Buddy Variables of this buddy.
Implemented in sfs3::entities::SFSBuddy.
|
pure virtual |
Retrieves the non-persistent Buddy Variables of this buddy.
Implemented in sfs3::entities::SFSBuddy.