objective-c-client-event

iOS

Objective-C Client Events

All Rooms Event

This event is raised in response to the getAllRooms request. It is passed in the registered ZoneRequestListener’s onGetAllRoomsDone request. It exposes the following properties

*result – Result status of the request. *roomIds – room id array of all the rooms.

@ property Byte result ; @ property ( nonatomic , retain ) NSMutableArray * roomIds ; 
All Users Event

This event is raised in response to the getOnlineUsers request. It is passed in the registered ZoneRequestListener’s onGetOnlineUsersDone method. It exposes the following properties

  • result – Result status of the request.
  • usernames – array of usernames for all the online users.
@ property Byte result ; @ property ( nonatomic , retain ) NSMutableArray * userNames ; 
Chat Event

This event is raised when a chat notification is received from a subscribed location such as room or lobby. It is passed in registered NotifyListener’s onChatReceived method. It exposes the following properties

  • message – The string message sent by the sender.
  • sender – The sender of the message.
  • locationId – The id of the location in which the message was sent (eg: room id)
  • isLocationLobby – Is the location a room or lobby.
@ property ( nonatomic , retain ) NSString * sender ; @ property ( nonatomic , retain ) NSString * message ; @ property ( nonatomic , retain ) NSString * locId ; @ property bool isLocationLobby ; 
Connect Event

This event is raised in response to a connectWithUsername request. It is passed in the registered ConnectionRequestListener’s onConnectDone method. It exposes the following properties

  • result – Result status of the request.
@ property Byte result ; 
Live Room Info Event

This event is raised in response to the getLiveRoomInfo or getLiveLobbyInfo request. It is passed in the registered RoomRequestListener’s onGetLiveRoomInfoDone method and in the LobbyRequestListener’s onGetLiveLobbyInfoDone method. It exposes the following properties

  • joinedUsers – Array of usernames who are joined in the room
  • customData – Custom data associated with the room
  • properties – Properties associated with the room (empty for lobby).
  • roomData – The static information structure of the room (or lobby).
  • result – Result status of the request.
@ property ( nonatomic , retain ) NSMutableArray * joinedUsers ; @ property ( nonatomic , retain ) NSString * customData ; @ property ( nonatomic , retain ) NSDictionary * properties ; @ property ( nonatomic , retain ) RoomData * roomData ; @ property Byte result ; 
Live User Info Event

This event is raised in response to the getLiveUserInfo request. It is passed in the registered ZoneRequestListener’s onGetLiverUserInfo request method. It exposes the following properties

  • result – Result status of the request.
  • locationId – The id of the location in which the user is present.
  • name – The username of the user
  • customData – The custom data associated with the user
  • isLocationLobby – Is the users location a room or a lobby.
@ property Byte result ; @ property ( nonatomic , retain ) NSString * locationId ; @ property ( nonatomic , retain ) NSString * name ; @ property ( nonatomic , retain ) NSString * customData ; @ property bool isLocationLobby ; 
Lobby Data

This represents a construct for holding static lobby information. It extends the RoomData class and exposes the following properties

  • Id – The id of the lobby. This is always 0 and is reserved for future if multi-lobby support is added.
  • owner – The owner of the lobby.
  • maxUsers – The max concurrent users allowed in the lobby.
  • name – The name of the lobby.
  • isPrimary – Is the lobby the primary one. This is always true and is reserved for future if multi-lobby support is added.
@ property ( nonatomic , retain ) NSString * name ; @ property ( nonatomic , retain ) NSString * roomId ; @ property ( nonatomic , retain ) NSString * owner ; @ property int maxUsers ; @ property bool isPrimary ; 
Lobby Event

This event is raised in response to requests for join/leave/subscribe/unsubscribe lobby. It is passed in the corresponding methods of the registered LobbyRequestListener. It exposes the following properties.

  • result – Result status of the request.
  • info – The static information structure of the lobby.
@ property ( nonatomic , retain ) LobbyData * info ; @ property Byte result ; 
Room Data

This represents a construct for holding room information. It exposes the following properties

  • roomId – unique id of a room. It is unique across all the rooms.
  • owner – owner of the room (behavior and usage of this meta property is up to the developer)
  • name – name of the room
  • maxUsers – number of maximum users allowed in the room
@ property ( nonatomic , retain ) NSString * roomId ; @ property ( nonatomic , retain ) NSString * owner ; @ property ( nonatomic , retain ) NSString * name ; @ property int maxUsers ; 
Room Event

This event is raised in response to requests for join/leave/subscribe/unsubscribe room. It is passed in the corresponding methods of the registered RoomRequestListener. It exposes the following properties.

  • roomData – The static information structure of the room.
  • result – Result status of the request.
@ property ( nonatomic , retain ) RoomData * roomData ; @ property Byte result ; 
Update Event

This event is raised when a updatePeers notification is received from a subscribed location such as room or lobby. It is passed in registered NotifyListener’s onUpdatePeersReceived method. It exposes the following properties

  • update – The binary data sent in the room.
  • isUDP – Flag to indicate whether the byte array was sent using UDP or TCP.
@ property ( nonatomic , retain ) NSData * update ; @ property Boolean isUDP ; 
Matched Room Event

This event is raised in response to requests for matchmaking request (getRoomwithNUsers/getRoomWithProperties). It is passed in the corresponding methods of the registered ZoneRequestListener. It exposes the following properties.

  • result – Result status of the request.
  • roomData – Array RoomData objects representing each of the matched rooms.
@ property Byte result ; 
@ property ( nonatomic , retain ) NSArray * roomData ; 
Move Event

This event is raised when a move completed notification is received from a subscribed turn based room. It is passed in registered NotifyListener’s onMoveCompleted method. It exposes the following properties

  • moveData – The associated move data.
  • sender – The sender of the move.
  • RoomId – The id of the room in which the move was sent.
  • nextTurn – The username of the user whose turn it is now.
 
    @property(nonatomic,retain) NSString *sender;
    @property(nonatomic,retain) NSString *moveData;
    @property(nonatomic,retain) NSString *nextTurn;
    @property(nonatomic,retain) NSString *roomId;