openharmony 鸿蒙 capi-transient-task-type-h

2026-08-25 浏览 (1)

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

Nametypedef KeywordDescription
TransientTask_DelaySuspendInfoTransientTask_DelaySuspendInfoA struct that describes the returned information about a transient task. The struct returns the ID and remaining time of the transient task.
TransientTask_TransientTaskInfoTransientTask_TransientTaskInfoA struct that describes all transient task information. The struct returns all transient task information, including the remaining quota of the current day.

Macros

NameDescription
TRANSIENT_TASK_MAX_NUM 3Defines the maximum number of transient tasks at the same time.
Since: 20

Enums

Nametypedef KeywordDescription
TransientTask_ErrorCodeTransientTask_ErrorCodeEnumerates the error codes available for a transient task.

Functions

Nametypedef KeywordDescription
typedef void (*TransientTask_Callback)(void)TransientTask_CallbackDefines 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

EnumDescription
ERR_TRANSIENT_TASK_OK = 0Operation successful.
ERR_TRANSIENT_TASK_INVALID_PARAM = 401Parameter check failed. Possible causes: 1. Mandatory parameters are not passed. 2. Incorrect parameter types.
ERR_TRANSIENT_TASK_PARCEL_FAILED = 9800002Parcel read/write operation failed.
ERR_TRANSIENT_TASK_TRANSACTION_FAILED = 9800003IPC failed.
ERR_TRANSIENT_TASK_SYS_NOT_READY = 9800004System service failed.
ERR_TRANSIENT_TASK_CLIENT_INFO_VERIFICATION_FAILED = 9900001Failed to verify the client information of the transient task.
ERR_TRANSIENT_TASK_SERVICE_VERIFICATION_FAILED = 9900002Failed to verify the server information of the transient task.
ERR_TRANSIENT_TASK_PARCELABLE_FAILED = 9900003Parcel 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 = 9900004System 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

openharmony 鸿蒙 capi-transienttask

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/6Ma7G6mf