SFS2X Objective-C API  1.7.13
iOS / macOS / tvOS
RoomSettings Class Reference

#import <RoomSettings.h>

Inherits NSObject.

Inherited by MMORoomSettings, and SFSGameSettings.

Instance Methods

(id) - initWithName:
 

Class Methods

(id) + settingsWithName:
 

Properties

NSString * name
 
NSString * password
 
NSString * groupId
 
BOOL isGame
 
NSInteger maxUsers
 
NSInteger maxSpectators
 
NSInteger maxVariables
 
NSArray * variables
 
RoomPermissionspermissions
 
RoomEventsevents
 
RoomExtensionextension
 
BOOL allowOwnerOnlyInvitation
 

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

Property Documentation

◆ allowOwnerOnlyInvitation

- (BOOL) allowOwnerOnlyInvitation
readwriteatomicassign

When switched off allows any user in the Room to invite more players. When switched on, allows only the Room's owner to invite other people inside.

◆ events

- (RoomEvents*) events
readwriteatomicstrong

The Room Event settings of the new Room

See also
RoomEvents

◆ extension

- (RoomExtension*) extension
readwriteatomicstrong

The Extension settings for the new Room

See also
RoomExtension

◆ groupId

- (NSString*) groupId
readwriteatomicstrong

the if of the Room Group in which the new Room should be created

◆ isGame

- (BOOL) isGame
readwriteatomicassign

Indicates if this is a Game Room

◆ maxSpectators

- (NSInteger) maxSpectators
readwriteatomicassign

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

◆ maxUsers

- (NSInteger) maxUsers
readwriteatomicassign

The maximum number of users/players allowed in the Room

◆ maxVariables

- (NSInteger) maxVariables
readwriteatomicassign

The maximum number of Room Variables allowed for this Room

◆ name

- (NSString*) name
readwriteatomicstrong

The name of the new Room

◆ password

- (NSString*) password
readwriteatomicstrong

The password of the Room. If null is used the Room will not be password protected

◆ permissions

- (RoomPermissions*) permissions
readwriteatomicstrong

The Room Permission settings of the new Room

See also
RoomPermissions

◆ variables

- (NSArray*) variables
readwriteatomicstrong

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

See also
SFSRoomVariable