SFS2X Objective-C API  1.7.13
iOS / macOS / tvOS
RoomSettings.h
1 //
2 // RoomSettings.h
3 // SFS2X
4 //
5 // Original development by Infosfer Game Technologies Ltd. | http://www.infosfer.com.
6 //
7 // Maintained and developed by A51 Integrated.
8 // Copyright 2012 A51 Integrated | http://a51integrated.com. All rights reserved.
9 //
10 
11 
12 #import "RoomPermissions.h"
13 #import "RoomEvents.h"
14 #import "RoomExtension.h"
15 
16 
17 /** This class provides the Room settings that you can pass to a CreateRoomRequest
18 
19  Some of these fields are mandatory and some other are populated by default if you don't specify them.
20 
21  - <b>name:</b> mandatory, each Room must have a unique name
22  - <b>password:</b> optional, by default a Room is created without a password
23  - <b>groupId:</b> optional, by default Rooms are created in the 'default' group if none is specified
24  - <b>isGame:</b> optional, by default isGame flage is set to false
25  - <b>maxUsers:</b> optional, if no value is provided the default value of 10 is used
26  - <b>maxSpectators:</b> optional, if no value is provided the default value of 0 is used
27  - <b>maxVariables:</b> optional, if no value is provided the default value of 5 is used
28  - <b>variables:</b> optional, an array of RoomVariables to be set at creation time
29  - <b>permissions:</b> optional, if no value is provided the default RoomPermissions configuration is used
30  - <b>events:</b> optional, if no value is provided the default RoomEvents configuration is used
31  - <b>extension:</b> optional. No default values
32 
33  @see RoomEvents
34  @see RoomPermissions
35  @see RoomExtension
36  @see CreateRoomRequest
37 
38  */
39 @interface RoomSettings : NSObject {
40 @private
41  NSString *_name;
42  NSString *_password;
43  NSString *_groupId;
44  BOOL _isGame;
45  NSInteger _maxUsers;
46  NSInteger _maxSpectators;
47  NSInteger _maxVariables;
48  NSArray *_variables;
49  RoomPermissions *_permissions;
50  RoomEvents *_events;
51  RoomExtension *_extension;
52 }
53 
54 /** The name of the new Room */
55 @property (strong) NSString *name;
56 /** The password of the Room. If null is used the Room will not be password protected */
57 @property (strong) NSString *password;
58 /** the if of the Room Group in which the new Room should be created */
59 @property (strong) NSString *groupId;
60 /** Indicates if this is a Game Room */
61 @property (assign) BOOL isGame;
62 /** The maximum number of users/players allowed in the Room */
63 @property (assign) NSInteger maxUsers;
64 /** The maximum number of spectators allowed for this Room (only for Game Rooms) */
65 @property (assign) NSInteger maxSpectators;
66 /** The maximum number of Room Variables allowed for this Room */
67 @property (assign) NSInteger maxVariables;
68 
69 /** A list of Room Variables that should be attached to the newly created Room
70 
71  @see SFSRoomVariable
72  */
73 @property (strong) NSArray *variables;
74 
75 /** The Room Permission settings of the new Room
76 
77  @see RoomPermissions
78  */
79 @property (strong) RoomPermissions *permissions;
80 
81 /** The Room Event settings of the new Room
82 
83  @see RoomEvents
84  */
85 @property (strong) RoomEvents *events;
86 
87 
88 /** The Extension settings for the new Room
89 
90  @see RoomExtension
91  */
92 @property (strong) RoomExtension *extension;
93 
94 /**
95  When switched off allows any user in the Room to invite more players. When switched on, allows only the Room's owner
96  to invite other people inside.
97  */
98 @property (assign) BOOL allowOwnerOnlyInvitation; // New in SFS2X 2.12, API 1.7
99 
100 
101 -(id)initWithName:(NSString *)name;
102 +(id)settingsWithName:(NSString *)name;
103 
104 @end
RoomPermissions
Definition: RoomPermissions.h:20
RoomSettings
Definition: RoomSettings.h:39
RoomEvents
Definition: RoomEvents.h:28
RoomExtension
Definition: RoomExtension.h:21