Room Protocol Reference
| Conforms to | NSObject |
| Declared in | Room.h |
Tasks
-
– idThe unique Id of the Room
required method -
– nameThe unique name of the Room
required method -
– groupIdThe Room Group name. Each Group is identified by a unique String and it represent a different ‘container’ for Rooms.
required method -
– isJoinedReturns true if the Room is joined by the client User
required method -
– isGameReturns true is this is a game Room
required method -
– isHiddenReturns true if the Room hidden flag is turned on. The flag can be used to hide the rooms marked with this flag from the User
required method -
– isPasswordProtectedReturns true if the Room requires a password to be joined
required method -
– userCountGet the number of Users in the Room
required method -
– maxUsersGet the max number of Users allowed in the Room
required method -
– spectatorCountGet the number of Spectators in the Room (applies only for game Rooms)
required method -
– maxSpectatorsGet the max number of Spectators allowed in the Room (applies only for game Rooms)
required method -
– containsUser:Returns true if the the User is found in this Room
required method -
– getUserByName:Finds a User from its name
required method -
– getUserById:Finds a User from its Id
required method -
– userListThe Room User-list
required method -
– playerListReturns all the Users that are players in this Room (must be Game Room)
required method -
– spectatorListReturns all the Users that are spectators in this Room (must be Game Room)
required method -
– getVariable:Gets a RoomVariable in the Room
required method -
– getVariablesReturn the full list of RoomVariables in the Room
required method -
– containsVariable:Returns true if a RoomVariable with the passed name exists in the Room
required method -
– propertiesA generic object that can be used to store any Room custom data needed at runtime. The values added/removed in this object are for client side use only an are never transmitted to the Server.
required method -
– roomManagerA reference to the RoomManager, managing this Room
required method
Instance Methods
containsUser:
Returns true if the the User is found in this Room
- (BOOL)containsUser:(id<User>)userDiscussion
Returns true if the the User is found in this Room
Declared In
Room.hcontainsVariable:
Returns true if a RoomVariable with the passed name exists in the Room
- (BOOL)containsVariable:(NSString *)nameDiscussion
Returns true if a RoomVariable with the passed name exists in the Room
See Also
Declared In
Room.hgetUserById:
Finds a User from its Id
- (id<User>)getUserById:(NSInteger)idParameters
- id
the User Id
Return Value
the User or null if not found
Discussion
Finds a User from its Id
Declared In
Room.hgetUserByName:
Finds a User from its name
- (id<User>)getUserByName:(NSString *)nameParameters
- name
the User name
Return Value
the User or nil if not found
Discussion
Finds a User from its name
Declared In
Room.hgetVariable:
Gets a RoomVariable in the Room
- (id<RoomVariable>)getVariable:(NSString *)nameParameters
- name
: the variable name
Return Value
the RoomVariable or nil if the variable doesn’t exist
Discussion
Gets a RoomVariable in the Room
See Also
Declared In
Room.hgetVariables
Return the full list of RoomVariables in the Room
- (NSArray *)getVariablesDiscussion
Return the full list of RoomVariables in the Room
See Also
Declared In
Room.hgroupId
The Room Group name. Each Group is identified by a unique String and it represent a different ‘container’ for Rooms.
- (NSString *)groupIdDiscussion
The Room Group name. Each Group is identified by a unique String and it represent a different ‘container’ for Rooms.
The idea behind the Room Groups is to enable the developer to organize Rooms under different types or categories and let clients select only those Groups they are interested in. This is done via the SubscribeRoomGroupRequest and UnsubscribeRoomGroupRequest requests.
Declared In
Room.hid
The unique Id of the Room
- (NSInteger)idDiscussion
The unique Id of the Room
Declared In
Room.hisGame
Returns true is this is a game Room
- (BOOL)isGameDiscussion
Returns true is this is a game Room
Declared In
Room.hisHidden
Returns true if the Room hidden flag is turned on. The flag can be used to hide the rooms marked with this flag from the User
- (BOOL)isHiddenDiscussion
Returns true if the Room hidden flag is turned on. The flag can be used to hide the rooms marked with this flag from the User
Declared In
Room.hisJoined
Returns true if the Room is joined by the client User
- (BOOL)isJoinedDiscussion
Returns true if the Room is joined by the client User
Declared In
Room.hisPasswordProtected
Returns true if the Room requires a password to be joined
- (BOOL)isPasswordProtectedDiscussion
Returns true if the Room requires a password to be joined
Declared In
Room.hmaxSpectators
Get the max number of Spectators allowed in the Room (applies only for game Rooms)
- (NSInteger)maxSpectatorsDiscussion
Get the max number of Spectators allowed in the Room (applies only for game Rooms)
Declared In
Room.hmaxUsers
Get the max number of Users allowed in the Room
- (NSInteger)maxUsersDiscussion
Get the max number of Users allowed in the Room
Declared In
Room.hname
The unique name of the Room
- (NSString *)nameDiscussion
The unique name of the Room
Declared In
Room.hplayerList
Returns all the Users that are players in this Room (must be Game Room)
- (NSArray *)playerListDiscussion
Returns all the Users that are players in this Room (must be Game Room)
Declared In
Room.hproperties
A generic object that can be used to store any Room custom data needed at runtime. The values added/removed in this object are for client side use only an are never transmitted to the Server.
- (NSDictionary *)propertiesDiscussion
A generic object that can be used to store any Room custom data needed at runtime. The values added/removed in this object are for client side use only an are never transmitted to the Server.
Declared In
Room.hroomManager
A reference to the RoomManager, managing this Room
- (id<IRoomManager>)roomManagerDiscussion
A reference to the RoomManager, managing this Room
Declared In
Room.hspectatorCount
Get the number of Spectators in the Room (applies only for game Rooms)
- (NSInteger)spectatorCountDiscussion
Get the number of Spectators in the Room (applies only for game Rooms)
Declared In
Room.hspectatorList
Returns all the Users that are spectators in this Room (must be Game Room)
- (NSArray *)spectatorListDiscussion
Returns all the Users that are spectators in this Room (must be Game Room)
Declared In
Room.h