21 class IChatChannelListener;
22 class IChatAPIListener;
23 class IChatUserThreadsListener;
24 class IChatReplayListener;
26 struct ChatChannelListenerProxy;
50 virtual void ChatChannelMessagesReceived(
UserId userId,
ChannelId channelId,
const std::vector<LiveChatMessage>& messageList) = 0;
58 virtual void ChatChannelMessagesCleared(
UserId userId,
ChannelId channelId) = 0;
62 virtual void ChatChannelUserMessagesCleared(
UserId userId,
ChannelId channelId,
UserId clearUserId) = 0;
63 virtual void ChatChannelHostTargetChanged(
UserId userId,
ChannelId channelId,
const std::string& targetChannelName, uint32_t numViewers) = 0;
64 virtual void ChatChannelNoticeReceived(
UserId userId,
ChannelId channelId,
const std::string& noticeId,
const std::map<std::string, std::string>& params) = 0;
73 virtual void ChatThreadRealtimeMessageReceived(
UserId userId,
const std::string& threadId,
const WhisperMessage& messageList) = 0;
74 virtual void ChatThreadParticipantsUpdated(
UserId userId,
const std::string& threadId,
const std::vector<ChatUserInfo>& participants) = 0;
75 virtual void ChatThreadUnreadMessageWindowChanged(
UserId userId,
const std::string& threadId,
MessageId lastMessageId,
MessageId lastReadMessageId) = 0;
76 virtual void ChatThreadMutedStatusChanged(
UserId userId,
const std::string& threadId,
bool muted) = 0;
77 virtual void ChatThreadRemoved(
UserId userId,
const std::string& threadId) = 0;
92 virtual void ChatReplayCurrentTimeChanged(
UserId userId,
const std::string& vodId,
Timestamp time) = 0;
97 virtual void ChatReplayMessagesReceived(
UserId userId,
const std::string& vodId,
const std::vector<ReplayMessage>& messageList) = 0;
101 virtual void ChatReplayDeleteMessageComplete(
UserId userId,
const std::string& vodId,
const std::string& messageId,
TTV_ErrorCode ec) = 0;
119 using ChatChannelNoticeReceivedCallback = std::function<void(UserId userId, ChannelId channelId, const std::string& noticeId, const std::map<std::string, std::string>& params)>;
125 if (chatChannelStateChangedCallback !=
nullptr)
127 chatChannelStateChangedCallback(userId, channelId, state, ec);
133 if (chatChannelInfoChangedCallback !=
nullptr)
135 chatChannelInfoChangedCallback(userId, channelId, channelInfo);
141 if (chatChannelRestrictionsChangedCallback !=
nullptr)
143 chatChannelRestrictionsChangedCallback(userId, channelId, restrictions);
149 if (chatChannelLocalUserChangedCallback !=
nullptr)
151 chatChannelLocalUserChangedCallback(userId, channelId, userInfo);
157 if (chatChannelSubscriptionNoticeReceivedCallback !=
nullptr)
159 chatChannelSubscriptionNoticeReceivedCallback(userId, channelId, notice);
165 if (chatChannelFirstTimeChatterNoticeReceivedCallback !=
nullptr)
167 chatChannelFirstTimeChatterNoticeReceivedCallback(userId, channelId, notice);
173 if (chatChannelRaidNoticeReceivedCallback !=
nullptr)
175 chatChannelRaidNoticeReceivedCallback(userId, channelId, notice);
181 if (chatChannelUnraidNoticeReceivedCallback !=
nullptr)
183 chatChannelUnraidNoticeReceivedCallback(userId, channelId, notice);
189 if (chatChannelMessagesReceivedCallback !=
nullptr)
191 chatChannelMessagesReceivedCallback(userId, channelId, messageList);
197 if (chatChannelMessagesClearedCallback !=
nullptr)
199 chatChannelMessagesClearedCallback(userId, channelId);
205 if (chatChannelUserMessagesClearedCallback !=
nullptr)
207 chatChannelUserMessagesClearedCallback(userId, channelId, clearUserId);
213 if (chatChannelHostTargetChangedCallback !=
nullptr)
215 chatChannelHostTargetChangedCallback(userId, channelId, targetChannel, numViewers);
221 if (chatChannelNoticeReceivedCallback !=
nullptr)
223 chatChannelNoticeReceivedCallback(userId, channelId, noticeId, params);
uint32_t UserId
Definition: coretypes.h:22
std::function< void(UserId userId, ChannelId channelId, const std::string ¬iceId, const std::map< std::string, std::string > ¶ms)> ChatChannelNoticeReceivedCallback
Definition: chatlistener.h:119
std::function< void(UserId userId, ChannelId channelId, const ChatChannelInfo &channelInfo)> ChatChannelInfoChangedCallback
Definition: chatlistener.h:108
ChatReplayState
Definition: chattypes.h:547
std::function< void(UserId userId, ChannelId channelId, const RaidNotice ¬ice)> ChatChannelRaidNoticeReceivedCallback
Definition: chatlistener.h:113
Definition: chatlistener.h:105
Definition: chattypes.h:161
ChatChannelMessagesClearedCallback chatChannelMessagesClearedCallback
Definition: chatlistener.h:236
Definition: chattypes.h:369
virtual void ChatChannelLocalUserChanged(UserId userId, ChannelId channelId, const ChatUserInfo &userInfo) override
Definition: chatlistener.h:147
virtual void ChatChannelSubscriptionNoticeReceived(UserId userId, ChannelId channelId, const SubscriptionNotice ¬ice) override
Definition: chatlistener.h:155
uint32_t MessageId
Definition: chattypes.h:26
Definition: chattypes.h:169
std::function< void(UserId userId, ChannelId channelId, ChatChannelState state, TTV_ErrorCode ec)> ChatChannelStateChangedCallback
Definition: chatlistener.h:107
std::function< void(UserId userId, ChannelId channelId, const ChatUserInfo &userInfo)> ChatChannelLocalUserChangedCallback
Definition: chatlistener.h:110
virtual void ChatChannelMessagesCleared(UserId userId, ChannelId channelId) override
Definition: chatlistener.h:195
uint32_t Timestamp
Definition: coretypes.h:27
std::function< void(UserId userId, ChannelId channelId, const std::vector< LiveChatMessage > &messageList)> ChatChannelMessagesReceivedCallback
Definition: chatlistener.h:115
std::function< void(UserId userId, ChannelId channelId, const ChatChannelRestrictions &restrictions)> ChatChannelRestrictionsChangedCallback
Definition: chatlistener.h:109
ChatChannelUserMessagesClearedCallback chatChannelUserMessagesClearedCallback
Definition: chatlistener.h:237
Definition: chatlistener.h:70
std::function< void(UserId userId, ChannelId channelId, const SubscriptionNotice ¬ice)> ChatChannelSubscriptionNoticeReceivedCallback
Definition: chatlistener.h:111
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
ChatChannelUnraidNoticeReceivedCallback chatChannelUnraidNoticeReceivedCallback
Definition: chatlistener.h:234
Definition: chatlistener.h:43
virtual void ChatChannelRestrictionsChanged(UserId userId, ChannelId channelId, const ChatChannelRestrictions &restrictions) override
Definition: chatlistener.h:139
Definition: chattypes.h:745
ChatChannelNoticeReceivedCallback chatChannelNoticeReceivedCallback
Definition: chatlistener.h:239
virtual void ChatChannelInfoChanged(UserId userId, ChannelId channelId, const ChatChannelInfo &channelInfo) override
Definition: chatlistener.h:131
ChatChannelStateChangedCallback chatChannelStateChangedCallback
Definition: chatlistener.h:227
virtual void ChatChannelMessagesReceived(UserId userId, ChannelId channelId, const std::vector< LiveChatMessage > &messageList) override
Definition: chatlistener.h:187
virtual void ChatUserEmoticonSetsChanged(UserId userId, const std::vector< EmoticonSet > &emoticonSets)=0
std::function< void(UserId userId, ChannelId channelId)> ChatChannelMessagesClearedCallback
Definition: chatlistener.h:116
virtual void ChatChannelRaidNoticeReceived(UserId userId, ChannelId channelId, const RaidNotice ¬ice) override
Definition: chatlistener.h:171
std::function< void(UserId userId, ChannelId channelId, const std::string &targetChannel, uint32_t numViewers)> ChatChannelHostTargetChangedCallback
Definition: chatlistener.h:118
uint32_t TTV_ErrorCode
Definition: errortypes.h:30
virtual void ChatChannelStateChanged(UserId userId, ChannelId channelId, ChatChannelState state, TTV_ErrorCode ec) override
Definition: chatlistener.h:123
virtual void ChatChannelFirstTimeChatterNoticeReceived(UserId userId, ChannelId channelId, const FirstTimeChatterNotice ¬ice) override
Definition: chatlistener.h:163
ChatChannelState
Definition: chattypes.h:60
ChatChannelInfoChangedCallback chatChannelInfoChangedCallback
Definition: chatlistener.h:228
std::function< void(UserId userId, ChannelId channelId, UserId clearUserId)> ChatChannelUserMessagesClearedCallback
Definition: chatlistener.h:117
std::function< void(UserId userId, ChannelId channelId, const UnraidNotice ¬ice)> ChatChannelUnraidNoticeReceivedCallback
Definition: chatlistener.h:114
Definition: chatlistener.h:34
virtual void ChatChannelNoticeReceived(UserId userId, ChannelId channelId, const std::string ¬iceId, const std::map< std::string, std::string > ¶ms) override
Definition: chatlistener.h:219
ChatChannelLocalUserChangedCallback chatChannelLocalUserChangedCallback
Definition: chatlistener.h:230
virtual void ChatChannelUserMessagesCleared(UserId userId, ChannelId channelId, UserId clearUserId) override
Definition: chatlistener.h:203
ChatChannelRestrictionsChangedCallback chatChannelRestrictionsChangedCallback
Definition: chatlistener.h:229
Definition: chatlistener.h:82
ChatChannelHostTargetChangedCallback chatChannelHostTargetChangedCallback
Definition: chatlistener.h:238
virtual void ChatChannelHostTargetChanged(UserId userId, ChannelId channelId, const std::string &targetChannel, uint32_t numViewers) override
Definition: chatlistener.h:211
ChatChannelMessagesReceivedCallback chatChannelMessagesReceivedCallback
Definition: chatlistener.h:235
ChatChannelSetBroadcasterLanguageChatEnabledCompleteCallback chatChannelSetBroadcasterLanguageChatEnabledCompleteCallback
Definition: chatlistener.h:240
std::function< void(UserId userId, ChannelId channelId, TTV_ErrorCode ec)> ChatChannelSetBroadcasterLanguageChatEnabledCompleteCallback
Definition: chatlistener.h:120
uint32_t ChannelId
Definition: coretypes.h:23
Definition: chattypes.h:447
Definition: chattypes.h:126
Definition: chattypes.h:343
virtual void ChatChannelUnraidNoticeReceived(UserId userId, ChannelId channelId, const UnraidNotice ¬ice) override
Definition: chatlistener.h:179
Definition: chattypes.h:434
ChatChannelSubscriptionNoticeReceivedCallback chatChannelSubscriptionNoticeReceivedCallback
Definition: chatlistener.h:231
std::function< void(UserId userId, ChannelId channelId, const FirstTimeChatterNotice ¬ice)> ChatChannelFirstTimeChatterNoticeReceivedCallback
Definition: chatlistener.h:112
Definition: chattypes.h:423
ChatChannelRaidNoticeReceivedCallback chatChannelRaidNoticeReceivedCallback
Definition: chatlistener.h:233
ChatChannelFirstTimeChatterNoticeReceivedCallback chatChannelFirstTimeChatterNoticeReceivedCallback
Definition: chatlistener.h:232