webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | List of all members
rtc::Task Class Referenceabstract

#include <task.h>

Inheritance diagram for rtc::Task:
rtc::TaskParent rtc::TaskParent rtc::AbortTask rtc::IdTimeoutTask rtc::SetBoolOnDeleteTask rtc::HappyTask rtc::StuckTask

Public Member Functions

 Task (TaskParent *parent)
 
 ~Task () override
 
int32_t unique_id ()
 
void Start ()
 
void Step ()
 
int GetState () const
 
bool HasError () const
 
bool Blocked () const
 
bool IsDone () const
 
int64_t ElapsedTime ()
 
void Abort (bool nowake=false)
 
bool TimedOut ()
 
int64_t timeout_time () const
 
int timeout_seconds () const
 
void set_timeout_seconds (int timeout_seconds)
 
void Wake ()
 
 Task (TaskParent *parent)
 
 ~Task () override
 
int32_t unique_id ()
 
void Start ()
 
void Step ()
 
int GetState () const
 
bool HasError () const
 
bool Blocked () const
 
bool IsDone () const
 
int64_t ElapsedTime ()
 
void Abort (bool nowake=false)
 
bool TimedOut ()
 
int64_t timeout_time () const
 
int timeout_seconds () const
 
void set_timeout_seconds (int timeout_seconds)
 
void Wake ()
 
- Public Member Functions inherited from rtc::TaskParent
 TaskParent (Task *derived_instance, TaskParent *parent)
 
 TaskParent (TaskRunner *derived_instance)
 
virtual ~TaskParent ()
 
TaskParentGetParent ()
 
TaskRunnerGetRunner ()
 
bool AllChildrenDone ()
 
bool AnyChildError ()
 
 TaskParent (Task *derived_instance, TaskParent *parent)
 
 TaskParent (TaskRunner *derived_instance)
 
virtual ~TaskParent ()
 
TaskParentGetParent ()
 
TaskRunnerGetRunner ()
 
bool AllChildrenDone ()
 
bool AnyChildError ()
 

Public Attributes

sigslot::signal0 SignalTimeout
 

Protected Types

enum  {
  STATE_BLOCKED = -1, STATE_INIT = 0, STATE_START = 1, STATE_DONE = 2,
  STATE_ERROR = 3, STATE_RESPONSE = 4, STATE_NEXT = 5
}
 
enum  {
  STATE_BLOCKED = -1, STATE_INIT = 0, STATE_START = 1, STATE_DONE = 2,
  STATE_ERROR = 3, STATE_RESPONSE = 4, STATE_NEXT = 5
}
 

Protected Member Functions

void Error ()
 
int64_t CurrentTime ()
 
virtual std::string GetStateName (int state) const
 
virtual int Process (int state)
 
virtual void Stop ()
 
virtual int ProcessStart ()=0
 
virtual int ProcessResponse ()
 
void ResetTimeout ()
 
void ClearTimeout ()
 
void SuspendTimeout ()
 
void ResumeTimeout ()
 
virtual int OnTimeout ()
 
void Error ()
 
int64_t CurrentTime ()
 
virtual std::string GetStateName (int state) const
 
virtual int Process (int state)
 
virtual void Stop ()
 
virtual int ProcessStart ()=0
 
virtual int ProcessResponse ()
 
void ResetTimeout ()
 
void ClearTimeout ()
 
void SuspendTimeout ()
 
void ResumeTimeout ()
 
virtual int OnTimeout ()
 
- Protected Member Functions inherited from rtc::TaskParent
void OnStopped (Task *task)
 
void AbortAllChildren ()
 
TaskParentparent ()
 
void OnStopped (Task *task)
 
void AbortAllChildren ()
 
TaskParentparent ()
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
STATE_BLOCKED 
STATE_INIT 
STATE_START 
STATE_DONE 
STATE_ERROR 
STATE_RESPONSE 
STATE_NEXT 

◆ anonymous enum

anonymous enum
protected
Enumerator
STATE_BLOCKED 
STATE_INIT 
STATE_START 
STATE_DONE 
STATE_ERROR 
STATE_RESPONSE 
STATE_NEXT 

Constructor & Destructor Documentation

◆ Task() [1/2]

rtc::Task::Task ( TaskParent parent)

◆ ~Task() [1/2]

rtc::Task::~Task ( )
override

◆ Task() [2/2]

rtc::Task::Task ( TaskParent parent)

◆ ~Task() [2/2]

rtc::Task::~Task ( )
override

Member Function Documentation

◆ Abort() [1/2]

void rtc::Task::Abort ( bool  nowake = false)

◆ Abort() [2/2]

void rtc::Task::Abort ( bool  nowake = false)

◆ Blocked() [1/2]

bool rtc::Task::Blocked ( ) const
inline

◆ Blocked() [2/2]

bool rtc::Task::Blocked ( ) const
inline

◆ ClearTimeout() [1/2]

void rtc::Task::ClearTimeout ( )
protected

◆ ClearTimeout() [2/2]

void rtc::Task::ClearTimeout ( )
protected

◆ CurrentTime() [1/2]

int64_t rtc::Task::CurrentTime ( )
protected

◆ CurrentTime() [2/2]

int64_t rtc::Task::CurrentTime ( )
protected

◆ ElapsedTime() [1/2]

int64_t rtc::Task::ElapsedTime ( )

◆ ElapsedTime() [2/2]

int64_t rtc::Task::ElapsedTime ( )

◆ Error() [1/2]

void rtc::Task::Error ( )
protected

◆ Error() [2/2]

void rtc::Task::Error ( )
protected

◆ GetState() [1/2]

int rtc::Task::GetState ( ) const
inline

◆ GetState() [2/2]

int rtc::Task::GetState ( ) const
inline

◆ GetStateName() [1/2]

std::string rtc::Task::GetStateName ( int  state) const
protectedvirtual

◆ GetStateName() [2/2]

virtual std::string rtc::Task::GetStateName ( int  state) const
protectedvirtual

◆ HasError() [1/2]

bool rtc::Task::HasError ( ) const
inline

◆ HasError() [2/2]

bool rtc::Task::HasError ( ) const
inline

◆ IsDone() [1/2]

bool rtc::Task::IsDone ( ) const
inline

◆ IsDone() [2/2]

bool rtc::Task::IsDone ( ) const
inline

◆ OnTimeout() [1/2]

int rtc::Task::OnTimeout ( )
protectedvirtual

◆ OnTimeout() [2/2]

virtual int rtc::Task::OnTimeout ( )
protectedvirtual

◆ Process() [1/2]

int rtc::Task::Process ( int  state)
protectedvirtual

◆ Process() [2/2]

virtual int rtc::Task::Process ( int  state)
protectedvirtual

◆ ProcessResponse() [1/2]

int rtc::Task::ProcessResponse ( )
protectedvirtual

◆ ProcessResponse() [2/2]

virtual int rtc::Task::ProcessResponse ( )
protectedvirtual

◆ ProcessStart() [1/2]

virtual int rtc::Task::ProcessStart ( )
protectedpure virtual

◆ ProcessStart() [2/2]

virtual int rtc::Task::ProcessStart ( )
protectedpure virtual

◆ ResetTimeout() [1/2]

void rtc::Task::ResetTimeout ( )
protected

◆ ResetTimeout() [2/2]

void rtc::Task::ResetTimeout ( )
protected

◆ ResumeTimeout() [1/2]

void rtc::Task::ResumeTimeout ( )
protected

◆ ResumeTimeout() [2/2]

void rtc::Task::ResumeTimeout ( )
protected

◆ set_timeout_seconds() [1/2]

void rtc::Task::set_timeout_seconds ( int  timeout_seconds)

◆ set_timeout_seconds() [2/2]

void rtc::Task::set_timeout_seconds ( int  timeout_seconds)

◆ Start() [1/2]

void rtc::Task::Start ( )

◆ Start() [2/2]

void rtc::Task::Start ( )

◆ Step() [1/2]

void rtc::Task::Step ( )

◆ Step() [2/2]

void rtc::Task::Step ( )

◆ Stop() [1/2]

virtual void rtc::Task::Stop ( )
protectedvirtual

Reimplemented in rtc::IdTimeoutTask.

◆ Stop() [2/2]

void rtc::Task::Stop ( )
protectedvirtual

Reimplemented in rtc::IdTimeoutTask.

◆ SuspendTimeout() [1/2]

void rtc::Task::SuspendTimeout ( )
protected

◆ SuspendTimeout() [2/2]

void rtc::Task::SuspendTimeout ( )
protected

◆ TimedOut() [1/2]

bool rtc::Task::TimedOut ( )

◆ TimedOut() [2/2]

bool rtc::Task::TimedOut ( )

◆ timeout_seconds() [1/2]

int rtc::Task::timeout_seconds ( ) const
inline

◆ timeout_seconds() [2/2]

int rtc::Task::timeout_seconds ( ) const
inline

◆ timeout_time() [1/2]

int64_t rtc::Task::timeout_time ( ) const
inline

◆ timeout_time() [2/2]

int64_t rtc::Task::timeout_time ( ) const
inline

◆ unique_id() [1/2]

int32_t rtc::Task::unique_id ( )
inline

◆ unique_id() [2/2]

int32_t rtc::Task::unique_id ( )
inline

◆ Wake() [1/2]

void rtc::Task::Wake ( )

◆ Wake() [2/2]

void rtc::Task::Wake ( )

Member Data Documentation

◆ SignalTimeout

sigslot::signal0 rtc::Task::SignalTimeout

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