#include <IChatService.h>
Inherits istd::IPolymorphic.
Inherited by imtchat::CChatServiceComp [virtual].
|
| virtual QByteArray | SendMessage (const QByteArray &conversationId, const QString &content, const QByteArrayList &entityReferences=QByteArrayList(), const QByteArrayList &attachmentIds=QByteArrayList())=0 |
| |
| virtual QByteArrayList | GetMessages (const QByteArray &conversationId, int offset=0, int limit=50) const =0 |
| |
| virtual QByteArray | CreateConversation (const QString &name, int conversationType, const QByteArrayList &participantIds)=0 |
| |
| virtual QByteArrayList | GetConversations (int offset=0, int limit=-1) const =0 |
| |
| virtual bool | MarkMessageRead (const QByteArray &conversationId, const QByteArray &messageId)=0 |
| |
Service interface for chat operations.
Provides operations for sending and retrieving messages, managing conversations, and marking messages as read.
Definition at line 24 of file IChatService.h.
◆ CreateConversation()
| virtual QByteArray imtchat::IChatService::CreateConversation |
( |
const QString & |
name, |
|
|
int |
conversationType, |
|
|
const QByteArrayList & |
participantIds |
|
) |
| |
|
pure virtual |
Create a new conversation.
- Parameters
-
| name | Display name. |
| conversationType | Type (0 = Direct, 1 = Group, 2 = Channel, 3 = Support). |
| participantIds | Initial participant list. |
- Returns
- New conversation ID, or empty on failure.
◆ GetConversations()
| virtual QByteArrayList imtchat::IChatService::GetConversations |
( |
int |
offset = 0, |
|
|
int |
limit = -1 |
|
) |
| const |
|
pure virtual |
Retrieve conversation IDs accessible to the current user.
- Parameters
-
| offset | Pagination offset. |
| limit | Maximum number of conversations (-1 = all). |
- Returns
- List of conversation IDs.
◆ GetMessages()
| virtual QByteArrayList imtchat::IChatService::GetMessages |
( |
const QByteArray & |
conversationId, |
|
|
int |
offset = 0, |
|
|
int |
limit = 50 |
|
) |
| const |
|
pure virtual |
Retrieve messages for a conversation.
- Parameters
-
| conversationId | Conversation to query. |
| offset | Pagination offset. |
| limit | Maximum number of messages to return (-1 = all). |
- Returns
- List of message IDs in chronological order.
◆ MarkMessageRead()
| virtual bool imtchat::IChatService::MarkMessageRead |
( |
const QByteArray & |
conversationId, |
|
|
const QByteArray & |
messageId |
|
) |
| |
|
pure virtual |
Mark a message as read for the current user.
- Parameters
-
| conversationId | The conversation containing the message. |
| messageId | The message to mark as read. |
- Returns
- True on success.
◆ SendMessage()
| virtual QByteArray imtchat::IChatService::SendMessage |
( |
const QByteArray & |
conversationId, |
|
|
const QString & |
content, |
|
|
const QByteArrayList & |
entityReferences = QByteArrayList(), |
|
|
const QByteArrayList & |
attachmentIds = QByteArrayList() |
|
) |
| |
|
pure virtual |
Send a message to a conversation.
- Parameters
-
| conversationId | Target conversation ID. |
| content | Message text content. |
| entityReferences | Optional entity reference IDs. |
| attachmentIds | Optional attachment IDs. |
- Returns
- New message ID, or empty on failure.