![]() | InDesign SDK 20.5 |
#include <TaskInfo.h>

Public Types | |
| typedef AsyncWorkPacketID | TaskID |
Public Member Functions | |
| TaskInfo (const IDTaskPtr &myTask) | |
| TaskInfo (IDTask &myTask) | |
| TaskInfo () | |
| ~TaskInfo () | |
| TaskInfo (const TaskInfo &other) | |
| TaskInfo (adobe::move_from< TaskInfo > other) | |
| TaskInfo & | operator= (TaskInfo other) |
| TaskID | GetID () const |
| bool | GetTaskStatusData (TaskStatusInfo::StatusData &data) const |
| bool | GetTaskProgressData (TaskProgressInfo::ProgressData &data) const |
| const AsyncWorkPacketJobSpec & | GetJobSpec () const |
| PMString | GetName () const |
| TaskStatusInfo::TaskState | GetCurrentState () const |
| void | ClearAlertMessages () |
| PMReal | GetTaskCompletionPercentage () const |
| AlertMessageQueue | GetAlertMessages () const |
| ErrorStateInfo | GetTaskExitErrorStateInfo () const |
| bool | WasCancelled () const |
| bool | IsValid () const |
| void | Cancel () |
| TaskStatusInfo::TaskState | WaitForTask () |
Friends | |
| void | swap (TaskInfo &left, TaskInfo &right) |
| bool | operator== (TaskInfo const &left, TaskInfo const &right) |
This class is used to track the status and progress of background tasks. Each top level task registers with the TaskMonitor which will hold a pointer to that task info. A client can obtain a TaskInfo from the TaskMonitor, store it and poll it for status and progress information. Not all tasks have progress information but all should have a name and should support cancellation.
| explicit |
Construct a TaskInfo from a const IDTaskPtr
| explicit |
Construct a TaskInfo from an IDTask reference
| TaskInfo::TaskInfo | ( | ) |
Default constructor - creates an invalid task
| TaskInfo::~TaskInfo | ( | ) |
Destructor
| TaskInfo::TaskInfo | ( | const TaskInfo & | other | ) |
Copy constructor - add a reference to the IDTaskPtr in other
| [in] | other | TaskInfo representing the task |
| TaskInfo::TaskInfo | ( | adobe::move_from< TaskInfo > | other | ) |
Move constructor - moves the content of other into this object, leaving other in destructible state
| [in] | other | TaskInfo that will be invalid after this method |
| void TaskInfo::Cancel | ( | ) |
Signal the underlying task to cancel.
WaitForTask. | void TaskInfo::ClearAlertMessages | ( | ) |
for internal use only Clear the alert messages for the task.
| AlertMessageQueue TaskInfo::GetAlertMessages | ( | ) | const |
Retrieves any alerts or errors from the task
| TaskStatusInfo::TaskState TaskInfo::GetCurrentState | ( | ) | const |
| TaskID TaskInfo::GetID | ( | ) | const |
Retrieves the unique task identifier for this task.
| const AsyncWorkPacketJobSpec& TaskInfo::GetJobSpec | ( | ) | const |
Retrieves the job spec for this task
| PMString TaskInfo::GetName | ( | ) | const |
Retrieves the task description
| PMReal TaskInfo::GetTaskCompletionPercentage | ( | ) | const |
Retrieves the current task completion as a percentage
| ErrorStateInfo TaskInfo::GetTaskExitErrorStateInfo | ( | ) | const |
Retrieves the ErrorStateInfo at exit of the task.
| bool TaskInfo::GetTaskProgressData | ( | TaskProgressInfo::ProgressData & | data | ) | const |
Retrieves a snapshot of all progress data.
| [out] | data | current data. Only filled when the return value is true. |
| bool TaskInfo::GetTaskStatusData | ( | TaskStatusInfo::StatusData & | data | ) | const |
Retrieves a copy of the current task status info. Useful when the caller needs all the data in one call, or will be making several status-related calls.
| [out] | data | current data. Only filled when the return value is true. |
| inline |
Move-compatible assignment operator.
| [in] | other | TaskInfo that will be invalid after this method |
| TaskStatusInfo::TaskState TaskInfo::WaitForTask | ( | ) |
Wait for the underlying task to finish executing and return the state.
| bool TaskInfo::WasCancelled | ( | ) | const |
Check if the underlying task was previously signaled to cancel