Conforms to NSObject
Declared in Room.h

Overview

See SFSRoom

Tasks

  • – id

    The unique Id of the Room

    required method
  • – name

    The unique name of the Room

    required method
  • – groupId

    The Room Group name. Each Group is identified by a unique String and it represent a different ‘container’ for Rooms.

    required method
  • – isJoined

    Returns true if the Room is joined by the client User

    required method
  • – isGame

    Returns true is this is a game Room

    required method
  • – isHidden

    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

    required method
  • – isPasswordProtected

    Returns true if the Room requires a password to be joined

    required method
  • – userCount

    Get the number of Users in the Room

    required method
  • – maxUsers

    Get the max number of Users allowed in the Room

    required method
  • – spectatorCount

    Get the number of Spectators in the Room (applies only for game Rooms)

    required method
  • – maxSpectators

    Get 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
  • – userList

    The Room User-list

    required method
  • – playerList

    Returns all the Users that are players in this Room (must be Game Room)

    required method
  • – spectatorList

    Returns all the Users that are spectators in this Room (must be Game Room)

    required method
  • – getVariable:

    Gets a RoomVariable in the Room

    required method
  • – getVariables

    Return 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
  • – properties

    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.

    required method
  • – roomManager

    A 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>)user

Discussion

Returns true if the the User is found in this Room

Declared In

Room.h

containsVariable:

Returns true if a RoomVariable with the passed name exists in the Room

- (BOOL)containsVariable:(NSString *)name

Discussion

Returns true if a RoomVariable with the passed name exists in the Room

See Also

Declared In

Room.h

getUserById:

Finds a User from its Id

- (id<User>)getUserById:(NSInteger)id

Parameters

id

the User Id

Return Value

the User or null if not found

Discussion

Finds a User from its Id

Declared In

Room.h

getUserByName:

Finds a User from its name

- (id<User>)getUserByName:(NSString *)name

Parameters

name

the User name

Return Value

the User or nil if not found

Discussion

Finds a User from its name

Declared In

Room.h

getVariable:

Gets a RoomVariable in the Room

- (id<RoomVariable>)getVariable:(NSString *)name

Parameters

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

getVariables

Return the full list of RoomVariables in the Room

- (NSArray *)getVariables

Discussion

Return the full list of RoomVariables in the Room

See Also

Declared In

Room.h

groupId

The Room Group name. Each Group is identified by a unique String and it represent a different ‘container’ for Rooms.

- (NSString *)groupId

Discussion

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

id

The unique Id of the Room

- (NSInteger)id

Discussion

The unique Id of the Room

Declared In

Room.h

isGame

Returns true is this is a game Room

- (BOOL)isGame

Discussion

Returns true is this is a game Room

Declared In

Room.h

isHidden

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

Discussion

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

isJoined

Returns true if the Room is joined by the client User

- (BOOL)isJoined

Discussion

Returns true if the Room is joined by the client User

Declared In

Room.h

isPasswordProtected

Returns true if the Room requires a password to be joined

- (BOOL)isPasswordProtected

Discussion

Returns true if the Room requires a password to be joined

Declared In

Room.h

maxSpectators

Get the max number of Spectators allowed in the Room (applies only for game Rooms)

- (NSInteger)maxSpectators

Discussion

Get the max number of Spectators allowed in the Room (applies only for game Rooms)

Declared In

Room.h

maxUsers

Get the max number of Users allowed in the Room

- (NSInteger)maxUsers

Discussion

Get the max number of Users allowed in the Room

Declared In

Room.h

name

The unique name of the Room

- (NSString *)name

Discussion

The unique name of the Room

Declared In

Room.h

playerList

Returns all the Users that are players in this Room (must be Game Room)

- (NSArray *)playerList

Discussion

Returns all the Users that are players in this Room (must be Game Room)

Declared In

Room.h

properties

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 *)properties

Discussion

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

roomManager

A reference to the RoomManager, managing this Room

- (id<IRoomManager>)roomManager

Discussion

A reference to the RoomManager, managing this Room

Declared In

Room.h

spectatorCount

Get the number of Spectators in the Room (applies only for game Rooms)

- (NSInteger)spectatorCount

Discussion

Get the number of Spectators in the Room (applies only for game Rooms)

Declared In

Room.h

spectatorList

Returns all the Users that are spectators in this Room (must be Game Room)

- (NSArray *)spectatorList

Discussion

Returns all the Users that are spectators in this Room (must be Game Room)

Declared In

Room.h

userCount

Get the number of Users in the Room

- (NSInteger)userCount

Discussion

Get the number of Users in the Room

Declared In

Room.h

userList

The Room User-list

- (NSArray *)userList

Discussion

The Room User-list

Declared In

Room.h