SmartFoxServer 2X C++ API
Sfs2X::Requests::RoomSettings Class Reference

This class provides the Room settings that you can pass to a CreateRoomRequest More...

#include <RoomSettings.h>

Inheritance diagram for Sfs2X::Requests::RoomSettings:
Sfs2X::Requests::Game::SFSGameSettings

Public Member Functions

 RoomSettings (string name)
 Constructor More...
 
boost::shared_ptr< string > Name ()
 The name of the new Room More...
 
void Name (string value)
 The name of the new Room More...
 
boost::shared_ptr< string > Password ()
 The password of the Room. If empty the Room will not be password protected More...
 
void Password (string value)
 The password of the Room. If empty the Room will not be password protected More...
 
bool IsGame ()
 Indicates if this is a Game Room More...
 
void IsGame (bool value)
 Indicates if this is a Game Room More...
 
short int MaxUsers ()
 The maximum number of users/players allowed in the Room More...
 
void MaxUsers (short int value)
 The maximum number of users/players allowed in the Room More...
 
short int MaxVariables ()
 The maximum number of Room Variables allowed for this Room More...
 
void MaxVariables (short int value)
 The maximum number of Room Variables allowed for this Room More...
 
short int MaxSpectators ()
 The maximum number of spectators allowed for this Room (only for Game Rooms) More...
 
void MaxSpectators (short int value)
 The maximum number of spectators allowed for this Room (only for Game Rooms) More...
 
boost::shared_ptr< vector< boost::shared_ptr< RoomVariable > > > Variables ()
 A list of Room Variables that should be attached to the newly created Room More...
 
void Variables (boost::shared_ptr< vector< boost::shared_ptr< RoomVariable > > > value)
 A list of Room Variables that should be attached to the newly created Room More...
 
boost::shared_ptr< RoomPermissionsPermissions ()
 The Room Permission settings of the new Room More...
 
void Permissions (boost::shared_ptr< RoomPermissions > value)
 The Room Permission settings of the new Room More...
 
boost::shared_ptr< RoomEventsEvents ()
 The Room Event settings of the new Room More...
 
void Events (boost::shared_ptr< RoomEvents > value)
 The Room Event settings of the new Room More...
 
boost::shared_ptr< RoomExtensionExtension ()
 The Extension settings for the new Room More...
 
void Extension (boost::shared_ptr< RoomExtension > value)
 The Extension settings for the new Room More...
 
boost::shared_ptr< string > GroupId ()
 The id of the Room Group in which the new Room should be created More...
 
void GroupId (string value)
 The id of the Room Group in which the new Room should be created More...
 
bool AllowOwnerOnlyInvitation ()
 Specifies if the Room allows "Join Room" invitations to be sent by any user or just by its owner. More...
 
void AllowOwnerOnlyInvitation (bool value)
 Specifies if the Room allows "Join Room" invitations to be sent by any user or just by its owner. More...
 

Detailed Description

This class provides the Room settings that you can pass to a CreateRoomRequest

Some of these fields are mandatory and some other are populated by default if you don't specify them.

  • name: mandatory, each Room must have a unique name
  • password: optional, by default a Room is created without a password
  • groupId: optional, by default Rooms are created in the 'default' group if none is specified
  • isGame: optional, by default isGame flage is set to false
  • maxUsers: optional, if no value is provided the default value of 10 is used
  • maxSpectators: optional, if no value is provided the default value of 0 is used
  • maxVariables: optional, if no value is provided the default value of 5 is used
  • variables: optional, an array of RoomVariables to be set at creation time
  • permissions: optional, if no value is provided the default RoomPermissions configuration is used
  • events: optional, if no value is provided the default RoomEvents configuration is used
  • extension: optional. No default values
See also
RoomEvents, RoomPermissions, RoomExtension, CreateRoomRequest

Constructor & Destructor Documentation

◆ RoomSettings()

Sfs2X::Requests::RoomSettings::RoomSettings ( string  name)

Constructor

Parameters
namethe room name
See also
Core.SFSEvent.PUBLIC_MESSAGE, PrivateMessageRequest

Member Function Documentation

◆ AllowOwnerOnlyInvitation() [1/2]

bool Sfs2X::Requests::RoomSettings::AllowOwnerOnlyInvitation ( )

Specifies if the Room allows "Join Room" invitations to be sent by any user or just by its owner.

The default value is true.

See also
Sfs2X.Requests.Game.JoinRoomInvitationRequest

◆ AllowOwnerOnlyInvitation() [2/2]

void Sfs2X::Requests::RoomSettings::AllowOwnerOnlyInvitation ( bool  value)

Specifies if the Room allows "Join Room" invitations to be sent by any user or just by its owner.

The default value is true.

See also
Sfs2X.Requests.Game.JoinRoomInvitationRequest

◆ Events() [1/2]

boost::shared_ptr< RoomEvents > Sfs2X::Requests::RoomSettings::Events ( )

The Room Event settings of the new Room

See also
RoomEvents

◆ Events() [2/2]

void Sfs2X::Requests::RoomSettings::Events ( boost::shared_ptr< RoomEvents value)

The Room Event settings of the new Room

See also
RoomEvents

◆ Extension() [1/2]

boost::shared_ptr< RoomExtension > Sfs2X::Requests::RoomSettings::Extension ( )

The Extension settings for the new Room

See also
RoomExtension

◆ Extension() [2/2]

void Sfs2X::Requests::RoomSettings::Extension ( boost::shared_ptr< RoomExtension value)

The Extension settings for the new Room

See also
RoomExtension

◆ GroupId() [1/2]

boost::shared_ptr< string > Sfs2X::Requests::RoomSettings::GroupId ( )

The id of the Room Group in which the new Room should be created

◆ GroupId() [2/2]

void Sfs2X::Requests::RoomSettings::GroupId ( string  value)

The id of the Room Group in which the new Room should be created

◆ IsGame() [1/2]

bool Sfs2X::Requests::RoomSettings::IsGame ( )

Indicates if this is a Game Room

◆ IsGame() [2/2]

void Sfs2X::Requests::RoomSettings::IsGame ( bool  value)

Indicates if this is a Game Room

◆ MaxSpectators() [1/2]

short int Sfs2X::Requests::RoomSettings::MaxSpectators ( )

The maximum number of spectators allowed for this Room (only for Game Rooms)

◆ MaxSpectators() [2/2]

void Sfs2X::Requests::RoomSettings::MaxSpectators ( short int  value)

The maximum number of spectators allowed for this Room (only for Game Rooms)

◆ MaxUsers() [1/2]

short int Sfs2X::Requests::RoomSettings::MaxUsers ( )

The maximum number of users/players allowed in the Room

◆ MaxUsers() [2/2]

void Sfs2X::Requests::RoomSettings::MaxUsers ( short int  value)

The maximum number of users/players allowed in the Room

◆ MaxVariables() [1/2]

short int Sfs2X::Requests::RoomSettings::MaxVariables ( )

The maximum number of Room Variables allowed for this Room

◆ MaxVariables() [2/2]

void Sfs2X::Requests::RoomSettings::MaxVariables ( short int  value)

The maximum number of Room Variables allowed for this Room

◆ Name() [1/2]

boost::shared_ptr< string > Sfs2X::Requests::RoomSettings::Name ( )

The name of the new Room

◆ Name() [2/2]

void Sfs2X::Requests::RoomSettings::Name ( string  value)

The name of the new Room

◆ Password() [1/2]

boost::shared_ptr< string > Sfs2X::Requests::RoomSettings::Password ( )

The password of the Room. If empty the Room will not be password protected

◆ Password() [2/2]

void Sfs2X::Requests::RoomSettings::Password ( string  value)

The password of the Room. If empty the Room will not be password protected

◆ Permissions() [1/2]

boost::shared_ptr< RoomPermissions > Sfs2X::Requests::RoomSettings::Permissions ( )

The Room Permission settings of the new Room

See also
RoomPermissions

◆ Permissions() [2/2]

void Sfs2X::Requests::RoomSettings::Permissions ( boost::shared_ptr< RoomPermissions value)

The Room Permission settings of the new Room

See also
RoomPermissions

◆ Variables() [1/2]

boost::shared_ptr< vector< boost::shared_ptr< RoomVariable > > > Sfs2X::Requests::RoomSettings::Variables ( )

A list of Room Variables that should be attached to the newly created Room

See also
SFSRoomVariable

◆ Variables() [2/2]

void Sfs2X::Requests::RoomSettings::Variables ( boost::shared_ptr< vector< boost::shared_ptr< RoomVariable > > >  value)

A list of Room Variables that should be attached to the newly created Room

See also
SFSRoomVariable