InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TaskStatusInfo Class Reference

#include <TaskInfo.h>

Classes

struct  StatusData
 

Public Types

enum  TaskState {
  kQueued = 0x0, kRunning = 0x1, kFinishing = 0x2, kCompleted = 0x3,
  kCancelling = 0x4, kCancelled = 0x5, kWaiting = 0x6, kForceKilled = 0x7
}
 

Public Member Functions

 TaskStatusInfo ()
 
TaskState GetCurrentState () const
 
ErrorStateInfo GetTaskExitErrorStateInfo () const
 
AlertMessageQueue GetAlertMessages () const
 
void ClearAlertMessages ()
 
bool WasCancelled () const
 
StatusData GetCurrentData () const
 

Friends

class IDTaskAccessor
 

Detailed Description

This class encapsulates task status information.

Member Enumeration Documentation

The enumeration of possible states for a task
Enumerator
kQueued 

Task was initialized and added to the queue but it is not running yet

kRunning 

Task is running

kFinishing 

Task completed (successfully or not) and it's waiting for the completion callback to execute.

kCompleted 

Task is done (this state is set when the task finished regardless if it was successful or not - use GetTaskExitErrorStateInfo() to find out the errorState at exit time

kCancelling 

Task was signaled to cancel, but is still running

kCancelled 

Task was cancelled either before it ran or during execution and it is now stopped.

kWaiting 

Task is waiting for an event

kForceKilled 

Task crashed, used only in background pdf export tasks

Constructor & Destructor Documentation

TaskStatusInfo::TaskStatusInfo ()
inline

Constructor

Member Function Documentation

void TaskStatusInfo::ClearAlertMessages ()

for internal use only Clear the alert messages that were logged during task execution.

AlertMessageQueue TaskStatusInfo::GetAlertMessages () const

Retrieve the alert messages that were logged during task execution.

StatusData TaskStatusInfo::GetCurrentData () const

Returns a snapshot of the current status data

TaskState TaskStatusInfo::GetCurrentState () const

Retrieves the current state of the task.

ErrorStateInfo TaskStatusInfo::GetTaskExitErrorStateInfo () const

Global error code state when the task finished.

Warning
{ Should only be called if the TaskState is Cancelled or Completed. }
bool TaskStatusInfo::WasCancelled () const

Returns true if the task was signalled to cancel, false otherwise.