#include <IAgoraRtmService.h>
Inherited by
agora::rtm::IFileMessage,
and
agora::rtm::IImageMessage.
◆ ~IMessage()
virtual agora::rtm::IMessage::~IMessage |
( |
|
) |
|
|
inlineprotectedvirtual
|
◆ getMessageId()
virtual long long agora::rtm::IMessage::getMessageId |
( |
|
) |
const |
|
pure virtual
|
Retrieves the unique ID of the message.
- Returns
- The message ID.
◆ getMessageType()
virtual
MESSAGE_TYPE
agora::rtm::IMessage::getMessageType
|
( |
|
) |
const |
|
pure virtual
|
Retrieves the message type.
- Returns
-
The message type. See
MESSAGE_TYPE.
◆ setText()
virtual void agora::rtm::IMessage::setText |
( |
const char * |
str |
) |
|
|
pure virtual
|
Sets the content of a text message, or the text description of a raw message.
- Parameters
-
str |
The text message to be set. Must not exceed 32 KB in length. If the message is a
raw message, ensure that the overall size of the text description and the raw
message data does not exceed 32 KB.
|
◆ getText()
virtual const char * agora::rtm::IMessage::getText |
( |
|
) |
const |
|
pure virtual
|
Retrieves the content of a text message, or the text description of a raw message.
- Returns
-
The content of the received text message, or the text description of the received raw
message.
◆ getRawMessageData()
virtual const char * agora::rtm::IMessage::getRawMessageData
|
( |
|
) |
const |
|
pure virtual
|
Retrieves the starting address of the raw message in the memory.
- Returns
- The starting address of the raw message in the memory.
◆ getRawMessageLength()
virtual int agora::rtm::IMessage::getRawMessageLength |
( |
|
) |
const |
|
pure virtual
|
Retrieves the length of the raw message.
- Returns
- The length of the raw message in Bytes.
◆ getServerReceivedTs()
virtual long long agora::rtm::IMessage::getServerReceivedTs
|
( |
|
) |
const |
|
pure virtual
|
Allows the receiver to retrieve the timestamp of when the messaging server receives this
message.
- Note
-
-
You can infer from the returned timestamp the approximate time as to when
this message was sent.
-
The returned timestamp is on a millisecond time-scale. It is for demonstration
purposes only, not for strict ordering of messages.
- Returns
- The timestamp (ms) of when the messaging server receives this message.
◆ isOfflineMessage()
virtual bool agora::rtm::IMessage::isOfflineMessage |
( |
|
) |
const |
|
pure virtual
|
Allows the receiver to check whether this message has been cached on the server (Applies
to peer-to-peer message only).
- Note
-
-
This method returns false if a message is not cached by the server. Only if the
sender sends the message as an offline message (sets
enableOfflineMessaging
as true) when the specified user is offline, does the method return true when the
user is back online.
-
For now we only cache 200 offline messages for up to seven days for each message
receiver. When the number of the cached messages reaches this limit, the newest
message overrides the oldest one.
- Returns
-
-
true: This message has been cached on the server (the server caches this message
and re-sends it to the receiver when he/she is back online).
- false: This message has not been cached on the server.
◆ release()
virtual void agora::rtm::IMessage::release |
( |
|
) |
|
|
pure virtual
|