typedef struct OH_AbilityRuntime_ModObjDispatcher_TypeInfo {...} OH_AbilityRuntime_ModObjDispatcher_TypeInfo Defines the type information of a parameter or return value.
Uses the tagged union u to describe the type information, and uses the vt field to determine which member of the union is valid.
For the map (MAP) type, use u.mapType.keyType to describe the key type and u.mapType.pValueType to describe the value type.
For the array (ARRAY) type, use u.arrayType.pElementType to describe the element type and u.arrayType.size to describe the fixed size of the array.
For the vector (VECTOR) or set (SET) type, use u.pElementType to describe the element type.
For the struct (STRUCT), remote communication object (IPC_REMOTE_PROXY, IPC_REMOTE_STUB), and enum (ENUM) types, use u.idlType to describe the IDL type name.
After use, call OH_AbilityRuntime_ModObjDispatcher_TypeInfoClear to release the heap resources held internally.
Since: 26.0.0
Related module: AbilityRuntime
File to include: modular_object_dispatcher.h
| Name | Description |
|---|---|
| OH_AbilityRuntime_ModObjDispatcher_ValueType vt | Type tag that determines which member of the union is valid. Since: 26.0.0 |
| union { struct { OH_AbilityRuntime_ModObjDispatcher_ValueType keyType; OH_AbilityRuntime_ModObjDispatcher_TypeInfo* pValueType; } mapType; struct { OH_AbilityRuntime_ModObjDispatcher_TypeInfo* pElementType; uint32_t size; } arrayType; OH_AbilityRuntime_ModObjDispatcher_TypeInfo* pElementType; char* idlType; } u | Union of type-specific metadata. The valid member is determined by vt. mapType: metadata of the map type, used when vt is MAP. mapType.keyType: key type of the map. Only basic types (BOOL, signed integer, unsigned integer, floating-point number, STRING, ENUM) are supported. Container types (ARRAY, VECTOR, SET, MAP) and complex types (STRUCT, IPC_REMOTE_PROXY, IPC_REMOTE_STUB) are not supported. mapType.pValueType: handle to the value type descriptor, which must be released by calling OH_AbilityRuntime_ModObjDispatcher_TypeInfoClear. arrayType: metadata of the array type, used when vt is ARRAY. arrayType.pElementType: handle to the element type descriptor, which must be released by calling OH_AbilityRuntime_ModObjDispatcher_TypeInfoClear. arrayType.size: fixed size of the array. pElementType: handle to the element type descriptor, used when vt is VECTOR or SET, which must be released by calling OH_AbilityRuntime_ModObjDispatcher_TypeInfoClear. idlType: string of the IDL type name, used when vt is STRUCT, IPC_REMOTE_PROXY, IPC_REMOTE_STUB, or ENUM, which must be released by calling OH_AbilityRuntime_ModObjDispatcher_TypeInfoClear. Since: 26.0.0 |