目录

OH_AbilityRuntime_ModObjDispatcher_TypeInfo

typedef struct OH_AbilityRuntime_ModObjDispatcher_TypeInfo {...} OH_AbilityRuntime_ModObjDispatcher_TypeInfo

Overview

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.

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

Summary

[h2]Member Variables

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