17 #include <unordered_set> 26 class SettingRepository;
27 class ChannelRepository;
32 class IChatObjectFactory;
34 class ChatChannelWrapper;
35 class BitsConfigRepository;
55 virtual void Update()
override;
132 std::map<ChannelId, std::shared_ptr<ChannelEntry>>
mChannels;
159 virtual TTV_ErrorCode SendMessage(
const std::string& message)
override;
uint32_t UserId
Definition: coretypes.h:22
std::shared_ptr< IChatObjectFactory > mChatObjectFactory
Definition: chatchannelset.h:127
std::shared_ptr< IChatChannelListener > mInternalChannelListener
The internal chat object factory.
Definition: chatchannelset.h:128
ChatChannelSet(const std::shared_ptr< User > &user)
void ChatChannelUnraidNoticeReceived(UserId userId, ChannelId channelId, const UnraidNotice ¬ice)
void SetChatObjectFactory(std::shared_ptr< IChatObjectFactory > factory)
Definition: chatchannelset.h:50
Definition: ichatchannel.h:27
Definition: chattypes.h:161
DisposerFunc mDisposerFunc
Definition: chatchannelset.h:164
Definition: chattypes.h:369
Definition: chatchannelset.h:78
void SetTokenizationOptions(const TokenizationOptions &tokenizationOptions)
Definition: chatchannelset.h:49
void ChatChannelUserMessagesCleared(UserId userId, ChannelId channelId, UserId clearUserId)
uint64_t GetMessageFlushInterval() const
Definition: chatchannelset.h:68
TTV_ErrorCode Disconnect(ChannelId channelId)
static std::string GetComponentName()
Definition: chatchannelset.h:71
virtual void CompleteShutdown() override
std::vector< std::shared_ptr< ChannelEntry > > mCleanupChannels
The channels that should be released after all events have been flushed.
Definition: chatchannelset.h:133
void SetChannelRepository(const std::shared_ptr< ChannelRepository > &channelRepository)
Definition: chatchannelset.h:52
Definition: chattypes.h:169
std::shared_ptr< IChatChannelListener > mChatChannelListener
Definition: chatchannelset.h:166
ChannelId mChannelId
Definition: chatchannelset.h:167
TTV_ErrorCode SendChatMessage(ChannelId channelId, const std::string &message)
void ChatChannelMessagesReceived(UserId userId, ChannelId channelId, const std::vector< LiveChatMessage > &messageList)
virtual bool CheckShutdown() override
std::shared_ptr< ChannelEntry > CreateChannel(ChannelId channelId)
TTV_ErrorCode SetLocalLanguage(const std::string &language)
std::function< void()> DisposerFunc
Definition: chatchannelset.h:146
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
Definition: chatlistener.h:43
TokenizationOptions mTokenizationOptions
Definition: chatchannelset.h:137
std::function< void(TTV_ErrorCode ec)> SetBroadcasterLanguageChatCallback
Definition: chatchannelset.h:44
std::function< void(TTV_ErrorCode ec, UserList &&userList)> FetchUserListCallback
Definition: chatchannelset.h:43
std::function< void(TTV_ErrorCode ec)> SetBroadcasterLanguageChatEnabledCallback
Definition: ichatchannel.h:30
virtual std::string GetLoggerName() const override
TTV_ErrorCode SetBroadcasterLanguageChatEnabled(ChannelId channelId, bool enabled, const SetBroadcasterLanguageChatCallback &callback)
void ChatChannelNoticeReceived(UserId userId, ChannelId channelId, const std::string &id, const std::map< std::string, std::string > ¶ms)
std::shared_ptr< ChatChannel > channel
Definition: chatchannelset.h:80
void SetDisposer(DisposerFunc &&func)
Definition: chatchannelset.h:152
void ChatChannelMessagesCleared(UserId userId, ChannelId channelId)
ChatChannelSet * mOwner
Definition: chatchannelset.h:105
void ChatChannelHostTargetChanged(UserId userId, ChannelId channelId, const std::string &targetChannelName, uint32_t numViewers)
TTV_ErrorCode FlushChannelEvents()
void SetMessageFlushInterval(uint64_t milliseconds)
uint32_t TTV_ErrorCode
Definition: errortypes.h:30
void ChatChannelFirstTimeChatterNoticeReceived(UserId userId, ChannelId channelId, const FirstTimeChatterNotice ¬ice)
Definition: component.h:87
ChatChannelState
Definition: chattypes.h:60
TTV_ErrorCode LookupChannel(ChannelId channelId, std::shared_ptr< ChatChannel > &channel)
Definition: chatchannelset.h:84
std::shared_ptr< IChatChannelListener > channelListener
Definition: chatchannelset.h:81
void ChatChannelLocalUserChanged(UserId userId, ChannelId channelId, const ChatUserInfo &userInfo)
uint64_t mUserMessageFlushInterval
The max amount of time between user message flushes to the main thread.
Definition: chatchannelset.h:139
virtual ~ChatChannelSet() override
void ChatChannelStateChanged(UserId userId, ChannelId channelId, ChatChannelState state, TTV_ErrorCode ec)
std::shared_ptr< SettingRepository > mSettingRepository
The listener for channel events.
Definition: chatchannelset.h:129
void ChatChannelRaidNoticeReceived(UserId userId, ChannelId channelId, const RaidNotice ¬ice)
std::shared_ptr< ChatChannelSet > GetChatChannelSet() const
Definition: chatchannelset.h:153
virtual TTV_ErrorCode Shutdown() override
TTV_ErrorCode FetchUserList(ChannelId channelId, const FetchUserListCallback &callback)
void SetSettingRepository(std::shared_ptr< SettingRepository > settings)
Definition: chatchannelset.h:51
std::shared_ptr< ChatChannelSet > mChatChannelSet
Definition: chatchannelset.h:165
TTV_ErrorCode OptInToBroadcasterLanguageChat(ChannelId channelId, const std::string &language)
virtual void Update() override
Definition: chatchannelset.h:40
TTV_ErrorCode Connect(ChannelId channelId, const std::shared_ptr< IChatChannelListener > &listener)
uint32_t ChannelId
Definition: coretypes.h:23
std::shared_ptr< BitsConfigRepository > mBitsConfigRepository
Definition: chatchannelset.h:131
Definition: chattypes.h:447
Definition: chattypes.h:126
Definition: chattypes.h:41
std::string mLocalLanguage
The local user's language.
Definition: chatchannelset.h:135
std::map< ChannelId, std::shared_ptr< ChannelEntry > > mChannels
The mapping of lower case channel name to channel.
Definition: chatchannelset.h:132
Definition: chattypes.h:434
void ChatChannelInfoChanged(UserId userId, ChannelId channelId, const ChatChannelInfo &channelInfo)
Definition: chattypes.h:423
std::shared_ptr< ChannelRepository > mChannelRepository
Definition: chatchannelset.h:130
void ChatChannelRestrictionsChanged(UserId userId, ChannelId channelId, const ChatChannelRestrictions &restrictions)
void SetBitsConfigRepository(std::shared_ptr< BitsConfigRepository > repository)
Definition: chatchannelset.h:53
void ChatChannelSubscriptionNoticeReceived(UserId userId, ChannelId channelId, const SubscriptionNotice ¬ice)
Definition: chatchannelset.h:143