|
SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
|
Sets one or more custom Room Variables in a Room. More...
#include <SetRoomVariablesRequest.h>
Public Member Functions | |
| SetRoomVariablesRequest (std::vector< std::shared_ptr< entities::RoomVariable > > varList, std::shared_ptr< entities::Room > room=nullptr) | |
| Creates a new SetRoomVariablesRequest. | |
| SetRoomVariablesRequest (const std::vector< entities::SFSRoomVariable > &vars, std::shared_ptr< entities::Room > room=nullptr) | |
| Creates a new SetRoomVariablesRequest from concrete variables. | |
Sets one or more custom Room Variables in a Room.
When a Room Variable is set, a event::SFSEvent::ROOM_VARIABLES_UPDATE event reaches every user in the target Room, the one who set it included. If the Room Variable is global, the event also reaches every user who subscribed the Group of that Room.
|
inline |
Creates a new SetRoomVariablesRequest.
Pass it to SmartFox::send for the request to be performed.
| varList | The Room Variables to set. |
| room | The Room where to set them. When it is nullptr the last Room joined by the current user is used. |
|
inline |
Creates a new SetRoomVariablesRequest from concrete variables.
This overload saves you from wrapping each variable in a shared pointer. Each one is copied into the request, keeping its concrete type.
| vars | The Room Variables to set. |
| room | The Room where to set them. When it is nullptr the last Room joined by the current user is used. |