33 ChatRoom(
const std::shared_ptr<User>& user,
const std::string& roomId,
ChannelId channelId);
38 virtual void Update()
override;
std::function< void(TTV_ErrorCode ec, std::vector< ChatRoomMessage > &&messages, std::string &&nextCursor, bool moreMessages)> FetchMessagesCallback
Definition: ichatroom.h:80
std::function< void()> DisposerFunc
Definition: chatroom.h:30
virtual TTV_ErrorCode SetTopic(const std::string &topic, const UpdateRoomInfoCallback &callback) override
virtual TTV_ErrorCode DisableEmotesOnlyMode(const UpdateRoomModesCallback &callback) override
Definition: chattypes.h:358
virtual TTV_ErrorCode SetMuted(bool isMuted, const UpdateRoomViewCallback &callback) override
RoomRole
Definition: chattypes.h:775
std::string mRoomId
Definition: chatroom.h:79
ChannelId mChannelId
Definition: chatroom.h:81
ChatMode
Definition: chattypes.h:73
virtual TTV_ErrorCode FetchMessagesAfterCursor(const std::string &cursor, uint32_t limit, const FetchMessagesCallback &callback) override
virtual TTV_ErrorCode FetchMessagesBeforeCursor(const std::string &cursor, uint32_t limit, const FetchMessagesCallback &callback) override
virtual TTV_ErrorCode DisableSlowMode(const UpdateRoomModesCallback &callback) override
void FlagIgnoredMessages(std::vector< ChatRoomMessage > &messages)
std::function< void(TTV_ErrorCode ec, ChatRoomMessage &&message)> EditMessageCallback
Definition: ichatroom.h:58
virtual TTV_ErrorCode Dispose() override
uint32_t Timestamp
Definition: coretypes.h:27
Enum
Definition: pubsubclient.h:91
virtual void Update() override
virtual TTV_ErrorCode SetLastReadAt(Timestamp lastReadAt, const UpdateRoomViewCallback &callback) override
virtual std::string GetLoggerName() const override
virtual TTV_ErrorCode DisableR9kMode(const UpdateRoomModesCallback &callback) override
std::function< void(TTV_ErrorCode ec, UpdateRoomModesError &&error, ChatRoomInfo &&info)> UpdateRoomModesCallback
Definition: ichatroom.h:104
virtual TTV_ErrorCode FetchRoomInfo(const FetchRoomInfoCallback &callback) override
void OnTopicMessageReceived(const std::string &topic, const ttv::json::Value &jVal) override
virtual TTV_ErrorCode SetMinimumAllowedRole(RoomRole minimumAllowedRole, const UpdateRoomInfoCallback &callback) override
JSON (JavaScript Object Notation).
Definition: adsapi.h:16
virtual TTV_ErrorCode FetchMessagesBeforeTimestamp(Timestamp timestamp, uint32_t limit, const FetchMessagesCallback &callback) override
virtual TTV_ErrorCode SetPreviewable(bool isPreviewable, const UpdateRoomInfoCallback &callback) override
virtual TTV_ErrorCode FetchMessagesAfterTimestamp(Timestamp timestamp, uint32_t limit, const FetchMessagesCallback &callback) override
TTV_ErrorCode SetChatMode(ChatMode mode, bool turnOn, uint32_t slowModeDurationSeconds, const UpdateRoomModesCallback &callback)
Represents a JSON value.
Definition: value.h:114
virtual TTV_ErrorCode EnableEmotesOnlyMode(const UpdateRoomModesCallback &callback) override
virtual TTV_ErrorCode DeleteMessage(const std::string &messageId, const DeleteMessageCallback &callback) override
TokenizationOptions mTokenizationOptions
Definition: chatroom.h:80
virtual TTV_ErrorCode DeleteRoom(const DeleteRoomCallback &callback) override
TTV_ErrorCode TokenizeLocalMessage(const std::shared_ptr< User > &user, const std::string &message, ChatRoomMessage &chatMessage)
virtual TTV_ErrorCode EnableSlowMode(uint32_t durationSeconds, const UpdateRoomModesCallback &callback) override
virtual TTV_ErrorCode SetArchived(bool isArchived, const UpdateRoomViewCallback &callback) override
std::function< void(TTV_ErrorCode ec, ChatRoomInfo &&info)> UpdateRoomViewCallback
Definition: ichatroom.h:114
uint32_t TTV_ErrorCode
Definition: errortypes.h:30
virtual TTV_ErrorCode EnableR9kMode(const UpdateRoomModesCallback &callback) override
std::string mPubSubTopic
Definition: chatroom.h:78
Definition: chatroom.h:27
std::function< void(TTV_ErrorCode ec)> DeleteMessageCallback
Definition: ichatroom.h:68
std::function< void(TTV_ErrorCode ec)> DeleteRoomCallback
Definition: ichatroom.h:36
virtual TTV_ErrorCode SetRoomName(const std::string &name, const UpdateRoomInfoCallback &callback) override
virtual TTV_ErrorCode EditMessage(const std::string &messageId, const std::string &message, ChatRoomMessage &placeholderMessage, const EditMessageCallback &callback) override
std::vector< MessageBadge > mCachedUserBadges
Cache the user's badges received from the last API callback to use for the next placeholder message's...
Definition: chatroom.h:77
void OnTopicSubscribeStateChanged(const std::string &topic, PubSubClient::SubscribeState::Enum state, TTV_ErrorCode ec) override
std::function< void(TTV_ErrorCode ec, UpdateRoomError &&error, ChatRoomInfo &&info)> UpdateRoomInfoCallback
Definition: ichatroom.h:92
void SetTokenizationOptions(const TokenizationOptions &options)
Definition: chatroom.h:65
ChatRoom(const std::shared_ptr< User > &user, const std::string &roomId, ChannelId channelId)
std::function< void(TTV_ErrorCode ec, ChatRoomInfo &&info)> FetchRoomInfoCallback
Definition: ichatroom.h:124
uint32_t ChannelId
Definition: coretypes.h:23
virtual TTV_ErrorCode SendMessage(const std::string &message, ChatRoomMessage &placeholderMessage, const SendMessageCallback &callback) override
Color mCachedUserColor
Cache the user's chat color received from the last API callback to use for the next placeholder messa...
Definition: chatroom.h:82
Definition: chattypes.h:41
uint32_t Color
Definition: coretypes.h:28
Definition: ichatroom.h:25
std::function< void(TTV_ErrorCode ec, SendRoomMessageError &&error, ChatRoomMessage &&message)> SendMessageCallback
Definition: ichatroom.h:48
std::unordered_map< std::string, uint64_t > mMessageNonces
Keeps track of sent message nonces to prevent duplicates from pubsub.
Definition: chatroom.h:76
static std::string GetComponentName()
Definition: chatroom.h:36
Definition: pubsubcomponent.h:21