Microsoft Information Protection SDK - C++ 1.17
API Reference Documentation for C++
Loading...
Searching...
No Matches
TaskDispatcherDelegate Class Referenceabstract

A class that defines the interface to the MIP SDK task dispatcher. More...

#include <task_dispatcher_delegate.h>

Public Member Functions

virtual void DispatchTask (const std::string &taskId, std::function< void()> task)=0
 Execute a task on a background thread.
 
virtual void DispatchTask (const std::string &taskId, std::function< void()> task, const std::shared_ptr< void > &)
 Execute a task on a background thread.
 
virtual void DispatchTask (const std::string &taskId, std::function< void()> task, int64_t delaySeconds)=0
 Execute a task on a background thread with the given delay.
 
virtual void DispatchTask (const std::string &taskId, std::function< void()> task, int64_t delaySeconds, const std::shared_ptr< void > &)
 Execute a task on a background thread with the given delay.
 
virtual void ExecuteTaskOnIndependentThread (const std::string &taskId, std::function< void()> task)=0
 Immediately execute a task on an independent thread.
 
virtual void ExecuteTaskOnIndependentThread (const std::string &taskId, std::function< void()> task, const std::shared_ptr< void > &)
 Immediately execute a task on an independent thread.
 
virtual bool CancelTask (const std::string &taskId)=0
 Cancel a background task.
 
virtual bool CancelTask (const std::string &taskId, const std::shared_ptr< void > &)
 Cancel a background task.
 
virtual void CancelAllTasks ()=0
 Cancel all background tasks.
 

Detailed Description

A class that defines the interface to the MIP SDK task dispatcher.

Member Function Documentation

◆ CancelAllTasks()

virtual void TaskDispatcherDelegate::CancelAllTasks ( )
pure virtual

Cancel all background tasks.

◆ CancelTask() [1/2]

virtual bool TaskDispatcherDelegate::CancelTask ( const std::string & taskId)
pure virtual

Cancel a background task.

Parameters
taskIdID of task to cancel
Returns
True if task was successfully cancelled, else false

◆ CancelTask() [2/2]

virtual bool TaskDispatcherDelegate::CancelTask ( const std::string & taskId,
const std::shared_ptr< void > &  )
inlinevirtual

Cancel a background task.

Parameters
taskIdID of task to cancel
loggerContextlogger context that should be used with the logger delegate for cancelation logging
Returns
True if task was successfully cancelled, else false

◆ DispatchTask() [1/4]

virtual void TaskDispatcherDelegate::DispatchTask ( const std::string & taskId,
std::function< void()> task )
pure virtual

Execute a task on a background thread.

Parameters
taskIdID to uniquely identify a task
taskFunction to be executed

◆ DispatchTask() [2/4]

virtual void TaskDispatcherDelegate::DispatchTask ( const std::string & taskId,
std::function< void()> task,
const std::shared_ptr< void > &  )
inlinevirtual

Execute a task on a background thread.

Parameters
taskIdID to uniquely identify a task
taskFunction to be executed
loggerContextlogger context that should be used with the logger delegate before the task is run

◆ DispatchTask() [3/4]

virtual void TaskDispatcherDelegate::DispatchTask ( const std::string & taskId,
std::function< void()> task,
int64_t delaySeconds )
pure virtual

Execute a task on a background thread with the given delay.

Parameters
taskIdID to uniquely identify a task
taskFunction to be executed
delaySecondsDelay (in seconds) before executing task

◆ DispatchTask() [4/4]

virtual void TaskDispatcherDelegate::DispatchTask ( const std::string & taskId,
std::function< void()> task,
int64_t delaySeconds,
const std::shared_ptr< void > &  )
inlinevirtual

Execute a task on a background thread with the given delay.

Parameters
taskIdID to uniquely identify a task
taskFunction to be executed
delaySecondsDelay (in seconds) before executing task
loggerContextlogger context that should be used with the logger delegate before the task is run

◆ ExecuteTaskOnIndependentThread() [1/2]

virtual void TaskDispatcherDelegate::ExecuteTaskOnIndependentThread ( const std::string & taskId,
std::function< void()> task )
pure virtual

Immediately execute a task on an independent thread.

Parameters
taskIdID to uniquely identify a task
taskFunction to be executed

◆ ExecuteTaskOnIndependentThread() [2/2]

virtual void TaskDispatcherDelegate::ExecuteTaskOnIndependentThread ( const std::string & taskId,
std::function< void()> task,
const std::shared_ptr< void > &  )
inlinevirtual

Immediately execute a task on an independent thread.

Parameters
taskIdID to uniquely identify a task
taskFunction to be executed
loggerContextlogger context that should be used with the logger delegate before the task is run

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