Microsoft Information Protection SDK - C 1.17
API Reference Documentation for C
Loading...
Searching...
No Matches
task_dispatcher_delegate_cc.h File Reference

Defines task dispatcher callback functions. More...

#include <stddef.h>
#include <stdint.h>
#include "mip_cc/common_types_cc.h"
#include "mip_cc/error_cc.h"
#include "mip_cc/mip_macros_cc.h"
#include "mip_cc/result_cc.h"

Go to the source code of this file.

Classes

struct  mip_cc_async_task
 Defines a single async task dispatch request. More...
 

Typedefs

typedef mip_cc_handlemip_cc_task_dispatcher_delegate
 

Functions

 MIP_CC_CALLBACK (mip_cc_dispatch_task_callback_fn, void, const mip_cc_async_task *)
 Callback function definition for dispatching an async task.
 
 MIP_CC_CALLBACK (mip_cc_cancel_task_callback_fn, bool, const char *)
 Callback function for canceling a background tasks.
 
 MIP_CC_CALLBACK (mip_cc_cancel_all_tasks_callback_fn, void)
 Callback function for canceling all background tasks.
 
 MIP_CC_API (mip_cc_result) MIP_CC_CreateTaskDispatcherDelegate(const mip_cc_dispatch_task_callback_fn dispatchTaskCallback
 Creates a task dispatcher delegate which can be used to override MIP's default async task handling.
 
 MIP_CC_API (void) MIP_CC_ExecuteDispatchedTask(const mip_cc_task_dispatcher_delegate taskDispatcher
 Notifies a TaskDispatcher delegate that a task is scheduled to execute now on the current thread.
 

Variables

const mip_cc_cancel_task_callback_fn cancelTaskCallback
 
const mip_cc_cancel_task_callback_fn const mip_cc_cancel_all_tasks_callback_fn cancelAllTasksCallback
 
const mip_cc_cancel_task_callback_fn const mip_cc_cancel_all_tasks_callback_fn mip_cc_task_dispatcher_delegatetaskDispatcher
 
const mip_cc_cancel_task_callback_fn const mip_cc_cancel_all_tasks_callback_fn mip_cc_task_dispatcher_delegate mip_cc_errorerrorInfo
 
const char * taskId
 

Detailed Description

Defines task dispatcher callback functions.

Typedef Documentation

◆ mip_cc_task_dispatcher_delegate

Function Documentation

◆ MIP_CC_API() [1/2]

MIP_CC_API ( mip_cc_result ) const

Creates a task dispatcher delegate which can be used to override MIP's default async task handling.

Parameters
dispatchTaskCallbackFunction pointer for dispatching async tasks
cancelTaskCallbackFunction pointer for cancelling background tasks
cancelAllTasksCallbackFunction pointer for cancelling all background tasks
taskDispatcher[Output] Handle to task dispatcher delegate object
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure

◆ MIP_CC_API() [2/2]

MIP_CC_API ( void ) const

Notifies a TaskDispatcher delegate that a task is scheduled to execute now on the current thread.

Release resources associated with an task dispatcher delegate handle.

Parameters
taskDispatcherHandle to task dispatcher delegate object
taskIdID of async task associated with this operation
Note
This function must be called by the application when a task is scheduled to execute. It will result in immediate execution of the task on the current thread. The ID should match that of a previously-dispatched, non-cancelled task.
Parameters
taskDispatcherTask dispatcher delegate to be released

◆ MIP_CC_CALLBACK() [1/3]

MIP_CC_CALLBACK ( mip_cc_cancel_all_tasks_callback_fn ,
void  )

Callback function for canceling all background tasks.

◆ MIP_CC_CALLBACK() [2/3]

MIP_CC_CALLBACK ( mip_cc_cancel_task_callback_fn ,
bool ,
const char *  )

Callback function for canceling a background tasks.

Parameters
taskIdUnique task identifier
Returns
True if task was successfully cancelled, else false

◆ MIP_CC_CALLBACK() [3/3]

MIP_CC_CALLBACK ( mip_cc_dispatch_task_callback_fn ,
void ,
const mip_cc_async_task *  )

Callback function definition for dispatching an async task.

Parameters
taskIdUnique task identifier

Variable Documentation

◆ cancelAllTasksCallback

const mip_cc_cancel_task_callback_fn const mip_cc_cancel_all_tasks_callback_fn cancelAllTasksCallback

◆ cancelTaskCallback

const mip_cc_cancel_task_callback_fn cancelTaskCallback

◆ errorInfo

const mip_cc_cancel_task_callback_fn const mip_cc_cancel_all_tasks_callback_fn mip_cc_task_dispatcher_delegate mip_cc_error* errorInfo

◆ taskDispatcher

const mip_cc_cancel_task_callback_fn const mip_cc_cancel_all_tasks_callback_fn mip_cc_task_dispatcher_delegate* taskDispatcher

◆ taskId

const char* taskId