Twitch SDK (Internal)
Classes | Public Member Functions | Private Attributes | List of all members
ttv::chat::UnreadThreadCache Class Reference

#include <chathelpers.h>

Classes

struct  ThreadData
 

Public Member Functions

 UnreadThreadCache ()
 
uint32_t GetNumUnreadThreads () const
 
uint32_t GetNumUnreadMessages () const
 
UnreadThreadCounts GetUnreadThreadCounts () const
 
void UpdateThread (const std::string &threadId, MessageId lastMessageId, MessageId lastReadMessageId)
 
void SetExhaustive (bool exhaustive)
 
bool GetExhaustive () const
 
void Clear ()
 
bool ContainsThread (const std::string &threadId) const
 
bool GetDirty ()
 
void MarkClean ()
 
void RealtimeMessageReceived (const std::string &threadId, MessageId id)
 
void RealtimeMessageSent (const std::string &threadId, MessageId id)
 
void MarkThreadRead (const std::string &threadId, MessageId lastReadId)
 
void MarkThreadRead (const std::string &threadId)
 

Private Attributes

std::map< std::string, ThreadDatamUnreadThreads
 
int32_t mNumUnreadThreads
 
int32_t mNumUnreadMessages
 
bool mExhaustive
 exhaustive = false means we need to poll the endpoint after each action for more accurate counts More...
 
bool mDirty
 Whether the cache has changed since the last time the unread counts callbacks notified the user. More...
 

Constructor & Destructor Documentation

◆ UnreadThreadCache()

ttv::chat::UnreadThreadCache::UnreadThreadCache ( )

Member Function Documentation

◆ Clear()

void ttv::chat::UnreadThreadCache::Clear ( )

◆ ContainsThread()

bool ttv::chat::UnreadThreadCache::ContainsThread ( const std::string &  threadId) const

◆ GetDirty()

bool ttv::chat::UnreadThreadCache::GetDirty ( )
inline

◆ GetExhaustive()

bool ttv::chat::UnreadThreadCache::GetExhaustive ( ) const
inline

◆ GetNumUnreadMessages()

uint32_t ttv::chat::UnreadThreadCache::GetNumUnreadMessages ( ) const
inline

◆ GetNumUnreadThreads()

uint32_t ttv::chat::UnreadThreadCache::GetNumUnreadThreads ( ) const
inline

◆ GetUnreadThreadCounts()

UnreadThreadCounts ttv::chat::UnreadThreadCache::GetUnreadThreadCounts ( ) const

◆ MarkClean()

void ttv::chat::UnreadThreadCache::MarkClean ( )
inline

◆ MarkThreadRead() [1/2]

void ttv::chat::UnreadThreadCache::MarkThreadRead ( const std::string &  threadId,
MessageId  lastReadId 
)

◆ MarkThreadRead() [2/2]

void ttv::chat::UnreadThreadCache::MarkThreadRead ( const std::string &  threadId)

◆ RealtimeMessageReceived()

void ttv::chat::UnreadThreadCache::RealtimeMessageReceived ( const std::string &  threadId,
MessageId  id 
)

◆ RealtimeMessageSent()

void ttv::chat::UnreadThreadCache::RealtimeMessageSent ( const std::string &  threadId,
MessageId  id 
)

◆ SetExhaustive()

void ttv::chat::UnreadThreadCache::SetExhaustive ( bool  exhaustive)
inline

◆ UpdateThread()

void ttv::chat::UnreadThreadCache::UpdateThread ( const std::string &  threadId,
MessageId  lastMessageId,
MessageId  lastReadMessageId 
)

Member Data Documentation

◆ mDirty

bool ttv::chat::UnreadThreadCache::mDirty
private

Whether the cache has changed since the last time the unread counts callbacks notified the user.

◆ mExhaustive

bool ttv::chat::UnreadThreadCache::mExhaustive
private

exhaustive = false means we need to poll the endpoint after each action for more accurate counts

◆ mNumUnreadMessages

int32_t ttv::chat::UnreadThreadCache::mNumUnreadMessages
private

◆ mNumUnreadThreads

int32_t ttv::chat::UnreadThreadCache::mNumUnreadThreads
private

◆ mUnreadThreads

std::map<std::string, ThreadData> ttv::chat::UnreadThreadCache::mUnreadThreads
private

The documentation for this class was generated from the following file: