GOG GALAXY SDK Documentation
|
The interface for chat communication with other Galaxy Users. More...
#include <IChat.h>
Public Member Functions | |
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. More... | |
virtual void | RequestChatRoomMessages (ChatRoomID chatRoomID, uint32_t limit, ChatMessageID referenceMessageID=0, IChatRoomMessagesRetrieveListener *const listener=NULL)=0 |
Retrieves historical messages in a specified chat room. More... | |
virtual uint32_t | SendChatRoomMessage (ChatRoomID chatRoomID, const char *msg, IChatRoomMessageSendListener *const listener=NULL)=0 |
Sends a message to a chat room. More... | |
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. More... | |
virtual uint32_t | GetChatRoomMemberCount (ChatRoomID chatRoomID)=0 |
Returns the number of users in a specified chat room. More... | |
virtual GalaxyID | GetChatRoomMemberUserIDByIndex (ChatRoomID chatRoomID, uint32_t index)=0 |
Returns the GalaxyID of a user in a specified chat room. More... | |
virtual uint32_t | GetChatRoomUnreadMessageCount (ChatRoomID chatRoomID)=0 |
Returns the number of unread messages in a specified chat room. More... | |
virtual void | MarkChatRoomAsRead (ChatRoomID chatRoomID)=0 |
Marks a specified chat room as read. More... | |
The interface for chat communication with other Galaxy Users.
|
pure virtual |
Returns the number of users in a specified chat room.
[in] | chatRoomID | The ID of the chat room. |
|
pure virtual |
Returns the GalaxyID of a user in a specified chat room.
[in] | chatRoomID | The ID of the chat room. |
[in] | index | Index as an integer in the range of [0, number of chat room members). |
|
pure virtual |
Reads an incoming chat room message by index.
This call is non-blocking and operates on the messages available in the IChatRoomMessagesListener, thus instantly finishes.
If the buffer that is supposed to take the message is too small, the message will be truncated to its size. The size of the longest message is provided in the notification about an incoming message from IChatRoomMessagesListener::OnChatRoomMessagesReceived().
[in] | index | Index of the incoming message as an integer in the range of [0, number of messages). |
[out] | messageID | Global ID of the message. |
[out] | messageType | The type of the message. |
[out] | senderID | The ID of the sender of the message. |
[out] | sendTime | The time when the message was sent. |
[in,out] | buffer | The output buffer. |
[in] | bufferLength | The size of the output buffer. |
|
pure virtual |
Returns the number of unread messages in a specified chat room.
[in] | chatRoomID | The ID of the chat room. |
|
pure virtual |
Marks a specified chat room as read.
Marks all the messages in the specified chat room up to the one received last as read.
[in] | chatRoomID | The ID of the chat room. |
|
pure virtual |
Retrieves historical messages in a specified chat room.
This call is asynchronous. Response comes to the IChatRoomMessagesRetrieveListener.
The list of retrieved messages contains a limited number of the latest messages that were sent prior to the one specified as the optional reference message.
[in] | chatRoomID | The ID of the chat room. |
[in] | limit | The maximum number of messages to retrieve or 0 for using default. |
[in] | referenceMessageID | The ID of the oldest of the messages that were already retrieved. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Creates new, or retrieves already existing one-on-one chat room with a specified user.
This call is asynchronous. Response comes to the IChatRoomWithUserRetrieveListener, provided that the chat room was created successfully, in which case chat room data is immediately available.
[in] | userID | The ID of the interlocutor user. |
[in] | listener | The listener for specific operation. |
|
pure virtual |
Sends a message to a chat room.
This call is asynchronous. Result of sending message comes to the IChatRoomMessageSendListener. If message was sent successfully, for all the members in the chat room there comes a notification to the IChatRoomMessagesListener.
[in] | chatRoomID | The ID of the chat room. |
[in] | msg | The message to send. |
[in] | listener | The listener for specific operation. |