Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
ProgressInfo Class Reference

Generic progress info. More...

#include <src/utils/progress_info.h>

Public Types

enum  Status { PENDING_START , PENDING_CANCELLATION , RUNNING , COMPLETED }
 
enum  CompletionType { CANCELLED , HAS_WARNING , HAS_ERROR , SUCCESS }
 

Public Member Functions

Status get_status () const
 
CompletionType get_completion_type () const
 
void request_cancellation ()
 To be called by the task caller.
 
void mark_completed (CompletionType type, const utils::Utf8String &msg)
 To be called by the task itself.
 
utils::Utf8String get_message () const
 Returns a newly allocated string.
 
std::tuple< double, utils::Utf8Stringget_progress ()
 To be called by the task caller.
 
void update_progress (double progress, const utils::Utf8String &msg)
 To be called by the task itself.
 
bool pending_cancellation () const
 

Detailed Description

Generic progress info.

Note
Not realtime-safe.

Definition at line 31 of file progress_info.h.

Member Enumeration Documentation

◆ CompletionType

enum ProgressInfo::CompletionType

Definition at line 43 of file progress_info.h.

◆ Status

enum ProgressInfo::Status

Definition at line 35 of file progress_info.h.

Member Function Documentation

◆ get_completion_type()

CompletionType ProgressInfo::get_completion_type ( ) const
inline

Definition at line 53 of file progress_info.h.

◆ get_message()

utils::Utf8String ProgressInfo::get_message ( ) const
inline

Returns a newly allocated string.

Definition at line 72 of file progress_info.h.

◆ get_progress()

std::tuple< double, utils::Utf8String > ProgressInfo::get_progress ( )
inline

To be called by the task caller.

Definition at line 77 of file progress_info.h.

◆ get_status()

Status ProgressInfo::get_status ( ) const
inline

Definition at line 51 of file progress_info.h.

◆ pending_cancellation()

bool ProgressInfo::pending_cancellation ( ) const
inline

Definition at line 89 of file progress_info.h.


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