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

#import <ChangeRoomCapacityRequest.h>

Inherits BaseRequest.

Class Methods

(id) + requestWithRoom:newMaxUsers:newMaxSpect:
 

Protected Attributes

id< Room > _room
 
NSInteger _newMaxUsers
 
NSInteger _newMaxSpect
 

Detailed Description

Changes the capacity of a Room (maxUsers and maxSpectators) at runtime.

This request might fail if the User sending the requestis not the owner of the Room. Moderators and Administrator can override this constraint.

If the Room was configured so that resizing is not allowed (see the RoomSettings.permissions parameter), the request is ignored and no error is fired.

It is possible to "shrink" the Room capacity so that maxUsers < userCount. In this case nothing will happen to the "extra" users. As soon as clients will leave the Room the userCount will get down to the new maxUsers value.

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).

Method Documentation

◆ requestWithRoom:newMaxUsers:newMaxSpect:

+ (id) requestWithRoom: (id<Room>)  room
newMaxUsers: (NSInteger)  newMaxUsers
newMaxSpect: (NSInteger)  newMaxSpect 
Parameters
roomthe Room to resize
newMaxUsersthe new maxUsers value
newMaxSpectthe new maxSpect value
See also
[ISFSEvents onRoomCapacityChange:]
[ISFSEvents onRoomCapacityChangeError:]
ChangeRoomNameRequest
ChangeRoomPasswordStateRequest