asset_type.h
Overview
Defines the enums, structs, and error codes used in the asset store service (ASSET).
Library: libasset_ndk.z.so
System capability: SystemCapability.Security.Asset
Since: 11
Related module: AssetType
Summary
Structs
Name | Description |
---|---|
struct Asset_Blob | Defines a binary array, that is, an array of bytes with variable length. |
union Asset_Value | Represents the value of an asset attribute. |
struct Asset_Attr | Represents an asset attribute in the form of a key-value (KV) pair. |
struct Asset_Result | Represents the query result of an asset. |
struct Asset_ResultSet | Represents the query result of multiple assets. |
Macros
Name | Description |
---|---|
ASSET_TAG_TYPE_MASK (0xF << 28) | Defines the mask used to obtain the key type of an asset attribute. |
Enums
Name | Description |
---|---|
Asset_TagType { ASSET_TYPE_BOOL = 0x1 << 28, ASSET_TYPE_NUMBER = 0x2 << 28, ASSET_TYPE_BYTES = 0x3 << 28 } |
Enumerates the tag types of asset attributes. |
Asset_Tag { ASSET_TAG_SECRET = ASSET_TYPE_BYTES | 0x01, ASSET_TAG_ALIAS = ASSET_TYPE_BYTES | 0x02, ASSET_TAG_ACCESSIBILITY = ASSET_TYPE_NUMBER | 0x03, ASSET_TAG_REQUIRE_PASSWORD_SET = ASSET_TYPE_BOOL | 0x04, ASSET_TAG_AUTH_TYPE = ASSET_TYPE_NUMBER | 0x05, ASSET_TAG_AUTH_VALIDITY_PERIOD = ASSET_TYPE_NUMBER | 0x06, ASSET_TAG_AUTH_CHALLENGE = ASSET_TYPE_BYTES | 0x07, ASSET_TAG_AUTH_TOKEN = ASSET_TYPE_BYTES | 0x08, ASSET_TAG_SYNC_TYPE = ASSET_TYPE_NUMBER | 0x10, ASSET_TAG_IS_PERSISTENT = ASSET_TYPE_BOOL | 0x11, ASSET_TAG_DATA_LABEL_CRITICAL_1 = ASSET_TYPE_BYTES | 0x20, ASSET_TAG_DATA_LABEL_CRITICAL_2 = ASSET_TYPE_BYTES | 0x21, ASSET_TAG_DATA_LABEL_CRITICAL_3 = ASSET_TYPE_BYTES | 0x22, ASSET_TAG_DATA_LABEL_CRITICAL_4 = ASSET_TYPE_BYTES | 0x23, ASSET_TAG_DATA_LABEL_NORMAL_1 = ASSET_TYPE_BYTES | 0x30, ASSET_TAG_DATA_LABEL_NORMAL_2 = ASSET_TYPE_BYTES | 0x31, ASSET_TAG_DATA_LABEL_NORMAL_3 = ASSET_TYPE_BYTES | 0x32, ASSET_TAG_DATA_LABEL_NORMAL_4 = ASSET_TYPE_BYTES | 0x33, ASSET_TAG_RETURN_TYPE = ASSET_TYPE_NUMBER | 0x40, ASSET_TAG_RETURN_LIMIT = ASSET_TYPE_NUMBER | 0x41, ASSET_TAG_RETURN_OFFSET = ASSET_TYPE_NUMBER | 0x42, ASSET_TAG_RETURN_ORDERED_BY = ASSET_TYPE_NUMBER | 0x43, ASSET_TAG_CONFLICT_RESOLUTION = ASSET_TYPE_NUMBER | 0x44 } |
Enumerates the tags of asset attributes. |
Asset_ResultCode { ASSET_SUCCESS = 0, ASSET_PERMISSION_DENIED = 201, ASSET_INVALID_ARGUMENT = 401, ASSET_SERVICE_UNAVAILABLE = 24000001, ASSET_NOT_FOUND = 24000002, ASSET_DUPLICATED = 24000003, ASSET_ACCESS_DENIED = 24000004, ASSET_STATUS_MISMATCH = 24000005, ASSET_OUT_OF_MEMORY = 24000006, ASSET_DATA_CORRUPTED = 24000007, ASSET_DATABASE_ERROR = 24000008, ASSET_CRYPTO_ERROR = 24000009, ASSET_IPC_ERROR = 24000010, ASSET_BMS_ERROR = 24000011, ASSET_ACCOUNT_ERROR = 24000012, ASSET_ACCESS_TOKEN_ERROR = 24000013, ASSET_FILE_OPERATION_ERROR = 24000014, ASSET_GET_SYSTEM_TIME_ERROR = 24000015, ASSET_LIMIT_EXCEEDED = 24000016, ASSET_UNSUPPORTED = 24000017 } |
Enumerates the result codes returned by ASSET functions. |
Asset_Accessibility { ASSET_ACCESSIBILITY_DEVICE_POWERED_ON = 0, ASSET_ACCESSIBILITY_DEVICE_FIRST_UNLOCKED = 1, ASSET_ACCESSIBILITY_DEVICE_UNLOCKED = 2 } |
Enumerates the types of access control based on the lock screen status. |
Asset_AuthType { ASSET_AUTH_TYPE_NONE = 0x00, ASSET_AUTH_TYPE_ANY = 0xFF } |
Enumerates the user authentication types supported by assets. |
Asset_SyncType { ASSET_SYNC_TYPE_NEVER = 0, ASSET_SYNC_TYPE_THIS_DEVICE = 1 << 0, ASSET_SYNC_TYPE_TRUSTED_DEVICE = 1 << 1 } |
Enumerates the sync types supported by assets. |
Asset_ConflictResolution { ASSET_CONFLICT_OVERWRITE = 0, ASSET_CONFLICT_THROW_ERROR = 1 } |
Enumerates the policies for resolving the conflict (for example, a duplicate alias). |
Asset_ReturnType { ASSET_RETURN_ALL = 0, ASSET_RETURN_ATTRIBUTES = 1 } |
Enumerates the types of the asset query result to return. |