Public Member Functions | |
| (void) | - onAdminMessage: |
| (void) | - onBuddyList: |
| (void) | - onBuddyListError: |
| (void) | - onBuddyListUpdate: |
| (void) | - onBuddyPermissionRequest: |
| (void) | - onBuddyRoom: |
| (void) | - onConfigLoadFailure: |
| (void) | - onConfigLoadSuccess: |
| (void) | - onConnection: |
| (void) | - onConnectionLost: |
| (void) | - onCreateRoomError: |
| (void) | - onDebugMessage: |
| (void) | - onExtensionResponse: |
| (void) | - onJoinRoom: |
| (void) | - onJoinRoomError: |
| (void) | - onLogin: |
| (void) | - onLogout: |
| (void) | - onModMessage: |
| (void) | - onObjectReceived: |
| (void) | - onPrivateMessage: |
| (void) | - onPublicMessage: |
| (void) | - onRandomKey: |
| (void) | - onRoomAdded: |
| (void) | - onRoomDeleted: |
| (void) | - onRoomLeft: |
| (void) | - onRoomListUpdate: |
| (void) | - onRoomVariablesUpdate: |
| (void) | - onRoundTripResponse: |
| (void) | - onSpectatorSwitched: |
| (void) | - onUserCountChange: |
| (void) | - onUserEnterRoom: |
| (void) | - onUserLeaveRoom: |
| (void) | - onUserVariablesUpdate: |
| - (void) onAdminMessage: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when a message from the Administrator is received. Admin messages are special messages that can be sent by an Administrator to a user or group of users. All client applications should handle this event, or users won't be be able to receive important admin notifications!
The params object contains the following parameters.
| message | : (String) the Administrator's message. |
| - (void) onBuddyList: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when the buddy list for the current user is received or a buddy is added/removed.
The params object contains the following parameters.
| list | : (Array) the buddy list. Refer to the buddyList (INFSmartFoxiPhoneClient) property for a description of the buddy object's properties. |
INFSmartFoxiPhoneClient::_buddyList
- loadBuddyList (INFSmartFoxiPhoneClient)
| - (void) onBuddyListError: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when an error occurs while loading the buddy list.
The params object contains the following parameters.
| error | : (String) the error message. |
| - (void) onBuddyListUpdate: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when the status or variables of a buddy in the buddy list change.
The params object contains the following parameters.
| buddy | : (Object) an object representing the buddy whose status or Buddy Variables have changed. Refer to the buddyList (INFSmartFoxiPhoneClient) property for a description of the buddy object's properties. |
INFSmartFoxiPhoneClient::_buddyList
| - (void) onBuddyPermissionRequest: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when the current user receives a request to be added to the buddy list of another user.
The params object contains the following parameters.
| sender | : (String) the name of the user requesting to add the current user to his/her buddy list. | |
| message | : (String) a message accompaining the permission request. This message can't be sent from the client-side, but it's part of the advanced server-side buddy list features. |
| - (void) onBuddyRoom: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched in response to a getBuddyRoom (INFSmartFoxiPhoneClient) request.
The params object contains the following parameters.
| idList | : (Array) the list of id of the rooms in which the buddy is currently logged; if users can't be present in more than one room at the same time, the list will contain one room id only, at 0 index. |
| - (void) onConfigLoadFailure: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when an error occurs while loading the external SmartFoxClient configuration file.
The params object contains the following parameters.
| message | : (String) the error message. |
| - (void) onConfigLoadSuccess: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when the external SmartFoxClient configuration file has been loaded successfully. This event is dispatched only if the autoConnect parameter of the loadConfig (INFSmartFoxiPhoneClient) method is set to true; otherwise the connection is made and the onConnection event fired.
No parameters are provided.
| - (void) onConnection: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched in response to the connect (INFSmartFoxiPhoneClient) request. The connection to SmartFoxServer may have succeeded or failed: the success parameter must be checked.
The params object contains the following parameters.
| success | : (Boolean) the connection result: true if the connection succeeded, false if the connection failed. | |
| error | : (String) the error message in case of connection failure. |
| - (void) onConnectionLost: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when the connection with SmartFoxServer is closed (either from the client or from the server).
No parameters are provided.
| - (void) onCreateRoomError: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when an error occurs during the creation of a room. Usually this happens when a client tries to create a room but its name is already taken.
The params object contains the following parameters.
| error | : (String) the error message. |
| - (void) onDebugMessage: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when a debug message is traced by the SmartFoxServer API. In order to receive this event you have to previously set the debug (INFSmartFoxiPhoneClient) flag to true.
The params object contains the following parameters.
| message | : (String) the debug message. |
| - (void) onExtensionResponse: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when a command/response from a server-side extension is received.
The params object contains the following parameters.
| dataObj | : (Object) an object containing all the data sent by the server-side extension; by convention, a String property called _cmd should always be present, to distinguish between different responses coming from the same extension. | |
| type | : (String) one of the following response protocol types: INFSMARTFOXCLIENT_XTMSG_TYPE_XML (INFSmartFoxiPhoneClient) , INFSMARTFOXCLIENT_XTMSG_TYPE_STR (INFSmartFoxiPhoneClient) , INFSMARTFOXCLIENT_XTMSG_TYPE_JSON (INFSmartFoxiPhoneClient) . By default INFSMARTFOXCLIENT_XTMSG_TYPE_XML (INFSmartFoxiPhoneClient) is used. |
INFSmartFoxiPhoneClient::INFSMARTFOXCLIENT_XTMSG_TYPE_STR
INFSmartFoxiPhoneClient::INFSMARTFOXCLIENT_XTMSG_TYPE_JSON
- sendXtMessage:cmd:paramObj:type:roomId: (INFSmartFoxiPhoneClient)
| - (void) onJoinRoom: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when a room is joined successfully.
The params object contains the following parameters.
| room | : (Room) the INFSmartFoxRoom object representing the joined room. |
- joinRoom:pword:isSpectator:dontLeave:oldRoom: (INFSmartFoxiPhoneClient)
| - (void) onJoinRoomError: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when an error occurs while joining a room. This error could happen, for example, if the user is trying to join a room which is currently full.
The params object contains the following parameters.
| error | : (String) the error message. |
| - (void) onLogin: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when the login to a SmartFoxServer zone has been attempted.
The params object contains the following parameters.
| success | : (Boolean) the login result: true if the login to the provided zone succeeded; false if login failed. | |
| name | : (String) the user's actual username. | |
| error | : (String) the error message in case of login failure. |
| - (void) onLogout: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when the user logs out successfully. After a successful logout the user is still connected to the server, but he/she has to login again into a zone, in order to be able to interact with the server.
No parameters are provided.
| - (void) onModMessage: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when a message from a Moderator is received.
The params object contains the following parameters.
| message | : (String) the Moderator's message. | |
| sender | : (User) the INFSmartFoxUser object representing the Moderator. |
| - (void) onObjectReceived: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when an Actionscript object is received.
The params object contains the following parameters.
| obj | : (Object) the Actionscript object received. | |
| sender | : (User) the INFSmartFoxUser object representing the user that sent the Actionscript object. |
- sendObject:roomId: (INFSmartFoxiPhoneClient)
- sendObjectToGroup:userList:roomId: (INFSmartFoxiPhoneClient)
| - (void) onPrivateMessage: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when a private chat message is received.
The params object contains the following parameters.
| message | : (String) the private message received. | |
| sender | : (User) the INFSmartFoxUser object representing the user that sent the message; this property is undefined if the sender isn't in the same room of the recipient. | |
| roomId | : (int) the id of the room where the sender is. | |
| userId | : (int) the user id of the sender (useful in case of private messages across different rooms, when the sender object is not available). |
| - (void) onPublicMessage: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when a public chat message is received.
The params object contains the following parameters.
| message | : (String) the public message received. | |
| sender | : (User) the INFSmartFoxUser object representing the user that sent the message. | |
| roomId | : (int) the id of the room where the sender is. |
| - (void) onRandomKey: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched in response to a getRandomKey (INFSmartFoxiPhoneClient) request.
The params object contains the following parameters.
| key | : (String) a unique random key generated by the server. |
| - (void) onRoomAdded: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when a new room is created in the zone where the user is currently logged in.
The params object contains the following parameters.
| room | : (Room) the INFSmartFoxRoom object representing the room that was created. |
| - (void) onRoomDeleted: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when a room is removed from the zone where the user is currently logged in.
The params object contains the following parameters.
| room | : (Room) the INFSmartFoxRoom object representing the room that was removed. |
| - (void) onRoomLeft: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when a room is left in multi-room mode, in response of a leaveRoom (INFSmartFoxiPhoneClient) request.
The params object contains the following parameters.
| roomId | : (int) the id of the room that was left. |
| - (void) onRoomListUpdate: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when the list of rooms available in the current zone is received. If the default login mechanism provided by SmartFoxServer is used, then this event is dispatched right after a successful login. This is because the SmartFoxServer API, internally, call the getRoomList (INFSmartFoxiPhoneClient) method after a successful login is performed. If a custom login handler is implemented, the room list must be manually requested to the server by calling the mentioned method.
The params object contains the following parameters.
| roomList | : (Array) a list of INFSmartFoxRoom objects for the zone logged in by the user. |
| - (void) onRoomVariablesUpdate: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when Room Variables are updated. A user receives this notification only from the room(s) where he/she is currently logged in. Also, only the variables that changed are transmitted.
The params object contains the following parameters.
| room | : (Room) the INFSmartFoxRoom object representing the room where the update took place. | |
| changedVars | : (Array) an associative array with the names of the changed variables as keys. The array can also be iterated through numeric indexes (0 to changedVars.length) to get the names of the variables that changed. NOTE: the changedVars array contains the names of the changed variables only, not the actual values. To retrieve them the getVariable / getVariables methods can be used. |
| - (void) onRoundTripResponse: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when a response to the roundTripBench (INFSmartFoxiPhoneClient) request is received. The "roundtrip time" represents the number of milliseconds that it takes to a message to go from the client to the server and back to the client. A good way to measure the network lag is to send continuos requests (every 3 or 5 seconds) and then calculate the average roundtrip time on a fixed number of responses (i.e. the last 10 measurements).
The params object contains the following parameters.
| elapsed | : (int) the roundtrip time. |
| - (void) onSpectatorSwitched: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched in response to the switchSpectator (INFSmartFoxiPhoneClient) request. The request to turn a spectator into a player may fail if another user did the same before your request, and there was only one player slot available.
The params object contains the following parameters.
| success | : (Boolean) the switch result: true if the spectator was turned into a player, otherwise false. | |
| newId | : (int) the player id assigned by the server to the user. | |
| room | : (Room) the INFSmartFoxRoom object representing the room where the switch occurred. |
| - (void) onUserCountChange: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when the number of users and/or spectators changes in a room within the current zone. This event allows to keep track in realtime of the status of all the zone rooms in terms of users and spectators. In case many rooms are used and the zone handles a medium to high traffic, this notification can be turned off to reduce bandwidth consumption, since a message is broadcasted to all users in the zone each time a user enters or exits a room.
The params object contains the following parameters.
| room | : (Room) the INFSmartFoxRoom object representing the room where the change occurred. |
| - (void) onUserEnterRoom: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when another user joins the current room.
The params object contains the following parameters.
| roomId | : (int) the id of the room joined by a user (useful in case multi-room presence is allowed). | |
| user | : (User) the INFSmartFoxUser object representing the user that joined the room. |
| - (void) onUserLeaveRoom: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when a user leaves the current room. This event is also dispatched when a user gets disconnected from the server.
The params object contains the following parameters.
| roomId | : (int) the id of the room left by a user (useful in case multi-room presence is allowed). | |
| userId | : (int) the id of the user that left the room (or got disconnected). | |
| userName | : (String) the name of the user. |
| - (void) onUserVariablesUpdate: | (INFSmartFoxSFSEvent *) | evt | [optional] |
Dispatched when a user in the current room updates his/her User Variables.
The params object contains the following parameters.
| user | : (User) the INFSmartFoxUser object representing the user who updated his/her variables. | |
| changedVars | : (Array) an associative array with the names of the changed variables as keys. The array can also be iterated through numeric indexes (0 to changedVars.length) to get the names of the variables that changed. NOTE: the changedVars array contains the names of the changed variables only, not the actual values. To retrieve them the getVariable / getVariables methods can be used. |
1.5.8