Sendbird Chat SDK for Unreal
Public Member Functions | List of all members
SBDChannelHandler Class Reference

#include <SBDBaseChannel.h>

Public Member Functions

virtual void MessageReceived (SBDBaseChannel *channel, SBDBaseMessage *message)
 
virtual void MessageUpdated (SBDBaseChannel *channel, SBDBaseMessage *message)
 
virtual void ReadReceiptUpdated (SBDGroupChannel *channel)
 
virtual void InvitationReceived (SBDGroupChannel *channel, const std::vector< SBDUser > &invitees, SBDUser &inviter)
 
virtual void InvitationDeclined (SBDGroupChannel *channel, SBDUser &invitee, SBDUser &inviter)
 
virtual void UserJoined (SBDGroupChannel *channel, SBDUser &user)
 
virtual void UserLeft (SBDGroupChannel *channel, SBDUser &user)
 
virtual void UserEntered (SBDOpenChannel *channel, SBDUser &user)
 
virtual void UserExited (SBDOpenChannel *channel, SBDUser &user)
 
virtual void UserMuted (SBDOpenChannel *channel, SBDUser &user)
 
virtual void UserUnmuted (SBDOpenChannel *channel, SBDUser &user)
 
virtual void UserBanned (SBDOpenChannel *channel, SBDUser &user)
 
virtual void UserUnbanned (SBDOpenChannel *channel, SBDUser &user)
 
virtual void ChannelFrozen (SBDOpenChannel *channel)
 
virtual void ChannelUnfrozen (SBDOpenChannel *channel)
 
virtual void ChannelChanged (SBDBaseChannel *channel)
 
virtual void ChannelDeleted (const std::wstring &channel_url, SBDChannelType channel_type)
 
virtual void MessageDeleted (SBDBaseChannel *channel, uint64_t message_id)
 
virtual void ChannelMetaDataCreated (SBDBaseChannel *channel, const std::map< std::wstring, std::wstring > &created_meta_data)
 
virtual void ChannelMetaDataUpdated (SBDBaseChannel *channel, const std::map< std::wstring, std::wstring > &updated_meta_data)
 
virtual void ChannelMetaDataDeleted (SBDBaseChannel *channel, const std::vector< std::wstring > &deleted_meta_data)
 
virtual void ChannelMetaCountersCreated (SBDBaseChannel *channel, const std::map< std::wstring, int64_t > &created_meta_counters)
 
virtual void ChannelMetaCountersUpdated (SBDBaseChannel *channel, const std::map< std::wstring, int64_t > &updated_meta_counters)
 
virtual void ChannelMetaCountersDeleted (SBDBaseChannel *channel, const std::vector< std::wstring > &deleted_meta_counters)
 
virtual void MentionReceived (SBDBaseChannel *channel, SBDBaseMessage *message)
 
virtual void ChannelWasHidden (SBDGroupChannel *channel)
 
virtual void OperatorUpdated (SBDBaseChannel *channel)
 

Detailed Description

An object that adopts the SBDChannelHandler class is responsible for receiving the events in the channel. Some of virtual methods are common for the SBDBaseChannel. However, there are virtual methods for the SBDOpenChannel and SBDGroupChannel exclusive. The SBDChannelHandler can be added by [void AddChannelHandler(std::wstring identifier, SBDChannelHandler* handler)]() in SBDMain. Every SBDChannelHandler method which is added is going to receive events.

Warning
If the object that adopts the SBDChannelHandler class is invalid, the delegate has to be removed by the identifier via [void RemoveChannelHandler(string identifier)]() in SBDMain. If you miss this, it will cause the crash.

Member Function Documentation

◆ ChannelChanged()

virtual void SBDChannelHandler::ChannelChanged ( SBDBaseChannel channel)
inlinevirtual

A callback when an open channel was changed.

Parameters
channelThe open channel.

◆ ChannelDeleted()

virtual void SBDChannelHandler::ChannelDeleted ( const std::wstring &  channel_url,
SBDChannelType  channel_type 
)
inlinevirtual

A callback when an open channel was deleted.

Parameters
channel_urlThe open channel.

◆ ChannelFrozen()

virtual void SBDChannelHandler::ChannelFrozen ( SBDOpenChannel channel)
inlinevirtual

A callback when an open channel was frozen.

Parameters
channelThe open channel.

◆ ChannelMetaCountersCreated()

virtual void SBDChannelHandler::ChannelMetaCountersCreated ( SBDBaseChannel channel,
const std::map< std::wstring, int64_t > &  created_meta_counters 
)
inlinevirtual

A callback when meta counters were created in the channel.

Parameters
channelThe channel that the meta counters were created.
created_meta_countersThe created meta counters.

◆ ChannelMetaCountersDeleted()

virtual void SBDChannelHandler::ChannelMetaCountersDeleted ( SBDBaseChannel channel,
const std::vector< std::wstring > &  deleted_meta_counters 
)
inlinevirtual

A callback when meta counters were deleted in the channel.

Parameters
channelThe channel that the meta counters were deleted.
deleted_meta_countersThe keys of the deleted meta counters.

◆ ChannelMetaCountersUpdated()

virtual void SBDChannelHandler::ChannelMetaCountersUpdated ( SBDBaseChannel channel,
const std::map< std::wstring, int64_t > &  updated_meta_counters 
)
inlinevirtual

A callback when meta counters were updated in the channel.

Parameters
channelThe channel that the meta counters were updated.
updated_meta_countersThe updated meta counters.

◆ ChannelMetaDataCreated()

virtual void SBDChannelHandler::ChannelMetaDataCreated ( SBDBaseChannel channel,
const std::map< std::wstring, std::wstring > &  created_meta_data 
)
inlinevirtual

A callback when meta data was created in the channel.

Parameters
channelThe channel that the meta data was created.
created_meta_dataThe created meta data.

◆ ChannelMetaDataDeleted()

virtual void SBDChannelHandler::ChannelMetaDataDeleted ( SBDBaseChannel channel,
const std::vector< std::wstring > &  deleted_meta_data 
)
inlinevirtual

A callback when meta data was deleted in the channel.

Parameters
channelThe channel that the meta data was deleted.
deleted_meta_dataThe keys of the deleted meta data.

◆ ChannelMetaDataUpdated()

virtual void SBDChannelHandler::ChannelMetaDataUpdated ( SBDBaseChannel channel,
const std::map< std::wstring, std::wstring > &  updated_meta_data 
)
inlinevirtual

A callback when meta data was updated in the channel.

Parameters
channelThe channel that the meta data was updated.
updated_meta_dataThe updated meta data.

◆ ChannelUnfrozen()

virtual void SBDChannelHandler::ChannelUnfrozen ( SBDOpenChannel channel)
inlinevirtual

A callback when an open channel was unfrozen.

Parameters
channelThe open channel.

◆ ChannelWasHidden()

virtual void SBDChannelHandler::ChannelWasHidden ( SBDGroupChannel channel)
inlinevirtual

A callback when the channel was hidden on the other device or by Platform API.

Parameters
channelThe channel where the channel was hidden.

◆ InvitationDeclined()

virtual void SBDChannelHandler::InvitationDeclined ( SBDGroupChannel channel,
SBDUser invitee,
SBDUser inviter 
)
inlinevirtual

A callback when user declined the invitation.

Parameters
channelThe group channel where the invitation is occured.
inviteeInvitee.
inviterInviter.

◆ InvitationReceived()

virtual void SBDChannelHandler::InvitationReceived ( SBDGroupChannel channel,
const std::vector< SBDUser > &  invitees,
SBDUser inviter 
)
inlinevirtual

A callback when users are invited by inviter.

Parameters
channelThe group channel where the invitation is occured.
inviteesInvitees.
inviterInviter.

◆ MentionReceived()

virtual void SBDChannelHandler::MentionReceived ( SBDBaseChannel channel,
SBDBaseMessage message 
)
inlinevirtual

A callback when a mentioned user is received.

Parameters
channelThe channel where the mentioned user is received.
messageThe received message.

◆ MessageDeleted()

virtual void SBDChannelHandler::MessageDeleted ( SBDBaseChannel channel,
uint64_t  message_id 
)
inlinevirtual

A callback when a message was removed in the channel.

Parameters
channelThe base channel.
message_idThe message ID which was removed.

◆ MessageReceived()

virtual void SBDChannelHandler::MessageReceived ( SBDBaseChannel channel,
SBDBaseMessage message 
)
inlinevirtual

A callback when a message is received.

Parameters
channelThe channel where the message is received.
messageThe received message.

◆ MessageUpdated()

virtual void SBDChannelHandler::MessageUpdated ( SBDBaseChannel channel,
SBDBaseMessage message 
)
inlinevirtual

A callback when a message is updated.

Parameters
channelThe channel where the message is updated.
messageThe updated message.

◆ OperatorUpdated()

virtual void SBDChannelHandler::OperatorUpdated ( SBDBaseChannel channel)
inlinevirtual

A callback for when operators change in channel.

Parameters
channelThe BaseChannel the change has occurred.
Since
3.0.37

◆ ReadReceiptUpdated()

virtual void SBDChannelHandler::ReadReceiptUpdated ( SBDGroupChannel channel)
inlinevirtual

A callback when read receipts updated.

Parameters
channelThe group channel where the read receipt updated.

◆ UserBanned()

virtual void SBDChannelHandler::UserBanned ( SBDOpenChannel channel,
SBDUser user 
)
inlinevirtual

A callback when a user was banned in the open channel.

Parameters
channelThe open channel.
userThe user who was banned.

◆ UserEntered()

virtual void SBDChannelHandler::UserEntered ( SBDOpenChannel channel,
SBDUser user 
)
inlinevirtual

A callback when a user enter an open channel.

Parameters
channelThe open channel.
userThe user

◆ UserExited()

virtual void SBDChannelHandler::UserExited ( SBDOpenChannel channel,
SBDUser user 
)
inlinevirtual

A callback when a user exit an open channel.

Parameters
channelThe open channel.
userThe user.

◆ UserJoined()

virtual void SBDChannelHandler::UserJoined ( SBDGroupChannel channel,
SBDUser user 
)
inlinevirtual

A callback when new member joined to the group channel.

Parameters
channelThe group channel.
userThe new user joined to the channel.

◆ UserLeft()

virtual void SBDChannelHandler::UserLeft ( SBDGroupChannel channel,
SBDUser user 
)
inlinevirtual

A callback when current member left from the group channel.

Parameters
channelThe group channel.
userThe member left from the channel.

◆ UserMuted()

virtual void SBDChannelHandler::UserMuted ( SBDOpenChannel channel,
SBDUser user 
)
inlinevirtual

A callback when a user was muted in the open channel.

Parameters
channelThe open channel.
userThe user who was muted.

◆ UserUnbanned()

virtual void SBDChannelHandler::UserUnbanned ( SBDOpenChannel channel,
SBDUser user 
)
inlinevirtual

A callback when a user was unbanned in the open channel.

Parameters
channelThe open channel.
userThe user who was unbanned.

◆ UserUnmuted()

virtual void SBDChannelHandler::UserUnmuted ( SBDOpenChannel channel,
SBDUser user 
)
inlinevirtual

A callback when a user was unmuted in the open channel.

Parameters
channelThe open channel.
userThe user who was unmuted.