SFS2X Objective-C API  1.7.13
iOS / macOS / tvOS
ChangeRoomCapacityRequest.h
1 //
2 // ChangeRoomCapacityRequest.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 #import "BaseRequest.h"
12 #import "Room.h"
13 
14 EXTERN NSString * const ChangeRoomCapacityRequest_KEY_ROOM;
15 EXTERN NSString * const ChangeRoomCapacityRequest_KEY_USER_SIZE;
16 EXTERN NSString * const ChangeRoomCapacityRequest_KEY_SPEC_SIZE;
17 
18 /** Changes the capacity of a Room (maxUsers and maxSpectators) at runtime.
19 
20  This request might fail if the User sending the requestis not the owner of the Room. Moderators and Administrator can override this constraint.
21 
22  If the Room was configured so that resizing is not allowed (see the <em>RoomSettings.permissions</em> parameter), the request is ignored and no error is fired.
23 
24  It is possible to "shrink" the Room capacity so that maxUsers < userCount. In this case nothing will happen to the "extra" users.
25  As soon as clients will leave the Room the userCount will get down to the new maxUsers value.
26 
27  Also note that some restrictions are applied to the passed values (i.e. a client can't set the max users to more than 200, or the max spectators to more than 32).
28  */
29 @interface ChangeRoomCapacityRequest : BaseRequest {
30 
31  id<Room> _room;
32  NSInteger _newMaxUsers;
33  NSInteger _newMaxSpect;
34 
35 }
36 
37 
38 /**
39  @param room the Room to resize
40  @param newMaxUsers the new maxUsers value
41  @param newMaxSpect the new maxSpect value
42 
43 
44  @see [ISFSEvents onRoomCapacityChange:]
45  @see [ISFSEvents onRoomCapacityChangeError:]
46  @see ChangeRoomNameRequest
47  @see ChangeRoomPasswordStateRequest
48 
49  */
50 +(id)requestWithRoom:(id<Room>)room newMaxUsers:(NSInteger)newMaxUsers newMaxSpect:(NSInteger)newMaxSpect;
51 
52 @end
ChangeRoomCapacityRequest
Definition: ChangeRoomCapacityRequest.h:29