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.
|
| 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.
|
|
| MIP_CC_CALLBACK (mip_cc_cancel_all_tasks_callback_fn, void) |
| Callback function for canceling all background tasks.
|
|
| MIP_CC_CALLBACK (mip_cc_cancel_task_callback_fn, bool, const char *) |
| Callback function for canceling a background tasks.
|
|
| MIP_CC_CALLBACK (mip_cc_dispatch_task_callback_fn, void, const mip_cc_async_task *) |
| Callback function definition for dispatching an async task.
|
|
Defines task dispatcher callback functions.
Definition in file task_dispatcher_delegate_cc.h.
◆ mip_cc_task_dispatcher_delegate
◆ MIP_CC_API() [1/2]
Creates a task dispatcher delegate which can be used to override MIP's default async task handling.
- Parameters
-
dispatchTaskCallback | Function pointer for dispatching async tasks |
cancelTaskCallback | Function pointer for cancelling background tasks |
cancelAllTasksCallback | Function 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
-
taskDispatcher | Handle to task dispatcher delegate object |
taskId | ID 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
-
taskDispatcher | Task 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
-
taskId | Unique 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
-
taskId | Unique task identifier |
◆ 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
◆ taskDispatcher
◆ taskId