Manages the Rooms the client knows about.
More...
#include <RoomManager.h>
|
| virtual size_t | getRoomCount ()=0 |
| | Returns the current number of Rooms in the Rooms list.
|
| virtual bool | containsGroup (const std::string &groupId)=0 |
| | Indicates whether the specified Group has been subscribed by the client or not.
|
| virtual bool | containsRoom (int32_t id)=0 |
| | Indicates whether a Room exists in the Rooms list or not.
|
| virtual bool | containsRoom (const std::string &name)=0 |
| | Indicates whether a Room exists in the Rooms list or not.
|
| virtual bool | containsRoomInGroup (int32_t roomId, const std::string &groupId)=0 |
| | Indicates whether the Rooms list contains a Room belonging to the specified Group or not.
|
| virtual bool | containsRoomInGroup (const std::string &roomName, const std::string &groupId)=0 |
| | Indicates whether the Rooms list contains a Room belonging to the specified Group or not.
|
| virtual std::shared_ptr< entities::Room > | getRoomById (int32_t id)=0 |
| | Retrieves a Room object from its id.
|
| virtual std::shared_ptr< entities::Room > | getRoomByName (const std::string &name)=0 |
| | Retrieves a Room object from its name.
|
| virtual std::vector< std::shared_ptr< entities::Room > > | getRoomListFromGroup (const std::string &groupId)=0 |
| | Retrieves the list of Rooms which are part of the specified Room Group.
|
| virtual std::vector< std::shared_ptr< entities::Room > > | getJoinedRooms ()=0 |
| | Returns a list of Rooms currently joined by the client.
|
| virtual std::vector< std::shared_ptr< entities::Room > > | getUserRooms (std::shared_ptr< entities::User > user)=0 |
| | Retrieves a list of Rooms joined by the specified user.
|
| virtual std::vector< std::shared_ptr< entities::Room > > | getRoomList ()=0 |
| | Returns a list of Rooms currently "known" by the client.
|
| virtual std::vector< std::string > | getRoomGroups ()=0 |
| | Returns the names of Room Groups currently subscribed by the client.
|
Manages the Rooms the client knows about.
It keeps the list of the Rooms the client joined and of the Rooms in the Room Groups the client subscribed, and it keeps that list up to date with the server.
- See also
- SmartFox::getRoomManager
◆ getRoomCount()
| virtual size_t sfs3::core::RoomManager::getRoomCount |
( |
| ) |
|
|
pure virtual |
Returns the current number of Rooms in the Rooms list.
- Returns
- The number of Rooms in the Rooms list.
◆ containsGroup()
| virtual bool sfs3::core::RoomManager::containsGroup |
( |
const std::string & | groupId | ) |
|
|
pure virtual |
Indicates whether the specified Group has been subscribed by the client or not.
- Parameters
-
| groupId | The name of the Group. |
- Returns
true if the client subscribed the passed Group.
◆ containsRoom() [1/2]
| virtual bool sfs3::core::RoomManager::containsRoom |
( |
int32_t | id | ) |
|
|
pure virtual |
Indicates whether a Room exists in the Rooms list or not.
- Parameters
-
| id | The id of the Room object whose presence in the Rooms list is to be tested. |
- Returns
true if the passed Room exists in the Rooms list.
- See also
- entities::Room::getId
◆ containsRoom() [2/2]
| virtual bool sfs3::core::RoomManager::containsRoom |
( |
const std::string & | name | ) |
|
|
pure virtual |
Indicates whether a Room exists in the Rooms list or not.
- Parameters
-
| name | The name of the Room object whose presence in the Rooms list is to be tested. |
- Returns
true if the passed Room exists in the Rooms list.
- See also
- entities::Room::getName
◆ containsRoomInGroup() [1/2]
| virtual bool sfs3::core::RoomManager::containsRoomInGroup |
( |
int32_t | roomId, |
|
|
const std::string & | groupId ) |
|
pure virtual |
Indicates whether the Rooms list contains a Room belonging to the specified Group or not.
- Parameters
-
| roomId | The id of the Room object whose presence in the Rooms list is to be tested. |
| groupId | The name of the Group to which the specified Room must belong. |
- Returns
true if the Rooms list contains the passed Room and it belongs to the specified Group.
- See also
- entities::Room::getId
-
entities::Room::getGroupId
◆ containsRoomInGroup() [2/2]
| virtual bool sfs3::core::RoomManager::containsRoomInGroup |
( |
const std::string & | roomName, |
|
|
const std::string & | groupId ) |
|
pure virtual |
Indicates whether the Rooms list contains a Room belonging to the specified Group or not.
- Parameters
-
| roomName | The name of the Room object whose presence in the Rooms list is to be tested. |
| groupId | The name of the Group to which the specified Room must belong. |
- Returns
true if the Rooms list contains the passed Room and it belongs to the specified Group.
- See also
- entities::Room::getName
-
entities::Room::getGroupId
◆ getRoomById()
| virtual std::shared_ptr< entities::Room > sfs3::core::RoomManager::getRoomById |
( |
int32_t | id | ) |
|
|
pure virtual |
Retrieves a Room object from its id.
- Parameters
-
- Returns
- The Room, or
nullptr if no Room with that id is in the Rooms list.
- See also
- RoomManager::getRoomByName
◆ getRoomByName()
| virtual std::shared_ptr< entities::Room > sfs3::core::RoomManager::getRoomByName |
( |
const std::string & | name | ) |
|
|
pure virtual |
Retrieves a Room object from its name.
- Parameters
-
| name | The name of the Room. |
- Returns
- The Room, or
nullptr if no Room with that name is in the Rooms list.
- See also
- RoomManager::getRoomById
◆ getRoomListFromGroup()
| virtual std::vector< std::shared_ptr< entities::Room > > sfs3::core::RoomManager::getRoomListFromGroup |
( |
const std::string & | groupId | ) |
|
|
pure virtual |
Retrieves the list of Rooms which are part of the specified Room Group.
- Parameters
-
| groupId | The name of the Group. |
- Returns
- The list of Room objects belonging to the passed Room Group.
- See also
- entities::Room
◆ getJoinedRooms()
| virtual std::vector< std::shared_ptr< entities::Room > > sfs3::core::RoomManager::getJoinedRooms |
( |
| ) |
|
|
pure virtual |
◆ getUserRooms()
Retrieves a list of Rooms joined by the specified user.
The list contains only those Rooms "known" by the Room Manager; the user might have joined others the client is not aware of.
- Parameters
-
| user | A User object representing the user to look for in the current Rooms list. |
- Returns
- The list of Rooms joined by the passed user.
◆ getRoomList()
| virtual std::vector< std::shared_ptr< entities::Room > > sfs3::core::RoomManager::getRoomList |
( |
| ) |
|
|
pure virtual |
◆ getRoomGroups()
| virtual std::vector< std::string > sfs3::core::RoomManager::getRoomGroups |
( |
| ) |
|
|
pure virtual |
The documentation for this class was generated from the following file: