22 #include <unordered_set> 31 class SettingRepository;
62 struct ChatAPIInternalData;
1072 std::shared_ptr<ChatUserBlockList>
CreateUserBlockList(
const std::shared_ptr<User>& user);
uint32_t UserId
Definition: coretypes.h:22
TTV_ErrorCode DisposeBitsStatus(const std::shared_ptr< IBitsStatus > &bitsStatus)
std::shared_ptr< ChatUserBlockList > CreateUserBlockList(const std::shared_ptr< User > &user)
TTV_ErrorCode OptInToBroadcasterLanguageChat(UserId userId, ChannelId channelId, const std::string &language)
TokenizationOptions mTokenizationOptions
Definition: chatapi.h:1112
virtual TTV_ErrorCode Update() override
std::function< void(TTV_ErrorCode ec, const std::vector< UserInfo > &blockedUsers)> FetchBlockedUsersCallback
Definition: chatapi.h:252
std::function< void(TTV_ErrorCode ec, UnbanUserError &&error)> UnbanUserCallback
Definition: chatapi.h:276
Definition: ichatchannel.h:27
TTV_ErrorCode SetBroadcasterLanguageChatEnabled(UserId userId, ChannelId channelId, bool enabled, const SetBroadcasterLanguageChatEnabledCallback &callback)
TTV_ErrorCode SetTokenizationOptions(const TokenizationOptions &options)
std::function< void(TTV_ErrorCode ec, const UnreadThreadCounts &counts)> FetchThreadUnreadCountsCallback
Definition: chatapi.h:240
Definition: ichatobjectfactory.h:22
std::shared_ptr< ChannelRepository > mChannelRepository
The internal chat object factory.
Definition: chatapi.h:1102
void SetChatObjectFactory(const std::shared_ptr< IChatObjectFactory > &factory)
TTV_ErrorCode FetchChannelBadges(ChannelId channelId, const FetchBadgesCallback &callback)
TTV_ErrorCode FetchThreadDataPage(UserId userId, uint32_t offset, uint32_t pageSize, const FetchThreadDataPageCallback &callback)
Definition: ifollowerslistener.h:24
std::function< void(TTV_ErrorCode ec, const std::vector< WhisperMessage > &message)> FetchThreadMessagesCallback
Definition: chatapi.h:195
TTV_ErrorCode FetchUserThreadData(UserId userId, const std::string &threadId, const FetchThreadDataCallback &callback)
std::shared_ptr< UserRepository > mUserRepository
The cache of channel info.
Definition: chatapi.h:1103
TTV_ErrorCode GetEmoticonUrl(uint32_t emoticonId, float scale, std::string &result)
Definition: isubscriberslistener.h:24
virtual void CoreUserLoggedOut(std::shared_ptr< User > user) override
uint32_t MessageId
Definition: chattypes.h:26
TTV_ErrorCode FetchBlockedUsers(UserId userId, const FetchBlockedUsersCallback &callback)
std::function< void(TTV_ErrorCode ec, BadgeSet &&badges)> FetchBadgesCallback
Definition: chatapi.h:123
std::function< void(TTV_ErrorCode ec, const ThreadData &threadData)> FetchThreadDataCallback
Definition: chatapi.h:183
Definition: chatapitaskhost.h:29
Definition: ibitsstatus.h:26
TTV_ErrorCode GetBlockListForUser(UserId userId, std::shared_ptr< ChatUserBlockList > &blockList)
TTV_ErrorCode Connect(UserId userId, ChannelId channelId, const std::shared_ptr< IChatChannelListener > &listener)
FeatureFlags mEnabledFeatures
The task runner to use for block lists. Once we rework the way httprequest queueing and retried works...
Definition: chatapi.h:1111
TTV_ErrorCode ModUser(UserId userId, ChannelId channelId, const std::string &modUserName, const ModUserCallback &callback)
std::function< void(TTV_ErrorCode ec, const std::vector< ThreadData > &threadPage, uint32_t total)> FetchThreadDataPageCallback
Definition: chatapi.h:171
Definition: ichannelchatroommanager.h:25
Definition: ibitslistener.h:24
virtual TTV_ErrorCode Shutdown(const ShutdownCallback &callback) override
TTV_ErrorCode UnmodUser(UserId userId, ChannelId channelId, const std::string &unmodUserName, const UnmodUserCallback &callback)
Definition: chatuserblocklist.h:35
TTV_ErrorCode SetCoreApi(const std::shared_ptr< CoreAPI > &coreApi)
TTV_ErrorCode DisposeChatRoom(const std::shared_ptr< IChatRoom > &chatRoom)
std::shared_ptr< IChatObjectFactory > mChatObjectFactory
Definition: chatapi.h:1101
std::function< void(TTV_ErrorCode ec, const std::shared_ptr< BitsConfiguration > &bitsConfig)> FetchBitsConfigurationCallback
Definition: chatapi.h:135
std::shared_ptr< CoreAPI > mCoreApi
Definition: chatapi.h:1098
std::function< void(TTV_ErrorCode ec)> InitializeCallback
Definition: module.h:48
Definition: ichatroomnotifications.h:25
virtual void GetRequiredOAuthScopes(std::vector< std::string > &scopes) override
TTV_ErrorCode CreateChatRoom(UserId userId, const std::string &roomId, ChannelId channelId, const std::shared_ptr< IChatRoomListener > &listener, std::shared_ptr< IChatRoom > &result)
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
TTV_ErrorCode DisposeSubscribersStatus(const std::shared_ptr< ISubscribersStatus > &subscribersStatus)
TTV_ErrorCode FetchUserListForChannel(UserId userId, ChannelId channelId, const FetchUserListCallback &callback)
uint64_t GetMessageFlushInterval() const
std::function< void(TTV_ErrorCode ec)> UpdateUserColorCallback
Definition: chatapi.h:310
Definition: ichannelchatroommanagerlistener.h:24
Definition: bitsconfigrepository.h:35
TTV_ErrorCode GenerateThreadId(UserId userId, UserId otherUserId, std::string &threadId)
TTV_ErrorCode SetListener(const std::shared_ptr< IChatAPIListener > &listener)
TTV_ErrorCode GetChannelSet(UserId userId, std::shared_ptr< ChatChannelSet > &channelSet)
TTV_ErrorCode DisposeChatReplay(const std::shared_ptr< IChatReplay > &chatReplay)
std::shared_ptr< SettingRepository > mSettingRepository
The set of all local users.
Definition: chatapi.h:1104
std::shared_ptr< ChatAPIInternalData > mInternalData
Definition: chatapi.h:1100
TTV_ErrorCode FetchChannelBitsConfiguration(ChannelId channelId, const FetchBitsConfigurationCallback &callback)
virtual std::string GetClientName() override
TTV_ErrorCode SetEnabledFeatures(const FeatureFlags &features)
TTV_ErrorCode CreateChannelChatRoomManager(UserId userId, ChannelId channelId, const std::shared_ptr< IChannelChatRoomManagerListener > &listener, std::shared_ptr< IChannelChatRoomManager > &result)
std::function< void(TTV_ErrorCode ec)> BlockChangeCallback
Definition: chatapi.h:98
std::shared_ptr< ChatAPITaskHost > mTaskHost
Definition: chatapi.h:1106
virtual std::string GetModuleName() const override
TTV_ErrorCode FetchUserEmoticonSets(UserId userId, bool forceRefetch, const FetchEmoticonSetsCallback &callback)
virtual void CoreLocalLanguageChanged(const std::string &language) override
std::shared_ptr< CoreApiClient > mCoreApiClient
Definition: chatapi.h:1099
TTV_ErrorCode CreateBitsStatus(UserId userId, ChannelId channelId, const std::shared_ptr< IBitsListener > &listener, std::shared_ptr< IBitsStatus > &result)
std::shared_ptr< BitsConfigRepository > mBitsConfigRepository
Definition: chatapi.h:1105
TTV_ErrorCode DisposeFollowersStatus(const std::shared_ptr< IFollowersStatus > &followersStatus)
Definition: ichatchannelproperties.h:25
uint32_t TTV_ErrorCode
Definition: errortypes.h:30
TTV_ErrorCode SetMessageFlushInterval(uint64_t milliseconds)
std::function< void(TTV_ErrorCode ec, const std::vector< EmoticonSet > &sets)> FetchEmoticonSetsCallback
Definition: chatapi.h:111
TTV_ErrorCode BanUser(UserId userId, ChannelId channelId, const std::string &bannedUserName, uint32_t durationSeconds, const BanUserCallback &callback)
TTV_ErrorCode DisposeChatRaid(const std::shared_ptr< IChatRaid > &chatRaid)
TTV_ErrorCode DisposeChannelChatRoomManager(const std::shared_ptr< IChannelChatRoomManager > &channelChatRoomManager)
Definition: chatuserthread.h:39
std::function< void(TTV_ErrorCode ec, MessageId messageID)> SendMessageCallback
Definition: chatapi.h:158
TTV_ErrorCode UpdateUserColor(UserId userId, const std::string &color, const UpdateUserColorCallback &callback)
std::function< void(TTV_ErrorCode ec)> SetBroadcasterLanguageChatEnabledCallback
Definition: chatapi.h:146
virtual void CoreUserLoggedIn(std::shared_ptr< User > user) override
std::function< void(TTV_ErrorCode ec)> ShutdownCallback
Definition: module.h:49
CoreApiClient(ChatAPI *api)
Definition: ichatchannelpropertylistener.h:25
std::function< void(TTV_ErrorCode ec, UserList &&userList)> FetchUserListCallback
Definition: chatapi.h:87
TTV_ErrorCode FetchThreadMessages(UserId userId, const std::string &threadId, MessageId start, uint32_t beforeCount, const FetchThreadMessagesCallback &callback)
Definition: ichatraid.h:28
Definition: ichatreplay.h:31
std::function< void(TTV_ErrorCode ec)> SetThreadArchivedCallback
Definition: chatapi.h:228
virtual TTV_ErrorCode Initialize(const InitializeCallback &callback) override
TTV_ErrorCode CreateChatRoomNotifications(UserId userId, const std::shared_ptr< IChatRoomNotificationsListener > &listener, std::shared_ptr< IChatRoomNotifications > &result)
Definition: ichatroomnotificationslistener.h:24
Definition: chatapi.h:1054
static void GetRequiredAuthScopes(std::vector< std::string > &scopes)
Definition: chatchannel.h:45
TTV_ErrorCode SetThreadArchived(UserId userId, const std::string &threadId, bool archived, const SetThreadArchivedCallback &callback)
TTV_ErrorCode UnblockUser(UserId userId, UserId blockUserId, const BlockChangeCallback &callback)
TTV_ErrorCode FetchGlobalBitsConfiguration(const FetchBitsConfigurationCallback &callback)
std::shared_ptr< TaskRunner > mTaskRunner
Definition: chatapi.h:1108
TTV_ErrorCode SendChatMessage(UserId userId, ChannelId channelId, const std::string &message)
TTV_ErrorCode CreateFollowersStatus(UserId userId, ChannelId channelId, const std::shared_ptr< IFollowersListener > &listener, std::shared_ptr< IFollowersStatus > &result)
Definition: chattypes.h:28
TTV_ErrorCode BlockUser(UserId userId, UserId blockUserId, const std::string &reason, bool whisper, const BlockChangeCallback &callback)
TTV_ErrorCode UnbanUser(UserId userId, ChannelId channelId, const std::string &bannedUserName, const UnbanUserCallback &callback)
Definition: ichatroomlistener.h:24
Definition: chatchannelset.h:40
std::function< void(TTV_ErrorCode ec)> SetLastMessageReadIdCallback
Definition: chatapi.h:206
uint32_t ChannelId
Definition: coretypes.h:23
TTV_ErrorCode FetchGlobalBadges(const FetchBadgesCallback &callback)
virtual void CompleteShutdown() override
TTV_ErrorCode SendMessageToUser(UserId userId, UserId otherUserId, const std::string &message, WhisperMessage &placeholderMessage, const SendMessageCallback &callback)
TTV_ErrorCode CreateSubscribersStatus(UserId userId, ChannelId channelId, const std::shared_ptr< ISubscribersListener > &listener, std::shared_ptr< ISubscribersStatus > &result)
Definition: ichatraidlistener.h:25
Definition: chattypes.h:343
TTV_ErrorCode SetThreadMuted(UserId userId, const std::string &threadId, bool muted, const SetThreadMutedCallback &callback)
std::function< void(TTV_ErrorCode ec, ModUserError &&error)> ModUserCallback
Definition: chatapi.h:288
std::function< void(TTV_ErrorCode ec, UnmodUserError &&error)> UnmodUserCallback
Definition: chatapi.h:300
TTV_ErrorCode CreateChatReplay(UserId userId, const std::string &vodId, const std::shared_ptr< IChatReplayListener > &listener, std::shared_ptr< IChatReplay > &result)
TTV_ErrorCode SetLastMessageReadId(UserId userId, const std::string &threadId, MessageId lastReadMessageId, const SetLastMessageReadIdCallback &callback)
TTV_ErrorCode FetchThreadUnreadCounts(UserId userId, const FetchThreadUnreadCountsCallback &callback)
Definition: chattypes.h:41
TTV_ErrorCode Disconnect(UserId userId, ChannelId channelId)
std::function< void(TTV_ErrorCode ec)> SetThreadMutedCallback
Definition: chatapi.h:217
TTV_ErrorCode DisposeChatRoomNotifications(const std::shared_ptr< IChatRoomNotifications > &chatRoomNotifications)
TTV_ErrorCode FetchChannelModerators(ChannelId channelId, const std::string &cursor, const FetchChannelModeratorsCallback &callback)
std::function< void(TTV_ErrorCode ec, BanUserError &&error)> BanUserCallback
Definition: chatapi.h:264
TTV_ErrorCode SetUserThreadsListener(UserId userId, const std::shared_ptr< IChatUserThreadsListener > &listener)
Definition: ichatroom.h:25
ChatAPI * mApi
Definition: chatapi.h:1067
std::function< void(TTV_ErrorCode ec, const std::vector< std::string > &modNames, const std::string &nextCursor)> FetchChannelModeratorsCallback
Definition: chatapi.h:322
TTV_ErrorCode CreateChatRaid(UserId userId, ChannelId channelId, const std::shared_ptr< IChatRaidListener > &listener, std::shared_ptr< IChatRaid > &result)
std::shared_ptr< TaskRunner > mUserBlocksTaskRunner
The general task runner to use for api calls.
Definition: chatapi.h:1109
virtual bool CheckShutdown() override
TTV_ErrorCode GetUserThreadsForUser(UserId userId, std::shared_ptr< ChatUserThreads > &userThreads)
TTV_ErrorCode GetUserBlocked(UserId userId, UserId blockUserId, bool &blocked)
TTV_ErrorCode GetThreadForUser(UserId userId, const std::string &threadId, std::shared_ptr< ChatUserThread > &thread)
TTV_ErrorCode DisposeChatChannel(const std::shared_ptr< IChatChannel > &chatChannel)
Definition: chatuserthreads.h:50
TTV_ErrorCode DisposeChatChannelProperties(const std::shared_ptr< IChatChannelProperties > &chatChannelProperties)
TTV_ErrorCode CreateChatChannel(UserId userId, ChannelId channelId, const std::shared_ptr< IChatChannelListener > &listener, std::shared_ptr< IChatChannel > &result)
TTV_ErrorCode CreateChatChannelProperties(UserId userId, ChannelId channelId, const std::shared_ptr< IChatChannelPropertyListener > &listener, std::shared_ptr< IChatChannelProperties > &result)