|
virtual void | debugReturn (int debugLevel, const Common::JString &string)=0 |
|
virtual void | onStateChange (int state)=0 |
|
virtual void | connectionErrorReturn (int errorCode)=0 |
|
virtual void | clientErrorReturn (int errorCode)=0 |
|
virtual void | warningReturn (int warningCode)=0 |
|
virtual void | serverErrorReturn (int errorCode)=0 |
|
virtual void | connectReturn (int errorCode, const Common::JString &errorString)=0 |
|
virtual void | disconnectReturn (void)=0 |
|
virtual void | subscribeReturn (const Common::JVector< Common::JString > &channels, const Common::JVector< bool > &results)=0 |
|
virtual void | unsubscribeReturn (const Common::JVector< Common::JString > &channels)=0 |
|
virtual void | onStatusUpdate (const Common::JString &user, int status, bool gotMessage, const Common::Object &message)=0 |
|
virtual void | onGetMessages (const Common::JString &channelName, const Common::JVector< Common::JString > &senders, const Common::JVector< Common::Object > &messages)=0 |
|
virtual void | onPrivateMessage (const Common::JString &sender, const Common::Object &message, const Common::JString &channelName)=0 |
|
Callback interface for Chat client side. Contains callback methods to notify your app about updates. Must be provided to new Chat::Client in constructor
§ debugReturn()
virtual void debugReturn |
( |
int |
debugLevel, |
|
|
const Common::JString & |
string |
|
) |
| |
|
pure virtual |
This is the callback function for debug-messages.
- Parameters
-
debugLevel | one of the values in DebugLevel |
string | the formatted debug string |
- See also
- BaseListener
Implements BaseListener.
§ onStateChange()
virtual void onStateChange |
( |
int |
state | ) |
|
|
pure virtual |
Notifies app that client state changed.
- Parameters
-
- See also
- ClientState::ClientState
§ connectReturn()
virtual void connectReturn |
( |
int |
errorCode, |
|
|
const Common::JString & |
errorString |
|
) |
| |
|
pure virtual |
§ disconnectReturn()
virtual void disconnectReturn |
( |
void |
| ) |
|
|
pure virtual |
§ subscribeReturn()
The result of the subscribe operation. Returns per channel name if the channel is now subscribed.
- Parameters
-
channels | channel names |
results | per channel result: true if subscribed |
§ unsubscribeReturn()
Result of unsubscribe operation. Returns per channel name if the channel is now subscribed.
- Parameters
-
channels | channel names that are no longer subscribed |
§ onStatusUpdate()
The new status of another user (you get updates for users that are in your friends list).
- Parameters
-
user | name of the user |
status | new status of that user |
gotMessage | true if the status contains a message you should cache locally. False: This status update does not include a message (keep any you have). |
message | message that user set |
§ onGetMessages()
Notifies the app that the client got new messages from the server Number of senders is equal to number of messages in 'messages'. Sender with number '0' corresponds to message with number '0', sender with number '1' corresponds to message with number '1' and so on
- Parameters
-
channelName | channel from where messages came |
senders | list of users who sent messages |
messages | list of messages it self |
§ onPrivateMessage()
Notifies the app about a private message
- Parameters
-
sender | user who sent this message |
message | the message itself |
channelName | the channel name for private messages (messages that you sent yourself get added to a channel per target username) |