1 #ifndef GALAXY_I_CHAT_H
2 #define GALAXY_I_CHAT_H
Contains GalaxyID, which is the class that represents the ID of an entity used by Galaxy Peer.
Contains data structures and interfaces related to callback listeners.
Represents the ID of an entity used by Galaxy Peer.
Definition: GalaxyID.h:30
The class that is inherited by all specific callback listeners and provides a static method that retu...
Definition: IListenerRegistrar.h:117
Listener for the event of sending a chat room message.
Definition: IChat.h:85
FailureReason
The reason of a failure in sending a message to a chat room.
Definition: IChat.h:102
@ FAILURE_REASON_FORBIDDEN
Sending messages to the chat room is forbidden for the user.
Definition: IChat.h:104
@ FAILURE_REASON_UNDEFINED
Unspecified error.
Definition: IChat.h:103
@ FAILURE_REASON_CONNECTION_FAILURE
Unable to communicate with backend services.
Definition: IChat.h:105
virtual void OnChatRoomMessageSendSuccess(ChatRoomID chatRoomID, uint32_t sentMessageIndex, ChatMessageID messageID, uint32_t sendTime)=0
Notification for the event of sending a chat room message.
virtual void OnChatRoomMessageSendFailure(ChatRoomID chatRoomID, uint32_t sentMessageIndex, FailureReason failureReason)=0
Notification for the event of a failure in sending a message to a chat room.
Listener for the event of receiving chat room messages.
Definition: IChat.h:127
virtual void OnChatRoomMessagesReceived(ChatRoomID chatRoomID, uint32_t messageCount, uint32_t longestMessageLenght)=0
Notification for the event of receiving chat room messages.
Listener for the event of retrieving chat room messages in a specified chat room.
Definition: IChat.h:155
FailureReason
The reason of a failure in retrieving chat room messages in a specified chat room.
Definition: IChat.h:173
@ FAILURE_REASON_FORBIDDEN
Retrieving messages from the chat room is forbidden for the user.
Definition: IChat.h:175
@ FAILURE_REASON_UNDEFINED
Unspecified error.
Definition: IChat.h:174
@ FAILURE_REASON_CONNECTION_FAILURE
Unable to communicate with backend services.
Definition: IChat.h:176
virtual void OnChatRoomMessagesRetrieveFailure(ChatRoomID chatRoomID, FailureReason failureReason)=0
Notification for the event of a failure in retrieving chat room messages in a specified chat room.
virtual void OnChatRoomMessagesRetrieveSuccess(ChatRoomID chatRoomID, uint32_t messageCount, uint32_t longestMessageLenght)=0
Notification for the event of retrieving chat room messages in a specified chat room.
Listener for the event of retrieving a chat room with a specified user.
Definition: IChat.h:46
virtual void OnChatRoomWithUserRetrieveSuccess(GalaxyID userID, ChatRoomID chatRoomID)=0
Notification for the event of retrieving a chat room with a specified user.
FailureReason
The reason of a failure in retrieving a chat room with a specified user.
Definition: IChat.h:61
@ FAILURE_REASON_FORBIDDEN
Communication with a specified user is not allowed.
Definition: IChat.h:63
@ FAILURE_REASON_UNDEFINED
Unspecified error.
Definition: IChat.h:62
@ FAILURE_REASON_CONNECTION_FAILURE
Unable to communicate with backend services.
Definition: IChat.h:64
virtual void OnChatRoomWithUserRetrieveFailure(GalaxyID userID, FailureReason failureReason)=0
Notification for the event of a failure in retrieving a chat room with a specified user.
The interface for chat communication with other Galaxy Users.
Definition: IChat.h:197
virtual uint32_t SendChatRoomMessage(ChatRoomID chatRoomID, const char *msg, IChatRoomMessageSendListener *const listener=NULL)=0
Sends a message to a chat room.
virtual void MarkChatRoomAsRead(ChatRoomID chatRoomID)=0
Marks a specified chat room as read.
virtual void RequestChatRoomWithUser(GalaxyID userID, IChatRoomWithUserRetrieveListener *const listener=NULL)=0
Creates new, or retrieves already existing one-on-one chat room with a specified user.
virtual uint32_t GetChatRoomMemberCount(ChatRoomID chatRoomID)=0
Returns the number of users in a specified chat room.
virtual GalaxyID GetChatRoomMemberUserIDByIndex(ChatRoomID chatRoomID, uint32_t index)=0
Returns the GalaxyID of a user in a specified chat room.
virtual void RequestChatRoomMessages(ChatRoomID chatRoomID, uint32_t limit, ChatMessageID referenceMessageID=0, IChatRoomMessagesRetrieveListener *const listener=NULL)=0
Retrieves historical messages in a specified chat room.
virtual uint32_t GetChatRoomUnreadMessageCount(ChatRoomID chatRoomID)=0
Returns the number of unread messages in a specified chat room.
virtual uint32_t GetChatRoomMessageByIndex(uint32_t index, ChatMessageID &messageID, ChatMessageType &messageType, GalaxyID &senderID, uint32_t &sendTime, char *buffer, uint32_t bufferLength)=0
Reads an incoming chat room message by index.
The class that is inherited by the self-registering versions of all specific callback listeners.
Definition: IListenerRegistrar.h:211
SelfRegisteringListener< IChatRoomMessageSendListener > GlobalChatRoomMessageSendListener
Globally self-registering version of IChatRoomMessageSendListener.
Definition: IChat.h:121
SelfRegisteringListener< IChatRoomMessagesRetrieveListener > GlobalChatRoomMessagesRetrieveListener
Globally self-registering version of IChatRoomMessagesRetrieveListener.
Definition: IChat.h:191
uint64_t ChatMessageID
Global ID of a chat message.
Definition: IChat.h:30
uint64_t ChatRoomID
The ID of a chat room.
Definition: IChat.h:25
SelfRegisteringListener< IChatRoomWithUserRetrieveListener > GlobalChatRoomWithUserRetrieveListener
Globally self-registering version of IChatRoomWithUserRetrieveListener.
Definition: IChat.h:79
SelfRegisteringListener< IChatRoomMessagesListener > GlobalChatRoomMessagesListener
Globally self-registering version of IChatRoomMessagesListener.
Definition: IChat.h:149
ChatMessageType
The type of a chat message.
Definition: IChat.h:36
@ CHAT_MESSAGE_TYPE_GAME_INVITATION
Game invitation.
Definition: IChat.h:39
@ CHAT_MESSAGE_TYPE_CHAT_MESSAGE
Chat message.
Definition: IChat.h:38
@ CHAT_MESSAGE_TYPE_UNKNOWN
Unknown message type.
Definition: IChat.h:37