transient_task_type.h
Overview
The transient_task_type.h file declares the error codes and structs of a transient task.
File to include: <transient_task/transient_task_type.h>
Library: libtransient_task.so
System capability: SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask
Since: 11
Related module: TransientTask
Summary
Structs
| Name | typedef Keyword | Description |
|---|---|---|
| TransientTask_DelaySuspendInfo | TransientTask_DelaySuspendInfo | A struct that describes the returned information about a transient task. The struct returns the ID and remaining time of the transient task. |
| TransientTask_TransientTaskInfo | TransientTask_TransientTaskInfo | A struct that describes all transient task information. The struct returns all transient task information, including the remaining quota of the current day. |
Macros
| Name | Description |
|---|---|
| TRANSIENT_TASK_MAX_NUM 3 | Defines the maximum number of transient tasks at the same time. Since: 20 |
Enums
| Name | typedef Keyword | Description |
|---|---|---|
| TransientTask_ErrorCode | TransientTask_ErrorCode | Enumerates the error codes available for a transient task. |
Functions
| Name | typedef Keyword | Description |
|---|---|---|
| typedef void (*TransientTask_Callback)(void) | TransientTask_Callback | Defines a callback for transient task timeout. |
Enum Description
TransientTask_ErrorCode
enum TransientTask_ErrorCode
Description
Enumerates the error codes available for a transient task.
Since: 13
| Enum | Description |
|---|---|
| ERR_TRANSIENT_TASK_OK = 0 | Operation successful. |
| ERR_TRANSIENT_TASK_INVALID_PARAM = 401 | Parameter check failed. Possible causes: 1. Mandatory parameters are not passed. 2. Incorrect parameter types. |
| ERR_TRANSIENT_TASK_PARCEL_FAILED = 9800002 | Parcel read/write operation failed. |
| ERR_TRANSIENT_TASK_TRANSACTION_FAILED = 9800003 | IPC failed. |
| ERR_TRANSIENT_TASK_SYS_NOT_READY = 9800004 | System service failed. |
| ERR_TRANSIENT_TASK_CLIENT_INFO_VERIFICATION_FAILED = 9900001 | Failed to verify the client information of the transient task. |
| ERR_TRANSIENT_TASK_SERVICE_VERIFICATION_FAILED = 9900002 | Failed to verify the server information of the transient task. |
| ERR_TRANSIENT_TASK_PARCELABLE_FAILED = 9900003 | Parcel read/write operation failed for the transient task. Possible causes: 1. The parameter is invalid. 2. Memory allocation fails. |
| ERR_TRANSIENT_TASK_SERVICE_NOT_READY = 9900004 | System service failed for the transient task. |
Function Description
TransientTask_Callback()
typedef void (*TransientTask_Callback)(void)
Description
Defines a callback for transient task timeout.
Since: 13
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 js-apis-backgroundTaskManager
openharmony 鸿蒙 errorcode-DeviceUsageStatistics
openharmony 鸿蒙 errorcode-backgroundTaskMgr
openharmony 鸿蒙 js-apis-WorkSchedulerExtensionContext
openharmony 鸿蒙 js-apis-reminderAgent
openharmony 鸿蒙 errorcode-backgroundProcessManager
openharmony 鸿蒙 js-apis-WorkSchedulerExtensionAbility
openharmony 鸿蒙 errorcode-reminderAgentManager
openharmony 鸿蒙 capi-transienttask-transienttask-transienttaskinfo