Manages the users the client knows about, that is, the users inside the Rooms the client joined.
More...
#include <UserManager.h>
|
| virtual bool | containsUserName (const std::string &userName)=0 |
| | Indicates whether a user with the passed name exists in the local list.
|
| virtual bool | containsUserId (int32_t userId)=0 |
| | Indicates whether a user with the passed id exists in the local list.
|
| virtual bool | containsUser (std::shared_ptr< entities::User > user)=0 |
| | Indicates whether the passed user exists in the local list.
|
| virtual std::shared_ptr< entities::User > | getUserByName (const std::string &userName)=0 |
| | Retrieves a User object from its name.
|
| virtual std::shared_ptr< entities::User > | getUserById (int32_t userId)=0 |
| | Retrieves a User object from its id.
|
|
virtual int32_t | getUserCount ()=0 |
| | Returns the total number of users in the local users list.
|
| virtual std::vector< std::shared_ptr< entities::User > > | getUserList ()=0 |
| | Returns the whole list of users inside the Rooms joined by the client.
|
Manages the users the client knows about, that is, the users inside the Rooms the client joined.
It keeps the local users list and finds a user by name or by id. SFSUserManager is the standard implementation.
- See also
- SmartFox::getUserManager
-
SFSUserManager
◆ containsUserName()
| virtual bool sfs3::core::UserManager::containsUserName |
( |
const std::string & | userName | ) |
|
|
pure virtual |
Indicates whether a user with the passed name exists in the local list.
- Parameters
-
| userName | The name to test. |
- Returns
true if the user exists in the users list.
◆ containsUserId()
| virtual bool sfs3::core::UserManager::containsUserId |
( |
int32_t | userId | ) |
|
|
pure virtual |
Indicates whether a user with the passed id exists in the local list.
- Parameters
-
- Returns
true if the user exists in the users list.
◆ containsUser()
| virtual bool sfs3::core::UserManager::containsUser |
( |
std::shared_ptr< entities::User > | user | ) |
|
|
pure virtual |
Indicates whether the passed user exists in the local list.
- Parameters
-
- Returns
true if the user exists in the users list.
◆ getUserByName()
| virtual std::shared_ptr< entities::User > sfs3::core::UserManager::getUserByName |
( |
const std::string & | userName | ) |
|
|
pure virtual |
Retrieves a User object from its name.
- Parameters
-
| userName | The name of the user to find. |
- Returns
- The User, or
nullptr if no user with the passed name exists in the local list.
◆ getUserById()
| virtual std::shared_ptr< entities::User > sfs3::core::UserManager::getUserById |
( |
int32_t | userId | ) |
|
|
pure virtual |
Retrieves a User object from its id.
- Parameters
-
| userId | The id of the user to find. |
- Returns
- The User, or
nullptr if no user with the passed id exists in the local list.
◆ getUserList()
| virtual std::vector< std::shared_ptr< entities::User > > sfs3::core::UserManager::getUserList |
( |
| ) |
|
|
pure virtual |
Returns the whole list of users inside the Rooms joined by the client.
- Returns
- The list of User objects in the local users list.
The documentation for this class was generated from the following file: