LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
LC::ProcessStateInfo Struct Reference

State of a single process represented in a IJobHolder model. More...

#include "ijobholder.h"

Public Types

enum  State {
  State::Unknown,
  State::Running,
  State::Paused,
  State::Error
}
 Describes the state of the process. More...
 

Public Member Functions

 ProcessStateInfo ()=default
 Default-constructs a process description. More...
 
 ProcessStateInfo (qlonglong done, qlonglong total, TaskParameters params)
 Constructs the description with the given values. More...
 
 ProcessStateInfo (qlonglong done, qlonglong total, TaskParameters params, State state)
 Constructs the description with the given values and state. More...
 

Public Attributes

qlonglong Done_ = 0
 The amount of items already processed or downloaded. More...
 
qlonglong Total_ = 0
 The total amount of items to be processed or downloaded. More...
 
TaskParameters Params_ = {}
 The flags of the task as it was originally added to the downloader, if relevant. More...
 
enum LC::ProcessStateInfo::State State_ = State::Unknown
 

Detailed Description

State of a single process represented in a IJobHolder model.

This structure describes the a process represented by a row in an IJobHolder model and should be returned via the JobHolderRole::ProcessState role.

The value of the CustomDataRoles::RoleJobHolderRow role should be either JobHolderRow::DownloadProgress or JobHolderRow::ProcessProgress.

See also
IJobHolder
JobHolderRow

Definition at line 92 of file ijobholder.h.

Member Enumeration Documentation

◆ State

Describes the state of the process.

Enumerator
Unknown 

Unknown state.

Running 

The process is running just fine.

Paused 

The process is paused.

Error 

There was an error completing the process.

Definition at line 122 of file ijobholder.h.

Constructor & Destructor Documentation

◆ ProcessStateInfo() [1/3]

LC::ProcessStateInfo::ProcessStateInfo ( )
default

Default-constructs a process description.

◆ ProcessStateInfo() [2/3]

LC::ProcessStateInfo::ProcessStateInfo ( qlonglong  done,
qlonglong  total,
TaskParameters  params 
)
inline

Constructs the description with the given values.

Parameters
[in]doneThe value for the Done_ variable.
[in]totalThe value for the Total_ variable.
[in]paramsThe value for the Params_ variable.
See also
Done_
Total_
Params_

Definition at line 155 of file ijobholder.h.

References Unknown.

◆ ProcessStateInfo() [3/3]

LC::ProcessStateInfo::ProcessStateInfo ( qlonglong  done,
qlonglong  total,
TaskParameters  params,
State  state 
)
inline

Constructs the description with the given values and state.

Parameters
[in]doneThe value for the Done_ variable.
[in]totalThe value for the Total_ variable.
[in]paramsThe value for the Params_ variable.
[in]stateThe value for the State_ variable.
See also
Done_
Total_
Params_
State_

Definition at line 173 of file ijobholder.h.

Member Data Documentation

◆ Done_

qlonglong LC::ProcessStateInfo::Done_ = 0

The amount of items already processed or downloaded.

This can be the number of already downloaded bytes in an HTTP client, a number of messages fetched in an email client, and so on.

Definition at line 100 of file ijobholder.h.

Referenced by LC::Util::SetJobHolderProgress().

◆ Params_

TaskParameters LC::ProcessStateInfo::Params_ = {}

The flags of the task as it was originally added to the downloader, if relevant.

This field only makes sense if the relevant process is a download process, that is, if value of the CustomDataRoles::RoleJobHolderRow role is JobHolderRow::DownloadProgress.

Definition at line 118 of file ijobholder.h.

◆ State_

enum LC::ProcessStateInfo::State LC::ProcessStateInfo::State_ = State::Unknown

◆ Total_

qlonglong LC::ProcessStateInfo::Total_ = 0

The total amount of items to be processed or downloaded.

This can be the number of already downloaded bytes in an HTTP client, a number of messages fetched in an email client, and so on.

Definition at line 108 of file ijobholder.h.


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