SDK Version 2.0.1
AnsuR Technologies ASMIRA SDK
Loading...
Searching...
No Matches
Chat

Typedefs

typedef void(*) asdk::ChatMessageFunc(const uint32_t clientID, const char *message, const uint32_t size, void *opaque)
 A chat message was received from the joined room.

Functions

Status asdk::sdk_t::SendChatMessage (const char *message)
 Sends a chat message to the currently joined room.
void asdk::sdk_t::SetChatMessageCallback (ChatMessageFunc func, void *opaque=nullptr)
 Chat message callback.

Variables

static const uint32_t asdk::CHAT_MESSAGE_LEN = 256

Detailed Description

Short text messages exchanged between the members of a joined room.

Typedef Documentation

◆ ChatMessageFunc

typedef void(*) asdk::ChatMessageFunc(const uint32_t clientID, const char *message, const uint32_t size, void *opaque)

A chat message was received from the joined room.

clientID is the sender, matching the id given by RoomClientAdded.

Definition at line 914 of file asmirasdk.h.

Function Documentation

◆ SendChatMessage()

Status asdk::sdk_t::SendChatMessage ( const char * message)
inline

Sends a chat message to the currently joined room.

A room has to be joined first. The message is broadcast to the other members of that room and is not echoed back. The server delivers it to every controller, and to the senders, viewers and guests allowed by the room flags (RoomFlagChatSenders, RoomFlagChatViewers, RoomFlagChatGuests). Connect with DeviceCapabilityChat to announce that this client handles chat.

Parameters
messageMessage as plaintext, at most CHAT_MESSAGE_LEN bytes.
Returns
Status

Definition at line 1126 of file asmirasdk.h.

References asdk::StatusErrorHandle.

◆ SetChatMessageCallback()

void asdk::sdk_t::SetChatMessageCallback ( ChatMessageFunc func,
void * opaque = nullptr )
inline

Chat message callback.

Parameters
funcCallback to install.
opaqueCaller data passed back unchanged to every invocation.

Definition at line 1539 of file asmirasdk.h.

Variable Documentation

◆ CHAT_MESSAGE_LEN

const uint32_t asdk::CHAT_MESSAGE_LEN = 256
static

Maximum chat message length in bytes, excluding any terminating null

Definition at line 143 of file asmirasdk.h.