Sendbird Chat SDK for Unreal
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
SBDBaseChannel Class Reference

#include <SBDBaseChannel.h>

Inheritance diagram for SBDBaseChannel:
SBDGroupChannel SBDOpenChannel

Public Member Functions

SBDUserMessageSendUserMessage (SBDUserMessageParams &params, std::function< void(SBDUserMessage *, SBDError *)> completion_handler)
 
SBDFileMessageSendFileMessage (const char *file_buf, const std::wstring &filename, int64_t size, const std::wstring &type, std::vector< SBDThumbnailSize > thumbnail_sizes, const std::wstring &data, const std::wstring &custom_type, std::function< void(SBDFileMessage *, SBDError *)> completion_handler)
 
SBDFileMessageSendFileMessage (SBDFileMessageParams &params, std::function< void(SBDFileMessage *, SBDError *)> completion_handler)
 
void DeleteMessage (SBDBaseMessage *message, std::function< void(SBDError *)> completion_handler)
 
void UpdateUserMessage (SBDUserMessage *message, const std::wstring &message_text, const std::wstring &data, const std::wstring &custom_type, std::function< void(SBDUserMessage *, SBDError *)> completion_handler)
 
void UpdateFileMessage (SBDFileMessage *message, const std::wstring &data, const std::wstring &custom_type, std::function< void(SBDFileMessage *, SBDError *)> completion_handler)
 
SBDPreviousMessageListQueryCreatePreviousMessageListQuery ()
 
void CreateMetaCounters (const std::map< std::wstring, int64_t > &meta_counters, std::function< void(const std::map< std::wstring, int64_t > &meta_counters, SBDError *)> completion_handler)
 
void GetMetaCounters (const std::vector< std::wstring > &keys, std::function< void(const std::map< std::wstring, int64_t > &meta_counters, SBDError *)> completion_handler)
 
void GetAllMetaCounters (std::function< void(const std::map< std::wstring, int64_t > &meta_counters, SBDError *)> completion_handler)
 
void UpdateMetaCounters (const std::map< std::wstring, int64_t > &meta_counters, std::function< void(const std::map< std::wstring, int64_t > &meta_counters, SBDError *)> completion_handler)
 
void IncreaseMetaCounters (const std::map< std::wstring, int64_t > &meta_counters, std::function< void(const std::map< std::wstring, int64_t > &meta_counters, SBDError *)> completion_handler)
 
void DecreaseMetaCounters (const std::map< std::wstring, int64_t > &meta_counters, std::function< void(const std::map< std::wstring, int64_t > &meta_counters, SBDError *)> completion_handler)
 
void DeleteMetaCounter (const std::wstring &key, std::function< void(SBDError *)> completion_handler)
 
void DeleteAllMetaCounters (std::function< void(SBDError *)> completion_handler)
 
void CreateMetaData (const std::map< std::wstring, std::wstring > &meta_data, std::function< void(const std::map< std::wstring, std::wstring > &meta_data, SBDError *)> completion_handler)
 
void GetMetaData (const std::vector< std::wstring > &keys, std::function< void(const std::map< std::wstring, std::wstring > &meta_data, SBDError *error)> completion_handler)
 
void GetAllMetaData (std::function< void(const std::map< std::wstring, std::wstring > &meta_data, SBDError *error)> completion_handler)
 
void UpdateMetaData (const std::map< std::wstring, std::wstring > &meta_data, std::function< void(const std::map< std::wstring, std::wstring > &meta_data, SBDError *)> completion_handler)
 
void DeleteMetaData (const std::wstring &key, std::function< void(SBDError *)> completion_handler)
 
void DeleteAllMetaData (std::function< void(SBDError *)> completion_handler)
 
void GetNextMessagesByTimestamp (int64_t timestamp, int64_t next_limit, bool reverse, SBDMessageTypeFilter message_type, const std::wstring &custom_type, std::function< void(const std::vector< SBDBaseMessage * > &, SBDError *)> completion_handler)
 
void GetPreviousMessagesByTimestamp (int64_t timestamp, int64_t prev_limit, bool reverse, SBDMessageTypeFilter message_type, const std::wstring &custom_type, std::function< void(const std::vector< SBDBaseMessage * > &, SBDError *)> completion_handler)
 
void GetMessagesByTimestamp (int64_t timestamp, int64_t prev_limit, int64_t next_limit, bool reverse, SBDMessageTypeFilter message_type, const std::wstring &custom_type, std::function< void(const std::vector< SBDBaseMessage * > &, SBDError *)> completion_handler)
 
void GetNextMessagesByMessageId (int64_t message_id, int64_t next_limit, bool reverse, SBDMessageTypeFilter message_type, const std::wstring &custom_type, std::function< void(const std::vector< SBDBaseMessage * > &, SBDError *)> completion_handler)
 
void GetPreviousMessagesByMessageId (int64_t message_id, int64_t prev_limit, bool reverse, SBDMessageTypeFilter message_type, const std::wstring &custom_type, std::function< void(const std::vector< SBDBaseMessage * > &, SBDError *)> completion_handler)
 
void GetMessagesByMessageId (int64_t message_id, int64_t prev_limit, int64_t next_limit, bool reverse, SBDMessageTypeFilter message_type, const std::wstring &custom_type, std::function< void(const std::vector< SBDBaseMessage * > &, SBDError *)> completion_handler)
 
void AddMessageMetaArrayValues (const std::wstring &channel_url, int64_t message_id, const std::map< std::wstring, std::vector< std::wstring > > &key_value, std::function< void(SBDBaseMessage *, SBDError *)> completion_handler)
 
void AddMessageMetaArrayValues (const std::wstring &channel_url, int64_t message_id, const std::vector< SBDMessageMetaArray > &metaarrays, std::function< void(SBDBaseMessage *, SBDError *)> completion_handler)
 
void RemoveMessageMetaArrayValues (const std::wstring &channel_url, int64_t message_id, const std::map< std::wstring, std::vector< std::wstring > > &key_value, std::function< void(SBDBaseMessage *, SBDError *)> completion_handler)
 
void RemoveMessageMetaArrayValues (const std::wstring &channel_url, int64_t message_id, const std::vector< SBDMessageMetaArray > &metaarrays, std::function< void(SBDBaseMessage *, SBDError *)> completion_handler)
 
void DeleteMessageMetaArrayKeys (const std::wstring &channel_url, int64_t message_id, const std::vector< std::wstring > &metaarray_keys, std::function< void(SBDBaseMessage *, SBDError *)> completion_handler)
 
void CreateMessageMetaArrayKeys (const std::wstring &channel_url, int64_t message_id, const std::vector< std::wstring > &metaarray_keys, std::function< void(SBDBaseMessage *, SBDError *)> completion_handler)
 
SBDUserMessageCopyUserMessage (SBDUserMessage *message, SBDBaseChannel *target_channel, std::function< void(SBDUserMessage *, SBDError *)> completion_handler)
 
SBDFileMessageCopyFileMessage (SBDFileMessage *message, SBDBaseChannel *target_channel, std::function< void(SBDFileMessage *, SBDError *)> completion_handler)
 
void AddOperators (const std::vector< std::wstring > &user_ids, std::function< void(SBDError *)> completion_handler)
 
void RemoveOperators (const std::vector< std::wstring > &user_ids, std::function< void(SBDError *)> completion_handler)
 
void RemoveAllOperators (std::function< void(SBDError *)> completion_handler)
 
SBDOperatorListQueryCreateOperatorListQuery ()
 
void Report (SBDReportCategory report_category, std::wstring report_description, std::function< void(SBDError *)> completion_handler)
 
void ReportUser (SBDUser &offending_user, SBDReportCategory report_category, std::wstring report_description, std::function< void(SBDError *)> completion_handler)
 
void ReportMessage (SBDBaseMessage *message, SBDReportCategory report_category, std::wstring report_description, std::function< void(SBDError *)> completion_handler)
 

Public Attributes

std::wstring channel_url
 
std::wstring name
 
std::wstring cover_url
 
int64_t created_at
 
std::wstring data
 
std::wstring custom_type
 
bool is_group_channel
 
bool is_open_channel
 

Protected Member Functions

 SBDBaseChannel (const std::string &dict)
 

Detailed Description

The SBDBaseChannel class represents the channel where users chat each other. The SBDOpenChannel and the SBDGroupChannel are derived from this class. This class provides the common methods for the SBDOpenChannel and the SBDGroupChannel.

The channel objects are maintained as a single instance in an application. If you create or get channels from the same channel URL, they must be the same instances.

Member Function Documentation

◆ AddMessageMetaArrayValues() [1/2]

void SBDBaseChannel::AddMessageMetaArrayValues ( const std::wstring &  channel_url,
int64_t  message_id,
const std::map< std::wstring, std::vector< std::wstring > > &  key_value,
std::function< void(SBDBaseMessage *, SBDError *)>  completion_handler 
)

AddMessageMetaArrayValues

◆ AddMessageMetaArrayValues() [2/2]

void SBDBaseChannel::AddMessageMetaArrayValues ( const std::wstring &  channel_url,
int64_t  message_id,
const std::vector< SBDMessageMetaArray > &  metaarrays,
std::function< void(SBDBaseMessage *, SBDError *)>  completion_handler 
)

AddMessageMetaArrayValues

◆ AddOperators()

void SBDBaseChannel::AddOperators ( const std::vector< std::wstring > &  user_ids,
std::function< void(SBDError *)>  completion_handler 
)

Add operators to the channel.

Parameters
user_idsuser ids to add as operators.
completion_handlerhandler to register
Since
3.0.37

◆ CopyFileMessage()

SBDFileMessage * SBDBaseChannel::CopyFileMessage ( SBDFileMessage message,
SBDBaseChannel target_channel,
std::function< void(SBDFileMessage *, SBDError *)>  completion_handler 
)

Copies a file message to the target channel.

Parameters
messageFile message object.
target_channelTarget channel object.
completion_handlerThe handler interface to execute. The fileMessage is a user message which is returned from the Sendbird server. The message has a message ID.
Returns
Returns the temporary file message with a request ID. It doesn't have a message ID.

◆ CopyUserMessage()

SBDUserMessage * SBDBaseChannel::CopyUserMessage ( SBDUserMessage message,
SBDBaseChannel target_channel,
std::function< void(SBDUserMessage *, SBDError *)>  completion_handler 
)

Copies a user message to the target channel.

Parameters
messageUser message object.
target_channelTarget channel object.
completion_handlerThe handler interface to execute. The userMessage is a user message which is returned from the Sendbird server. The message has a message ID.
Returns
Returns the temporary user message with a request ID. It doesn't have a message ID.

◆ CreateMessageMetaArrayKeys()

void SBDBaseChannel::CreateMessageMetaArrayKeys ( const std::wstring &  channel_url,
int64_t  message_id,
const std::vector< std::wstring > &  metaarray_keys,
std::function< void(SBDBaseMessage *, SBDError *)>  completion_handler 
)

CreateMessageMetaArrayKeys

◆ CreateMetaCounters()

void SBDBaseChannel::CreateMetaCounters ( const std::map< std::wstring, int64_t > &  meta_counters,
std::function< void(const std::map< std::wstring, int64_t > &meta_counters, SBDError *)>  completion_handler 
)

Creates the meta counters for the channel.

Parameters
meta_countersThe meta counters to be set.
completion_handlerThe handler interface to execute.

◆ CreateMetaData()

void SBDBaseChannel::CreateMetaData ( const std::map< std::wstring, std::wstring > &  meta_data,
std::function< void(const std::map< std::wstring, std::wstring > &meta_data, SBDError *)>  completion_handler 
)

Creates the meta data for the channel.

Parameters
meta_dataThe meta data to be set.
completion_handlerThe handler interface to execute.

◆ CreateOperatorListQuery()

SBDOperatorListQuery * SBDBaseChannel::CreateOperatorListQuery ( )

Creates a query instance to get the operator list from this channel.

Returns
Query to use.
Since
3.0.37

◆ CreatePreviousMessageListQuery()

SBDPreviousMessageListQuery * SBDBaseChannel::CreatePreviousMessageListQuery ( )

Creates SBDPreviousMessageListQuery instance for getting the previous messages list of the channel.

Returns
Returns the message list of the channel.

◆ DecreaseMetaCounters()

void SBDBaseChannel::DecreaseMetaCounters ( const std::map< std::wstring, int64_t > &  meta_counters,
std::function< void(const std::map< std::wstring, int64_t > &meta_counters, SBDError *)>  completion_handler 
)

Decreases the meta counters for the channel.

Parameters
meta_countersThe meta counters to be decreased.
completion_handlerThe handler interface to execute.

◆ DeleteAllMetaCounters()

void SBDBaseChannel::DeleteAllMetaCounters ( std::function< void(SBDError *)>  completion_handler)

Deletes all meta counters for the channel.

Parameters
completion_handlerThe handler interface to execute.

◆ DeleteAllMetaData()

void SBDBaseChannel::DeleteAllMetaData ( std::function< void(SBDError *)>  completion_handler)

Deletes all meta data for the channel.

Parameters
completion_handlerThe handler interface to execute.

◆ DeleteMessage()

void SBDBaseChannel::DeleteMessage ( SBDBaseMessage message,
std::function< void(SBDError *)>  completion_handler 
)

Deletes a message. The message's sender has to be the current user.

Parameters
messageThe message to be deleted.
completion_handlerThe handler interface to execute.

◆ DeleteMessageMetaArrayKeys()

void SBDBaseChannel::DeleteMessageMetaArrayKeys ( const std::wstring &  channel_url,
int64_t  message_id,
const std::vector< std::wstring > &  metaarray_keys,
std::function< void(SBDBaseMessage *, SBDError *)>  completion_handler 
)

DeleteMessageMetaArrayKeys

◆ DeleteMetaCounter()

void SBDBaseChannel::DeleteMetaCounter ( const std::wstring &  key,
std::function< void(SBDError *)>  completion_handler 
)

Deletes the meta counters with key for the channel.

Parameters
keyThe key to be deleted.
completion_handlerThe handler interface to execute.

◆ DeleteMetaData()

void SBDBaseChannel::DeleteMetaData ( const std::wstring &  key,
std::function< void(SBDError *)>  completion_handler 
)

Deletes meta data with key for the channel.

Parameters
keyThe key to be deleted.
completion_handlerThe handler interface to execute.

◆ GetAllMetaCounters()

void SBDBaseChannel::GetAllMetaCounters ( std::function< void(const std::map< std::wstring, int64_t > &meta_counters, SBDError *)>  completion_handler)

Gets all meta counters for the channel.

Parameters
completion_handlerThe handler interface to execute.

◆ GetAllMetaData()

void SBDBaseChannel::GetAllMetaData ( std::function< void(const std::map< std::wstring, std::wstring > &meta_data, SBDError *error)>  completion_handler)

Gets all meta data for the channel.

Parameters
completion_handlerThe handler interface to execute.

◆ GetMessagesByMessageId()

void SBDBaseChannel::GetMessagesByMessageId ( int64_t  message_id,
int64_t  prev_limit,
int64_t  next_limit,
bool  reverse,
SBDMessageTypeFilter  message_type,
const std::wstring &  custom_type,
std::function< void(const std::vector< SBDBaseMessage * > &, SBDError *)>  completion_handler 
)

Gets the previous and next message by the message ID with a limit and ordering.

Parameters
message_idThe standard message ID to load messages.
prev_limitThe previous limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp.
next_limitThe next limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp.
reverseIf yes, the latest message is the index 0.
message_typeMessage type to filter messages.
custom_typeCustom type to filter messages. If filtering isn't required, set SBD_NULL_WSTRING.
completion_handlerThe handler interface to execute.

◆ GetMessagesByTimestamp()

void SBDBaseChannel::GetMessagesByTimestamp ( int64_t  timestamp,
int64_t  prev_limit,
int64_t  next_limit,
bool  reverse,
SBDMessageTypeFilter  message_type,
const std::wstring &  custom_type,
std::function< void(const std::vector< SBDBaseMessage * > &, SBDError *)>  completion_handler 
)

Gets the previous and next message by the timestamp with a limit and ordering.

Parameters
timestampThe standard timestamp to load messages.
prev_limitThe previous limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp.
next_limitThe next limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp.
reverseIf yes, the latest message is the index 0.
message_typeMessage type to filter messages.
custom_typeCustom type to filter messages. If filtering isn't required, set SBD_NULL_WSTRING.
completion_handlerThe handler interface to execute.

◆ GetMetaCounters()

void SBDBaseChannel::GetMetaCounters ( const std::vector< std::wstring > &  keys,
std::function< void(const std::map< std::wstring, int64_t > &meta_counters, SBDError *)>  completion_handler 
)

Gets the meta counters with keys for the channel.

Parameters
keysThe keys to get meta counters.
completion_handlerThe handler interface to execute.

◆ GetMetaData()

void SBDBaseChannel::GetMetaData ( const std::vector< std::wstring > &  keys,
std::function< void(const std::map< std::wstring, std::wstring > &meta_data, SBDError *error)>  completion_handler 
)

Gets the meta data for the channel.

Parameters
keysThe keys to get meta data.
completion_handlerThe handler interface to execute.

◆ GetNextMessagesByMessageId()

void SBDBaseChannel::GetNextMessagesByMessageId ( int64_t  message_id,
int64_t  next_limit,
bool  reverse,
SBDMessageTypeFilter  message_type,
const std::wstring &  custom_type,
std::function< void(const std::vector< SBDBaseMessage * > &, SBDError *)>  completion_handler 
)

Gets the next messages by the message ID with a limit and ordering.

Parameters
message_idThe standard message ID to load messages.
next_limitThe limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp.
reverseIf yes, the latest message is the index 0.
message_typeMessage type to filter messages.
custom_typeCustom type to filter messages. If filtering isn't required, set SBD_NULL_WSTRING.
completion_handlerThe handler interface to execute.

◆ GetNextMessagesByTimestamp()

void SBDBaseChannel::GetNextMessagesByTimestamp ( int64_t  timestamp,
int64_t  next_limit,
bool  reverse,
SBDMessageTypeFilter  message_type,
const std::wstring &  custom_type,
std::function< void(const std::vector< SBDBaseMessage * > &, SBDError *)>  completion_handler 
)

Gets the next messages by the timestamp with a limit and ordering.

Parameters
timestampThe standard timestamp to load messages.
next_limitThe limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp.
reverseIf yes, the latest message is the index 0.
message_typeMessage type to filter messages.
custom_typeCustom type to filter messages. If filtering isn't required, set SBD_NULL_WSTRING.
completion_handlerThe handler interface to execute.

◆ GetPreviousMessagesByMessageId()

void SBDBaseChannel::GetPreviousMessagesByMessageId ( int64_t  message_id,
int64_t  prev_limit,
bool  reverse,
SBDMessageTypeFilter  message_type,
const std::wstring &  custom_type,
std::function< void(const std::vector< SBDBaseMessage * > &, SBDError *)>  completion_handler 
)

Gets the previous messages by the message ID with a limit and ordering.

Parameters
message_idThe standard message ID to load messages.
prev_limitThe limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp.
reverseIf yes, the latest message is the index 0.
message_typeMessage type to filter messages.
custom_typeCustom type to filter messages. If filtering isn't required, set SBD_NULL_WSTRING.
completion_handlerThe handler interface to execute.

◆ GetPreviousMessagesByTimestamp()

void SBDBaseChannel::GetPreviousMessagesByTimestamp ( int64_t  timestamp,
int64_t  prev_limit,
bool  reverse,
SBDMessageTypeFilter  message_type,
const std::wstring &  custom_type,
std::function< void(const std::vector< SBDBaseMessage * > &, SBDError *)>  completion_handler 
)

Gets the previous messages by the timestamp with a limit and ordering.

Parameters
timestampThe standard timestamp to load messages.
prev_limitThe limit for the number of messages. The returned messages could be more than this number if there are messages which have the same timestamp.
reverseIf yes, the latest message is the index 0.
message_typeMessage type to filter messages.
custom_typeCustom type to filter messages. If filtering isn't required, set SBD_NULL_WSTRING.
completion_handlerThe handler interface to execute.

◆ IncreaseMetaCounters()

void SBDBaseChannel::IncreaseMetaCounters ( const std::map< std::wstring, int64_t > &  meta_counters,
std::function< void(const std::map< std::wstring, int64_t > &meta_counters, SBDError *)>  completion_handler 
)

Increases the meta counters for the channel.

Parameters
meta_countersThe meta counters to be increased.
completion_handlerThe handler interface to execute.

◆ RemoveAllOperators()

void SBDBaseChannel::RemoveAllOperators ( std::function< void(SBDError *)>  completion_handler)

Remove all operators from the channel.

Parameters
completion_handlerhandler to register
Since
3.0.37

◆ RemoveMessageMetaArrayValues() [1/2]

void SBDBaseChannel::RemoveMessageMetaArrayValues ( const std::wstring &  channel_url,
int64_t  message_id,
const std::map< std::wstring, std::vector< std::wstring > > &  key_value,
std::function< void(SBDBaseMessage *, SBDError *)>  completion_handler 
)

RemoveMessageMetaArrayValues

◆ RemoveMessageMetaArrayValues() [2/2]

void SBDBaseChannel::RemoveMessageMetaArrayValues ( const std::wstring &  channel_url,
int64_t  message_id,
const std::vector< SBDMessageMetaArray > &  metaarrays,
std::function< void(SBDBaseMessage *, SBDError *)>  completion_handler 
)

RemoveMessageMetaArrayValues

◆ RemoveOperators()

void SBDBaseChannel::RemoveOperators ( const std::vector< std::wstring > &  user_ids,
std::function< void(SBDError *)>  completion_handler 
)

Remove operators from the channel.

Parameters
user_idsuser ids to remove from operators list.
completion_handlerhandler to register
Since
3.0.37

◆ Report()

void SBDBaseChannel::Report ( SBDReportCategory  report_category,
std::wstring  report_description,
std::function< void(SBDError *)>  completion_handler 
)

Reports this channel of inappropriate activities.

Parameters
report_categorySBDReportCategory.
report_descriptionReport description (optional). If this isn't needed, set SBD_NULL_WSTRING.
handlerCallback handler.
Since
3.1.1

◆ ReportMessage()

void SBDBaseChannel::ReportMessage ( SBDBaseMessage message,
SBDReportCategory  report_category,
std::wstring  report_description,
std::function< void(SBDError *)>  completion_handler 
)

Reports a malicious message.

Parameters
messageSBDUserMessage or SBDFileMessage.
report_categorySBDReportCategory.
report_descriptionReport description (optional). If this isn't needed, set SBD_NULL_WSTRING.
handlerCallback handler.
Since
3.1.1

◆ ReportUser()

void SBDBaseChannel::ReportUser ( SBDUser offending_user,
SBDReportCategory  report_category,
std::wstring  report_description,
std::function< void(SBDError *)>  completion_handler 
)

Reports a user of suspicious activities.

Parameters
offending_userOffending user.
report_categorySBDReportCategory.
report_descriptionReport description (optional). If this isn't needed, set SBD_NULL_WSTRING.
handlerCallback handler.
Since
3.1.1

◆ SendFileMessage() [1/2]

SBDFileMessage * SBDBaseChannel::SendFileMessage ( const char *  file_buf,
const std::wstring &  filename,
int64_t  size,
const std::wstring &  type,
std::vector< SBDThumbnailSize thumbnail_sizes,
const std::wstring &  data,
const std::wstring &  custom_type,
std::function< void(SBDFileMessage *, SBDError *)>  completion_handler 
)

Sends a file message with binary file data and custom message type.

Parameters
file_bufBinary file data.
filenameFile<span>name.
sizeFile size.
typeThe type of file.
thumbnail_sizesThumbnail sizes. This parameter is the std::vector of SBDThumbnailSize object and works for image file only.
dataCustom data.
custom_typeCustom message type.
completion_handlerThe handler interface to execute.
Returns
Returns the temporary file message with a request ID. It doesn't have a message ID.

◆ SendFileMessage() [2/2]

SBDFileMessage * SBDBaseChannel::SendFileMessage ( SBDFileMessageParams params,
std::function< void(SBDFileMessage *, SBDError *)>  completion_handler 
)

Sends a file message with SBDFileMessageParams.

Parameters
paramsSBDFileMessageParams.
completion_handlerThe handler interface to execute.
Returns
Returns the temporary file message with a request ID. It doesn't have a message ID.

◆ SendUserMessage()

SBDUserMessage * SBDBaseChannel::SendUserMessage ( SBDUserMessageParams params,
std::function< void(SBDUserMessage *, SBDError *)>  completion_handler 
)

Sends a user message with params.

Parameters
paramsThe message params
completion_handlerThe handler interface to execute.
Returns
Returns the temporary user message with a request ID. It doesn't have a message ID.

◆ UpdateFileMessage()

void SBDBaseChannel::UpdateFileMessage ( SBDFileMessage message,
const std::wstring &  data,
const std::wstring &  custom_type,
std::function< void(SBDFileMessage *, SBDError *)>  completion_handler 
)

Updates a file message. The data and custom type can be updated.

Parameters
messageThe file message to be updated.
dataNew data.
custom_typeNew custom type.
completion_handlerThe handler interface to execute.

◆ UpdateMetaCounters()

void SBDBaseChannel::UpdateMetaCounters ( const std::map< std::wstring, int64_t > &  meta_counters,
std::function< void(const std::map< std::wstring, int64_t > &meta_counters, SBDError *)>  completion_handler 
)

Updates the meta counters for the channel.

Parameters
meta_countersThe meta counters to be updated.
completion_handlerThe handler interface to execute.

◆ UpdateMetaData()

void SBDBaseChannel::UpdateMetaData ( const std::map< std::wstring, std::wstring > &  meta_data,
std::function< void(const std::map< std::wstring, std::wstring > &meta_data, SBDError *)>  completion_handler 
)

Updates the meta data for the channel.

Parameters
meta_dataThe meta data to be updated.
completion_handlerThe handler interface to execute.

◆ UpdateUserMessage()

void SBDBaseChannel::UpdateUserMessage ( SBDUserMessage message,
const std::wstring &  message_text,
const std::wstring &  data,
const std::wstring &  custom_type,
std::function< void(SBDUserMessage *, SBDError *)>  completion_handler 
)

Updates a user message. The message text, data, and custom type can be updated.

Parameters
messageThe user message to be updated.
message_textNew message text.
dataNew data.
custom_typeNew custom type.
completion_handlerThe handler interface to execute.

Member Data Documentation

◆ channel_url

std::wstring SBDBaseChannel::channel_url

The channel URL.

◆ cover_url

std::wstring SBDBaseChannel::cover_url

The channel cover image URL.

◆ created_at

int64_t SBDBaseChannel::created_at

The timestamp when the channel is created.

◆ custom_type

std::wstring SBDBaseChannel::custom_type

The custom type of the channel.

◆ data

std::wstring SBDBaseChannel::data

The custom date of the channel.

◆ is_group_channel

bool SBDBaseChannel::is_group_channel

Checks the channel type. If true, this channel is a group channel.

◆ is_open_channel

bool SBDBaseChannel::is_open_channel

Checks the channel type. If true, this channel is an open channel.

◆ name

std::wstring SBDBaseChannel::name

The name of channel.