1# transient_task_type.h 2 3## Overview 4 5The **transient_task_type.h** file declares the error codes and structs of a transient task. 6 7**File to include**: <transient_task/transient_task_type.h> 8 9**Library**: libtransient_task.so 10 11**System capability**: SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask 12 13**Since**: 13 14 15**Related module**: [TransientTask](capi-transienttask.md) 16 17## Summary 18 19### Structs 20 21| Name | typedef Keyword| Description| 22|------------------------------------------------------------------------------------------| -- | -- | 23| [TransientTask_DelaySuspendInfo](capi-transienttask-transienttask-delaysuspendinfo.md) | TransientTask_DelaySuspendInfo | A struct that describes the returned information about a transient task.| 24| [TransientTask_TransientTaskInfo](capi-transienttask-transienttask-transienttaskinfo.md) | TransientTask_TransientTaskInfo | A struct that describes all transient task information.| 25 26### Enums 27 28| Name| typedef Keyword| Description| 29| -- | -- | -- | 30| [TransientTask_ErrorCode](#transienttask_errorcode) | TransientTask_ErrorCode | Enumerates the error codes available for a transient task.| 31 32### Functions 33 34| Name| typedef Keyword| Description| 35| -- | -- | -- | 36| [typedef void (\*TransientTask_Callback)(void)](#transienttask_callback) | TransientTask_Callback | Defines a callback for transient task timeout.| 37 38## Enum Description 39 40### TransientTask_ErrorCode 41 42``` 43enum TransientTask_ErrorCode 44``` 45 46**Description** 47 48Enumerates the error codes available for a transient task. 49 50**Since**: 13 51 52| Enum| Description| 53| -- | -- | 54| ERR_TRANSIENT_TASK_OK = 0 | Operation successful.| 55| ERR_TRANSIENT_TASK_INVALID_PARAM = 401 | Parameter check failed. Possible causes: 1. Mandatory parameters are not passed. 2. Incorrect parameter types.| 56| ERR_TRANSIENT_TASK_PARCEL_FAILED = 9800002 | Parcel read/write operation failed.| 57| ERR_TRANSIENT_TASK_TRANSACTION_FAILED = 9800003 | IPC failed.| 58| ERR_TRANSIENT_TASK_SYS_NOT_READY = 9800004 | System service failed.| 59| ERR_TRANSIENT_TASK_CLIENT_INFO_VERIFICATION_FAILED = 9900001 | Failed to verify the client information of the transient task.| 60| ERR_TRANSIENT_TASK_SERVICE_VERIFICATION_FAILED = 9900002 | Failed to verify the server information of the transient task.| 61| 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.| 62| ERR_TRANSIENT_TASK_SERVICE_NOT_READY = 9900004 | System service failed for the transient task.| 63 64 65## Function Description 66 67### TransientTask_Callback() 68 69``` 70typedef void (*TransientTask_Callback)(void) 71``` 72 73**Description** 74 75Defines a callback for transient task timeout. 76 77**Since**: 13 78