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

#include <chatgetthreadmessagestask.h>

Inheritance diagram for ttv::chat::ChatGetThreadMessagesTask:
ttv::chat::ChatApiTask ttv::Task

Classes

struct  Result
 

Public Types

typedef std::function< void(ChatGetThreadMessagesTask *source, TTV_ErrorCode ec, std::shared_ptr< Result > result)> Callback
 
typedef TTV_TaskCallback TaskCallback
 

Public Member Functions

 ChatGetThreadMessagesTask (const std::string &authToken, const std::string &threadId, const TokenizationOptions &tokenizationOptions, const std::shared_ptr< BitsConfiguration > &bitsConfiguration, Callback &&callback)
 
virtual ~ChatGetThreadMessagesTask ()
 
void FetchDefault ()
 
void FetchRelative (MessageId beforeMessageId, uint32_t limit)
 
void SetLocalUserNames (const std::vector< std::string > &localUserNames)
 
virtual void Run ()
 
virtual void Abort ()
 

Protected Member Functions

virtual const char * GetTaskName () const
 
virtual void FillHttpRequestInfo (HttpRequestInfo &requestInfo)
 
virtual void ResponseCallback (uint statusCode, const std::vector< char > &response, void *userData)
 
virtual void ProcessResponse (const std::vector< char > &response)
 
virtual void OnComplete ()
 
virtual bool ProcessHeaders (const std::map< std::string, std::string > &headers)
 

Protected Attributes

TTV_ErrorCode mTaskStatus
 
void * mUserData
 
std::atomic_bool mAborted
 

Private Attributes

std::shared_ptr< BitsConfigurationmBitsConfiguration
 
std::vector< std::string > mLocalUserNames
 
std::shared_ptr< ResultmResult
 
Callback mCallback
 
TokenizationOptions mTokenizationOptions
 
std::string mThreadId
 
MessageId mBeforeMessageId
 
uint mLimit
 

Class Documentation

◆ ttv::chat::ChatGetThreadMessagesTask::Result

struct ttv::chat::ChatGetThreadMessagesTask::Result
Class Members
vector< WhisperMessage > messageList
bool valid

Member Typedef Documentation

◆ Callback

typedef std::function<void(ChatGetThreadMessagesTask* source, TTV_ErrorCode ec, std::shared_ptr<Result> result)> ttv::chat::ChatGetThreadMessagesTask::Callback

◆ TaskCallback

Constructor & Destructor Documentation

◆ ChatGetThreadMessagesTask()

ttv::chat::ChatGetThreadMessagesTask::ChatGetThreadMessagesTask ( const std::string &  authToken,
const std::string &  threadId,
const TokenizationOptions tokenizationOptions,
const std::shared_ptr< BitsConfiguration > &  bitsConfiguration,
Callback &&  callback 
)

◆ ~ChatGetThreadMessagesTask()

virtual ttv::chat::ChatGetThreadMessagesTask::~ChatGetThreadMessagesTask ( )
virtual

Member Function Documentation

◆ Abort()

virtual void ttv::Task::Abort ( )
virtualinherited

◆ FetchDefault()

void ttv::chat::ChatGetThreadMessagesTask::FetchDefault ( )

◆ FetchRelative()

void ttv::chat::ChatGetThreadMessagesTask::FetchRelative ( MessageId  beforeMessageId,
uint32_t  limit 
)

◆ FillHttpRequestInfo()

virtual void ttv::chat::ChatGetThreadMessagesTask::FillHttpRequestInfo ( HttpRequestInfo requestInfo)
protectedvirtual

◆ GetTaskName()

virtual const char* ttv::chat::ChatGetThreadMessagesTask::GetTaskName ( ) const
inlineprotectedvirtual

Implements ttv::Task.

◆ OnComplete()

virtual void ttv::chat::ChatGetThreadMessagesTask::OnComplete ( )
protectedvirtual

Reimplemented from ttv::chat::ChatApiTask.

◆ ProcessHeaders()

virtual bool ttv::chat::ChatApiTask::ProcessHeaders ( const std::map< std::string, std::string > &  headers)
protectedvirtualinherited

◆ ProcessResponse()

virtual void ttv::chat::ChatGetThreadMessagesTask::ProcessResponse ( const std::vector< char > &  response)
protectedvirtual

◆ ResponseCallback()

virtual void ttv::chat::ChatGetThreadMessagesTask::ResponseCallback ( uint  statusCode,
const std::vector< char > &  response,
void *  userData 
)
protectedvirtual

Reimplemented from ttv::chat::ChatApiTask.

◆ Run()

virtual void ttv::chat::ChatApiTask::Run ( )
virtualinherited

Implements ttv::Task.

◆ SetLocalUserNames()

void ttv::chat::ChatGetThreadMessagesTask::SetLocalUserNames ( const std::vector< std::string > &  localUserNames)
inline

Member Data Documentation

◆ mAborted

std::atomic_bool ttv::Task::mAborted
protectedinherited

◆ mBeforeMessageId

MessageId ttv::chat::ChatGetThreadMessagesTask::mBeforeMessageId
private

◆ mBitsConfiguration

std::shared_ptr<BitsConfiguration> ttv::chat::ChatGetThreadMessagesTask::mBitsConfiguration
private

◆ mCallback

Callback ttv::chat::ChatGetThreadMessagesTask::mCallback
private

◆ mLimit

uint ttv::chat::ChatGetThreadMessagesTask::mLimit
private

◆ mLocalUserNames

std::vector<std::string> ttv::chat::ChatGetThreadMessagesTask::mLocalUserNames
private

◆ mResult

std::shared_ptr<Result> ttv::chat::ChatGetThreadMessagesTask::mResult
private

◆ mTaskStatus

TTV_ErrorCode ttv::chat::ChatApiTask::mTaskStatus
protectedinherited

◆ mThreadId

std::string ttv::chat::ChatGetThreadMessagesTask::mThreadId
private

◆ mTokenizationOptions

TokenizationOptions ttv::chat::ChatGetThreadMessagesTask::mTokenizationOptions
private

◆ mUserData

void* ttv::Task::mUserData
protectedinherited

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