LeechCraft  0.6.70-3565-g2d86529
Modular cross-platform feature rich live environment.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LeechCraft::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
LeechCraft::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 119 of file ijobholder.h.

Member Enumeration Documentation

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 149 of file ijobholder.h.

Constructor & Destructor Documentation

LeechCraft::ProcessStateInfo::ProcessStateInfo ( )
default

Default-constructs a process description.

LeechCraft::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 182 of file ijobholder.h.

References Unknown.

LeechCraft::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 200 of file ijobholder.h.

Member Data Documentation

qlonglong LeechCraft::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 127 of file ijobholder.h.

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

TaskParameters LeechCraft::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 145 of file ijobholder.h.

enum LeechCraft::ProcessStateInfo::State LeechCraft::ProcessStateInfo::State_ = State::Unknown
qlonglong LeechCraft::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 135 of file ijobholder.h.


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