diff --git a/ani/ani.h b/ani/ani.h deleted file mode 100644 index 58b27279a17390b87cdf0f122201941d5a27c9e5..0000000000000000000000000000000000000000 --- a/ani/ani.h +++ /dev/null @@ -1,7506 +0,0 @@ -/** - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __ANI_H__ -#define __ANI_H__ -// NOLINTBEGIN - -#ifdef __cplusplus -#include -#include -#include -#else -#include -#include -#include -#endif - -#define ANI_VERSION_1 1 - -#define ANI_FALSE 0 -#define ANI_TRUE 1 - -// Logger interface: -// typedef void (*ani_logger)(FILE *stream, int log_level, const char *component, const char *message); -// ani_option: -// 'option': "--logger" -// 'extra': ani_logger -// where 'log_level' can have the following values: -#define ANI_LOGLEVEL_FATAL 0 -#define ANI_LOGLEVEL_ERROR 1 -#define ANI_LOGLEVEL_WARNING 2 -#define ANI_LOGLEVEL_INFO 3 -#define ANI_LOGLEVEL_DEBUG 4 - -typedef size_t ani_size; - -// Primitive types: -typedef uint8_t ani_boolean; -typedef uint16_t ani_char; -typedef int8_t ani_byte; -typedef int16_t ani_short; -typedef int32_t ani_int; -typedef int64_t ani_long; -typedef float ani_float; -typedef double ani_double; - -// Reference types: -#ifdef __cplusplus -class __ani_ref {}; -class __ani_module : public __ani_ref {}; -class __ani_namespace : public __ani_ref {}; -class __ani_object : public __ani_ref {}; -class __ani_fn_object : public __ani_object {}; -class __ani_enum_item : public __ani_object {}; -class __ani_error : public __ani_object {}; -class __ani_tuple_value : public __ani_object {}; -class __ani_type : public __ani_object {}; -class __ani_arraybuffer : public __ani_object {}; -class __ani_string : public __ani_object {}; -class __ani_class : public __ani_type {}; -class __ani_enum : public __ani_type {}; -class __ani_union : public __ani_type {}; -class __ani_array : public __ani_object {}; -class __ani_array_boolean : public __ani_array {}; -class __ani_array_char : public __ani_array {}; -class __ani_array_byte : public __ani_array {}; -class __ani_array_short : public __ani_array {}; -class __ani_array_int : public __ani_array {}; -class __ani_array_long : public __ani_array {}; -class __ani_array_float : public __ani_array {}; -class __ani_array_double : public __ani_array {}; -class __ani_array_ref : public __ani_array {}; -typedef __ani_ref *ani_ref; -typedef __ani_module *ani_module; -typedef __ani_namespace *ani_namespace; -typedef __ani_object *ani_object; -typedef __ani_fn_object *ani_fn_object; -typedef __ani_enum_item *ani_enum_item; -typedef __ani_error *ani_error; -typedef __ani_tuple_value *ani_tuple_value; -typedef __ani_type *ani_type; -typedef __ani_arraybuffer *ani_arraybuffer; -typedef __ani_string *ani_string; -typedef __ani_class *ani_class; -typedef __ani_enum *ani_enum; -typedef __ani_union *ani_union; -typedef __ani_array *ani_array; -typedef __ani_array_boolean *ani_array_boolean; -typedef __ani_array_char *ani_array_char; -typedef __ani_array_byte *ani_array_byte; -typedef __ani_array_short *ani_array_short; -typedef __ani_array_int *ani_array_int; -typedef __ani_array_long *ani_array_long; -typedef __ani_array_float *ani_array_float; -typedef __ani_array_double *ani_array_double; -typedef __ani_array_ref *ani_array_ref; -#else // __cplusplus -struct __ani_ref; -typedef struct __ani_ref *ani_ref; -typedef ani_ref ani_module; -typedef ani_ref ani_namespace; -typedef ani_ref ani_object; -typedef ani_object ani_fn_object; -typedef ani_object ani_enum_item; -typedef ani_object ani_error; -typedef ani_object ani_tuple_value; -typedef ani_object ani_type; -typedef ani_object ani_arraybuffer; -typedef ani_object ani_string; -typedef ani_type ani_class; -typedef ani_type ani_enum; -typedef ani_type ani_union; -typedef ani_object ani_array; -typedef ani_array ani_array_boolean; -typedef ani_array ani_array_char; -typedef ani_array ani_array_byte; -typedef ani_array ani_array_short; -typedef ani_array ani_array_int; -typedef ani_array ani_array_long; -typedef ani_array ani_array_float; -typedef ani_array ani_array_double; -typedef ani_array ani_array_ref; -#endif // __cplusplus - -struct __ani_wref; -typedef struct __ani_wref *ani_wref; - -struct __ani_variable; -typedef struct __ani_variable *ani_variable; - -struct __ani_function; -typedef struct __ani_function *ani_function; - -struct __ani_field; -typedef struct __ani_field *ani_field; - -struct __ani_static_field; -typedef struct __ani_satic_field *ani_static_field; - -struct __ani_method; -typedef struct __ani_method *ani_method; - -struct __ani_static_method; -typedef struct __ani_static_method *ani_static_method; - -struct __ani_resolver; -typedef struct __ani_resolver *ani_resolver; - -typedef void (*ani_finalizer)(void *data, void *hint); - -typedef union { - ani_boolean z; - ani_char c; - ani_byte b; - ani_short s; - ani_int i; - ani_long l; - ani_float f; - ani_double d; - ani_ref r; -} ani_value; - -typedef struct { - const char *name; - const char *signature; - const void *pointer; -} ani_native_function; - -#ifdef __cplusplus -typedef struct __ani_vm ani_vm; -typedef struct __ani_env ani_env; -#else -typedef const struct __ani_vm_api *ani_vm; -typedef const struct __ani_interaction_api *ani_env; -#endif - -typedef enum { - ANI_OK, - ANI_ERROR, - ANI_INVALID_ARGS, - ANI_INVALID_TYPE, - ANI_INVALID_DESCRIPTOR, - ANI_INCORRECT_REF, - ANI_PENDING_ERROR, - ANI_NOT_FOUND, - ANI_ALREADY_BINDED, - ANI_OUT_OF_REF, - ANI_OUT_OF_MEMORY, - ANI_OUT_OF_RANGE, - ANI_BUFFER_TO_SMALL, - ANI_INVALID_VERSION, - ANI_AMBIGUOUS, - // NOTE: Add necessary status codes -} ani_status; - -typedef struct { - const char *option; - void *extra; -} ani_option; - -typedef struct { - size_t nr_options; - const ani_option *options; -} ani_options; - -struct __ani_vm_api { - void *reserved0; - void *reserved1; - void *reserved2; - void *reserved3; - - ani_status (*DestroyVM)(ani_vm *vm); - ani_status (*GetEnv)(ani_vm *vm, uint32_t version, ani_env **result); - ani_status (*AttachCurrentThread)(ani_vm *vm, const ani_options *options, uint32_t version, ani_env **result); - ani_status (*DetachCurrentThread)(ani_vm *vm); -}; - -#define ANI_EXPORT __attribute__((visibility("default"))) - -#ifdef __cplusplus -extern "C" { -#endif - -ANI_EXPORT ani_status ANI_CreateVM(const ani_options *options, uint32_t version, ani_vm **result); -ANI_EXPORT ani_status ANI_GetCreatedVMs(ani_vm **vms_buffer, ani_size vms_buffer_length, ani_size *result); - -// Prototypes of exported functions for a shared library. -ANI_EXPORT ani_status ANI_Constructor(ani_vm *vm, uint32_t *result); -ANI_EXPORT ani_status ANI_Destructor(ani_vm *vm); - -#ifdef __cplusplus -} -#endif - -struct __ani_interaction_api { - void *reserved0; - void *reserved1; - void *reserved2; - void *reserved3; - - /** - * @brief Retrieves the version information. - * - * This function retrieves the version information and stores it in the result parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[out] result A pointer to a variable where the version information will be stored. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*GetVersion)(ani_env *env, uint32_t *result); - - /** - * @brief Retrieves the Virtual Machine (VM) instance. - * - * This function retrieves the VM instance and stores it in the result parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[out] result A pointer to the VM instance to be populated. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*GetVM)(ani_env *env, ani_vm **result); - - /** - * @brief Creates a new object of a specified class using a constructor method. - * - * This function creates a new object of the given class and calls the specified constructor method with variadic - * arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class of the object to create. - * @param[in] method The constructor method to invoke. - * @param[in] ... Variadic arguments to pass to the constructor method. - * @param[out] result A pointer to store the object return value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_New)(ani_env *env, ani_class cls, ani_method method, ani_object *result, ...); - - /** - * @brief Creates a new object of a specified class using a constructor method (array-based). - * - * This function creates a new object of the given class and calls the specified constructor method with arguments - * provided in an array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class of the object to create. - * @param[in] method The constructor method to invoke. - * @param[in] args An array of arguments to pass to the constructor method. - * @param[out] result A pointer to store the object return value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_New_A)(ani_env *env, ani_class cls, ani_method method, ani_object *result, - const ani_value *args); - - /** - * @brief Creates a new object of a specified class using a constructor method (variadic arguments). - * - * This function creates a new object of the given class and calls the specified constructor method with a `va_list` - * of arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class of the object to create. - * @param[in] method The constructor method to invoke. - * @param[in] args A `va_list` of arguments to pass to the constructor method. - * @param[out] result A pointer to store the object return value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_New_V)(ani_env *env, ani_class cls, ani_method method, ani_object *result, va_list args); - - /** - * @brief Retrieves the type of a given object. - * - * This function retrieves the type of the specified object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object whose type is to be retrieved. - * @param[out] result A pointer to store the retrieved type. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetType)(ani_env *env, ani_object object, ani_type *result); - - /** - * @brief Checks if an object is an instance of a specified type. - * - * This function checks whether the given object is an instance of the specified type. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object to check. - * @param[in] type The type to compare against. - * @param[out] result A pointer to store the boolean result (true if the object is an instance of the type, false - * otherwise). - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_InstanceOf)(ani_env *env, ani_object object, ani_type type, ani_boolean *result); - - /** - * @brief Retrieves the superclass of a specified type. - * - * This function retrieves the superclass of a given type and stores it in the result parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[in] type The type for which to retrieve the superclass. - * @param[out] result A pointer to the superclass to be populated. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Type_GetSuperClass)(ani_env *env, ani_type type, ani_class *result); - - /** - * @brief Determines if one type is assignable from another. - * - * This function checks if a type is assignable from another and stores the result in the output parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[in] from_type The source type. - * @param[in] to_type The target type. - * @param[out] result A pointer to a boolean indicating assignability. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Type_IsAssignableFrom)(ani_env *env, ani_type from_type, ani_type to_type, ani_boolean *result); - - /** - * @brief Finds a module by its descriptor. - * - * This function locates a module based on its descriptor and stores it in the result parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[in] module_descriptor The descriptor of the module to find. - * @param[out] result A pointer to the module to be populated. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*FindModule)(ani_env *env, const char *module_descriptor, ani_module *result); - - /** - * @brief Finds a namespace by its descriptor. - * - * This function locates a namespace based on its descriptor and stores it in the result parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[in] namespace_descriptor The descriptor of the namespace to find. - * @param[out] result A pointer to the namespace to be populated. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*FindNamespace)(ani_env *env, const char *namespace_descriptor, ani_namespace *result); - - /** - * @brief Finds a class by its descriptor. - * - * This function locates a class based on its descriptor and stores it in the result parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[in] class_descriptor The descriptor of the class to find. - * @param[out] result A pointer to the class to be populated. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*FindClass)(ani_env *env, const char *class_descriptor, ani_class *result); - - /** - * @brief Finds an enum by its descriptor. - * - * This function locates an enum based on its descriptor and stores it in the result parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[in] enum_descriptor The descriptor of the enum to find. - * @param[out] result A pointer to the enum to be populated. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*FindEnum)(ani_env *env, const char *enum_descriptor, ani_enum *result); - - /** - * @brief Finds a namespace within a module by its descriptor. - * - * This function locates a namespace within the specified module based on its descriptor. - * - * @param[in] env A pointer to the environment structure. - * @param[in] module The module to search within. - * @param[in] namespace_descriptor The descriptor of the namespace to find. - * @param[out] result A pointer to the namespace object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Module_FindNamespace)(ani_env *env, ani_module module, const char *namespace_descriptor, - ani_namespace *result); - - /** - * @brief Finds a class within a module by its descriptor. - * - * This function locates a class within the specified module based on its descriptor. - * - * @param[in] env A pointer to the environment structure. - * @param[in] module The module to search within. - * @param[in] class_descriptor The descriptor of the class to find. - * @param[out] result A pointer to the class object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Module_FindClass)(ani_env *env, ani_module module, const char *class_descriptor, ani_class *result); - - /** - * @brief Finds an enum within a module by its descriptor. - * - * This function locates an enum within the specified module based on its descriptor. - * - * @param[in] env A pointer to the environment structure. - * @param[in] module The module to search within. - * @param[in] enum_descriptor The descriptor of the enum to find. - * @param[out] result A pointer to the enum object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Module_FindEnum)(ani_env *env, ani_module module, const char *enum_descriptor, ani_enum *result); - - /** - * @brief Finds a function within a module by its name and signature. - * - * This function locates a function within the specified module based on its name and signature. - * - * @param[in] env A pointer to the environment structure. - * @param[in] module The module to search within. - * @param[in] name The name of the function to find. - * @param[in] signature The signature of the function to find. - * @param[out] result A pointer to the function object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Module_FindFunction)(ani_env *env, ani_module module, const char *name, const char *signature, - ani_function *result); - - /** - * @brief Finds a variable within a module by its name. - * - * This function locates a variable within the specified module based on its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] module The module to search within. - * @param[in] name The name of the variable to find. - * @param[out] result A pointer to the variable object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Module_FindVariable)(ani_env *env, ani_module module, const char *name, ani_variable *result); - - /** - * @brief Finds a namespace within another namespace by its descriptor. - * - * This function locates a namespace within the specified parent namespace based on its descriptor. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ns The parent namespace to search within. - * @param[in] namespace_descriptor The descriptor of the namespace to find. - * @param[out] result A pointer to the namespace object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Namespace_FindNamespace)(ani_env *env, ani_namespace ns, const char *namespace_descriptor, - ani_namespace *result); - - /** - * @brief Finds a class within a namespace by its descriptor. - * - * This function locates a class within the specified namespace based on its descriptor. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ns The namespace to search within. - * @param[in] class_descriptor The descriptor of the class to find. - * @param[out] result A pointer to the class object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Namespace_FindClass)(ani_env *env, ani_namespace ns, const char *class_descriptor, ani_class *result); - - /** - * @brief Finds an enum within a namespace by its descriptor. - * - * This function locates an enum within the specified namespace based on its descriptor. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ns The namespace to search within. - * @param[in] enum_descriptor The descriptor of the enum to find. - * @param[out] result A pointer to the enum object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Namespace_FindEnum)(ani_env *env, ani_namespace ns, const char *enum_descriptor, ani_enum *result); - - /** - * @brief Finds a function within a namespace by its name and signature. - * - * This function locates a function within the specified namespace based on its name and signature. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ns The namespace to search within. - * @param[in] name The name of the function to find. - * @param[in] signature The signature of the function to find. - * @param[out] result A pointer to the function object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Namespace_FindFunction)(ani_env *env, ani_namespace ns, const char *name, const char *signature, - ani_function *result); - - /** - * @brief Finds a variable within a namespace by its name. - * - * This function locates a variable within the specified namespace based on its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ns The namespace to search within. - * @param[in] name The name of the variable to find. - * @param[out] result A pointer to the variable object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Namespace_FindVariable)(ani_env *env, ani_namespace ns, const char *name, ani_variable *result); - - /** - * @brief Binds native functions to a module. - * - * This function binds an array of native functions to the specified module. - * - * @param[in] env A pointer to the environment structure. - * @param[in] module The module to which the native functions will be bound. - * @param[in] functions A pointer to an array of native functions to bind. - * @param[in] nr_functions The number of native functions in the array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Module_BindNativeFunctions)(ani_env *env, ani_module module, const ani_native_function *functions, - ani_size nr_functions); - - /** - * @brief Binds native functions to a namespace. - * - * This function binds an array of native functions to the specified namespace. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ns The namespace to which the native functions will be bound. - * @param[in] functions A pointer to an array of native functions to bind. - * @param[in] nr_functions The number of native functions in the array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Namespace_BindNativeFunctions)(ani_env *env, ani_namespace ns, const ani_native_function *functions, - ani_size nr_functions); - - /** - * @brief Binds native methods to a class. - * - * This function binds an array of native methods to the specified class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class to which the native methods will be bound. - * @param[in] methods A pointer to an array of native methods to bind. - * @param[in] nr_methods The number of native methods in the array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_BindNativeMethods)(ani_env *env, ani_class cls, const ani_native_function *methods, - ani_size nr_methods); - - /** - * @brief Deletes a local reference. - * - * This function deletes a specified local reference to free up resources. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to be deleted. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_Delete)(ani_env *env, ani_ref ref); - - /** - * @brief Ensures enough local references are available. - * - * This function checks and ensures that the specified number of local references can be created. - * - * @param[in] env A pointer to the environment structure. - * @param[in] nr_refs The number of local references to ensure availability for. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*EnsureEnoughReferences)(ani_env *env, ani_size nr_refs); - - /** - * @brief Creates a new local scope for references. - * - * This function creates a local scope for references with a specified capacity. - * - * @param[in] env A pointer to the environment structure. - * @param[in] nr_refs The maximum number of references that can be created in this scope. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*CreateLocalScope)(ani_env *env, ani_size nr_refs); - - /** - * @brief Destroys the current local scope. - * - * This function destroys the current local scope and frees all references within it. - * - * @param[in] env A pointer to the environment structure. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*DestroyLocalScope)(ani_env *env); - - /** - * @brief Creates a new escape local scope. - * - * This function creates a local scope for references with escape functionality, allowing objects to escape this - * scope. - * - * @param[in] env A pointer to the environment structure. - * @param[in] nr_refs The maximum number of references that can be created in this scope. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*CreateEscapeLocalScope)(ani_env *env, ani_size nr_refs); - - /** - * @brief Destroys the current escape local scope. - * - * This function destroys the current escape local scope and allows escaping references to be retrieved. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to be escaped from the current scope. - * @param[out] result A pointer to the resulting reference that has escaped the scope. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*DestroyEscapeLocalScope)(ani_env *env, ani_ref ref, ani_ref *result); - - /** - * @brief Throws an error. - * - * This function throws the specified error in the current environment. - * - * @param[in] env A pointer to the environment structure. - * @param[in] err The error to throw. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*ThrowError)(ani_env *env, ani_error err); - - /** - * @brief Checks if there are unhandled errors. - * - * This function determines if there are unhandled errors in the current environment. - * - * @param[in] env A pointer to the environment structure. - * @param[out] result A pointer to a boolean indicating if unhandled errors exist. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*ExistUnhandledError)(ani_env *env, ani_boolean *result); - - /** - * @brief Retrieves the current unhandled error. - * - * This function fetches the unhandled error in the environment. - * - * @param[in] env A pointer to the environment structure. - * @param[out] result A pointer to store the unhandled error. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*GetUnhandledError)(ani_env *env, ani_error *result); - - /** - * @brief Resets the current error state. - * - * This function clears the error state in the current environment. - * - * @param[in] env A pointer to the environment structure. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*ResetError)(ani_env *env); - - /** - * @brief Provides a description of the current error. - * - * This function prints the stack trace or other debug information for the current error. - * - * @param[in] env A pointer to the environment structure. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*DescribeError)(ani_env *env); // NOTE: Print stacktrace for debugging? - - /** - * @brief Aborts execution with a message. - * - * This function terminates execution with the specified error message. - * - * @param[in] env A pointer to the environment structure. - * @param[in] message The error message to display on termination. - * @return Does not return; the process terminates. - */ - ani_status (*Abort)(ani_env *env, const char *message); - - /** - * @brief Retrieves a null reference. - * - * This function provides a null reference in the specified result. - * - * @param[in] env A pointer to the environment structure. - * @param[out] result A pointer to store the null reference. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*GetNull)(ani_env *env, ani_ref *result); - - /** - * @brief Retrieves an undefined reference. - * - * This function provides an undefined reference in the specified result. - * - * @param[in] env A pointer to the environment structure. - * @param[out] result A pointer to store the undefined reference. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*GetUndefined)(ani_env *env, ani_ref *result); - - /** - * @brief Checks if a reference is null. - * - * This function determines if the specified reference is null. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to a boolean indicating if the reference is null. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsNull)(ani_env *env, ani_ref ref, ani_boolean *result); - - /** - * @brief Checks if a reference is undefined. - * - * This function determines if the specified reference is undefined. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to a boolean indicating if the reference is undefined. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsUndefined)(ani_env *env, ani_ref ref, ani_boolean *result); - - /** - * @brief Checks if a reference is nullish value (null or undefined). - * - * This function determines if the specified reference is either null or undefined. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to a boolean indicating if the reference is nullish value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsNullishValue)(ani_env *env, ani_ref ref, ani_boolean *result); - - /** - * @brief Compares two references for equality. - * - * This function checks if two references are equal. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref0 The first reference to compare. - * @param[in] ref1 The second reference to compare. - * @param[out] result A pointer to a boolean indicating if the references are equal. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_Equals)(ani_env *env, ani_ref ref0, ani_ref ref1, ani_boolean *result); - - /** - * @brief Compares two references for strict equality. - * - * This function checks if two references are strictly equal. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref0 The first reference to compare. - * @param[in] ref1 The second reference to compare. - * @param[out] result A pointer to a boolean indicating if the references are strictly equal. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_StrictEquals)(ani_env *env, ani_ref ref0, ani_ref ref1, ani_boolean *result); - - /** - * @brief Creates a new UTF-16 string. - * - * This function creates a new string from the provided UTF-16 encoded data. - * - * @param[in] env A pointer to the environment structure. - * @param[in] utf16_string A pointer to the UTF-16 encoded string data. - * @param[in] utf16_size The size of the UTF-16 string in code units. - * @param[out] result A pointer to store the created string. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*String_NewUTF16)(ani_env *env, const uint16_t *utf16_string, ani_size utf16_size, ani_string *result); - - /** - * @brief Retrieves the size of a UTF-16 string. - * - * This function retrieves the size (in code units) of the specified UTF-16 string. - * - * @param[in] env A pointer to the environment structure. - * @param[in] string The UTF-16 string to measure. - * @param[out] result A pointer to store the size of the string. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*String_GetUTF16Size)(ani_env *env, ani_string string, ani_size *result); - - /** - * @brief Retrieves the UTF-16 encoded data of a string. - * - * This function copies the UTF-16 encoded data of the string into the provided buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] string The string to retrieve data from. - * @param[out] utf16_buffer A buffer to store the UTF-16 encoded data. - * @param[in] utf16_buffer_size The size of the buffer in code units. - * @param[out] result A pointer to store the number of code units written. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*String_GetUTF16)(ani_env *env, ani_string string, uint16_t *utf16_buffer, ani_size utf16_buffer_size, - ani_size *result); - - /** - * @brief Retrieves a substring of a UTF-16 string. - * - * This function copies a portion of the UTF-16 string into the provided buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] string The string to retrieve data from. - * @param[in] substr_offset The starting offset of the substring. - * @param[in] substr_size The size of the substring in code units. - * @param[out] utf16_buffer A buffer to store the substring. - * @param[in] utf16_buffer_size The size of the buffer in code units. - * @param[out] result A pointer to store the number of code units written. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*String_GetUTF16SubString)(ani_env *env, ani_string string, ani_size substr_offset, - ani_size substr_size, uint16_t *utf16_buffer, ani_size utf16_buffer_size, - ani_size *result); - - /** - * @brief Creates a new UTF-8 string. - * - * This function creates a new string from the provided UTF-8 encoded data. - * - * @param[in] env A pointer to the environment structure. - * @param[in] utf8_string A pointer to the UTF-8 encoded string data. - * @param[in] utf8_size The size of the UTF-8 string in bytes. - * @param[out] result A pointer to store the created string. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*String_NewUTF8)(ani_env *env, const char *utf8_string, ani_size utf8_size, ani_string *result); - - /** - * @brief Retrieves the size of a UTF-8 string. - * - * This function retrieves the size (in bytes) of the specified UTF-8 string. - * - * @param[in] env A pointer to the environment structure. - * @param[in] string The UTF-8 string to measure. - * @param[out] result A pointer to store the size of the string. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*String_GetUTF8Size)(ani_env *env, ani_string string, ani_size *result); - - /** - * @brief Retrieves the UTF-8 encoded data of a string. - * - * This function copies the UTF-8 encoded data of the string into the provided buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] string The string to retrieve data from. - * @param[out] utf8_buffer A buffer to store the UTF-8 encoded data. - * @param[in] utf8_buffer_size The size of the buffer in bytes. - * @param[out] result A pointer to store the number of bytes written. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*String_GetUTF8)(ani_env *env, ani_string string, char *utf8_buffer, ani_size utf8_buffer_size, - ani_size *result); - - /** - * @brief Retrieves a substring of a UTF-8 string. - * - * This function copies a portion of the UTF-8 string into the provided buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] string The string to retrieve data from. - * @param[in] substr_offset The starting offset of the substring. - * @param[in] substr_size The size of the substring in bytes. - * @param[out] utf8_buffer A buffer to store the substring. - * @param[in] utf8_buffer_size The size of the buffer in bytes. - * @param[out] result A pointer to store the number of bytes written. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*String_GetUTF8SubString)(ani_env *env, ani_string string, ani_size substr_offset, ani_size substr_size, - char *utf8_buffer, ani_size utf8_buffer_size, ani_size *result); - - /** - * @brief Retrieves the length of an array. - * - * This function retrieves the length of the specified array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array whose length is to be retrieved. - * @param[out] result A pointer to store the length of the array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_GetLength)(ani_env *env, ani_array array, ani_size *result); - - /** - * @brief Creates a new array of booleans. - * - * This function creates a new array of the specified length for boolean values. - * - * @param[in] env A pointer to the environment structure. - * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_New_Boolean)(ani_env *env, ani_size length, ani_array_boolean *result); - - /** - * @brief Creates a new array of characters. - * - * This function creates a new array of the specified length for character values. - * - * @param[in] env A pointer to the environment structure. - * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_New_Char)(ani_env *env, ani_size length, ani_array_char *result); - - /** - * @brief Creates a new array of bytes. - * - * This function creates a new array of the specified length for byte values. - * - * @param[in] env A pointer to the environment structure. - * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_New_Byte)(ani_env *env, ani_size length, ani_array_byte *result); - - /** - * @brief Creates a new array of shorts. - * - * This function creates a new array of the specified length for short integer values. - * - * @param[in] env A pointer to the environment structure. - * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_New_Short)(ani_env *env, ani_size length, ani_array_short *result); - - /** - * @brief Creates a new array of integers. - * - * This function creates a new array of the specified length for integer values. - * - * @param[in] env A pointer to the environment structure. - * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_New_Int)(ani_env *env, ani_size length, ani_array_int *result); - - /** - * @brief Creates a new array of long integers. - * - * This function creates a new array of the specified length for long integer values. - * - * @param[in] env A pointer to the environment structure. - * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_New_Long)(ani_env *env, ani_size length, ani_array_long *result); - - /** - * @brief Creates a new array of floats. - * - * This function creates a new array of the specified length for float values. - * - * @param[in] env A pointer to the environment structure. - * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_New_Float)(ani_env *env, ani_size length, ani_array_float *result); - - /** - * @brief Creates a new array of doubles. - * - * This function creates a new array of the specified length for double values. - * - * @param[in] env A pointer to the environment structure. - * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_New_Double)(ani_env *env, ani_size length, ani_array_double *result); - - /** - * @brief Retrieves a region of boolean values from an array. - * - * This function retrieves a portion of the specified boolean array into a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to retrieve values from. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to retrieve. - * @param[out] native_buffer A buffer to store the retrieved boolean values. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_GetRegion_Boolean)(ani_env *env, ani_array_boolean array, ani_size offset, ani_size length, - ani_boolean *native_buffer); - - /** - * @brief Retrieves a region of character values from an array. - * - * This function retrieves a portion of the specified character array into a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to retrieve values from. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to retrieve. - * @param[out] native_buffer A buffer to store the retrieved character values. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_GetRegion_Char)(ani_env *env, ani_array_char array, ani_size offset, ani_size length, - ani_char *native_buffer); - - /** - * @brief Retrieves a region of byte values from an array. - * - * This function retrieves a portion of the specified byte array into a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to retrieve values from. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to retrieve. - * @param[out] native_buffer A buffer to store the retrieved byte values. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_GetRegion_Byte)(ani_env *env, ani_array_byte array, ani_size offset, ani_size length, - ani_byte *native_buffer); - - /** - * @brief Retrieves a region of short values from an array. - * - * This function retrieves a portion of the specified short array into a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to retrieve values from. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to retrieve. - * @param[out] native_buffer A buffer to store the retrieved short values. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_GetRegion_Short)(ani_env *env, ani_array_short array, ani_size offset, ani_size length, - ani_short *native_buffer); - - /** - * @brief Retrieves a region of integer values from an array. - * - * This function retrieves a portion of the specified integer array into a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to retrieve values from. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to retrieve. - * @param[out] native_buffer A buffer to store the retrieved integer values. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_GetRegion_Int)(ani_env *env, ani_array_int array, ani_size offset, ani_size length, - ani_int *native_buffer); - - /** - * @brief Retrieves a region of long integer values from an array. - * - * This function retrieves a portion of the specified long integer array into a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to retrieve values from. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to retrieve. - * @param[out] native_buffer A buffer to store the retrieved long integer values. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_GetRegion_Long)(ani_env *env, ani_array_long array, ani_size offset, ani_size length, - ani_long *native_buffer); - - /** - * @brief Retrieves a region of float values from an array. - * - * This function retrieves a portion of the specified float array into a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to retrieve values from. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to retrieve. - * @param[out] native_buffer A buffer to store the retrieved float values. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_GetRegion_Float)(ani_env *env, ani_array_float array, ani_size offset, ani_size length, - ani_float *native_buffer); - - /** - * @brief Retrieves a region of double values from an array. - * - * This function retrieves a portion of the specified double array into a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to retrieve values from. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to retrieve. - * @param[out] native_buffer A buffer to store the retrieved double values. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_GetRegion_Double)(ani_env *env, ani_array_double array, ani_size offset, ani_size length, - ani_double *native_buffer); - - /** - * @brief Sets a region of boolean values in an array. - * - * This function sets a portion of the specified boolean array using a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to set values in. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to set. - * @param[in] native_buffer A buffer containing the boolean values to set. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_SetRegion_Boolean)(ani_env *env, ani_array_boolean array, ani_size offset, ani_size length, - const ani_boolean *native_buffer); - - /** - * @brief Sets a region of character values in an array. - * - * This function sets a portion of the specified character array using a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to set values in. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to set. - * @param[in] native_buffer A buffer containing the character values to set. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_SetRegion_Char)(ani_env *env, ani_array_char array, ani_size offset, ani_size length, - const ani_char *native_buffer); - - /** - * @brief Sets a region of byte values in an array. - * - * This function sets a portion of the specified byte array using a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to set values in. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to set. - * @param[in] native_buffer A buffer containing the byte values to set. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_SetRegion_Byte)(ani_env *env, ani_array_byte array, ani_size offset, ani_size length, - const ani_byte *native_buffer); - - /** - * @brief Sets a region of short values in an array. - * - * This function sets a portion of the specified short array using a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to set values in. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to set. - * @param[in] native_buffer A buffer containing the short values to set. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_SetRegion_Short)(ani_env *env, ani_array_short array, ani_size offset, ani_size length, - const ani_short *native_buffer); - - /** - * @brief Sets a region of integer values in an array. - * - * This function sets a portion of the specified integer array using a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to set values in. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to set. - * @param[in] native_buffer A buffer containing the integer values to set. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_SetRegion_Int)(ani_env *env, ani_array_int array, ani_size offset, ani_size length, - const ani_int *native_buffer); - - /** - * @brief Sets a region of long integer values in an array. - * - * This function sets a portion of the specified long integer array using a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to set values in. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to set. - * @param[in] native_buffer A buffer containing the long integer values to set. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_SetRegion_Long)(ani_env *env, ani_array_long array, ani_size offset, ani_size length, - const ani_long *native_buffer); - - /** - * @brief Sets a region of float values in an array. - * - * This function sets a portion of the specified float array using a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to set values in. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to set. - * @param[in] native_buffer A buffer containing the float values to set. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_SetRegion_Float)(ani_env *env, ani_array_float array, ani_size offset, ani_size length, - const ani_float *native_buffer); - - /** - * @brief Sets a region of double values in an array. - * - * This function sets a portion of the specified double array using a native buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array to set values in. - * @param[in] offset The starting offset of the region. - * @param[in] length The number of elements to set. - * @param[in] native_buffer A buffer containing the double values to set. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_SetRegion_Double)(ani_env *env, ani_array_double array, ani_size offset, ani_size length, - const ani_double *native_buffer); - - /** - * @brief Creates a new array of references. - * - * This function creates a new array of references, optionally initializing it with an array of references. - * - * @param[in] env A pointer to the environment structure. - * @param[in] type The type of the elements of the array. - * @param[in] length The length of the array to be created. - * @param[in] initial_element An optional reference to initialize the array. Can be null. - * @param[out] result A pointer to store the created array of references. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_New_Ref)(ani_env *env, ani_type type, ani_size length, ani_ref initial_element, - ani_array_ref *result); - - /** - * @brief Sets a reference at a specific index in an array. - * - * This function sets the value of a reference at the specified index in the array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array of references to modify. - * @param[in] index The index at which to set the reference. - * @param[in] ref The reference to set at the specified index. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_Set_Ref)(ani_env *env, ani_array_ref array, ani_size index, ani_ref ref); - - /** - * @brief Retrieves a reference from a specific index in an array. - * - * This function retrieves the value of a reference at the specified index in the array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] array The array of references to query. - * @param[in] index The index from which to retrieve the reference. - * @param[out] result A pointer to store the retrieved reference. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Array_Get_Ref)(ani_env *env, ani_array_ref array, ani_size index, ani_ref *result); - - /** - * @brief Retrieves an enum item by its name. - * - * This function retrieves an enum item associated with the specified name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] enm The enum to search within. - * @param[in] name The name of the enum item to retrieve. - * @param[out] result A pointer to store the retrieved enum item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Enum_GetEnumItemByName)(ani_env *env, ani_enum enm, const char *name, ani_enum_item *result); - - /** - * @brief Retrieves an enum item by its index. - * - * This function retrieves an enum item located at the specified index. - * - * @param[in] env A pointer to the environment structure. - * @param[in] enm The enum to search within. - * @param[in] index The index of the enum item to retrieve. - * @param[out] result A pointer to store the retrieved enum item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Enum_GetEnumItemByIndex)(ani_env *env, ani_enum enm, ani_size index, ani_enum_item *result); - - /** - * @brief Retrieves the enum associated with an enum item. - * - * This function retrieves the enum to which the specified enum item belongs. - * - * @param[in] env A pointer to the environment structure. - * @param[in] enum_item The enum item whose associated enum is to be retrieved. - * @param[out] result A pointer to store the retrieved enum. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*EnumItem_GetEnum)(ani_env *env, ani_enum_item enum_item, ani_enum *result); - - /** - * @brief Retrieves the integer value of an enum item. - * - * This function retrieves the integer representing the value of the specified enum item. - * - * @param[in] env A pointer to the environment structure. - * @param[in] enum_item The enum item whose underlying value is to be retrieved. - * @param[out] result A pointer to store the retrieved integer. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*EnumItem_GetValue_Int)(ani_env *env, ani_enum_item enum_item, ani_int *result); - - /** - * @brief Retrieves the string value of an enum item. - * - * This function retrieves the string representing the value of the specified enum item. - * - * @param[in] env A pointer to the environment structure. - * @param[in] enum_item The enum item whose underlying value is to be retrieved. - * @param[out] result A pointer to store the retrieved string. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*EnumItem_GetValue_String)(ani_env *env, ani_enum_item enum_item, ani_string *result); - - /** - * @brief Retrieves the name of an enum item. - * - * This function retrieves the name associated with the specified enum item. - * - * @param[in] env A pointer to the environment structure. - * @param[in] enum_item The enum item whose name is to be retrieved. - * @param[out] result A pointer to store the retrieved name. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*EnumItem_GetName)(ani_env *env, ani_enum_item enum_item, ani_string *result); - - /** - * @brief Retrieves the index of an enum item. - * - * This function retrieves the index of the specified enum item within its enum. - * - * @param[in] env A pointer to the environment structure. - * @param[in] enum_item The enum item whose index is to be retrieved. - * @param[out] result A pointer to store the retrieved index. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*EnumItem_GetIndex)(ani_env *env, ani_enum_item enum_item, ani_size *result); - - /** - * @brief Invokes a functional object. - * - * This function invokes a functional object (e.g., a function or callable object) with the specified arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The functional object to invoke. - * @param[in] argc The number of arguments being passed to the functional object. - * @param[in] argv A pointer to an array of references representing the arguments. Can be null if `argc` is 0. - * @param[out] result A pointer to store the result of the invocation. Can be null if the functional object does not - * return a value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*FunctionalObject_Call)(ani_env *env, ani_fn_object fn, ani_size argc, ani_ref *argv, ani_ref *result); - - /** - * @brief Sets a boolean value to a variable. - * - * This function assigns a boolean value to the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to modify. - * @param[in] value The boolean value to assign to the variable. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Variable_SetValue_Boolean)(ani_env *env, ani_variable variable, ani_boolean value); - - /** - * @brief Sets a character value to a variable. - * - * This function assigns a character value to the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to modify. - * @param[in] value The character value to assign to the variable. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Variable_SetValue_Char)(ani_env *env, ani_variable variable, ani_char value); - - /** - * @brief Sets a byte value to a variable. - * - * This function assigns a byte value to the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to modify. - * @param[in] value The byte value to assign to the variable. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Variable_SetValue_Byte)(ani_env *env, ani_variable variable, ani_byte value); - - /** - * @brief Sets a short value to a variable. - * - * This function assigns a short integer value to the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to modify. - * @param[in] value The short integer value to assign to the variable. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Variable_SetValue_Short)(ani_env *env, ani_variable variable, ani_short value); - - /** - * @brief Sets an integer value to a variable. - * - * This function assigns an integer value to the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to modify. - * @param[in] value The integer value to assign to the variable. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Variable_SetValue_Int)(ani_env *env, ani_variable variable, ani_int value); - - /** - * @brief Sets a long value to a variable. - * - * This function assigns a long integer value to the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to modify. - * @param[in] value The long integer value to assign to the variable. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Variable_SetValue_Long)(ani_env *env, ani_variable variable, ani_long value); - - /** - * @brief Sets a float value to a variable. - * - * This function assigns a float value to the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to modify. - * @param[in] value The float value to assign to the variable. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Variable_SetValue_Float)(ani_env *env, ani_variable variable, ani_float value); - - /** - * @brief Sets a double value to a variable. - * - * This function assigns a double value to the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to modify. - * @param[in] value The double value to assign to the variable. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Variable_SetValue_Double)(ani_env *env, ani_variable variable, ani_double value); - - /** - * @brief Sets a reference value to a variable. - * - * This function assigns a reference value to the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to modify. - * @param[in] value The reference value to assign to the variable. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Variable_SetValue_Ref)(ani_env *env, ani_variable variable, ani_ref value); - - /** - * @brief Retrieves a boolean value from a variable. - * - * This function fetches a boolean value from the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to query. - * @param[out] result A pointer to store the retrieved boolean value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Variable_GetValue_Boolean)(ani_env *env, ani_variable variable, ani_boolean *result); - - /** - * @brief Retrieves a character value from a variable. - * - * This function fetches a character value from the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to query. - * @param[out] result A pointer to store the retrieved character value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Variable_GetValue_Char)(ani_env *env, ani_variable variable, ani_char *result); - - /** - * @brief Retrieves a byte value from a variable. - * - * This function fetches a byte value from the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to query. - * @param[out] result A pointer to store the retrieved byte value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Variable_GetValue_Byte)(ani_env *env, ani_variable variable, ani_byte *result); - - /** - * @brief Retrieves a short value from a variable. - * - * This function fetches a short integer value from the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to query. - * @param[out] result A pointer to store the retrieved short integer value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Variable_GetValue_Short)(ani_env *env, ani_variable variable, ani_short *result); - - /** - * @brief Retrieves an integer value from a variable. - * - * This function fetches an integer value from the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to query. - * @param[out] result A pointer to store the retrieved integer value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Variable_GetValue_Int)(ani_env *env, ani_variable variable, ani_int *result); - - /** - * @brief Retrieves a long value from a variable. - * - * This function fetches a long integer value from the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to query. - * @param[out] result A pointer to store the retrieved long integer value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Variable_GetValue_Long)(ani_env *env, ani_variable variable, ani_long *result); - - /** - * @brief Retrieves a float value from a variable. - * - * This function fetches a float value from the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to query. - * @param[out] result A pointer to store the retrieved float value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Variable_GetValue_Float)(ani_env *env, ani_variable variable, ani_float *result); - - /** - * @brief Retrieves a double value from a variable. - * - * This function fetches a double value from the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to query. - * @param[out] result A pointer to store the retrieved double value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Variable_GetValue_Double)(ani_env *env, ani_variable variable, ani_double *result); - - /** - * @brief Retrieves a reference value from a variable. - * - * This function fetches a reference value from the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to query. - * @param[out] result A pointer to store the retrieved reference value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Variable_GetValue_Ref)(ani_env *env, ani_variable variable, ani_ref *result); - - /** - * @brief Calls a function and retrieves a boolean result. - * - * This function calls the specified function with variadic arguments and retrieves a boolean result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the boolean result. - * @param[in] ... Variadic arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Boolean)(ani_env *env, ani_function fn, ani_boolean *result, ...); - - /** - * @brief Calls a function and retrieves a boolean result (array-based). - * - * This function calls the specified function with arguments provided in an array and retrieves a boolean result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the boolean result. - * @param[in] args A pointer to an array of arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Boolean_A)(ani_env *env, ani_function fn, ani_boolean *result, const ani_value *args); - - /** - * @brief Calls a function and retrieves a boolean result (variadic arguments). - * - * This function calls the specified function with arguments provided in a `va_list` and retrieves a boolean result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the boolean result. - * @param[in] args A `va_list` containing the arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Boolean_V)(ani_env *env, ani_function fn, ani_boolean *result, va_list args); - - /** - * @brief Calls a function and retrieves a character result. - * - * This function calls the specified function with variadic arguments and retrieves a character result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the character result. - * @param[in] ... Variadic arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Char)(ani_env *env, ani_function fn, ani_char *result, ...); - - /** - * @brief Calls a function and retrieves a character result (array-based). - * - * This function calls the specified function with arguments provided in an array and retrieves a character result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the character result. - * @param[in] args A pointer to an array of arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Char_A)(ani_env *env, ani_function fn, ani_char *result, const ani_value *args); - - /** - * @brief Calls a function and retrieves a character result (variadic arguments). - * - * This function calls the specified function with arguments provided in a `va_list` and retrieves a character - * result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the character result. - * @param[in] args A `va_list` containing the arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Char_V)(ani_env *env, ani_function fn, ani_char *result, va_list args); - - /** - * @brief Calls a function and retrieves a byte result. - * - * This function calls the specified function with variadic arguments and retrieves a byte result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the byte result. - * @param[in] ... Variadic arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Byte)(ani_env *env, ani_function fn, ani_byte *result, ...); - - /** - * @brief Calls a function and retrieves a byte result (array-based). - * - * This function calls the specified function with arguments provided in an array and retrieves a byte result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the byte result. - * @param[in] args A pointer to an array of arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Byte_A)(ani_env *env, ani_function fn, ani_byte *result, const ani_value *args); - - /** - * @brief Calls a function and retrieves a byte result (variadic arguments). - * - * This function calls the specified function with arguments provided in a `va_list` and retrieves a byte result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the byte result. - * @param[in] args A `va_list` containing the arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Byte_V)(ani_env *env, ani_function fn, ani_byte *result, va_list args); - - /** - * @brief Calls a function and retrieves a short result. - * - * This function calls the specified function with variadic arguments and retrieves a short result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the short result. - * @param[in] ... Variadic arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Short)(ani_env *env, ani_function fn, ani_short *result, ...); - - /** - * @brief Calls a function and retrieves a short result (array-based). - * - * This function calls the specified function with arguments provided in an array and retrieves a short result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the short result. - * @param[in] args A pointer to an array of arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Short_A)(ani_env *env, ani_function fn, ani_short *result, const ani_value *args); - - /** - * @brief Calls a function and retrieves a short result (variadic arguments). - * - * This function calls the specified function with arguments provided in a `va_list` and retrieves a short result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the short result. - * @param[in] args A `va_list` containing the arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Short_V)(ani_env *env, ani_function fn, ani_short *result, va_list args); - - /** - * @brief Calls a function and retrieves an integer result. - * - * This function calls the specified function with variadic arguments and retrieves an integer result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the integer result. - * @param[in] ... Variadic arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Int)(ani_env *env, ani_function fn, ani_int *result, ...); - - /** - * @brief Calls a function and retrieves an integer result (array-based). - * - * This function calls the specified function with arguments provided in an array and retrieves an integer result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the integer result. - * @param[in] args A pointer to an array of arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Int_A)(ani_env *env, ani_function fn, ani_int *result, const ani_value *args); - - /** - * @brief Calls a function and retrieves an integer result (variadic arguments). - * - * This function calls the specified function with arguments provided in a `va_list` and retrieves an integer - * result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the integer result. - * @param[in] args A `va_list` containing the arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Int_V)(ani_env *env, ani_function fn, ani_int *result, va_list args); - - /** - * @brief Calls a function and retrieves a long result. - * - * This function calls the specified function with variadic arguments and retrieves a long result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the long result. - * @param[in] ... Variadic arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Long)(ani_env *env, ani_function fn, ani_long *result, ...); - - /** - * @brief Calls a function and retrieves a long result (array-based). - * - * This function calls the specified function with arguments provided in an array and retrieves a long result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the long result. - * @param[in] args A pointer to an array of arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Long_A)(ani_env *env, ani_function fn, ani_long *result, const ani_value *args); - - /** - * @brief Calls a function and retrieves a long result (variadic arguments). - * - * This function calls the specified function with arguments provided in a `va_list` and retrieves a long result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the long result. - * @param[in] args A `va_list` containing the arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Long_V)(ani_env *env, ani_function fn, ani_long *result, va_list args); - - /** - * @brief Calls a function and retrieves a float result. - * - * This function calls the specified function with variadic arguments and retrieves a float result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the float result. - * @param[in] ... Variadic arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Float)(ani_env *env, ani_function fn, ani_float *result, ...); - - /** - * @brief Calls a function and retrieves a float result (array-based). - * - * This function calls the specified function with arguments provided in an array and retrieves a float result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the float result. - * @param[in] args A pointer to an array of arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Float_A)(ani_env *env, ani_function fn, ani_float *result, const ani_value *args); - - /** - * @brief Calls a function and retrieves a float result (variadic arguments). - * - * This function calls the specified function with arguments provided in a `va_list` and retrieves a float result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the float result. - * @param[in] args A `va_list` containing the arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Float_V)(ani_env *env, ani_function fn, ani_float *result, va_list args); - - /** - * @brief Calls a function and retrieves a double result. - * - * This function calls the specified function with variadic arguments and retrieves a double result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the double result. - * @param[in] ... Variadic arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Double)(ani_env *env, ani_function fn, ani_double *result, ...); - - /** - * @brief Calls a function and retrieves a double result (array-based). - * - * This function calls the specified function with arguments provided in an array and retrieves a double result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the double result. - * @param[in] args A pointer to an array of arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Double_A)(ani_env *env, ani_function fn, ani_double *result, const ani_value *args); - - /** - * @brief Calls a function and retrieves a double result (variadic arguments). - * - * This function calls the specified function with arguments provided in a `va_list` and retrieves a double result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the double result. - * @param[in] args A `va_list` containing the arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Double_V)(ani_env *env, ani_function fn, ani_double *result, va_list args); - - /** - * @brief Calls a function and retrieves a reference result. - * - * This function calls the specified function with variadic arguments and retrieves a reference result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the reference result. - * @param[in] ... Variadic arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Ref)(ani_env *env, ani_function fn, ani_ref *result, ...); - - /** - * @brief Calls a function and retrieves a reference result (array-based). - * - * This function calls the specified function with arguments provided in an array and retrieves a reference result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the reference result. - * @param[in] args A pointer to an array of arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Ref_A)(ani_env *env, ani_function fn, ani_ref *result, const ani_value *args); - - /** - * @brief Calls a function and retrieves a reference result (variadic arguments). - * - * This function calls the specified function with arguments provided in a `va_list` and retrieves a reference - * result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[out] result A pointer to store the reference result. - * @param[in] args A `va_list` containing the arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Ref_V)(ani_env *env, ani_function fn, ani_ref *result, va_list args); - - /** - * @brief Calls a function without returning a result. - * - * This function calls the specified function with variadic arguments and does not return a result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[in] ... Variadic arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Void)(ani_env *env, ani_function fn, ...); - - /** - * @brief Calls a function without returning a result (array-based). - * - * This function calls the specified function with arguments provided in an array and does not return a result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[in] args A pointer to an array of arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Void_A)(ani_env *env, ani_function fn, const ani_value *args); - - /** - * @brief Calls a function without returning a result (variadic arguments). - * - * This function calls the specified function with arguments provided in a `va_list` and does not return a result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] fn The function to call. - * @param[in] args A `va_list` containing the arguments to pass to the function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Function_Call_Void_V)(ani_env *env, ani_function fn, va_list args); - - /** - * @brief Finds a field from by its name. - * - * This function locates a field based on its name and stores it in the result parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class to query. - * @param[in] name The name of the field to find. - * @param[out] result A pointer to the field to be populated. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_FindField)(ani_env *env, ani_class cls, const char *name, ani_field *result); - - /** - * @brief Finds a static field by its name. - * - * This function locates a static field based on its name and stores it in the result parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class to query. - * @param[in] name The name of the static field to find. - * @param[out] result A pointer to the static field to be populated. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_FindStaticField)(ani_env *env, ani_class cls, const char *name, ani_static_field *result); - - /** - * @brief Finds a method from by its name and signature. - * - * This function locates a method based on its name and signature and stores it in the result parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class to query. - * @param[in] name The name of the method to find. - * @param[in] signature The signature of the method to find. - * @param[out] result A pointer to the method to be populated. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_FindMethod)(ani_env *env, ani_class cls, const char *name, const char *signature, - ani_method *result); - - /** - * @brief Finds a static method from by its name and signature. - * - * This function locates a static method based on its name and signature and stores it in the result parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class to query. - * @param[in] name The name of the static method to find. - * @param[in] signature The signature of the static method to find. - * @param[out] result A pointer to the static method to be populated. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_FindStaticMethod)(ani_env *env, ani_class cls, const char *name, const char *signature, - ani_static_method *result); - - /** - * @brief Finds a setter method from by its name. - * - * This function locates a setter method based on its name and stores it in the result parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class to query. - * @param[in] name The name of the property whose setter is to be found. - * @param[out] result A pointer to the method to be populated. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_FindSetter)(ani_env *env, ani_class cls, const char *name, ani_method *result); - - /** - * @brief Finds a getter method from by its name. - * - * This function locates a getter method based on its name and stores it in the result parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class to query. - * @param[in] name The name of the property whose getter is to be found. - * @param[out] result A pointer to the method to be populated. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_FindGetter)(ani_env *env, ani_class cls, const char *name, ani_method *result); - - /** - * @brief Finds an indexable getter method from by its signature. - * - * This function locates an indexable getter method based on its signature and stores it in the result parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class to query. - * @param[in] signature The signature of the indexable getter to find. - * @param[out] result A pointer to the method to be populated. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_FindIndexableGetter)(ani_env *env, ani_class cls, const char *signature, ani_method *result); - - /** - * @brief Finds an indexable setter method from by its signature. - * - * This function locates an indexable setter method based on its signature and stores it in the result parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class to query. - * @param[in] signature The signature of the indexable setter to find. - * @param[out] result A pointer to the method to be populated. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_FindIndexableSetter)(ani_env *env, ani_class cls, const char *signature, ani_method *result); - - /** - * @brief Finds an iterator method. - * - * This function locates an iterator method - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class to query. - * @param[out] result A pointer to the method to be populated. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_FindIterator)(ani_env *env, ani_class cls, ani_method *result); - - /** - * @brief Retrieves a boolean value from a static field of a class. - * - * This function retrieves the boolean value of the specified static field from the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to retrieve. - * @param[out] result A pointer to store the retrieved boolean value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticField_Boolean)(ani_env *env, ani_class cls, ani_static_field field, - ani_boolean *result); - - /** - * @brief Retrieves a character value from a static field of a class. - * - * This function retrieves the character value of the specified static field from the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to retrieve. - * @param[out] result A pointer to store the retrieved character value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticField_Char)(ani_env *env, ani_class cls, ani_static_field field, ani_char *result); - - /** - * @brief Retrieves a byte value from a static field of a class. - * - * This function retrieves the byte value of the specified static field from the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to retrieve. - * @param[out] result A pointer to store the retrieved byte value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticField_Byte)(ani_env *env, ani_class cls, ani_static_field field, ani_byte *result); - - /** - * @brief Retrieves a short value from a static field of a class. - * - * This function retrieves the short value of the specified static field from the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to retrieve. - * @param[out] result A pointer to store the retrieved short value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticField_Short)(ani_env *env, ani_class cls, ani_static_field field, ani_short *result); - - /** - * @brief Retrieves an integer value from a static field of a class. - * - * This function retrieves the integer value of the specified static field from the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to retrieve. - * @param[out] result A pointer to store the retrieved integer value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticField_Int)(ani_env *env, ani_class cls, ani_static_field field, ani_int *result); - - /** - * @brief Retrieves a long value from a static field of a class. - * - * This function retrieves the long value of the specified static field from the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to retrieve. - * @param[out] result A pointer to store the retrieved long value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticField_Long)(ani_env *env, ani_class cls, ani_static_field field, ani_long *result); - - /** - * @brief Retrieves a float value from a static field of a class. - * - * This function retrieves the float value of the specified static field from the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to retrieve. - * @param[out] result A pointer to store the retrieved float value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticField_Float)(ani_env *env, ani_class cls, ani_static_field field, ani_float *result); - - /** - * @brief Retrieves a double value from a static field of a class. - * - * This function retrieves the double value of the specified static field from the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to retrieve. - * @param[out] result A pointer to store the retrieved double value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticField_Double)(ani_env *env, ani_class cls, ani_static_field field, ani_double *result); - - /** - * @brief Retrieves a reference value from a static field of a class. - * - * This function retrieves the reference value of the specified static field from the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to retrieve. - * @param[out] result A pointer to store the retrieved reference value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticField_Ref)(ani_env *env, ani_class cls, ani_static_field field, ani_ref *result); - - /** - * @brief Sets a boolean value to a static field of a class. - * - * This function assigns a boolean value to the specified static field of the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to modify. - * @param[in] value The boolean value to assign. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_SetStaticField_Boolean)(ani_env *env, ani_class cls, ani_static_field field, ani_boolean value); - - /** - * @brief Sets a character value to a static field of a class. - * - * This function assigns a character value to the specified static field of the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to modify. - * @param[in] value The character value to assign. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_SetStaticField_Char)(ani_env *env, ani_class cls, ani_static_field field, ani_char value); - - /** - * @brief Sets a byte value to a static field of a class. - * - * This function assigns a byte value to the specified static field of the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to modify. - * @param[in] value The byte value to assign. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_SetStaticField_Byte)(ani_env *env, ani_class cls, ani_static_field field, ani_byte value); - - /** - * @brief Sets a short value to a static field of a class. - * - * This function assigns a short value to the specified static field of the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to modify. - * @param[in] value The short value to assign. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_SetStaticField_Short)(ani_env *env, ani_class cls, ani_static_field field, ani_short value); - - /** - * @brief Sets an integer value to a static field of a class. - * - * This function assigns an integer value to the specified static field of the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to modify. - * @param[in] value The integer value to assign. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_SetStaticField_Int)(ani_env *env, ani_class cls, ani_static_field field, ani_int value); - - /** - * @brief Sets a long value to a static field of a class. - * - * This function assigns a long value to the specified static field of the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to modify. - * @param[in] value The long value to assign. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_SetStaticField_Long)(ani_env *env, ani_class cls, ani_static_field field, ani_long value); - - /** - * @brief Sets a float value to a static field of a class. - * - * This function assigns a float value to the specified static field of the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to modify. - * @param[in] value The float value to assign. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_SetStaticField_Float)(ani_env *env, ani_class cls, ani_static_field field, ani_float value); - - /** - * @brief Sets a double value to a static field of a class. - * - * This function assigns a double value to the specified static field of the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to modify. - * @param[in] value The double value to assign. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_SetStaticField_Double)(ani_env *env, ani_class cls, ani_static_field field, ani_double value); - - /** - * @brief Sets a reference value to a static field of a class. - * - * This function assigns a reference value to the specified static field of the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to modify. - * @param[in] value The reference value to assign. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_SetStaticField_Ref)(ani_env *env, ani_class cls, ani_static_field field, ani_ref value); - - /** - * @brief Retrieves a boolean value from a static field of a class by its name. - * - * This function retrieves the boolean value of the specified static field from the given class by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] name The name of the static field to retrieve. - * @param[out] result A pointer to store the retrieved boolean value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticFieldByName_Boolean)(ani_env *env, ani_class cls, const char *name, - ani_boolean *result); - - /** - * @brief Retrieves a character value from a static field of a class by its name. - * - * This function retrieves the character value of the specified static field from the given class by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] name The name of the static field to retrieve. - * @param[out] result A pointer to store the retrieved character value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticFieldByName_Char)(ani_env *env, ani_class cls, const char *name, ani_char *result); - - /** - * @brief Retrieves a byte value from a static field of a class by its name. - * - * This function retrieves the byte value of the specified static field from the given class by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] name The name of the static field to retrieve. - * @param[out] result A pointer to store the retrieved byte value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticFieldByName_Byte)(ani_env *env, ani_class cls, const char *name, ani_byte *result); - - /** - * @brief Retrieves a short value from a static field of a class by its name. - * - * This function retrieves the short value of the specified static field from the given class by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] name The name of the static field to retrieve. - * @param[out] result A pointer to store the retrieved short value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticFieldByName_Short)(ani_env *env, ani_class cls, const char *name, ani_short *result); - - /** - * @brief Retrieves an integer value from a static field of a class by its name. - * - * This function retrieves the integer value of the specified static field from the given class by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] name The name of the static field to retrieve. - * @param[out] result A pointer to store the retrieved integer value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticFieldByName_Int)(ani_env *env, ani_class cls, const char *name, ani_int *result); - - /** - * @brief Retrieves a long value from a static field of a class by its name. - * - * This function retrieves the long value of the specified static field from the given class by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] name The name of the static field to retrieve. - * @param[out] result A pointer to store the retrieved long value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticFieldByName_Long)(ani_env *env, ani_class cls, const char *name, ani_long *result); - - /** - * @brief Retrieves a float value from a static field of a class by its name. - * - * This function retrieves the float value of the specified static field from the given class by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] name The name of the static field to retrieve. - * @param[out] result A pointer to store the retrieved float value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticFieldByName_Float)(ani_env *env, ani_class cls, const char *name, ani_float *result); - - /** - * @brief Retrieves a double value from a static field of a class by its name. - * - * This function retrieves the double value of the specified static field from the given class by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] name The name of the static field to retrieve. - * @param[out] result A pointer to store the retrieved double value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticFieldByName_Double)(ani_env *env, ani_class cls, const char *name, ani_double *result); - - /** - * @brief Retrieves a reference value from a static field of a class by its name. - * - * This function retrieves the reference value of the specified static field from the given class by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] name The name of the static field to retrieve. - * @param[out] result A pointer to store the retrieved reference value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticFieldByName_Ref)(ani_env *env, ani_class cls, const char *name, ani_ref *result); - - /** - * @brief Sets a boolean value to a static field of a class by its name. - * - * This function assigns a boolean value to the specified static field of the given class by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] name The name of the static field to modify. - * @param[in] value The boolean value to assign. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_SetStaticFieldByName_Boolean)(ani_env *env, ani_class cls, const char *name, ani_boolean value); - - /** - * @brief Sets a character value to a static field of a class by its name. - * - * This function assigns a character value to the specified static field of the given class by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] name The name of the static field to modify. - * @param[in] value The character value to assign. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_SetStaticFieldByName_Char)(ani_env *env, ani_class cls, const char *name, ani_char value); - - /** - * @brief Sets a byte value to a static field of a class by its name. - * - * This function assigns a byte value to the specified static field of the given class by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] name The name of the static field to modify. - * @param[in] value The byte value to assign. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_SetStaticFieldByName_Byte)(ani_env *env, ani_class cls, const char *name, ani_byte value); - - /** - * @brief Sets a short value to a static field of a class by its name. - * - * This function assigns a short value to the specified static field of the given class by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] name The name of the static field to modify. - * @param[in] value The short value to assign. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_SetStaticFieldByName_Short)(ani_env *env, ani_class cls, const char *name, ani_short value); - - /** - * @brief Sets an integer value to a static field of a class by its name. - * - * This function assigns an integer value to the specified static field of the given class by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] name The name of the static field to modify. - * @param[in] value The integer value to assign. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_SetStaticFieldByName_Int)(ani_env *env, ani_class cls, const char *name, ani_int value); - - /** - * @brief Sets a long value to a static field of a class by its name. - * - * This function assigns a long value to the specified static field of the given class by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] name The name of the static field to modify. - * @param[in] value The long value to assign. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_SetStaticFieldByName_Long)(ani_env *env, ani_class cls, const char *name, ani_long value); - - /** - * @brief Sets a float value to a static field of a class by its name. - * - * This function assigns a float value to the specified static field of the given class by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] name The name of the static field to modify. - * @param[in] value The float value to assign. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_SetStaticFieldByName_Float)(ani_env *env, ani_class cls, const char *name, ani_float value); - - /** - * @brief Sets a double value to a static field of a class by its name. - * - * This function assigns a double value to the specified static field of the given class by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] name The name of the static field to modify. - * @param[in] value The double value to assign. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_SetStaticFieldByName_Double)(ani_env *env, ani_class cls, const char *name, ani_double value); - - /** - * @brief Sets a reference value to a static field of a class by its name. - * - * This function assigns a reference value to the specified static field of the given class by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] name The name of the static field to modify. - * @param[in] value The reference value to assign. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_SetStaticFieldByName_Ref)(ani_env *env, ani_class cls, const char *name, ani_ref value); - - /** - * @brief Calls a static method with a boolean return type. - * - * This function calls the specified static method of a class and retrieves a boolean result using variadic - * arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the boolean result. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Boolean)(ani_env *env, ani_class cls, ani_static_method method, - ani_boolean *result, ...); - - /** - * @brief Calls a static method with a boolean return type (array-based). - * - * This function calls the specified static method of a class and retrieves a boolean result using arguments from an - * array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the boolean result. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Boolean_A)(ani_env *env, ani_class cls, ani_static_method method, - ani_boolean *result, const ani_value *args); - - /** - * @brief Calls a static method with a boolean return type (variadic arguments). - * - * This function calls the specified static method of a class and retrieves a boolean result using a `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the boolean result. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Boolean_V)(ani_env *env, ani_class cls, ani_static_method method, - ani_boolean *result, va_list args); - - /** - * @brief Calls a static method with a character return type. - * - * This function calls the specified static method of a class and retrieves a character result using variadic - * arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the character result. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Char)(ani_env *env, ani_class cls, ani_static_method method, ani_char *result, - ...); - - /** - * @brief Calls a static method with a character return type (array-based). - * - * This function calls the specified static method of a class and retrieves a character result using arguments from - * an array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the character result. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Char_A)(ani_env *env, ani_class cls, ani_static_method method, ani_char *result, - const ani_value *args); - - /** - * @brief Calls a static method with a character return type (variadic arguments). - * - * This function calls the specified static method of a class and retrieves a character result using a `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the character result. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Char_V)(ani_env *env, ani_class cls, ani_static_method method, ani_char *result, - va_list args); - - /** - * @brief Calls a static method with a byte return type. - * - * This function calls the specified static method of a class and retrieves a byte result using variadic arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the byte result. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Byte)(ani_env *env, ani_class cls, ani_static_method method, ani_byte *result, - ...); - - /** - * @brief Calls a static method with a byte return type (array-based). - * - * This function calls the specified static method of a class and retrieves a byte result using arguments from an - * array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the byte result. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Byte_A)(ani_env *env, ani_class cls, ani_static_method method, ani_byte *result, - const ani_value *args); - - /** - * @brief Calls a static method with a byte return type (variadic arguments). - * - * This function calls the specified static method of a class and retrieves a byte result using a `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the byte result. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Byte_V)(ani_env *env, ani_class cls, ani_static_method method, ani_byte *result, - va_list args); - - /** - * @brief Calls a static method with a short return type. - * - * This function calls the specified static method of a class and retrieves a short result using variadic arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the short result. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Short)(ani_env *env, ani_class cls, ani_static_method method, ani_short *result, - ...); - - /** - * @brief Calls a static method with a short return type (array-based). - * - * This function calls the specified static method of a class and retrieves a short result using arguments from an - * array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the short result. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Short_A)(ani_env *env, ani_class cls, ani_static_method method, - ani_short *result, const ani_value *args); - - /** - * @brief Calls a static method with a short return type (variadic arguments). - * - * This function calls the specified static method of a class and retrieves a short result using a `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the short result. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Short_V)(ani_env *env, ani_class cls, ani_static_method method, - ani_short *result, va_list args); - - /** - * @brief Calls a static method with an integer return type. - * - * This function calls the specified static method of a class and retrieves an integer result using variadic - * arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the integer result. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Int)(ani_env *env, ani_class cls, ani_static_method method, ani_int *result, - ...); - - /** - * @brief Calls a static method with an integer return type (array-based). - * - * This function calls the specified static method of a class and retrieves an integer result using arguments from - * an array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the integer result. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Int_A)(ani_env *env, ani_class cls, ani_static_method method, ani_int *result, - const ani_value *args); - - /** - * @brief Calls a static method with an integer return type (variadic arguments). - * - * This function calls the specified static method of a class and retrieves an integer result using a `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the integer result. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Int_V)(ani_env *env, ani_class cls, ani_static_method method, ani_int *result, - va_list args); - - /** - * @brief Calls a static method with a long return type. - * - * This function calls the specified static method of a class and retrieves a long result using variadic arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the long result. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Long)(ani_env *env, ani_class cls, ani_static_method method, ani_long *result, - ...); - - /** - * @brief Calls a static method with a long return type (array-based). - * - * This function calls the specified static method of a class and retrieves a long result using arguments from an - * array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the long result. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Long_A)(ani_env *env, ani_class cls, ani_static_method method, ani_long *result, - const ani_value *args); - - /** - * @brief Calls a static method with a long return type (variadic arguments). - * - * This function calls the specified static method of a class and retrieves a long result using a `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the long result. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Long_V)(ani_env *env, ani_class cls, ani_static_method method, ani_long *result, - va_list args); - - /** - * @brief Calls a static method with a float return type. - * - * This function calls the specified static method of a class and retrieves a float result using variadic arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the float result. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Float)(ani_env *env, ani_class cls, ani_static_method method, ani_float *result, - ...); - - /** - * @brief Calls a static method with a float return type (array-based). - * - * This function calls the specified static method of a class and retrieves a float result using arguments from an - * array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the float result. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Float_A)(ani_env *env, ani_class cls, ani_static_method method, - ani_float *result, const ani_value *args); - - /** - * @brief Calls a static method with a float return type (variadic arguments). - * - * This function calls the specified static method of a class and retrieves a float result using a `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the float result. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Float_V)(ani_env *env, ani_class cls, ani_static_method method, - ani_float *result, va_list args); - - /** - * @brief Calls a static method with a double return type. - * - * This function calls the specified static method of a class and retrieves a double result using variadic - * arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the double result. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Double)(ani_env *env, ani_class cls, ani_static_method method, - ani_double *result, ...); - - /** - * @brief Calls a static method with a double return type (array-based). - * - * This function calls the specified static method of a class and retrieves a double result using arguments from an - * array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the double result. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Double_A)(ani_env *env, ani_class cls, ani_static_method method, - ani_double *result, const ani_value *args); - - /** - * @brief Calls a static method with a double return type (variadic arguments). - * - * This function calls the specified static method of a class and retrieves a double result using a `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the double result. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Double_V)(ani_env *env, ani_class cls, ani_static_method method, - ani_double *result, va_list args); - - /** - * @brief Calls a static method with a reference return type. - * - * This function calls the specified static method of a class and retrieves a reference result using variadic - * arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the reference result. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Ref)(ani_env *env, ani_class cls, ani_static_method method, ani_ref *result, - ...); - - /** - * @brief Calls a static method with a reference return type (array-based). - * - * This function calls the specified static method of a class and retrieves a reference result using arguments from - * an array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the reference result. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Ref_A)(ani_env *env, ani_class cls, ani_static_method method, ani_ref *result, - const ani_value *args); - - /** - * @brief Calls a static method with a reference return type (variadic arguments). - * - * This function calls the specified static method of a class and retrieves a reference result using a `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[out] result A pointer to store the reference result. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Ref_V)(ani_env *env, ani_class cls, ani_static_method method, ani_ref *result, - va_list args); - - /** - * @brief Calls a static method with no return value. - * - * This function calls the specified static method of a class using variadic arguments. The method does not return a - * value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Void)(ani_env *env, ani_class cls, ani_static_method method, ...); - - /** - * @brief Calls a static method with no return value (array-based). - * - * This function calls the specified static method of a class using arguments from an array. The method does not - * return a value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Void_A)(ani_env *env, ani_class cls, ani_static_method method, - const ani_value *args); - - /** - * @brief Calls a static method with no return value (variadic arguments). - * - * This function calls the specified static method of a class using a `va_list`. The method does not return a value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to call. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethod_Void_V)(ani_env *env, ani_class cls, ani_static_method method, va_list args); - - /** - * @brief Calls a static method by name with a boolean return type. - * - * This function calls the specified static method of a class by its name and retrieves a boolean result using - * variadic arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the boolean result. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Boolean)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_boolean *result, ...); - - /** - * @brief Calls a static method by name with a boolean return type (array-based). - * - * This function calls the specified static method of a class by its name and retrieves a boolean result using - * arguments from an array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the boolean result. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Boolean_A)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_boolean *result, - const ani_value *args); - - /** - * @brief Calls a static method by name with a boolean return type (variadic arguments). - * - * This function calls the specified static method of a class by its name and retrieves a boolean result using a - * `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the boolean result. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Boolean_V)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_boolean *result, va_list args); - - /** - * @brief Calls a static method by name with a char return type. - * - * This function calls the specified static method of a class by its name and retrieves a char result using variadic - * arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the char result. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Char)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_char *result, ...); - - /** - * @brief Calls a static method by name with a char return type (array-based). - * - * This function calls the specified static method of a class by its name and retrieves a char result using - * arguments from an array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the char result. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Char_A)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_char *result, const ani_value *args); - - /** - * @brief Calls a static method by name with a char return type (variadic arguments). - * - * This function calls the specified static method of a class by its name and retrieves a char result using a - * `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the char result. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Char_V)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_char *result, va_list args); - - /** - * @brief Calls a static method by name with a byte return type. - * - * This function calls the specified static method of a class by its name and retrieves a byte result using variadic - * arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the byte result. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Byte)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_byte *result, ...); - - /** - * @brief Calls a static method by name with a byte return type (array-based). - * - * This function calls the specified static method of a class by its name and retrieves a byte result using - * arguments from an array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the byte result. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Byte_A)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_byte *result, const ani_value *args); - - /** - * @brief Calls a static method by name with a byte return type (variadic arguments). - * - * This function calls the specified static method of a class by its name and retrieves a byte result using a - * `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the byte result. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Byte_V)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_byte *result, va_list args); - - /** - * @brief Calls a static method by name with a short return type. - * - * This function calls the specified static method of a class by its name and retrieves a short result using - * variadic arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the short result. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Short)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_short *result, ...); - - /** - * @brief Calls a static method by name with a short return type (array-based). - * - * This function calls the specified static method of a class by its name and retrieves a short result using - * arguments from an array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the short result. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Short_A)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_short *result, const ani_value *args); - - /** - * @brief Calls a static method by name with a short return type (variadic arguments). - * - * This function calls the specified static method of a class by its name and retrieves a short result using a - * `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the short result. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Short_V)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_short *result, va_list args); - - /** - * @brief Calls a static method by name with a integer return type. - * - * This function calls the specified static method of a class by its name and retrieves a integer result using - * variadic arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the integer result. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Int)(ani_env *env, ani_class cls, const char *name, const char *signature, - ani_int *result, ...); - - /** - * @brief Calls a static method by name with a integer return type (array-based). - * - * This function calls the specified static method of a class by its name and retrieves a integer result using - * arguments from an array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the integer result. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Int_A)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_int *result, const ani_value *args); - - /** - * @brief Calls a static method by name with a integer return type (variadic arguments). - * - * This function calls the specified static method of a class by its name and retrieves a integer result using a - * `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the integer result. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Int_V)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_int *result, va_list args); - - /** - * @brief Calls a static method by name with a long return type. - * - * This function calls the specified static method of a class by its name and retrieves a long result using variadic - * arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the long result. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Long)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_long *result, ...); - - /** - * @brief Calls a static method by name with a long return type (array-based). - * - * This function calls the specified static method of a class by its name and retrieves a long result using - * arguments from an array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the long result. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Long_A)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_long *result, const ani_value *args); - - /** - * @brief Calls a static method by name with a long return type (variadic arguments). - * - * This function calls the specified static method of a class by its name and retrieves a long result using a - * `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the long result. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Long_V)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_long *result, va_list args); - - /** - * @brief Calls a static method by name with a float return type. - * - * This function calls the specified static method of a class by its name and retrieves a float result using - * variadic arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the float result. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Float)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_float *result, ...); - - /** - * @brief Calls a static method by name with a float return type (array-based). - * - * This function calls the specified static method of a class by its name and retrieves a float result using - * arguments from an array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the float result. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Float_A)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_float *result, const ani_value *args); - - /** - * @brief Calls a static method by name with a float return type (variadic arguments). - * - * This function calls the specified static method of a class by its name and retrieves a float result using a - * `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the float result. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Float_V)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_float *result, va_list args); - - /** - * @brief Calls a static method by name with a double return type. - * - * This function calls the specified static method of a class by its name and retrieves a double result using - * variadic arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the double result. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Double)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_double *result, ...); - - /** - * @brief Calls a static method by name with a double return type (array-based). - * - * This function calls the specified static method of a class by its name and retrieves a double result using - * arguments from an array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the double result. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Double_A)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_double *result, - const ani_value *args); - - /** - * @brief Calls a static method by name with a double return type (variadic arguments). - * - * This function calls the specified static method of a class by its name and retrieves a double result using a - * `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the double result. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Double_V)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_double *result, va_list args); - - /** - * @brief Calls a static method by name with a reference return type. - * - * This function calls the specified static method of a class by its name and retrieves a reference result using - * variadic arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the reference result. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Ref)(ani_env *env, ani_class cls, const char *name, const char *signature, - ani_ref *result, ...); - - /** - * @brief Calls a static method by name with a reference return type (array-based). - * - * This function calls the specified static method of a class by its name and retrieves a reference result using - * arguments from an array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the reference result. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Ref_A)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_ref *result, const ani_value *args); - - /** - * @brief Calls a static method by name with a reference return type (variadic arguments). - * - * This function calls the specified static method of a class by its name and retrieves a reference result using a - * `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[out] result A pointer to store the reference result. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Ref_V)(ani_env *env, ani_class cls, const char *name, - const char *signature, ani_ref *result, va_list args); - - /** - * @brief Calls a static method by name with no return value. - * - * This function calls the specified static method of a class by its name using variadic arguments. The method does - * not return a value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Void)(ani_env *env, ani_class cls, const char *name, - const char *signature, ...); - - /** - * @brief Calls a static method by name with no return value (array-based). - * - * This function calls the specified static method of a class by its name using arguments from an array. The method - * does not return a value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Void_A)(ani_env *env, ani_class cls, const char *name, - const char *signature, const ani_value *args); - - /** - * @brief Calls a static method by name with no return value (variadic arguments). - * - * This function calls the specified static method of a class by its name using a `va_list`. The method does not - * return a value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] name The name of the static method to call. - * @param[in] signature The signature of the static method to call. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_CallStaticMethodByName_Void_V)(ani_env *env, ani_class cls, const char *name, - const char *signature, va_list args); - - /** - * @brief Retrieves a boolean value from a field of an object. - * - * This function retrieves the boolean value of the specified field from the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] field The field to retrieve the boolean value from. - * @param[out] result A pointer to store the retrieved boolean value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetField_Boolean)(ani_env *env, ani_object object, ani_field field, ani_boolean *result); - - /** - * @brief Retrieves a char value from a field of an object. - * - * This function retrieves the char value of the specified field from the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] field The field to retrieve the char value from. - * @param[out] result A pointer to store the retrieved char value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetField_Char)(ani_env *env, ani_object object, ani_field field, ani_char *result); - - /** - * @brief Retrieves a byte value from a field of an object. - * - * This function retrieves the byte value of the specified field from the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] field The field to retrieve the byte value from. - * @param[out] result A pointer to store the retrieved byte value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetField_Byte)(ani_env *env, ani_object object, ani_field field, ani_byte *result); - - /** - * @brief Retrieves a short value from a field of an object. - * - * This function retrieves the short value of the specified field from the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] field The field to retrieve the short value from. - * @param[out] result A pointer to store the retrieved short value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetField_Short)(ani_env *env, ani_object object, ani_field field, ani_short *result); - - /** - * @brief Retrieves a integer value from a field of an object. - * - * This function retrieves the integer value of the specified field from the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] field The field to retrieve the integer value from. - * @param[out] result A pointer to store the retrieved integer value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetField_Int)(ani_env *env, ani_object object, ani_field field, ani_int *result); - - /** - * @brief Retrieves a long value from a field of an object. - * - * This function retrieves the long value of the specified field from the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] field The field to retrieve the long value from. - * @param[out] result A pointer to store the retrieved long value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetField_Long)(ani_env *env, ani_object object, ani_field field, ani_long *result); - - /** - * @brief Retrieves a float value from a field of an object. - * - * This function retrieves the float value of the specified field from the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] field The field to retrieve the float value from. - * @param[out] result A pointer to store the retrieved float value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetField_Float)(ani_env *env, ani_object object, ani_field field, ani_float *result); - - /** - * @brief Retrieves a double value from a field of an object. - * - * This function retrieves the double value of the specified field from the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] field The field to retrieve the double value from. - * @param[out] result A pointer to store the retrieved double value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetField_Double)(ani_env *env, ani_object object, ani_field field, ani_double *result); - - /** - * @brief Retrieves a reference value from a field of an object. - * - * This function retrieves the reference value of the specified field from the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] field The field to retrieve the reference value from. - * @param[out] result A pointer to store the retrieved reference value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetField_Ref)(ani_env *env, ani_object object, ani_field field, ani_ref *result); - - /** - * @brief Sets a boolean value to a field of an object. - * - * This function assigns a boolean value to the specified field of the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] field The field to set the boolean value to. - * @param[in] value The boolean value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetField_Boolean)(ani_env *env, ani_object object, ani_field field, ani_boolean value); - - /** - * @brief Sets a char value to a field of an object. - * - * This function assigns a char value to the specified field of the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] field The field to set the char value to. - * @param[in] value The char value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetField_Char)(ani_env *env, ani_object object, ani_field field, ani_char value); - - /** - * @brief Sets a byte value to a field of an object. - * - * This function assigns a byte value to the specified field of the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] field The field to set the byte value to. - * @param[in] value The byte value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetField_Byte)(ani_env *env, ani_object object, ani_field field, ani_byte value); - - /** - * @brief Sets a short value to a field of an object. - * - * This function assigns a short value to the specified field of the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] field The field to set the short value to. - * @param[in] value The short value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetField_Short)(ani_env *env, ani_object object, ani_field field, ani_short value); - - /** - * @brief Sets a integer value to a field of an object. - * - * This function assigns a integer value to the specified field of the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] field The field to set the integer value to. - * @param[in] value The integer value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetField_Int)(ani_env *env, ani_object object, ani_field field, ani_int value); - - /** - * @brief Sets a long value to a field of an object. - * - * This function assigns a long value to the specified field of the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] field The field to set the long value to. - * @param[in] value The long value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetField_Long)(ani_env *env, ani_object object, ani_field field, ani_long value); - - /** - * @brief Sets a float value to a field of an object. - * - * This function assigns a float value to the specified field of the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] field The field to set the float value to. - * @param[in] value The float value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetField_Float)(ani_env *env, ani_object object, ani_field field, ani_float value); - - /** - * @brief Sets a double value to a field of an object. - * - * This function assigns a double value to the specified field of the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] field The field to set the double value to. - * @param[in] value The double value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetField_Double)(ani_env *env, ani_object object, ani_field field, ani_double value); - - /** - * @brief Sets a reference value to a field of an object. - * - * This function assigns a reference value to the specified field of the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] field The field to set the reference value to. - * @param[in] value The reference value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetField_Ref)(ani_env *env, ani_object object, ani_field field, ani_ref value); - - /** - * @brief Retrieves a boolean value from a field of an object by its name. - * - * This function retrieves the boolean value of the specified field from the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to retrieve the boolean value from. - * @param[out] result A pointer to store the retrieved boolean value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetFieldByName_Boolean)(ani_env *env, ani_object object, const char *name, ani_boolean *result); - - /** - * @brief Retrieves a char value from a field of an object by its name. - * - * This function retrieves the char value of the specified field from the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to retrieve the char value from. - * @param[out] result A pointer to store the retrieved char value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetFieldByName_Char)(ani_env *env, ani_object object, const char *name, ani_char *result); - - /** - * @brief Retrieves a byte value from a field of an object by its name. - * - * This function retrieves the byte value of the specified field from the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to retrieve the byte value from. - * @param[out] result A pointer to store the retrieved byte value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetFieldByName_Byte)(ani_env *env, ani_object object, const char *name, ani_byte *result); - - /** - * @brief Retrieves a short value from a field of an object by its name. - * - * This function retrieves the short value of the specified field from the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to retrieve the short value from. - * @param[out] result A pointer to store the retrieved short value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetFieldByName_Short)(ani_env *env, ani_object object, const char *name, ani_short *result); - - /** - * @brief Retrieves a integer value from a field of an object by its name. - * - * This function retrieves the integer value of the specified field from the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to retrieve the integer value from. - * @param[out] result A pointer to store the retrieved integer value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetFieldByName_Int)(ani_env *env, ani_object object, const char *name, ani_int *result); - - /** - * @brief Retrieves a long value from a field of an object by its name. - * - * This function retrieves the long value of the specified field from the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to retrieve the long value from. - * @param[out] result A pointer to store the retrieved long value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetFieldByName_Long)(ani_env *env, ani_object object, const char *name, ani_long *result); - - /** - * @brief Retrieves a float value from a field of an object by its name. - * - * This function retrieves the float value of the specified field from the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to retrieve the float value from. - * @param[out] result A pointer to store the retrieved float value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetFieldByName_Float)(ani_env *env, ani_object object, const char *name, ani_float *result); - - /** - * @brief Retrieves a double value from a field of an object by its name. - * - * This function retrieves the double value of the specified field from the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to retrieve the double value from. - * @param[out] result A pointer to store the retrieved double value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetFieldByName_Double)(ani_env *env, ani_object object, const char *name, ani_double *result); - - /** - * @brief Retrieves a reference value from a field of an object by its name. - * - * This function retrieves the reference value of the specified field from the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to retrieve the reference value from. - * @param[out] result A pointer to store the retrieved reference value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetFieldByName_Ref)(ani_env *env, ani_object object, const char *name, ani_ref *result); - - /** - * @brief Sets a boolean value to a field of an object by its name. - * - * This function assigns a boolean value to the specified field of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to set the boolean value to. - * @param[in] value The boolean value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetFieldByName_Boolean)(ani_env *env, ani_object object, const char *name, ani_boolean value); - - /** - * @brief Sets a char value to a field of an object by its name. - * - * This function assigns a char value to the specified field of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to set the char value to. - * @param[in] value The char value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetFieldByName_Char)(ani_env *env, ani_object object, const char *name, ani_char value); - - /** - * @brief Sets a byte value to a field of an object by its name. - * - * This function assigns a byte value to the specified field of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to set the byte value to. - * @param[in] value The byte value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetFieldByName_Byte)(ani_env *env, ani_object object, const char *name, ani_byte value); - - /** - * @brief Sets a short value to a field of an object by its name. - * - * This function assigns a short value to the specified field of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to set the short value to. - * @param[in] value The short value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetFieldByName_Short)(ani_env *env, ani_object object, const char *name, ani_short value); - - /** - * @brief Sets a integer value to a field of an object by its name. - * - * This function assigns a integer value to the specified field of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to set the integer value to. - * @param[in] value The integer value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetFieldByName_Int)(ani_env *env, ani_object object, const char *name, ani_int value); - - /** - * @brief Sets a long value to a field of an object by its name. - * - * This function assigns a long value to the specified field of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to set the long value to. - * @param[in] value The long value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetFieldByName_Long)(ani_env *env, ani_object object, const char *name, ani_long value); - - /** - * @brief Sets a float value to a field of an object by its name. - * - * This function assigns a float value to the specified field of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to set the float value to. - * @param[in] value The float value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetFieldByName_Float)(ani_env *env, ani_object object, const char *name, ani_float value); - - /** - * @brief Sets a double value to a field of an object by its name. - * - * This function assigns a double value to the specified field of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to set the double value to. - * @param[in] value The double value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetFieldByName_Double)(ani_env *env, ani_object object, const char *name, ani_double value); - - /** - * @brief Sets a reference value to a field of an object by its name. - * - * This function assigns a reference value to the specified field of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to set the reference value to. - * @param[in] value The reference value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetFieldByName_Ref)(ani_env *env, ani_object object, const char *name, ani_ref value); - - /** - * @brief Retrieves a boolean value from a property of an object by its name. - * - * This function retrieves the boolean value of the specified property from the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] name The name of the property to retrieve the boolean value from. - * @param[out] result A pointer to store the retrieved boolean value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetPropertyByName_Boolean)(ani_env *env, ani_object object, const char *name, - ani_boolean *result); - - /** - * @brief Retrieves a char value from a property of an object by its name. - * - * This function retrieves the char value of the specified property from the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] name The name of the property to retrieve the char value from. - * @param[out] result A pointer to store the retrieved char value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetPropertyByName_Char)(ani_env *env, ani_object object, const char *name, ani_char *result); - - /** - * @brief Retrieves a byte value from a property of an object by its name. - * - * This function retrieves the byte value of the specified property from the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] name The name of the property to retrieve the byte value from. - * @param[out] result A pointer to store the retrieved byte value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetPropertyByName_Byte)(ani_env *env, ani_object object, const char *name, ani_byte *result); - - /** - * @brief Retrieves a short value from a property of an object by its name. - * - * This function retrieves the short value of the specified property from the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] name The name of the property to retrieve the short value from. - * @param[out] result A pointer to store the retrieved short value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetPropertyByName_Short)(ani_env *env, ani_object object, const char *name, ani_short *result); - - /** - * @brief Retrieves a integer value from a property of an object by its name. - * - * This function retrieves the integer value of the specified property from the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] name The name of the property to retrieve the integer value from. - * @param[out] result A pointer to store the retrieved integer value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetPropertyByName_Int)(ani_env *env, ani_object object, const char *name, ani_int *result); - - /** - * @brief Retrieves a long value from a property of an object by its name. - * - * This function retrieves the long value of the specified property from the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] name The name of the property to retrieve the long value from. - * @param[out] result A pointer to store the retrieved long value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetPropertyByName_Long)(ani_env *env, ani_object object, const char *name, ani_long *result); - - /** - * @brief Retrieves a float value from a property of an object by its name. - * - * This function retrieves the float value of the specified property from the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] name The name of the property to retrieve the float value from. - * @param[out] result A pointer to store the retrieved float value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetPropertyByName_Float)(ani_env *env, ani_object object, const char *name, ani_float *result); - - /** - * @brief Retrieves a double value from a property of an object by its name. - * - * This function retrieves the double value of the specified property from the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] name The name of the property to retrieve the double value from. - * @param[out] result A pointer to store the retrieved double value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetPropertyByName_Double)(ani_env *env, ani_object object, const char *name, - ani_double *result); - - /** - * @brief Retrieves a reference value from a property of an object by its name. - * - * This function retrieves the reference value of the specified property from the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] name The name of the property to retrieve the reference value from. - * @param[out] result A pointer to store the retrieved reference value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetPropertyByName_Ref)(ani_env *env, ani_object object, const char *name, ani_ref *result); - - /** - * @brief Sets a boolean value to a property of an object by its name. - * - * This function assigns a boolean value to the specified property of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] name The name of the property to set the boolean value to. - * @param[in] value The boolean value to assign to the property. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetPropertyByName_Boolean)(ani_env *env, ani_object object, const char *name, - ani_boolean value); - - /** - * @brief Sets a char value to a property of an object by its name. - * - * This function assigns a char value to the specified property of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] name The name of the property to set the char value to. - * @param[in] value The char value to assign to the property. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetPropertyByName_Char)(ani_env *env, ani_object object, const char *name, ani_char value); - - /** - * @brief Sets a byte value to a property of an object by its name. - * - * This function assigns a byte value to the specified property of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] name The name of the property to set the byte value to. - * @param[in] value The byte value to assign to the property. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetPropertyByName_Byte)(ani_env *env, ani_object object, const char *name, ani_byte value); - - /** - * @brief Sets a short value to a property of an object by its name. - * - * This function assigns a short value to the specified property of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] name The name of the property to set the short value to. - * @param[in] value The short value to assign to the property. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetPropertyByName_Short)(ani_env *env, ani_object object, const char *name, ani_short value); - - /** - * @brief Sets a integer value to a property of an object by its name. - * - * This function assigns a integer value to the specified property of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] name The name of the property to set the integer value to. - * @param[in] value The integer value to assign to the property. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetPropertyByName_Int)(ani_env *env, ani_object object, const char *name, ani_int value); - - /** - * @brief Sets a long value to a property of an object by its name. - * - * This function assigns a long value to the specified property of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] name The name of the property to set the long value to. - * @param[in] value The long value to assign to the property. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetPropertyByName_Long)(ani_env *env, ani_object object, const char *name, ani_long value); - - /** - * @brief Sets a float value to a property of an object by its name. - * - * This function assigns a float value to the specified property of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] name The name of the property to set the float value to. - * @param[in] value The float value to assign to the property. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetPropertyByName_Float)(ani_env *env, ani_object object, const char *name, ani_float value); - - /** - * @brief Sets a double value to a property of an object by its name. - * - * This function assigns a double value to the specified property of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] name The name of the property to set the double value to. - * @param[in] value The double value to assign to the property. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetPropertyByName_Double)(ani_env *env, ani_object object, const char *name, ani_double value); - - /** - * @brief Sets a reference value to a property of an object by its name. - * - * This function assigns a reference value to the specified property of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] name The name of the property to set the reference value to. - * @param[in] value The reference value to assign to the property. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetPropertyByName_Ref)(ani_env *env, ani_object object, const char *name, ani_ref value); - - /** - * @brief Calls a method on an object and retrieves a boolean return value. - * - * This function calls the specified method of an object using variadic arguments and retrieves a boolean result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the boolean return value. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Boolean)(ani_env *env, ani_object object, ani_method method, ani_boolean *result, - ...); - - /** - * @brief Calls a method on an object and retrieves a boolean return value (array-based). - * - * This function calls the specified method of an object using arguments provided in an array and retrieves a - * boolean result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the boolean return value. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Boolean_A)(ani_env *env, ani_object object, ani_method method, ani_boolean *result, - const ani_value *args); - - /** - * @brief Calls a method on an object and retrieves a boolean return value (variadic arguments). - * - * This function calls the specified method of an object using a `va_list` and retrieves a boolean result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the boolean return value. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Boolean_V)(ani_env *env, ani_object object, ani_method method, ani_boolean *result, - va_list args); - - /** - * @brief Calls a method on an object and retrieves a char return value. - * - * This function calls the specified method of an object using variadic arguments and retrieves a char result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the char return value. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Char)(ani_env *env, ani_object object, ani_method method, ani_char *result, ...); - - /** - * @brief Calls a method on an object and retrieves a char return value (array-based). - * - * This function calls the specified method of an object using arguments provided in an array and retrieves a char - * result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the char return value. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Char_A)(ani_env *env, ani_object object, ani_method method, ani_char *result, - const ani_value *args); - - /** - * @brief Calls a method on an object and retrieves a char return value (variadic arguments). - * - * This function calls the specified method of an object using a `va_list` and retrieves a char result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the char return value. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Char_V)(ani_env *env, ani_object object, ani_method method, ani_char *result, - va_list args); - - /** - * @brief Calls a method on an object and retrieves a byte return value. - * - * This function calls the specified method of an object using variadic arguments and retrieves a byte result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the byte return value. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Byte)(ani_env *env, ani_object object, ani_method method, ani_byte *result, ...); - - /** - * @brief Calls a method on an object and retrieves a byte return value (array-based). - * - * This function calls the specified method of an object using arguments provided in an array and retrieves a byte - * result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the byte return value. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Byte_A)(ani_env *env, ani_object object, ani_method method, ani_byte *result, - const ani_value *args); - - /** - * @brief Calls a method on an object and retrieves a byte return value (variadic arguments). - * - * This function calls the specified method of an object using a `va_list` and retrieves a byte result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the byte return value. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Byte_V)(ani_env *env, ani_object object, ani_method method, ani_byte *result, - va_list args); - - /** - * @brief Calls a method on an object and retrieves a short return value. - * - * This function calls the specified method of an object using variadic arguments and retrieves a short result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the short return value. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Short)(ani_env *env, ani_object object, ani_method method, ani_short *result, ...); - - /** - * @brief Calls a method on an object and retrieves a short return value (array-based). - * - * This function calls the specified method of an object using arguments provided in an array and retrieves a short - * result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the short return value. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Short_A)(ani_env *env, ani_object object, ani_method method, ani_short *result, - const ani_value *args); - - /** - * @brief Calls a method on an object and retrieves a short return value (variadic arguments). - * - * This function calls the specified method of an object using a `va_list` and retrieves a short result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the short return value. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Short_V)(ani_env *env, ani_object object, ani_method method, ani_short *result, - va_list args); - - /** - * @brief Calls a method on an object and retrieves a integer return value. - * - * This function calls the specified method of an object using variadic arguments and retrieves a integer result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the integer return value. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Int)(ani_env *env, ani_object object, ani_method method, ani_int *result, ...); - - /** - * @brief Calls a method on an object and retrieves a integer return value (array-based). - * - * This function calls the specified method of an object using arguments provided in an array and retrieves a - * integer result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the integer return value. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Int_A)(ani_env *env, ani_object object, ani_method method, ani_int *result, - const ani_value *args); - - /** - * @brief Calls a method on an object and retrieves a integer return value (variadic arguments). - * - * This function calls the specified method of an object using a `va_list` and retrieves a integer result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the integer return value. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Int_V)(ani_env *env, ani_object object, ani_method method, ani_int *result, - va_list args); - - /** - * @brief Calls a method on an object and retrieves a long return value. - * - * This function calls the specified method of an object using variadic arguments and retrieves a long result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the long return value. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Long)(ani_env *env, ani_object object, ani_method method, ani_long *result, ...); - - /** - * @brief Calls a method on an object and retrieves a long return value (array-based). - * - * This function calls the specified method of an object using arguments provided in an array and retrieves a long - * result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the long return value. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Long_A)(ani_env *env, ani_object object, ani_method method, ani_long *result, - const ani_value *args); - - /** - * @brief Calls a method on an object and retrieves a long return value (variadic arguments). - * - * This function calls the specified method of an object using a `va_list` and retrieves a long result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the long return value. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Long_V)(ani_env *env, ani_object object, ani_method method, ani_long *result, - va_list args); - - /** - * @brief Calls a method on an object and retrieves a float return value. - * - * This function calls the specified method of an object using variadic arguments and retrieves a float result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the float return value. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Float)(ani_env *env, ani_object object, ani_method method, ani_float *result, ...); - - /** - * @brief Calls a method on an object and retrieves a float return value (array-based). - * - * This function calls the specified method of an object using arguments provided in an array and retrieves a float - * result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the float return value. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Float_A)(ani_env *env, ani_object object, ani_method method, ani_float *result, - const ani_value *args); - - /** - * @brief Calls a method on an object and retrieves a float return value (variadic arguments). - * - * This function calls the specified method of an object using a `va_list` and retrieves a float result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the float return value. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Float_V)(ani_env *env, ani_object object, ani_method method, ani_float *result, - va_list args); - - /** - * @brief Calls a method on an object and retrieves a double return value. - * - * This function calls the specified method of an object using variadic arguments and retrieves a double result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the double return value. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Double)(ani_env *env, ani_object object, ani_method method, ani_double *result, ...); - - /** - * @brief Calls a method on an object and retrieves a double return value (array-based). - * - * This function calls the specified method of an object using arguments provided in an array and retrieves a double - * result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the double return value. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Double_A)(ani_env *env, ani_object object, ani_method method, ani_double *result, - const ani_value *args); - - /** - * @brief Calls a method on an object and retrieves a double return value (variadic arguments). - * - * This function calls the specified method of an object using a `va_list` and retrieves a double result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the double return value. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Double_V)(ani_env *env, ani_object object, ani_method method, ani_double *result, - va_list args); - - /** - * @brief Calls a method on an object and retrieves a reference return value. - * - * This function calls the specified method of an object using variadic arguments and retrieves a reference result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the reference return value. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Ref)(ani_env *env, ani_object object, ani_method method, ani_ref *result, ...); - - /** - * @brief Calls a method on an object and retrieves a reference return value (array-based). - * - * This function calls the specified method of an object using arguments provided in an array and retrieves a - * reference result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the reference return value. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Ref_A)(ani_env *env, ani_object object, ani_method method, ani_ref *result, - const ani_value *args); - - /** - * @brief Calls a method on an object and retrieves a reference return value (variadic arguments). - * - * This function calls the specified method of an object using a `va_list` and retrieves a reference result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[out] result A pointer to store the reference return value. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Ref_V)(ani_env *env, ani_object object, ani_method method, ani_ref *result, - va_list args); - - /** - * @brief Calls a method on an object with no return value. - * - * This function calls the specified method of an object using variadic arguments. The method does not return a - * value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Void)(ani_env *env, ani_object object, ani_method method, ...); - - /** - * @brief Calls a method on an object with no return value (array-based). - * - * This function calls the specified method of an object using arguments provided in an array. The method does not - * return a value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Void_A)(ani_env *env, ani_object object, ani_method method, const ani_value *args); - - /** - * @brief Calls a method on an object with no return value (variadic arguments). - * - * This function calls the specified method of an object using a `va_list`. The method does not return a value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] method The method to call. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethod_Void_V)(ani_env *env, ani_object object, ani_method method, va_list args); - - /** - * @brief Calls a method by name on an object and retrieves a boolean return value. - * - * This function calls the specified method by its name and signature on an object using variadic arguments and - * retrieves a boolean result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the boolean return value. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Boolean)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_boolean *result, ...); - - /** - * @brief Calls a method by name on an object and retrieves a boolean return value (array-based). - * - * This function calls the specified method by its name and signature on an object using arguments provided in an - * array and retrieves a boolean result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the boolean return value. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Boolean_A)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_boolean *result, const ani_value *args); - - /** - * @brief Calls a method by name on an object and retrieves a boolean return value (variadic arguments). - * - * This function calls the specified method by its name and signature on an object using a `va_list` and retrieves a - * boolean result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the boolean return value. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Boolean_V)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_boolean *result, va_list args); - - /** - * @brief Calls a method by name on an object and retrieves a char return value. - * - * This function calls the specified method by its name and signature on an object using variadic arguments and - * retrieves a char result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the char return value. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Char)(ani_env *env, ani_object object, const char *name, const char *signature, - ani_char *result, ...); - - /** - * @brief Calls a method by name on an object and retrieves a char return value (array-based). - * - * This function calls the specified method by its name and signature on an object using arguments provided in an - * array and retrieves a char result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the char return value. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Char_A)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_char *result, const ani_value *args); - - /** - * @brief Calls a method by name on an object and retrieves a char return value (variadic arguments). - * - * This function calls the specified method by its name and signature on an object using a `va_list` and retrieves a - * char result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the char return value. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Char_V)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_char *result, va_list args); - - /** - * @brief Calls a method by name on an object and retrieves a byte return value. - * - * This function calls the specified method by its name and signature on an object using variadic arguments and - * retrieves a byte result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the byte return value. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Byte)(ani_env *env, ani_object object, const char *name, const char *signature, - ani_byte *result, ...); - - /** - * @brief Calls a method by name on an object and retrieves a byte return value (array-based). - * - * This function calls the specified method by its name and signature on an object using arguments provided in an - * array and retrieves a byte result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the byte return value. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Byte_A)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_byte *result, const ani_value *args); - - /** - * @brief Calls a method by name on an object and retrieves a byte return value (variadic arguments). - * - * This function calls the specified method by its name and signature on an object using a `va_list` and retrieves a - * byte result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the byte return value. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Byte_V)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_byte *result, va_list args); - - /** - * @brief Calls a method by name on an object and retrieves a short return value. - * - * This function calls the specified method by its name and signature on an object using variadic arguments and - * retrieves a short result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the short return value. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Short)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_short *result, ...); - - /** - * @brief Calls a method by name on an object and retrieves a short return value (array-based). - * - * This function calls the specified method by its name and signature on an object using arguments provided in an - * array and retrieves a short result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the short return value. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Short_A)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_short *result, const ani_value *args); - - /** - * @brief Calls a method by name on an object and retrieves a short return value (variadic arguments). - * - * This function calls the specified method by its name and signature on an object using a `va_list` and retrieves a - * short result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the short return value. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Short_V)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_short *result, va_list args); - - /** - * @brief Calls a method by name on an object and retrieves a integer return value. - * - * This function calls the specified method by its name and signature on an object using variadic arguments and - * retrieves a integer result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the integer return value. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Int)(ani_env *env, ani_object object, const char *name, const char *signature, - ani_int *result, ...); - - /** - * @brief Calls a method by name on an object and retrieves a integer return value (array-based). - * - * This function calls the specified method by its name and signature on an object using arguments provided in an - * array and retrieves a integer result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the integer return value. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Int_A)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_int *result, const ani_value *args); - - /** - * @brief Calls a method by name on an object and retrieves a integer return value (variadic arguments). - * - * This function calls the specified method by its name and signature on an object using a `va_list` and retrieves a - * integer result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the integer return value. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Int_V)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_int *result, va_list args); - - /** - * @brief Calls a method by name on an object and retrieves a long return value. - * - * This function calls the specified method by its name and signature on an object using variadic arguments and - * retrieves a long result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the long return value. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Long)(ani_env *env, ani_object object, const char *name, const char *signature, - ani_long *result, ...); - - /** - * @brief Calls a method by name on an object and retrieves a long return value (array-based). - * - * This function calls the specified method by its name and signature on an object using arguments provided in an - * array and retrieves a long result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the long return value. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Long_A)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_long *result, const ani_value *args); - - /** - * @brief Calls a method by name on an object and retrieves a long return value (variadic arguments). - * - * This function calls the specified method by its name and signature on an object using a `va_list` and retrieves a - * long result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the long return value. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Long_V)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_long *result, va_list args); - - /** - * @brief Calls a method by name on an object and retrieves a float return value. - * - * This function calls the specified method by its name and signature on an object using variadic arguments and - * retrieves a float result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the float return value. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Float)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_float *result, ...); - - /** - * @brief Calls a method by name on an object and retrieves a float return value (array-based). - * - * This function calls the specified method by its name and signature on an object using arguments provided in an - * array and retrieves a float result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the float return value. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Float_A)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_float *result, const ani_value *args); - - /** - * @brief Calls a method by name on an object and retrieves a float return value (variadic arguments). - * - * This function calls the specified method by its name and signature on an object using a `va_list` and retrieves a - * float result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the float return value. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Float_V)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_float *result, va_list args); - - /** - * @brief Calls a method by name on an object and retrieves a double return value. - * - * This function calls the specified method by its name and signature on an object using variadic arguments and - * retrieves a double result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the double return value. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Double)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_double *result, ...); - - /** - * @brief Calls a method by name on an object and retrieves a double return value (array-based). - * - * This function calls the specified method by its name and signature on an object using arguments provided in an - * array and retrieves a double result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the double return value. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Double_A)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_double *result, const ani_value *args); - - /** - * @brief Calls a method by name on an object and retrieves a double return value (variadic arguments). - * - * This function calls the specified method by its name and signature on an object using a `va_list` and retrieves a - * double result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the double return value. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Double_V)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_double *result, va_list args); - - /** - * @brief Calls a method by name on an object and retrieves a reference return value. - * - * This function calls the specified method by its name and signature on an object using variadic arguments and - * retrieves a reference result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the reference return value. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Ref)(ani_env *env, ani_object object, const char *name, const char *signature, - ani_ref *result, ...); - - /** - * @brief Calls a method by name on an object and retrieves a reference return value (array-based). - * - * This function calls the specified method by its name and signature on an object using arguments provided in an - * array and retrieves a reference result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the reference return value. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Ref_A)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_ref *result, const ani_value *args); - - /** - * @brief Calls a method by name on an object and retrieves a reference return value (variadic arguments). - * - * This function calls the specified method by its name and signature on an object using a `va_list` and retrieves a - * reference result. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[out] result A pointer to store the reference return value. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Ref_V)(ani_env *env, ani_object object, const char *name, - const char *signature, ani_ref *result, va_list args); - - /** - * @brief Calls a method by name on an object with no return value. - * - * This function calls the specified method by its name and signature on an object using variadic arguments. The - * method does not return a value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[in] ... Variadic arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Void)(ani_env *env, ani_object object, const char *name, const char *signature, - ...); - - /** - * @brief Calls a method by name on an object with no return value (array-based). - * - * This function calls the specified method by its name and signature on an object using arguments provided in an - * array. The method does not return a value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[in] args An array of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Void_A)(ani_env *env, ani_object object, const char *name, - const char *signature, const ani_value *args); - - /** - * @brief Calls a method by name on an object with no return value (variadic arguments). - * - * This function calls the specified method by its name and signature on an object using a `va_list`. The method - * does not return a value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object on which the method is to be called. - * @param[in] name The name of the method to call. - * @param[in] signature The signature of the method to call. - * @param[in] args A `va_list` of arguments to pass to the method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_CallMethodByName_Void_V)(ani_env *env, ani_object object, const char *name, - const char *signature, va_list args); - - /** - * @brief Retrieves the number of items in a tuple value. - * - * This function retrieves the total number of items in the specified tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value whose number of items is to be retrieved. - * @param[out] result A pointer to store the number of items. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_GetNumberOfItems)(ani_env *env, ani_tuple_value tuple_value, ani_size *result); - - /** - * @brief Retrieves a boolean item from a tuple value. - * - * This function retrieves the boolean value of the item at the specified index in the tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value containing the item. - * @param[in] index The index of the item. - * @param[out] result A pointer to store the boolean value of the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_GetItem_Boolean)(ani_env *env, ani_tuple_value tuple_value, ani_size index, - ani_boolean *result); - - /** - * @brief Retrieves a char item from a tuple value. - * - * This function retrieves the char value of the item at the specified index in the tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value containing the item. - * @param[in] index The index of the item. - * @param[out] result A pointer to store the char value of the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_GetItem_Char)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_char *result); - - /** - * @brief Retrieves a byte item from a tuple value. - * - * This function retrieves the byte value of the item at the specified index in the tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value containing the item. - * @param[in] index The index of the item. - * @param[out] result A pointer to store the byte value of the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_GetItem_Byte)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_byte *result); - - /** - * @brief Retrieves a short item from a tuple value. - * - * This function retrieves the short value of the item at the specified index in the tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value containing the item. - * @param[in] index The index of the item. - * @param[out] result A pointer to store the short value of the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_GetItem_Short)(ani_env *env, ani_tuple_value tuple_value, ani_size index, - ani_short *result); - - /** - * @brief Retrieves a integer item from a tuple value. - * - * This function retrieves the integer value of the item at the specified index in the tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value containing the item. - * @param[in] index The index of the item. - * @param[out] result A pointer to store the integer value of the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_GetItem_Int)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_int *result); - - /** - * @brief Retrieves a long item from a tuple value. - * - * This function retrieves the long value of the item at the specified index in the tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value containing the item. - * @param[in] index The index of the item. - * @param[out] result A pointer to store the long value of the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_GetItem_Long)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_long *result); - - /** - * @brief Retrieves a float item from a tuple value. - * - * This function retrieves the float value of the item at the specified index in the tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value containing the item. - * @param[in] index The index of the item. - * @param[out] result A pointer to store the float value of the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_GetItem_Float)(ani_env *env, ani_tuple_value tuple_value, ani_size index, - ani_float *result); - - /** - * @brief Retrieves a double item from a tuple value. - * - * This function retrieves the double value of the item at the specified index in the tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value containing the item. - * @param[in] index The index of the item. - * @param[out] result A pointer to store the double value of the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_GetItem_Double)(ani_env *env, ani_tuple_value tuple_value, ani_size index, - ani_double *result); - - /** - * @brief Retrieves a reference item from a tuple value. - * - * This function retrieves the reference value of the item at the specified index in the tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value containing the item. - * @param[in] index The index of the item. - * @param[out] result A pointer to store the reference value of the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_GetItem_Ref)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_ref *result); - - /** - * @brief Sets a boolean value to an item in a tuple value. - * - * This function assigns a boolean value to the item at the specified index in the tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value containing the item. - * @param[in] index The index of the item. - * @param[in] value The boolean value to assign to the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_SetItem_Boolean)(ani_env *env, ani_tuple_value tuple_value, ani_size index, - ani_boolean value); - - /** - * @brief Sets a char value to an item in a tuple value. - * - * This function assigns a char value to the item at the specified index in the tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value containing the item. - * @param[in] index The index of the item. - * @param[in] value The char value to assign to the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_SetItem_Char)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_char value); - - /** - * @brief Sets a byte value to an item in a tuple value. - * - * This function assigns a byte value to the item at the specified index in the tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value containing the item. - * @param[in] index The index of the item. - * @param[in] value The byte value to assign to the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_SetItem_Byte)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_byte value); - - /** - * @brief Sets a short value to an item in a tuple value. - * - * This function assigns a short value to the item at the specified index in the tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value containing the item. - * @param[in] index The index of the item. - * @param[in] value The short value to assign to the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_SetItem_Short)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_short value); - - /** - * @brief Sets a integer value to an item in a tuple value. - * - * This function assigns a integer value to the item at the specified index in the tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value containing the item. - * @param[in] index The index of the item. - * @param[in] value The integer value to assign to the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_SetItem_Int)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_int value); - - /** - * @brief Sets a long value to an item in a tuple value. - * - * This function assigns a long value to the item at the specified index in the tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value containing the item. - * @param[in] index The index of the item. - * @param[in] value The long value to assign to the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_SetItem_Long)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_long value); - - /** - * @brief Sets a float value to an item in a tuple value. - * - * This function assigns a float value to the item at the specified index in the tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value containing the item. - * @param[in] index The index of the item. - * @param[in] value The float value to assign to the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_SetItem_Float)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_float value); - - /** - * @brief Sets a double value to an item in a tuple value. - * - * This function assigns a double value to the item at the specified index in the tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value containing the item. - * @param[in] index The index of the item. - * @param[in] value The double value to assign to the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_SetItem_Double)(ani_env *env, ani_tuple_value tuple_value, ani_size index, - ani_double value); - - /** - * @brief Sets a reference value to an item in a tuple value. - * - * This function assigns a reference value to the item at the specified index in the tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_value The tuple value containing the item. - * @param[in] index The index of the item. - * @param[in] value The reference value to assign to the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_SetItem_Ref)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_ref value); - - /** - * @brief Creates a global reference. - * - * This function creates a global reference from a local reference. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The local reference to convert to a global reference. - * @param[out] result A pointer to store the created global reference. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*GlobalReference_Create)(ani_env *env, ani_ref ref, ani_ref *result); - - /** - * @brief Deletes a global reference. - * - * This function deletes the specified global reference, releasing all associated resources. - * - * @param[in] env A pointer to the environment structure. - * @param[in] gref The global reference to delete. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*GlobalReference_Delete)(ani_env *env, ani_ref gref); - - /** - * @brief Creates a weak reference. - * - * This function creates a weak reference from a local reference. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The local reference to convert to a weak reference. - * @param[out] result A pointer to store the created weak reference. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*WeakReference_Create)(ani_env *env, ani_ref ref, ani_wref *result); - - /** - * @brief Deletes a weak reference. - * - * This function deletes the specified weak reference, releasing all associated resources. - * - * @param[in] env A pointer to the environment structure. - * @param[in] wref The weak reference to delete. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*WeakReference_Delete)(ani_env *env, ani_wref wref); - - /** - * @brief Retrieves the local reference associated with a weak reference. - * - * This function retrieves the local reference that corresponds to the specified weak reference. - * - * @param[in] env A pointer to the environment structure. - * @param[in] wref The weak reference to query. - * @param[out] was_released_result A pointer to boolean flag which indicates that wref is GC collected. - * @param[out] ref_result A pointer to store the retrieved local reference. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*WeakReference_GetReference)(ani_env *env, ani_wref wref, ani_boolean *was_released_result, - ani_ref *ref_result); - - /** - * @brief Creates a new array buffer. - * - * This function creates a new array buffer with the specified length and returns a pointer to the allocated data. - * - * @param[in] env A pointer to the environment structure. - * @param[in] length The length of the array buffer in bytes. - * @param[out] data_result A pointer to store the allocated data of the array buffer. - * @param[out] arraybuffer_result A pointer to store the created array buffer object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*CreateArrayBuffer)(ani_env *env, size_t length, void **data_result, - ani_arraybuffer *arraybuffer_result); - - /** - * @brief Creates a new array buffer using external data. - * - * This function creates an array buffer that uses external data. The provided finalizer will be called when the - * array buffer is no longer needed. - * - * @param[in] env A pointer to the environment structure. - * @param[in] external_data A pointer to the external data to be used by the array buffer. - * @param[in] length The length of the external data in bytes. - * @param[in] finalizer A callback function to be called when the array buffer is finalized. Can be nullptr. - * @param[in] hint A user-defined hint to be passed to the finalizer. Can be nullptr. - * @param[out] result A pointer to store the created array buffer object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*CreateArrayBufferExternal)(ani_env *env, void *external_data, size_t length, ani_finalizer finalizer, - void *hint, ani_arraybuffer *result); - - /** - * @brief Retrieves information about an array buffer. - * - * This function retrieves the data pointer and length of the specified array buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] arraybuffer The array buffer to query. - * @param[out] data_result A pointer to store the data of the array buffer. - * @param[out] length_result A pointer to store the length of the array buffer in bytes. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*ArrayBuffer_GetInfo)(ani_env *env, ani_arraybuffer arraybuffer, void **data_result, - size_t *length_result); - - /** - * @brief Creates a new Promise. - * - * This function creates a new promise and a resolver to manage it. - * - * @param[in] env A pointer to the environment structure. - * @param[out] result_resolver A pointer to store the created resolver. - * @param[out] result_promise A pointer to store the created promise. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Promise_New)(ani_env *env, ani_resolver *result_resolver, ani_object *result_promise); - - /** - * @brief Resolves a promise. - * - * This function resolves a promise by way of the resolver with which it is associated - * and queues promise `then` callbacks. - * - * @param[in] env A pointer to the environment structure. - * @param[in] resolver A resolver whose associated promise to resolve. - * @param[in] resolution A reference with which to resolve the promise. - * @return Returns a status code of type `ani_status` indicating success or failure. - * The `resolver` is freed upon successful completion. - */ - ani_status (*PromiseResolver_Resolve)(ani_env *env, ani_resolver resolver, ani_ref resolution); - - /** - * @brief Rejects a promise. - * - * This function rejects a promise by way of the resolver with which it is associated - * and queues promise `catch` callbacks. - * - * @param[in] env A pointer to the environment structure. - * @param[in] resolver A resolver whose associated promise to resolve. - * @param[in] rejection An error with which to reject the promise. - * @return Returns a status code of type `ani_status` indicating success or failure. - * The `resolver` is freed upon successful completion. - */ - ani_status (*PromiseResolver_Reject)(ani_env *env, ani_resolver resolver, ani_error rejection); -}; - -// C++ API -struct __ani_vm { - const struct __ani_vm_api *c_api; - -#ifdef __cplusplus - ani_status DestroyVM() - { - return c_api->DestroyVM(this); - } - ani_status GetEnv(uint32_t version, ani_env **result) - { - return c_api->GetEnv(this, version, result); - } - ani_status AttachCurrentThread(const ani_options *options, uint32_t version, ani_env **result) - { - return c_api->AttachCurrentThread(this, options, version, result); - } - ani_status DetachCurrentThread() - { - return c_api->DetachCurrentThread(this); - } -#endif // __cplusplus -}; - -struct __ani_env { - const struct __ani_interaction_api *c_api; - -#ifdef __cplusplus - ani_status GetVersion(uint32_t *result) - { - return c_api->GetVersion(this, result); - } - ani_status GetVM(ani_vm **result) - { - return c_api->GetVM(this, result); - } - ani_status Object_New(ani_class cls, ani_method method, ani_object *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_New_V(this, cls, method, result, args); - va_end(args); - return status; - } - ani_status Object_New_A(ani_class cls, ani_method method, ani_object *result, const ani_value *args) - { - return c_api->Object_New_A(this, cls, method, result, args); - } - ani_status Object_New_V(ani_class cls, ani_method method, ani_object *result, va_list args) - { - return c_api->Object_New_V(this, cls, method, result, args); - } - ani_status Object_GetType(ani_object object, ani_type *result) - { - return c_api->Object_GetType(this, object, result); - } - ani_status Object_InstanceOf(ani_object object, ani_type type, ani_boolean *result) - { - return c_api->Object_InstanceOf(this, object, type, result); - } - ani_status Type_GetSuperClass(ani_type type, ani_class *result) - { - return c_api->Type_GetSuperClass(this, type, result); - } - ani_status Type_IsAssignableFrom(ani_type from_type, ani_type to_type, ani_boolean *result) - { - return c_api->Type_IsAssignableFrom(this, from_type, to_type, result); - } - ani_status FindModule(const char *module_descriptor, ani_module *result) - { - return c_api->FindModule(this, module_descriptor, result); - } - ani_status FindNamespace(const char *namespace_descriptor, ani_namespace *result) - { - return c_api->FindNamespace(this, namespace_descriptor, result); - } - ani_status FindClass(const char *class_descriptor, ani_class *result) - { - return c_api->FindClass(this, class_descriptor, result); - } - ani_status FindEnum(const char *enum_descriptor, ani_enum *result) - { - return c_api->FindEnum(this, enum_descriptor, result); - } - ani_status Module_FindNamespace(ani_module module, const char *namespace_descriptor, ani_namespace *result) - { - return c_api->Module_FindNamespace(this, module, namespace_descriptor, result); - } - ani_status Module_FindClass(ani_module module, const char *class_descriptor, ani_class *result) - { - return c_api->Module_FindClass(this, module, class_descriptor, result); - } - ani_status Module_FindEnum(ani_module module, const char *enum_descriptor, ani_enum *result) - { - return c_api->Module_FindEnum(this, module, enum_descriptor, result); - } - ani_status Module_FindFunction(ani_module module, const char *name, const char *signature, ani_function *result) - { - return c_api->Module_FindFunction(this, module, name, signature, result); - } - ani_status Module_FindVariable(ani_module module, const char *name, ani_variable *result) - { - return c_api->Module_FindVariable(this, module, name, result); - } - ani_status Namespace_FindNamespace(ani_namespace ns, const char *namespace_descriptor, ani_namespace *result) - { - return c_api->Namespace_FindNamespace(this, ns, namespace_descriptor, result); - } - ani_status Namespace_FindClass(ani_namespace ns, const char *class_descriptor, ani_class *result) - { - return c_api->Namespace_FindClass(this, ns, class_descriptor, result); - } - ani_status Namespace_FindEnum(ani_namespace ns, const char *enum_descriptor, ani_enum *result) - { - return c_api->Namespace_FindEnum(this, ns, enum_descriptor, result); - } - ani_status Namespace_FindFunction(ani_namespace ns, const char *name, const char *signature, ani_function *result) - { - return c_api->Namespace_FindFunction(this, ns, name, signature, result); - } - ani_status Namespace_FindVariable(ani_namespace ns, const char *name, ani_variable *result) - { - return c_api->Namespace_FindVariable(this, ns, name, result); - } - ani_status Module_BindNativeFunctions(ani_module module, const ani_native_function *functions, - ani_size nr_functions) - { - return c_api->Module_BindNativeFunctions(this, module, functions, nr_functions); - } - ani_status Namespace_BindNativeFunctions(ani_namespace ns, const ani_native_function *functions, - ani_size nr_functions) - { - return c_api->Namespace_BindNativeFunctions(this, ns, functions, nr_functions); - } - ani_status Class_BindNativeMethods(ani_class cls, const ani_native_function *methods, ani_size nr_methods) - { - return c_api->Class_BindNativeMethods(this, cls, methods, nr_methods); - } - ani_status Reference_Delete(ani_ref ref) - { - return c_api->Reference_Delete(this, ref); - } - ani_status EnsureEnoughReferences(ani_size nr_refs) - { - return c_api->EnsureEnoughReferences(this, nr_refs); - } - ani_status CreateLocalScope(ani_size nr_refs) - { - return c_api->CreateLocalScope(this, nr_refs); - } - ani_status DestroyLocalScope() - { - return c_api->DestroyLocalScope(this); - } - ani_status CreateEscapeLocalScope(ani_size nr_refs) - { - return c_api->CreateEscapeLocalScope(this, nr_refs); - } - ani_status DestroyEscapeLocalScope(ani_ref ref, ani_ref *result) - { - return c_api->DestroyEscapeLocalScope(this, ref, result); - } - ani_status ThrowError(ani_error err) - { - return c_api->ThrowError(this, err); - } - ani_status ExistUnhandledError(ani_boolean *result) - { - return c_api->ExistUnhandledError(this, result); - } - ani_status GetUnhandledError(ani_error *result) - { - return c_api->GetUnhandledError(this, result); - } - ani_status ResetError() - { - return c_api->ResetError(this); - } - ani_status DescribeError() - { - return c_api->DescribeError(this); - } - ani_status Abort(const char *message) - { - return c_api->Abort(this, message); - } - ani_status GetNull(ani_ref *result) - { - return c_api->GetNull(this, result); - } - ani_status GetUndefined(ani_ref *result) - { - return c_api->GetUndefined(this, result); - } - ani_status Reference_IsNull(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsNull(this, ref, result); - } - ani_status Reference_IsUndefined(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsUndefined(this, ref, result); - } - ani_status Reference_IsNullishValue(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsNullishValue(this, ref, result); - } - ani_status Reference_Equals(ani_ref ref0, ani_ref ref1, ani_boolean *result) - { - return c_api->Reference_Equals(this, ref0, ref1, result); - } - ani_status Reference_StrictEquals(ani_ref ref0, ani_ref ref1, ani_boolean *result) - { - return c_api->Reference_StrictEquals(this, ref0, ref1, result); - } - ani_status String_NewUTF16(const uint16_t *utf16_string, ani_size utf16_size, ani_string *result) - { - return c_api->String_NewUTF16(this, utf16_string, utf16_size, result); - } - ani_status String_GetUTF16Size(ani_string string, ani_size *result) - { - return c_api->String_GetUTF16Size(this, string, result); - } - ani_status String_GetUTF16(ani_string string, uint16_t *utf16_buffer, ani_size utf16_buffer_size, ani_size *result) - { - return c_api->String_GetUTF16(this, string, utf16_buffer, utf16_buffer_size, result); - } - ani_status String_GetUTF16SubString(ani_string string, ani_size substr_offset, ani_size substr_size, - uint16_t *utf16_buffer, ani_size utf16_buffer_size, ani_size *result) - { - return c_api->String_GetUTF16SubString(this, string, substr_offset, substr_size, utf16_buffer, - utf16_buffer_size, result); - } - ani_status String_NewUTF8(const char *utf8_string, ani_size utf8_size, ani_string *result) - { - return c_api->String_NewUTF8(this, utf8_string, utf8_size, result); - } - ani_status String_GetUTF8Size(ani_string string, ani_size *result) - { - return c_api->String_GetUTF8Size(this, string, result); - } - ani_status String_GetUTF8(ani_string string, char *utf8_buffer, ani_size utf8_buffer_size, ani_size *result) - { - return c_api->String_GetUTF8(this, string, utf8_buffer, utf8_buffer_size, result); - } - ani_status String_GetUTF8SubString(ani_string string, ani_size substr_offset, ani_size substr_size, - char *utf8_buffer, ani_size utf8_buffer_size, ani_size *result) - { - return c_api->String_GetUTF8SubString(this, string, substr_offset, substr_size, utf8_buffer, utf8_buffer_size, - result); - } - ani_status Array_GetLength(ani_array array, ani_size *result) - { - return c_api->Array_GetLength(this, array, result); - } - ani_status Array_New_Boolean(ani_size length, ani_array_boolean *result) - { - return c_api->Array_New_Boolean(this, length, result); - } - ani_status Array_New_Char(ani_size length, ani_array_char *result) - { - return c_api->Array_New_Char(this, length, result); - } - ani_status Array_New_Byte(ani_size length, ani_array_byte *result) - { - return c_api->Array_New_Byte(this, length, result); - } - ani_status Array_New_Short(ani_size length, ani_array_short *result) - { - return c_api->Array_New_Short(this, length, result); - } - ani_status Array_New_Int(ani_size length, ani_array_int *result) - { - return c_api->Array_New_Int(this, length, result); - } - ani_status Array_New_Long(ani_size length, ani_array_long *result) - { - return c_api->Array_New_Long(this, length, result); - } - ani_status Array_New_Float(ani_size length, ani_array_float *result) - { - return c_api->Array_New_Float(this, length, result); - } - ani_status Array_New_Double(ani_size length, ani_array_double *result) - { - return c_api->Array_New_Double(this, length, result); - } - ani_status Array_GetRegion_Boolean(ani_array_boolean array, ani_size offset, ani_size length, - ani_boolean *native_buffer) - { - return c_api->Array_GetRegion_Boolean(this, array, offset, length, native_buffer); - } - ani_status Array_GetRegion_Char(ani_array_char array, ani_size offset, ani_size length, ani_char *native_buffer) - { - return c_api->Array_GetRegion_Char(this, array, offset, length, native_buffer); - } - ani_status Array_GetRegion_Byte(ani_array_byte array, ani_size offset, ani_size length, ani_byte *native_buffer) - { - return c_api->Array_GetRegion_Byte(this, array, offset, length, native_buffer); - } - ani_status Array_GetRegion_Short(ani_array_short array, ani_size offset, ani_size length, ani_short *native_buffer) - { - return c_api->Array_GetRegion_Short(this, array, offset, length, native_buffer); - } - ani_status Array_GetRegion_Int(ani_array_int array, ani_size offset, ani_size length, ani_int *native_buffer) - { - return c_api->Array_GetRegion_Int(this, array, offset, length, native_buffer); - } - ani_status Array_GetRegion_Long(ani_array_long array, ani_size offset, ani_size length, ani_long *native_buffer) - { - return c_api->Array_GetRegion_Long(this, array, offset, length, native_buffer); - } - ani_status Array_GetRegion_Float(ani_array_float array, ani_size offset, ani_size length, ani_float *native_buffer) - { - return c_api->Array_GetRegion_Float(this, array, offset, length, native_buffer); - } - ani_status Array_GetRegion_Double(ani_array_double array, ani_size offset, ani_size length, - ani_double *native_buffer) - { - return c_api->Array_GetRegion_Double(this, array, offset, length, native_buffer); - } - ani_status Array_SetRegion_Boolean(ani_array_boolean array, ani_size offset, ani_size length, - const ani_boolean *native_buffer) - { - return c_api->Array_SetRegion_Boolean(this, array, offset, length, native_buffer); - } - ani_status Array_SetRegion_Char(ani_array_char array, ani_size offset, ani_size length, - const ani_char *native_buffer) - { - return c_api->Array_SetRegion_Char(this, array, offset, length, native_buffer); - } - ani_status Array_SetRegion_Byte(ani_array_byte array, ani_size offset, ani_size length, - const ani_byte *native_buffer) - { - return c_api->Array_SetRegion_Byte(this, array, offset, length, native_buffer); - } - ani_status Array_SetRegion_Short(ani_array_short array, ani_size offset, ani_size length, - const ani_short *native_buffer) - { - return c_api->Array_SetRegion_Short(this, array, offset, length, native_buffer); - } - ani_status Array_SetRegion_Int(ani_array_int array, ani_size offset, ani_size length, const ani_int *native_buffer) - { - return c_api->Array_SetRegion_Int(this, array, offset, length, native_buffer); - } - ani_status Array_SetRegion_Long(ani_array_long array, ani_size offset, ani_size length, - const ani_long *native_buffer) - { - return c_api->Array_SetRegion_Long(this, array, offset, length, native_buffer); - } - ani_status Array_SetRegion_Float(ani_array_float array, ani_size offset, ani_size length, - const ani_float *native_buffer) - { - return c_api->Array_SetRegion_Float(this, array, offset, length, native_buffer); - } - ani_status Array_SetRegion_Double(ani_array_double array, ani_size offset, ani_size length, - const ani_double *native_buffer) - { - return c_api->Array_SetRegion_Double(this, array, offset, length, native_buffer); - } - ani_status Array_New_Ref(ani_type type, ani_size length, ani_ref initial_element, ani_array_ref *result) - { - return c_api->Array_New_Ref(this, type, length, initial_element, result); - } - ani_status Array_Set_Ref(ani_array_ref array, ani_size index, ani_ref ref) - { - return c_api->Array_Set_Ref(this, array, index, ref); - } - ani_status Array_Get_Ref(ani_array_ref array, ani_size index, ani_ref *result) - { - return c_api->Array_Get_Ref(this, array, index, result); - } - ani_status Enum_GetEnumItemByName(ani_enum enm, const char *name, ani_enum_item *result) - { - return c_api->Enum_GetEnumItemByName(this, enm, name, result); - } - ani_status Enum_GetEnumItemByIndex(ani_enum enm, ani_size index, ani_enum_item *result) - { - return c_api->Enum_GetEnumItemByIndex(this, enm, index, result); - } - ani_status EnumItem_GetEnum(ani_enum_item enum_item, ani_enum *result) - { - return c_api->EnumItem_GetEnum(this, enum_item, result); - } - ani_status EnumItem_GetValue_Int(ani_enum_item enum_item, ani_int *result) - { - return c_api->EnumItem_GetValue_Int(this, enum_item, result); - } - ani_status EnumItem_GetValue_String(ani_enum_item enum_item, ani_string *result) - { - return c_api->EnumItem_GetValue_String(this, enum_item, result); - } - ani_status EnumItem_GetName(ani_enum_item enum_item, ani_string *result) - { - return c_api->EnumItem_GetName(this, enum_item, result); - } - ani_status EnumItem_GetIndex(ani_enum_item enum_item, ani_size *result) - { - return c_api->EnumItem_GetIndex(this, enum_item, result); - } - ani_status FunctionalObject_Call(ani_fn_object fn, ani_size argc, ani_ref *argv, ani_ref *result) - { - return c_api->FunctionalObject_Call(this, fn, argc, argv, result); - } - ani_status Variable_SetValue_Boolean(ani_variable variable, ani_boolean value) - { - return c_api->Variable_SetValue_Boolean(this, variable, value); - } - ani_status Variable_SetValue_Char(ani_variable variable, ani_char value) - { - return c_api->Variable_SetValue_Char(this, variable, value); - } - ani_status Variable_SetValue_Byte(ani_variable variable, ani_byte value) - { - return c_api->Variable_SetValue_Byte(this, variable, value); - } - ani_status Variable_SetValue_Short(ani_variable variable, ani_short value) - { - return c_api->Variable_SetValue_Short(this, variable, value); - } - ani_status Variable_SetValue_Int(ani_variable variable, ani_int value) - { - return c_api->Variable_SetValue_Int(this, variable, value); - } - ani_status Variable_SetValue_Long(ani_variable variable, ani_long value) - { - return c_api->Variable_SetValue_Long(this, variable, value); - } - ani_status Variable_SetValue_Float(ani_variable variable, ani_float value) - { - return c_api->Variable_SetValue_Float(this, variable, value); - } - ani_status Variable_SetValue_Double(ani_variable variable, ani_double value) - { - return c_api->Variable_SetValue_Double(this, variable, value); - } - ani_status Variable_SetValue_Ref(ani_variable variable, ani_ref value) - { - return c_api->Variable_SetValue_Ref(this, variable, value); - } - ani_status Variable_GetValue_Boolean(ani_variable variable, ani_boolean *result) - { - return c_api->Variable_GetValue_Boolean(this, variable, result); - } - ani_status Variable_GetValue_Char(ani_variable variable, ani_char *result) - { - return c_api->Variable_GetValue_Char(this, variable, result); - } - ani_status Variable_GetValue_Byte(ani_variable variable, ani_byte *result) - { - return c_api->Variable_GetValue_Byte(this, variable, result); - } - ani_status Variable_GetValue_Short(ani_variable variable, ani_short *result) - { - return c_api->Variable_GetValue_Short(this, variable, result); - } - ani_status Variable_GetValue_Int(ani_variable variable, ani_int *result) - { - return c_api->Variable_GetValue_Int(this, variable, result); - } - ani_status Variable_GetValue_Long(ani_variable variable, ani_long *result) - { - return c_api->Variable_GetValue_Long(this, variable, result); - } - ani_status Variable_GetValue_Float(ani_variable variable, ani_float *result) - { - return c_api->Variable_GetValue_Float(this, variable, result); - } - ani_status Variable_GetValue_Double(ani_variable variable, ani_double *result) - { - return c_api->Variable_GetValue_Double(this, variable, result); - } - ani_status Variable_GetValue_Ref(ani_variable variable, ani_ref *result) - { - return c_api->Variable_GetValue_Ref(this, variable, result); - } - ani_status Function_Call_Boolean(ani_function fn, ani_boolean *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Function_Call_Boolean_V(this, fn, result, args); - va_end(args); - return status; - } - ani_status Function_Call_Boolean_A(ani_function fn, ani_boolean *result, const ani_value *args) - { - return c_api->Function_Call_Boolean_A(this, fn, result, args); - } - ani_status Function_Call_Boolean_V(ani_function fn, ani_boolean *result, va_list args) - { - return c_api->Function_Call_Boolean_V(this, fn, result, args); - } - ani_status Function_Call_Char(ani_function fn, ani_char *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Function_Call_Char_V(this, fn, result, args); - va_end(args); - return status; - } - ani_status Function_Call_Char_A(ani_function fn, ani_char *result, const ani_value *args) - { - return c_api->Function_Call_Char_A(this, fn, result, args); - } - ani_status Function_Call_Char_V(ani_function fn, ani_char *result, va_list args) - { - return c_api->Function_Call_Char_V(this, fn, result, args); - } - ani_status Function_Call_Byte(ani_function fn, ani_byte *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Function_Call_Byte_V(this, fn, result, args); - va_end(args); - return status; - } - ani_status Function_Call_Byte_A(ani_function fn, ani_byte *result, const ani_value *args) - { - return c_api->Function_Call_Byte_A(this, fn, result, args); - } - ani_status Function_Call_Byte_V(ani_function fn, ani_byte *result, va_list args) - { - return c_api->Function_Call_Byte_V(this, fn, result, args); - } - ani_status Function_Call_Short(ani_function fn, ani_short *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Function_Call_Short_V(this, fn, result, args); - va_end(args); - return status; - } - ani_status Function_Call_Short_A(ani_function fn, ani_short *result, const ani_value *args) - { - return c_api->Function_Call_Short_A(this, fn, result, args); - } - ani_status Function_Call_Short_V(ani_function fn, ani_short *result, va_list args) - { - return c_api->Function_Call_Short_V(this, fn, result, args); - } - ani_status Function_Call_Int(ani_function fn, ani_int *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Function_Call_Int_V(this, fn, result, args); - va_end(args); - return status; - } - ani_status Function_Call_Int_A(ani_function fn, ani_int *result, const ani_value *args) - { - return c_api->Function_Call_Int_A(this, fn, result, args); - } - ani_status Function_Call_Int_V(ani_function fn, ani_int *result, va_list args) - { - return c_api->Function_Call_Int_V(this, fn, result, args); - } - ani_status Function_Call_Long(ani_function fn, ani_long *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Function_Call_Long_V(this, fn, result, args); - va_end(args); - return status; - } - ani_status Function_Call_Long_A(ani_function fn, ani_long *result, const ani_value *args) - { - return c_api->Function_Call_Long_A(this, fn, result, args); - } - ani_status Function_Call_Long_V(ani_function fn, ani_long *result, va_list args) - { - return c_api->Function_Call_Long_V(this, fn, result, args); - } - ani_status Function_Call_Float(ani_function fn, ani_float *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Function_Call_Float_V(this, fn, result, args); - va_end(args); - return status; - } - ani_status Function_Call_Float_A(ani_function fn, ani_float *result, const ani_value *args) - { - return c_api->Function_Call_Float_A(this, fn, result, args); - } - ani_status Function_Call_Float_V(ani_function fn, ani_float *result, va_list args) - { - return c_api->Function_Call_Float_V(this, fn, result, args); - } - ani_status Function_Call_Double(ani_function fn, ani_double *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Function_Call_Double_V(this, fn, result, args); - va_end(args); - return status; - } - ani_status Function_Call_Double_A(ani_function fn, ani_double *result, const ani_value *args) - { - return c_api->Function_Call_Double_A(this, fn, result, args); - } - ani_status Function_Call_Double_V(ani_function fn, ani_double *result, va_list args) - { - return c_api->Function_Call_Double_V(this, fn, result, args); - } - ani_status Function_Call_Ref(ani_function fn, ani_ref *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Function_Call_Ref_V(this, fn, result, args); - va_end(args); - return status; - } - ani_status Function_Call_Ref_A(ani_function fn, ani_ref *result, const ani_value *args) - { - return c_api->Function_Call_Ref_A(this, fn, result, args); - } - ani_status Function_Call_Ref_V(ani_function fn, ani_ref *result, va_list args) - { - return c_api->Function_Call_Ref_V(this, fn, result, args); - } - ani_status Function_Call_Void(ani_function fn, ...) - { - va_list args; - va_start(args, fn); - ani_status status = c_api->Function_Call_Void_V(this, fn, args); - va_end(args); - return status; - } - ani_status Function_Call_Void_A(ani_function fn, const ani_value *args) - { - return c_api->Function_Call_Void_A(this, fn, args); - } - ani_status Function_Call_Void_V(ani_function fn, va_list args) - { - return c_api->Function_Call_Void_V(this, fn, args); - } - ani_status Class_FindField(ani_class cls, const char *name, ani_field *result) - { - return c_api->Class_FindField(this, cls, name, result); - } - ani_status Class_FindStaticField(ani_class cls, const char *name, ani_static_field *result) - { - return c_api->Class_FindStaticField(this, cls, name, result); - } - ani_status Class_FindMethod(ani_class cls, const char *name, const char *signature, ani_method *result) - { - return c_api->Class_FindMethod(this, cls, name, signature, result); - } - ani_status Class_FindStaticMethod(ani_class cls, const char *name, const char *signature, ani_static_method *result) - { - return c_api->Class_FindStaticMethod(this, cls, name, signature, result); - } - ani_status Class_FindSetter(ani_class cls, const char *name, ani_method *result) - { - return c_api->Class_FindSetter(this, cls, name, result); - } - ani_status Class_FindGetter(ani_class cls, const char *name, ani_method *result) - { - return c_api->Class_FindGetter(this, cls, name, result); - } - ani_status Class_FindIndexableGetter(ani_class cls, const char *signature, ani_method *result) - { - return c_api->Class_FindIndexableGetter(this, cls, signature, result); - } - ani_status Class_FindIndexableSetter(ani_class cls, const char *signature, ani_method *result) - { - return c_api->Class_FindIndexableSetter(this, cls, signature, result); - } - ani_status Class_FindIterator(ani_class cls, ani_method *result) - { - return c_api->Class_FindIterator(this, cls, result); - } - ani_status Class_GetStaticField_Boolean(ani_class cls, ani_static_field field, ani_boolean *result) - { - return c_api->Class_GetStaticField_Boolean(this, cls, field, result); - } - ani_status Class_GetStaticField_Char(ani_class cls, ani_static_field field, ani_char *result) - { - return c_api->Class_GetStaticField_Char(this, cls, field, result); - } - ani_status Class_GetStaticField_Byte(ani_class cls, ani_static_field field, ani_byte *result) - { - return c_api->Class_GetStaticField_Byte(this, cls, field, result); - } - ani_status Class_GetStaticField_Short(ani_class cls, ani_static_field field, ani_short *result) - { - return c_api->Class_GetStaticField_Short(this, cls, field, result); - } - ani_status Class_GetStaticField_Int(ani_class cls, ani_static_field field, ani_int *result) - { - return c_api->Class_GetStaticField_Int(this, cls, field, result); - } - ani_status Class_GetStaticField_Long(ani_class cls, ani_static_field field, ani_long *result) - { - return c_api->Class_GetStaticField_Long(this, cls, field, result); - } - ani_status Class_GetStaticField_Float(ani_class cls, ani_static_field field, ani_float *result) - { - return c_api->Class_GetStaticField_Float(this, cls, field, result); - } - ani_status Class_GetStaticField_Double(ani_class cls, ani_static_field field, ani_double *result) - { - return c_api->Class_GetStaticField_Double(this, cls, field, result); - } - ani_status Class_GetStaticField_Ref(ani_class cls, ani_static_field field, ani_ref *result) - { - return c_api->Class_GetStaticField_Ref(this, cls, field, result); - } - ani_status Class_SetStaticField_Boolean(ani_class cls, ani_static_field field, ani_boolean value) - { - return c_api->Class_SetStaticField_Boolean(this, cls, field, value); - } - ani_status Class_SetStaticField_Char(ani_class cls, ani_static_field field, ani_char value) - { - return c_api->Class_SetStaticField_Char(this, cls, field, value); - } - ani_status Class_SetStaticField_Byte(ani_class cls, ani_static_field field, ani_byte value) - { - return c_api->Class_SetStaticField_Byte(this, cls, field, value); - } - ani_status Class_SetStaticField_Short(ani_class cls, ani_static_field field, ani_short value) - { - return c_api->Class_SetStaticField_Short(this, cls, field, value); - } - ani_status Class_SetStaticField_Int(ani_class cls, ani_static_field field, ani_int value) - { - return c_api->Class_SetStaticField_Int(this, cls, field, value); - } - ani_status Class_SetStaticField_Long(ani_class cls, ani_static_field field, ani_long value) - { - return c_api->Class_SetStaticField_Long(this, cls, field, value); - } - ani_status Class_SetStaticField_Float(ani_class cls, ani_static_field field, ani_float value) - { - return c_api->Class_SetStaticField_Float(this, cls, field, value); - } - ani_status Class_SetStaticField_Double(ani_class cls, ani_static_field field, ani_double value) - { - return c_api->Class_SetStaticField_Double(this, cls, field, value); - } - ani_status Class_SetStaticField_Ref(ani_class cls, ani_static_field field, ani_ref value) - { - return c_api->Class_SetStaticField_Ref(this, cls, field, value); - } - ani_status Class_GetStaticFieldByName_Boolean(ani_class cls, const char *name, ani_boolean *result) - { - return c_api->Class_GetStaticFieldByName_Boolean(this, cls, name, result); - } - ani_status Class_GetStaticFieldByName_Char(ani_class cls, const char *name, ani_char *result) - { - return c_api->Class_GetStaticFieldByName_Char(this, cls, name, result); - } - ani_status Class_GetStaticFieldByName_Byte(ani_class cls, const char *name, ani_byte *result) - { - return c_api->Class_GetStaticFieldByName_Byte(this, cls, name, result); - } - ani_status Class_GetStaticFieldByName_Short(ani_class cls, const char *name, ani_short *result) - { - return c_api->Class_GetStaticFieldByName_Short(this, cls, name, result); - } - ani_status Class_GetStaticFieldByName_Int(ani_class cls, const char *name, ani_int *result) - { - return c_api->Class_GetStaticFieldByName_Int(this, cls, name, result); - } - ani_status Class_GetStaticFieldByName_Long(ani_class cls, const char *name, ani_long *result) - { - return c_api->Class_GetStaticFieldByName_Long(this, cls, name, result); - } - ani_status Class_GetStaticFieldByName_Float(ani_class cls, const char *name, ani_float *result) - { - return c_api->Class_GetStaticFieldByName_Float(this, cls, name, result); - } - ani_status Class_GetStaticFieldByName_Double(ani_class cls, const char *name, ani_double *result) - { - return c_api->Class_GetStaticFieldByName_Double(this, cls, name, result); - } - ani_status Class_GetStaticFieldByName_Ref(ani_class cls, const char *name, ani_ref *result) - { - return c_api->Class_GetStaticFieldByName_Ref(this, cls, name, result); - } - ani_status Class_SetStaticFieldByName_Boolean(ani_class cls, const char *name, ani_boolean value) - { - return c_api->Class_SetStaticFieldByName_Boolean(this, cls, name, value); - } - ani_status Class_SetStaticFieldByName_Char(ani_class cls, const char *name, ani_char value) - { - return c_api->Class_SetStaticFieldByName_Char(this, cls, name, value); - } - ani_status Class_SetStaticFieldByName_Byte(ani_class cls, const char *name, ani_byte value) - { - return c_api->Class_SetStaticFieldByName_Byte(this, cls, name, value); - } - ani_status Class_SetStaticFieldByName_Short(ani_class cls, const char *name, ani_short value) - { - return c_api->Class_SetStaticFieldByName_Short(this, cls, name, value); - } - ani_status Class_SetStaticFieldByName_Int(ani_class cls, const char *name, ani_int value) - { - return c_api->Class_SetStaticFieldByName_Int(this, cls, name, value); - } - ani_status Class_SetStaticFieldByName_Long(ani_class cls, const char *name, ani_long value) - { - return c_api->Class_SetStaticFieldByName_Long(this, cls, name, value); - } - ani_status Class_SetStaticFieldByName_Float(ani_class cls, const char *name, ani_float value) - { - return c_api->Class_SetStaticFieldByName_Float(this, cls, name, value); - } - ani_status Class_SetStaticFieldByName_Double(ani_class cls, const char *name, ani_double value) - { - return c_api->Class_SetStaticFieldByName_Double(this, cls, name, value); - } - ani_status Class_SetStaticFieldByName_Ref(ani_class cls, const char *name, ani_ref value) - { - return c_api->Class_SetStaticFieldByName_Ref(this, cls, name, value); - } - ani_status Class_CallStaticMethod_Boolean(ani_class cls, ani_static_method method, ani_boolean *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Class_CallStaticMethod_Boolean_V(this, cls, method, result, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethod_Boolean_A(ani_class cls, ani_static_method method, ani_boolean *result, - const ani_value *args) - { - return c_api->Class_CallStaticMethod_Boolean_A(this, cls, method, result, args); - } - ani_status Class_CallStaticMethod_Boolean_V(ani_class cls, ani_static_method method, ani_boolean *result, - va_list args) - { - return c_api->Class_CallStaticMethod_Boolean_V(this, cls, method, result, args); - } - ani_status Class_CallStaticMethod_Char(ani_class cls, ani_static_method method, ani_char *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Class_CallStaticMethod_Char_V(this, cls, method, result, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethod_Char_A(ani_class cls, ani_static_method method, ani_char *result, - const ani_value *args) - { - return c_api->Class_CallStaticMethod_Char_A(this, cls, method, result, args); - } - ani_status Class_CallStaticMethod_Char_V(ani_class cls, ani_static_method method, ani_char *result, va_list args) - { - return c_api->Class_CallStaticMethod_Char_V(this, cls, method, result, args); - } - ani_status Class_CallStaticMethod_Byte(ani_class cls, ani_static_method method, ani_byte *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Class_CallStaticMethod_Byte_V(this, cls, method, result, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethod_Byte_A(ani_class cls, ani_static_method method, ani_byte *result, - const ani_value *args) - { - return c_api->Class_CallStaticMethod_Byte_A(this, cls, method, result, args); - } - ani_status Class_CallStaticMethod_Byte_V(ani_class cls, ani_static_method method, ani_byte *result, va_list args) - { - return c_api->Class_CallStaticMethod_Byte_V(this, cls, method, result, args); - } - ani_status Class_CallStaticMethod_Short(ani_class cls, ani_static_method method, ani_short *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Class_CallStaticMethod_Short_V(this, cls, method, result, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethod_Short_A(ani_class cls, ani_static_method method, ani_short *result, - const ani_value *args) - { - return c_api->Class_CallStaticMethod_Short_A(this, cls, method, result, args); - } - ani_status Class_CallStaticMethod_Short_V(ani_class cls, ani_static_method method, ani_short *result, va_list args) - { - return c_api->Class_CallStaticMethod_Short_V(this, cls, method, result, args); - } - ani_status Class_CallStaticMethod_Int(ani_class cls, ani_static_method method, ani_int *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Class_CallStaticMethod_Int_V(this, cls, method, result, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethod_Int_A(ani_class cls, ani_static_method method, ani_int *result, - const ani_value *args) - { - return c_api->Class_CallStaticMethod_Int_A(this, cls, method, result, args); - } - ani_status Class_CallStaticMethod_Int_V(ani_class cls, ani_static_method method, ani_int *result, va_list args) - { - return c_api->Class_CallStaticMethod_Int_V(this, cls, method, result, args); - } - ani_status Class_CallStaticMethod_Long(ani_class cls, ani_static_method method, ani_long *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Class_CallStaticMethod_Long_V(this, cls, method, result, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethod_Long_A(ani_class cls, ani_static_method method, ani_long *result, - const ani_value *args) - { - return c_api->Class_CallStaticMethod_Long_A(this, cls, method, result, args); - } - ani_status Class_CallStaticMethod_Long_V(ani_class cls, ani_static_method method, ani_long *result, va_list args) - { - return c_api->Class_CallStaticMethod_Long_V(this, cls, method, result, args); - } - ani_status Class_CallStaticMethod_Float(ani_class cls, ani_static_method method, ani_float *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Class_CallStaticMethod_Float_V(this, cls, method, result, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethod_Float_A(ani_class cls, ani_static_method method, ani_float *result, - const ani_value *args) - { - return c_api->Class_CallStaticMethod_Float_A(this, cls, method, result, args); - } - ani_status Class_CallStaticMethod_Float_V(ani_class cls, ani_static_method method, ani_float *result, va_list args) - { - return c_api->Class_CallStaticMethod_Float_V(this, cls, method, result, args); - } - ani_status Class_CallStaticMethod_Double(ani_class cls, ani_static_method method, ani_double *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Class_CallStaticMethod_Double_V(this, cls, method, result, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethod_Double_A(ani_class cls, ani_static_method method, ani_double *result, - const ani_value *args) - { - return c_api->Class_CallStaticMethod_Double_A(this, cls, method, result, args); - } - ani_status Class_CallStaticMethod_Double_V(ani_class cls, ani_static_method method, ani_double *result, - va_list args) - { - return c_api->Class_CallStaticMethod_Double_V(this, cls, method, result, args); - } - ani_status Class_CallStaticMethod_Ref(ani_class cls, ani_static_method method, ani_ref *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Class_CallStaticMethod_Ref_V(this, cls, method, result, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethod_Ref_A(ani_class cls, ani_static_method method, ani_ref *result, - const ani_value *args) - { - return c_api->Class_CallStaticMethod_Ref_A(this, cls, method, result, args); - } - ani_status Class_CallStaticMethod_Ref_V(ani_class cls, ani_static_method method, ani_ref *result, va_list args) - { - return c_api->Class_CallStaticMethod_Ref_V(this, cls, method, result, args); - } - ani_status Class_CallStaticMethod_Void(ani_class cls, ani_static_method method, ...) - { - va_list args; - va_start(args, method); - ani_status status = c_api->Class_CallStaticMethod_Void_V(this, cls, method, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethod_Void_A(ani_class cls, ani_static_method method, const ani_value *args) - { - return c_api->Class_CallStaticMethod_Void_A(this, cls, method, args); - } - ani_status Class_CallStaticMethod_Void_V(ani_class cls, ani_static_method method, va_list args) - { - return c_api->Class_CallStaticMethod_Void_V(this, cls, method, args); - } - ani_status Class_CallStaticMethodByName_Boolean(ani_class cls, const char *name, const char *signature, - ani_boolean *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Class_CallStaticMethodByName_Boolean_V(this, cls, name, signature, result, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethodByName_Boolean_A(ani_class cls, const char *name, const char *signature, - ani_boolean *result, const ani_value *args) - { - return c_api->Class_CallStaticMethodByName_Boolean_A(this, cls, name, signature, result, args); - } - ani_status Class_CallStaticMethodByName_Boolean_V(ani_class cls, const char *name, const char *signature, - ani_boolean *result, va_list args) - { - return c_api->Class_CallStaticMethodByName_Boolean_V(this, cls, name, signature, result, args); - } - ani_status Class_CallStaticMethodByName_Char(ani_class cls, const char *name, const char *signature, - ani_char *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Class_CallStaticMethodByName_Char_V(this, cls, name, signature, result, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethodByName_Char_A(ani_class cls, const char *name, const char *signature, - ani_char *result, const ani_value *args) - { - return c_api->Class_CallStaticMethodByName_Char_A(this, cls, name, signature, result, args); - } - ani_status Class_CallStaticMethodByName_Char_V(ani_class cls, const char *name, const char *signature, - ani_char *result, va_list args) - { - return c_api->Class_CallStaticMethodByName_Char_V(this, cls, name, signature, result, args); - } - ani_status Class_CallStaticMethodByName_Byte(ani_class cls, const char *name, const char *signature, - ani_byte *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Class_CallStaticMethodByName_Byte_V(this, cls, name, signature, result, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethodByName_Byte_A(ani_class cls, const char *name, const char *signature, - ani_byte *result, const ani_value *args) - { - return c_api->Class_CallStaticMethodByName_Byte_A(this, cls, name, signature, result, args); - } - ani_status Class_CallStaticMethodByName_Byte_V(ani_class cls, const char *name, const char *signature, - ani_byte *result, va_list args) - { - return c_api->Class_CallStaticMethodByName_Byte_V(this, cls, name, signature, result, args); - } - ani_status Class_CallStaticMethodByName_Short(ani_class cls, const char *name, const char *signature, - ani_short *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Class_CallStaticMethodByName_Short_V(this, cls, name, signature, result, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethodByName_Short_A(ani_class cls, const char *name, const char *signature, - ani_short *result, const ani_value *args) - { - return c_api->Class_CallStaticMethodByName_Short_A(this, cls, name, signature, result, args); - } - ani_status Class_CallStaticMethodByName_Short_V(ani_class cls, const char *name, const char *signature, - ani_short *result, va_list args) - { - return c_api->Class_CallStaticMethodByName_Short_V(this, cls, name, signature, result, args); - } - ani_status Class_CallStaticMethodByName_Int(ani_class cls, const char *name, const char *signature, ani_int *result, - ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Class_CallStaticMethodByName_Int_V(this, cls, name, signature, result, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethodByName_Int_A(ani_class cls, const char *name, const char *signature, - ani_int *result, const ani_value *args) - { - return c_api->Class_CallStaticMethodByName_Int_A(this, cls, name, signature, result, args); - } - ani_status Class_CallStaticMethodByName_Int_V(ani_class cls, const char *name, const char *signature, - ani_int *result, va_list args) - { - return c_api->Class_CallStaticMethodByName_Int_V(this, cls, name, signature, result, args); - } - ani_status Class_CallStaticMethodByName_Long(ani_class cls, const char *name, const char *signature, - ani_long *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Class_CallStaticMethodByName_Long_V(this, cls, name, signature, result, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethodByName_Long_A(ani_class cls, const char *name, const char *signature, - ani_long *result, const ani_value *args) - { - return c_api->Class_CallStaticMethodByName_Long_A(this, cls, name, signature, result, args); - } - ani_status Class_CallStaticMethodByName_Long_V(ani_class cls, const char *name, const char *signature, - ani_long *result, va_list args) - { - return c_api->Class_CallStaticMethodByName_Long_V(this, cls, name, signature, result, args); - } - ani_status Class_CallStaticMethodByName_Float(ani_class cls, const char *name, const char *signature, - ani_float *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Class_CallStaticMethodByName_Float_V(this, cls, name, signature, result, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethodByName_Float_A(ani_class cls, const char *name, const char *signature, - ani_float *result, const ani_value *args) - { - return c_api->Class_CallStaticMethodByName_Float_A(this, cls, name, signature, result, args); - } - ani_status Class_CallStaticMethodByName_Float_V(ani_class cls, const char *name, const char *signature, - ani_float *result, va_list args) - { - return c_api->Class_CallStaticMethodByName_Float_V(this, cls, name, signature, result, args); - } - ani_status Class_CallStaticMethodByName_Double(ani_class cls, const char *name, const char *signature, - ani_double *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Class_CallStaticMethodByName_Double_V(this, cls, name, signature, result, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethodByName_Double_A(ani_class cls, const char *name, const char *signature, - ani_double *result, const ani_value *args) - { - return c_api->Class_CallStaticMethodByName_Double_A(this, cls, name, signature, result, args); - } - ani_status Class_CallStaticMethodByName_Double_V(ani_class cls, const char *name, const char *signature, - ani_double *result, va_list args) - { - return c_api->Class_CallStaticMethodByName_Double_V(this, cls, name, signature, result, args); - } - ani_status Class_CallStaticMethodByName_Ref(ani_class cls, const char *name, const char *signature, ani_ref *result, - ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Class_CallStaticMethodByName_Ref_V(this, cls, name, signature, result, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethodByName_Ref_A(ani_class cls, const char *name, const char *signature, - ani_ref *result, const ani_value *args) - { - return c_api->Class_CallStaticMethodByName_Ref_A(this, cls, name, signature, result, args); - } - ani_status Class_CallStaticMethodByName_Ref_V(ani_class cls, const char *name, const char *signature, - ani_ref *result, va_list args) - { - return c_api->Class_CallStaticMethodByName_Ref_V(this, cls, name, signature, result, args); - } - ani_status Class_CallStaticMethodByName_Void(ani_class cls, const char *name, const char *signature, ...) - { - va_list args; - va_start(args, signature); - ani_status status = c_api->Class_CallStaticMethodByName_Void_V(this, cls, name, signature, args); - va_end(args); - return status; - } - ani_status Class_CallStaticMethodByName_Void_A(ani_class cls, const char *name, const char *signature, - const ani_value *args) - { - return c_api->Class_CallStaticMethodByName_Void_A(this, cls, name, signature, args); - } - ani_status Class_CallStaticMethodByName_Void_V(ani_class cls, const char *name, const char *signature, va_list args) - { - return c_api->Class_CallStaticMethodByName_Void_V(this, cls, name, signature, args); - } - ani_status Object_GetField_Boolean(ani_object object, ani_field field, ani_boolean *result) - { - return c_api->Object_GetField_Boolean(this, object, field, result); - } - ani_status Object_GetField_Char(ani_object object, ani_field field, ani_char *result) - { - return c_api->Object_GetField_Char(this, object, field, result); - } - ani_status Object_GetField_Byte(ani_object object, ani_field field, ani_byte *result) - { - return c_api->Object_GetField_Byte(this, object, field, result); - } - ani_status Object_GetField_Short(ani_object object, ani_field field, ani_short *result) - { - return c_api->Object_GetField_Short(this, object, field, result); - } - ani_status Object_GetField_Int(ani_object object, ani_field field, ani_int *result) - { - return c_api->Object_GetField_Int(this, object, field, result); - } - ani_status Object_GetField_Long(ani_object object, ani_field field, ani_long *result) - { - return c_api->Object_GetField_Long(this, object, field, result); - } - ani_status Object_GetField_Float(ani_object object, ani_field field, ani_float *result) - { - return c_api->Object_GetField_Float(this, object, field, result); - } - ani_status Object_GetField_Double(ani_object object, ani_field field, ani_double *result) - { - return c_api->Object_GetField_Double(this, object, field, result); - } - ani_status Object_GetField_Ref(ani_object object, ani_field field, ani_ref *result) - { - return c_api->Object_GetField_Ref(this, object, field, result); - } - ani_status Object_SetField_Boolean(ani_object object, ani_field field, ani_boolean value) - { - return c_api->Object_SetField_Boolean(this, object, field, value); - } - ani_status Object_SetField_Char(ani_object object, ani_field field, ani_char value) - { - return c_api->Object_SetField_Char(this, object, field, value); - } - ani_status Object_SetField_Byte(ani_object object, ani_field field, ani_byte value) - { - return c_api->Object_SetField_Byte(this, object, field, value); - } - ani_status Object_SetField_Short(ani_object object, ani_field field, ani_short value) - { - return c_api->Object_SetField_Short(this, object, field, value); - } - ani_status Object_SetField_Int(ani_object object, ani_field field, ani_int value) - { - return c_api->Object_SetField_Int(this, object, field, value); - } - ani_status Object_SetField_Long(ani_object object, ani_field field, ani_long value) - { - return c_api->Object_SetField_Long(this, object, field, value); - } - ani_status Object_SetField_Float(ani_object object, ani_field field, ani_float value) - { - return c_api->Object_SetField_Float(this, object, field, value); - } - ani_status Object_SetField_Double(ani_object object, ani_field field, ani_double value) - { - return c_api->Object_SetField_Double(this, object, field, value); - } - ani_status Object_SetField_Ref(ani_object object, ani_field field, ani_ref value) - { - return c_api->Object_SetField_Ref(this, object, field, value); - } - ani_status Object_GetFieldByName_Boolean(ani_object object, const char *name, ani_boolean *result) - { - return c_api->Object_GetFieldByName_Boolean(this, object, name, result); - } - ani_status Object_GetFieldByName_Char(ani_object object, const char *name, ani_char *result) - { - return c_api->Object_GetFieldByName_Char(this, object, name, result); - } - ani_status Object_GetFieldByName_Byte(ani_object object, const char *name, ani_byte *result) - { - return c_api->Object_GetFieldByName_Byte(this, object, name, result); - } - ani_status Object_GetFieldByName_Short(ani_object object, const char *name, ani_short *result) - { - return c_api->Object_GetFieldByName_Short(this, object, name, result); - } - ani_status Object_GetFieldByName_Int(ani_object object, const char *name, ani_int *result) - { - return c_api->Object_GetFieldByName_Int(this, object, name, result); - } - ani_status Object_GetFieldByName_Long(ani_object object, const char *name, ani_long *result) - { - return c_api->Object_GetFieldByName_Long(this, object, name, result); - } - ani_status Object_GetFieldByName_Float(ani_object object, const char *name, ani_float *result) - { - return c_api->Object_GetFieldByName_Float(this, object, name, result); - } - ani_status Object_GetFieldByName_Double(ani_object object, const char *name, ani_double *result) - { - return c_api->Object_GetFieldByName_Double(this, object, name, result); - } - ani_status Object_GetFieldByName_Ref(ani_object object, const char *name, ani_ref *result) - { - return c_api->Object_GetFieldByName_Ref(this, object, name, result); - } - ani_status Object_SetFieldByName_Boolean(ani_object object, const char *name, ani_boolean value) - { - return c_api->Object_SetFieldByName_Boolean(this, object, name, value); - } - ani_status Object_SetFieldByName_Char(ani_object object, const char *name, ani_char value) - { - return c_api->Object_SetFieldByName_Char(this, object, name, value); - } - ani_status Object_SetFieldByName_Byte(ani_object object, const char *name, ani_byte value) - { - return c_api->Object_SetFieldByName_Byte(this, object, name, value); - } - ani_status Object_SetFieldByName_Short(ani_object object, const char *name, ani_short value) - { - return c_api->Object_SetFieldByName_Short(this, object, name, value); - } - ani_status Object_SetFieldByName_Int(ani_object object, const char *name, ani_int value) - { - return c_api->Object_SetFieldByName_Int(this, object, name, value); - } - ani_status Object_SetFieldByName_Long(ani_object object, const char *name, ani_long value) - { - return c_api->Object_SetFieldByName_Long(this, object, name, value); - } - ani_status Object_SetFieldByName_Float(ani_object object, const char *name, ani_float value) - { - return c_api->Object_SetFieldByName_Float(this, object, name, value); - } - ani_status Object_SetFieldByName_Double(ani_object object, const char *name, ani_double value) - { - return c_api->Object_SetFieldByName_Double(this, object, name, value); - } - ani_status Object_SetFieldByName_Ref(ani_object object, const char *name, ani_ref value) - { - return c_api->Object_SetFieldByName_Ref(this, object, name, value); - } - ani_status Object_GetPropertyByName_Boolean(ani_object object, const char *name, ani_boolean *result) - { - return c_api->Object_GetPropertyByName_Boolean(this, object, name, result); - } - ani_status Object_GetPropertyByName_Char(ani_object object, const char *name, ani_char *result) - { - return c_api->Object_GetPropertyByName_Char(this, object, name, result); - } - ani_status Object_GetPropertyByName_Byte(ani_object object, const char *name, ani_byte *result) - { - return c_api->Object_GetPropertyByName_Byte(this, object, name, result); - } - ani_status Object_GetPropertyByName_Short(ani_object object, const char *name, ani_short *result) - { - return c_api->Object_GetPropertyByName_Short(this, object, name, result); - } - ani_status Object_GetPropertyByName_Int(ani_object object, const char *name, ani_int *result) - { - return c_api->Object_GetPropertyByName_Int(this, object, name, result); - } - ani_status Object_GetPropertyByName_Long(ani_object object, const char *name, ani_long *result) - { - return c_api->Object_GetPropertyByName_Long(this, object, name, result); - } - ani_status Object_GetPropertyByName_Float(ani_object object, const char *name, ani_float *result) - { - return c_api->Object_GetPropertyByName_Float(this, object, name, result); - } - ani_status Object_GetPropertyByName_Double(ani_object object, const char *name, ani_double *result) - { - return c_api->Object_GetPropertyByName_Double(this, object, name, result); - } - ani_status Object_GetPropertyByName_Ref(ani_object object, const char *name, ani_ref *result) - { - return c_api->Object_GetPropertyByName_Ref(this, object, name, result); - } - ani_status Object_SetPropertyByName_Boolean(ani_object object, const char *name, ani_boolean value) - { - return c_api->Object_SetPropertyByName_Boolean(this, object, name, value); - } - ani_status Object_SetPropertyByName_Char(ani_object object, const char *name, ani_char value) - { - return c_api->Object_SetPropertyByName_Char(this, object, name, value); - } - ani_status Object_SetPropertyByName_Byte(ani_object object, const char *name, ani_byte value) - { - return c_api->Object_SetPropertyByName_Byte(this, object, name, value); - } - ani_status Object_SetPropertyByName_Short(ani_object object, const char *name, ani_short value) - { - return c_api->Object_SetPropertyByName_Short(this, object, name, value); - } - ani_status Object_SetPropertyByName_Int(ani_object object, const char *name, ani_int value) - { - return c_api->Object_SetPropertyByName_Int(this, object, name, value); - } - ani_status Object_SetPropertyByName_Long(ani_object object, const char *name, ani_long value) - { - return c_api->Object_SetPropertyByName_Long(this, object, name, value); - } - ani_status Object_SetPropertyByName_Float(ani_object object, const char *name, ani_float value) - { - return c_api->Object_SetPropertyByName_Float(this, object, name, value); - } - ani_status Object_SetPropertyByName_Double(ani_object object, const char *name, ani_double value) - { - return c_api->Object_SetPropertyByName_Double(this, object, name, value); - } - ani_status Object_SetPropertyByName_Ref(ani_object object, const char *name, ani_ref value) - { - return c_api->Object_SetPropertyByName_Ref(this, object, name, value); - } - ani_status Object_CallMethod_Boolean(ani_object object, ani_method method, ani_boolean *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_CallMethod_Boolean_V(this, object, method, result, args); - va_end(args); - return status; - } - ani_status Object_CallMethod_Boolean_A(ani_object object, ani_method method, ani_boolean *result, - const ani_value *args) - { - return c_api->Object_CallMethod_Boolean_A(this, object, method, result, args); - } - ani_status Object_CallMethod_Boolean_V(ani_object object, ani_method method, ani_boolean *result, va_list args) - { - return c_api->Object_CallMethod_Boolean_V(this, object, method, result, args); - } - ani_status Object_CallMethod_Char(ani_object object, ani_method method, ani_char *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_CallMethod_Char_V(this, object, method, result, args); - va_end(args); - return status; - } - ani_status Object_CallMethod_Char_A(ani_object object, ani_method method, ani_char *result, const ani_value *args) - { - return c_api->Object_CallMethod_Char_A(this, object, method, result, args); - } - ani_status Object_CallMethod_Char_V(ani_object object, ani_method method, ani_char *result, va_list args) - { - return c_api->Object_CallMethod_Char_V(this, object, method, result, args); - } - ani_status Object_CallMethod_Byte(ani_object object, ani_method method, ani_byte *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_CallMethod_Byte_V(this, object, method, result, args); - va_end(args); - return status; - } - ani_status Object_CallMethod_Byte_A(ani_object object, ani_method method, ani_byte *result, const ani_value *args) - { - return c_api->Object_CallMethod_Byte_A(this, object, method, result, args); - } - ani_status Object_CallMethod_Byte_V(ani_object object, ani_method method, ani_byte *result, va_list args) - { - return c_api->Object_CallMethod_Byte_V(this, object, method, result, args); - } - ani_status Object_CallMethod_Short(ani_object object, ani_method method, ani_short *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_CallMethod_Short_V(this, object, method, result, args); - va_end(args); - return status; - } - ani_status Object_CallMethod_Short_A(ani_object object, ani_method method, ani_short *result, const ani_value *args) - { - return c_api->Object_CallMethod_Short_A(this, object, method, result, args); - } - ani_status Object_CallMethod_Short_V(ani_object object, ani_method method, ani_short *result, va_list args) - { - return c_api->Object_CallMethod_Short_V(this, object, method, result, args); - } - ani_status Object_CallMethod_Int(ani_object object, ani_method method, ani_int *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_CallMethod_Int_V(this, object, method, result, args); - va_end(args); - return status; - } - ani_status Object_CallMethod_Int_A(ani_object object, ani_method method, ani_int *result, const ani_value *args) - { - return c_api->Object_CallMethod_Int_A(this, object, method, result, args); - } - ani_status Object_CallMethod_Int_V(ani_object object, ani_method method, ani_int *result, va_list args) - { - return c_api->Object_CallMethod_Int_V(this, object, method, result, args); - } - ani_status Object_CallMethod_Long(ani_object object, ani_method method, ani_long *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_CallMethod_Long_V(this, object, method, result, args); - va_end(args); - return status; - } - ani_status Object_CallMethod_Long_A(ani_object object, ani_method method, ani_long *result, const ani_value *args) - { - return c_api->Object_CallMethod_Long_A(this, object, method, result, args); - } - ani_status Object_CallMethod_Long_V(ani_object object, ani_method method, ani_long *result, va_list args) - { - return c_api->Object_CallMethod_Long_V(this, object, method, result, args); - } - ani_status Object_CallMethod_Float(ani_object object, ani_method method, ani_float *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_CallMethod_Float_V(this, object, method, result, args); - va_end(args); - return status; - } - ani_status Object_CallMethod_Float_A(ani_object object, ani_method method, ani_float *result, const ani_value *args) - { - return c_api->Object_CallMethod_Float_A(this, object, method, result, args); - } - ani_status Object_CallMethod_Float_V(ani_object object, ani_method method, ani_float *result, va_list args) - { - return c_api->Object_CallMethod_Float_V(this, object, method, result, args); - } - ani_status Object_CallMethod_Double(ani_object object, ani_method method, ani_double *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_CallMethod_Double_V(this, object, method, result, args); - va_end(args); - return status; - } - ani_status Object_CallMethod_Double_A(ani_object object, ani_method method, ani_double *result, - const ani_value *args) - { - return c_api->Object_CallMethod_Double_A(this, object, method, result, args); - } - ani_status Object_CallMethod_Double_V(ani_object object, ani_method method, ani_double *result, va_list args) - { - return c_api->Object_CallMethod_Double_V(this, object, method, result, args); - } - ani_status Object_CallMethod_Ref(ani_object object, ani_method method, ani_ref *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_CallMethod_Ref_V(this, object, method, result, args); - va_end(args); - return status; - } - ani_status Object_CallMethod_Ref_A(ani_object object, ani_method method, ani_ref *result, const ani_value *args) - { - return c_api->Object_CallMethod_Ref_A(this, object, method, result, args); - } - ani_status Object_CallMethod_Ref_V(ani_object object, ani_method method, ani_ref *result, va_list args) - { - return c_api->Object_CallMethod_Ref_V(this, object, method, result, args); - } - ani_status Object_CallMethod_Void(ani_object object, ani_method method, ...) - { - va_list args; - va_start(args, method); - ani_status status = c_api->Object_CallMethod_Void_V(this, object, method, args); - va_end(args); - return status; - } - ani_status Object_CallMethod_Void_A(ani_object object, ani_method method, const ani_value *args) - { - return c_api->Object_CallMethod_Void_A(this, object, method, args); - } - ani_status Object_CallMethod_Void_V(ani_object object, ani_method method, va_list args) - { - return c_api->Object_CallMethod_Void_V(this, object, method, args); - } - ani_status Object_CallMethodByName_Boolean(ani_object object, const char *name, const char *signature, - ani_boolean *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_CallMethodByName_Boolean_V(this, object, name, signature, result, args); - va_end(args); - return status; - } - ani_status Object_CallMethodByName_Boolean_A(ani_object object, const char *name, const char *signature, - ani_boolean *result, const ani_value *args) - { - return c_api->Object_CallMethodByName_Boolean_A(this, object, name, signature, result, args); - } - ani_status Object_CallMethodByName_Boolean_V(ani_object object, const char *name, const char *signature, - ani_boolean *result, va_list args) - { - return c_api->Object_CallMethodByName_Boolean_V(this, object, name, signature, result, args); - } - ani_status Object_CallMethodByName_Char(ani_object object, const char *name, const char *signature, - ani_char *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_CallMethodByName_Char_V(this, object, name, signature, result, args); - va_end(args); - return status; - } - ani_status Object_CallMethodByName_Char_A(ani_object object, const char *name, const char *signature, - ani_char *result, const ani_value *args) - { - return c_api->Object_CallMethodByName_Char_A(this, object, name, signature, result, args); - } - ani_status Object_CallMethodByName_Char_V(ani_object object, const char *name, const char *signature, - ani_char *result, va_list args) - { - return c_api->Object_CallMethodByName_Char_V(this, object, name, signature, result, args); - } - ani_status Object_CallMethodByName_Byte(ani_object object, const char *name, const char *signature, - ani_byte *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_CallMethodByName_Byte_V(this, object, name, signature, result, args); - va_end(args); - return status; - } - ani_status Object_CallMethodByName_Byte_A(ani_object object, const char *name, const char *signature, - ani_byte *result, const ani_value *args) - { - return c_api->Object_CallMethodByName_Byte_A(this, object, name, signature, result, args); - } - ani_status Object_CallMethodByName_Byte_V(ani_object object, const char *name, const char *signature, - ani_byte *result, va_list args) - { - return c_api->Object_CallMethodByName_Byte_V(this, object, name, signature, result, args); - } - ani_status Object_CallMethodByName_Short(ani_object object, const char *name, const char *signature, - ani_short *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_CallMethodByName_Short_V(this, object, name, signature, result, args); - va_end(args); - return status; - } - ani_status Object_CallMethodByName_Short_A(ani_object object, const char *name, const char *signature, - ani_short *result, const ani_value *args) - { - return c_api->Object_CallMethodByName_Short_A(this, object, name, signature, result, args); - } - ani_status Object_CallMethodByName_Short_V(ani_object object, const char *name, const char *signature, - ani_short *result, va_list args) - { - return c_api->Object_CallMethodByName_Short_V(this, object, name, signature, result, args); - } - ani_status Object_CallMethodByName_Int(ani_object object, const char *name, const char *signature, ani_int *result, - ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_CallMethodByName_Int_V(this, object, name, signature, result, args); - va_end(args); - return status; - } - ani_status Object_CallMethodByName_Int_A(ani_object object, const char *name, const char *signature, - ani_int *result, const ani_value *args) - { - return c_api->Object_CallMethodByName_Int_A(this, object, name, signature, result, args); - } - ani_status Object_CallMethodByName_Int_V(ani_object object, const char *name, const char *signature, - ani_int *result, va_list args) - { - return c_api->Object_CallMethodByName_Int_V(this, object, name, signature, result, args); - } - ani_status Object_CallMethodByName_Long(ani_object object, const char *name, const char *signature, - ani_long *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_CallMethodByName_Long_V(this, object, name, signature, result, args); - va_end(args); - return status; - } - ani_status Object_CallMethodByName_Long_A(ani_object object, const char *name, const char *signature, - ani_long *result, const ani_value *args) - { - return c_api->Object_CallMethodByName_Long_A(this, object, name, signature, result, args); - } - ani_status Object_CallMethodByName_Long_V(ani_object object, const char *name, const char *signature, - ani_long *result, va_list args) - { - return c_api->Object_CallMethodByName_Long_V(this, object, name, signature, result, args); - } - ani_status Object_CallMethodByName_Float(ani_object object, const char *name, const char *signature, - ani_float *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_CallMethodByName_Float_V(this, object, name, signature, result, args); - va_end(args); - return status; - } - ani_status Object_CallMethodByName_Float_A(ani_object object, const char *name, const char *signature, - ani_float *result, const ani_value *args) - { - return c_api->Object_CallMethodByName_Float_A(this, object, name, signature, result, args); - } - ani_status Object_CallMethodByName_Float_V(ani_object object, const char *name, const char *signature, - ani_float *result, va_list args) - { - return c_api->Object_CallMethodByName_Float_V(this, object, name, signature, result, args); - } - ani_status Object_CallMethodByName_Double(ani_object object, const char *name, const char *signature, - ani_double *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_CallMethodByName_Double_V(this, object, name, signature, result, args); - va_end(args); - return status; - } - ani_status Object_CallMethodByName_Double_A(ani_object object, const char *name, const char *signature, - ani_double *result, const ani_value *args) - { - return c_api->Object_CallMethodByName_Double_A(this, object, name, signature, result, args); - } - ani_status Object_CallMethodByName_Double_V(ani_object object, const char *name, const char *signature, - ani_double *result, va_list args) - { - return c_api->Object_CallMethodByName_Double_V(this, object, name, signature, result, args); - } - ani_status Object_CallMethodByName_Ref(ani_object object, const char *name, const char *signature, ani_ref *result, - ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Object_CallMethodByName_Ref_V(this, object, name, signature, result, args); - va_end(args); - return status; - } - ani_status Object_CallMethodByName_Ref_A(ani_object object, const char *name, const char *signature, - ani_ref *result, const ani_value *args) - { - return c_api->Object_CallMethodByName_Ref_A(this, object, name, signature, result, args); - } - ani_status Object_CallMethodByName_Ref_V(ani_object object, const char *name, const char *signature, - ani_ref *result, va_list args) - { - return c_api->Object_CallMethodByName_Ref_V(this, object, name, signature, result, args); - } - ani_status Object_CallMethodByName_Void(ani_object object, const char *name, const char *signature, ...) - { - va_list args; - va_start(args, signature); - ani_status status = c_api->Object_CallMethodByName_Void_V(this, object, name, signature, args); - va_end(args); - return status; - } - ani_status Object_CallMethodByName_Void_A(ani_object object, const char *name, const char *signature, - const ani_value *args) - { - return c_api->Object_CallMethodByName_Void_A(this, object, name, signature, args); - } - ani_status Object_CallMethodByName_Void_V(ani_object object, const char *name, const char *signature, va_list args) - { - return c_api->Object_CallMethodByName_Void_V(this, object, name, signature, args); - } - ani_status TupleValue_GetNumberOfItems(ani_tuple_value tuple_value, ani_size *result) - { - return c_api->TupleValue_GetNumberOfItems(this, tuple_value, result); - } - ani_status TupleValue_GetItem_Boolean(ani_tuple_value tuple_value, ani_size index, ani_boolean *result) - { - return c_api->TupleValue_GetItem_Boolean(this, tuple_value, index, result); - } - ani_status TupleValue_GetItem_Char(ani_tuple_value tuple_value, ani_size index, ani_char *result) - { - return c_api->TupleValue_GetItem_Char(this, tuple_value, index, result); - } - ani_status TupleValue_GetItem_Byte(ani_tuple_value tuple_value, ani_size index, ani_byte *result) - { - return c_api->TupleValue_GetItem_Byte(this, tuple_value, index, result); - } - ani_status TupleValue_GetItem_Short(ani_tuple_value tuple_value, ani_size index, ani_short *result) - { - return c_api->TupleValue_GetItem_Short(this, tuple_value, index, result); - } - ani_status TupleValue_GetItem_Int(ani_tuple_value tuple_value, ani_size index, ani_int *result) - { - return c_api->TupleValue_GetItem_Int(this, tuple_value, index, result); - } - ani_status TupleValue_GetItem_Long(ani_tuple_value tuple_value, ani_size index, ani_long *result) - { - return c_api->TupleValue_GetItem_Long(this, tuple_value, index, result); - } - ani_status TupleValue_GetItem_Float(ani_tuple_value tuple_value, ani_size index, ani_float *result) - { - return c_api->TupleValue_GetItem_Float(this, tuple_value, index, result); - } - ani_status TupleValue_GetItem_Double(ani_tuple_value tuple_value, ani_size index, ani_double *result) - { - return c_api->TupleValue_GetItem_Double(this, tuple_value, index, result); - } - ani_status TupleValue_GetItem_Ref(ani_tuple_value tuple_value, ani_size index, ani_ref *result) - { - return c_api->TupleValue_GetItem_Ref(this, tuple_value, index, result); - } - ani_status TupleValue_SetItem_Boolean(ani_tuple_value tuple_value, ani_size index, ani_boolean value) - { - return c_api->TupleValue_SetItem_Boolean(this, tuple_value, index, value); - } - ani_status TupleValue_SetItem_Char(ani_tuple_value tuple_value, ani_size index, ani_char value) - { - return c_api->TupleValue_SetItem_Char(this, tuple_value, index, value); - } - ani_status TupleValue_SetItem_Byte(ani_tuple_value tuple_value, ani_size index, ani_byte value) - { - return c_api->TupleValue_SetItem_Byte(this, tuple_value, index, value); - } - ani_status TupleValue_SetItem_Short(ani_tuple_value tuple_value, ani_size index, ani_short value) - { - return c_api->TupleValue_SetItem_Short(this, tuple_value, index, value); - } - ani_status TupleValue_SetItem_Int(ani_tuple_value tuple_value, ani_size index, ani_int value) - { - return c_api->TupleValue_SetItem_Int(this, tuple_value, index, value); - } - ani_status TupleValue_SetItem_Long(ani_tuple_value tuple_value, ani_size index, ani_long value) - { - return c_api->TupleValue_SetItem_Long(this, tuple_value, index, value); - } - ani_status TupleValue_SetItem_Float(ani_tuple_value tuple_value, ani_size index, ani_float value) - { - return c_api->TupleValue_SetItem_Float(this, tuple_value, index, value); - } - ani_status TupleValue_SetItem_Double(ani_tuple_value tuple_value, ani_size index, ani_double value) - { - return c_api->TupleValue_SetItem_Double(this, tuple_value, index, value); - } - ani_status TupleValue_SetItem_Ref(ani_tuple_value tuple_value, ani_size index, ani_ref value) - { - return c_api->TupleValue_SetItem_Ref(this, tuple_value, index, value); - } - ani_status GlobalReference_Create(ani_ref ref, ani_ref *result) - { - return c_api->GlobalReference_Create(this, ref, result); - } - ani_status GlobalReference_Delete(ani_ref ref) - { - return c_api->GlobalReference_Delete(this, ref); - } - ani_status WeakReference_Create(ani_ref ref, ani_wref *result) - { - return c_api->WeakReference_Create(this, ref, result); - } - ani_status WeakReference_Delete(ani_wref wref) - { - return c_api->WeakReference_Delete(this, wref); - } - ani_status WeakReference_GetReference(ani_wref wref, ani_boolean *was_released_result, ani_ref *ref_result) - { - return c_api->WeakReference_GetReference(this, wref, was_released_result, ref_result); - } - ani_status CreateArrayBuffer(size_t length, void **data_result, ani_arraybuffer *arraybuffer_result) - { - return c_api->CreateArrayBuffer(this, length, data_result, arraybuffer_result); - } - ani_status CreateArrayBufferExternal(void *external_data, size_t length, ani_finalizer finalizer, void *hint, - ani_arraybuffer *result) - { - return c_api->CreateArrayBufferExternal(this, external_data, length, finalizer, hint, result); - } - ani_status ArrayBuffer_GetInfo(ani_arraybuffer arraybuffer, void **data_result, size_t *length_result) - { - return c_api->ArrayBuffer_GetInfo(this, arraybuffer, data_result, length_result); - } - ani_status Promise_New(ani_resolver *result_resolver, ani_object *result_promise) - { - return c_api->Promise_New(this, result_resolver, result_promise); - } - ani_status PromiseResolver_Resolve(ani_resolver resolver, ani_ref resolution) - { - return c_api->PromiseResolver_Resolve(this, resolver, resolution); - } - ani_status PromiseResolver_Reject(ani_resolver resolver, ani_error rejection) - { - return c_api->PromiseResolver_Reject(this, resolver, rejection); - } -#endif // __cplusplus -}; - -// NOLINTEND -#endif // __ANI_H__ diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 7a15d4e4f25e8fad68814e6c38199ed4a42e7213..f0145c3c8f8fbb2323aaefff7ba64ed4e1d1c701 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -3426,5 +3426,25 @@ { "first_introduced": "20", "name": "OH_ArkUI_SurfaceCallback_SetSurfaceHideEvent" + }, + { + "first_introduced": "20", + "name": "OH_ArkUI_UIInputEvent_GetLatestStatus" + }, + { + "first_introduced": "20", + "name": "OH_ArkUI_NodeUtils_GetNodeHandleByUniqueId" + }, + { + "first_introduced": "20", + "name": "OH_ArkUI_NodeUtils_GetNodeUniqueId" + }, + { + "first_introduced": "20", + "name": "OH_ArkUI_PreventGestureRecognizerBegin" + }, + { + "first_introduced": "20", + "name": "OH_ArkUI_SetTouchTestDoneCallback" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_gesture.h b/arkui/ace_engine/native/native_gesture.h index aa4b37c23759e2e08572eee0a3454cc0ba76113f..5a439910883793e55d9f59ed219533eb59bf3c2d 100644 --- a/arkui/ace_engine/native/native_gesture.h +++ b/arkui/ace_engine/native/native_gesture.h @@ -868,6 +868,31 @@ ArkUI_ErrorCode OH_ArkUI_PanGesture_SetDistanceMap( ArkUI_ErrorCode OH_ArkUI_PanGesture_GetDistanceByToolType( ArkUI_GestureRecognizer* recognizer, int toolType, double* distance); +/** + * @brief Registers a callback that is executed after all gesture recognizers are collected. + * When the user begins touching the screen, the system performs hit testing and collects gesture recognizers + * based on the touch location. Subsequently, before processing any move events, the component can use this API + * to determine the gesture recognizers that will participate in and compete for recognition. + * + * @param node Handle to the node on which the callback is to be set. + * @param userData Custom data. + * @param touchTestDone Callback for completion of gesture recognizer collection. + * @return Result code. + * {@link ARKUI_ERROR_CODE_NO_ERROR}: The operation is successful. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID}: A parameter error occurs. + * @since 20 + */ +ArkUI_ErrorCode OH_ArkUI_SetTouchTestDoneCallback( + ArkUI_NodeHandle node, + void* userData, + void (*touchTestDone)( + ArkUI_GestureEvent* event, + ArkUI_GestureRecognizerHandleArray recognizers, + int32_t count, + void* userData + ) +); + /** * @brief Defines the gesture APIs. * @@ -1162,6 +1187,20 @@ typedef struct { */ void* OH_ArkUI_GestureInterrupter_GetUserData(ArkUI_GestureInterruptInfo* event); +/** + * @brief Prevents a gesture recognizer from participating in the current gesture recognition before all fingers are + * lifted. + * If the system has already determined the result of the gesture recognizer (regardless of success or failure), + * calling this API will be ineffective. + * + * @param recognizer Pointer to a gesture recognizer. + * @return Result code. + * {@link ARKUI_ERROR_CODE_NO_ERROR}: The operation is successful. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID}: A parameter error occurs. + * @since 20 + */ +ArkUI_ErrorCode OH_ArkUI_PreventGestureRecognizerBegin(ArkUI_GestureRecognizer* recognizer); + #ifdef __cplusplus }; #endif diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index a3daf6262e6090bedc4194c16ec8b7af185c4fa2..248c7b520b062f89ce30e174b4fd7dfb1e0f29ec 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -2365,6 +2365,20 @@ typedef enum { */ NODE_TEXT_LINE_COUNT = 1031, + /** + * @brief Sets whether to optimize the trailing spaces at the end of each line during text layout. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * value[0].i32: whether to optimize trailing spaces at the end of each line during text layout. + * The default value is false. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * value[0].i32: whether to optimize trailing spaces at the end of each line during text layout. \n + * + * @since 20 + */ + NODE_TEXT_OPTIMIZE_TRAILING_SPACE = 1032, /** * @brief Sets a linear gradient effect for text. * This attribute can be set, reset, and obtained as required through APIs. @@ -2430,6 +2444,22 @@ typedef enum { */ NODE_TEXT_RADIAL_GRADIENT = 1034, + /** + * @brief Sets the vertical alignment of the text content. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: vertical alignment of the text content, specified using the {@link ArkUI_TextVerticalAlignment} + * enum. The default value is ARKUI_TEXT_VERTICAL_ALIGNMENT_BASELINE. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: vertical alignment of the text content, specified using the {@link ArkUI_TextVerticalAlignment} + * enum. \n + * + * @since 20 + */ + NODE_TEXT_VERTICAL_ALIGN = 1035, + /** * @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs. * @@ -2687,6 +2717,19 @@ typedef enum { * */ NODE_IMAGE_RESIZABLE, + /** + * @brief Defines the synchronous image loading attribute. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether to load the image synchronously. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: whether to load the image synchronously. \n + * + * @since 20 + */ + NODE_IMAGE_SYNC_LOAD = 4012, /** * @brief Defines the color of the component when it is selected. * This attribute can be set, reset, and obtained as required through APIs. @@ -3638,6 +3681,34 @@ typedef enum { */ NODE_TEXT_AREA_LINE_SPACING = 8028, + /** + * @brief Set the min lines of the node. This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: min lines count. + * \n + * Format of the return value {@link ArkUI_AttributeItem}: \n + * .value[0].i32: min line count.\n + * + * @since 20 + * + */ + NODE_TEXT_AREA_MIN_LINES = 8029, + + /** + * @brief Set the max lines of the node with scroll. This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: max lines count with scroll. + * \n + * Format of the return value {@link ArkUI_AttributeItem}: \n + * .value[0].i32: max line count with scroll.\n + * + * @since 20 + * + */ + NODE_TEXT_AREA_MAX_LINES_WITH_SCROLL = 8030, + /** * @brief Set the line height of the node. This attribute can be set, reset, and obtained as required through APIs. * @@ -4082,6 +4153,20 @@ typedef enum { * @since 18 */ NODE_DATE_PICKER_ENABLE_HAPTIC_FEEDBACK = 13008, + /** + * @brief Defines whether to support scroll looping for the date picker. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: whether to support scroll looping. The value true means to support scroll looping, and + * false means the opposite.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * value[0].i32: The value 1 means to support scroll looping, and 0 means the opposite. \n + * + * @since 20 + */ + NODE_DATE_PICKER_CAN_LOOP = 13009, /** * @brief Defines the time of the selected item. in the timer picker. * This attribute can be set, reset, and obtained as required through APIs. @@ -4753,6 +4838,32 @@ typedef enum { */ NODE_SLIDER_ENABLE_HAPTIC_FEEDBACK = 17013, + /** + * @brief Sets a custom component on the leading side of the Slider component. + * + * Attribute setting method {@link ArkUI_AttributeItem} parameter format:\n + * .object: Parameter type {@link ArkUI_NodeHandle}. + * + * The prefix component will be placed at the start position of the Slider, + * typically on the left side in LTR layouts. + * + * @since 20 + */ + NODE_SLIDER_PREFIX, + + /** + * @brief Sets a custom component on the trailing side of the Slider component. + * + * Attribute setting method {@link link ArkUI_AttributeItem} parameter format:\n + * .object: Parameter type {@link ArkUI_NodeHandle}. + * + * The suffix component will be placed at the end position of the Slider, + * typically on the right side in LTR layouts. + * + * @since 20 + */ + NODE_SLIDER_SUFFIX, + /** * @brief Set the selection status of an option button. Attribute setting, * attribute resetting, and attribute obtaining are supported. @@ -5582,6 +5693,22 @@ typedef enum { * @since 19 */ NODE_LIST_STACK_FROM_END = 1003014, + + /** + * @brief Defines the focus wrap mode for the List component. + * This attribute can be set, reset, and obtained as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: focus wrap mode of the List component. + * The parameter type is {@link ArkUI_FocusWrapMode}. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: focus wrap mode of the List component. + * The parameter type is {@link ArkUI_FocusWrapMode}. \n + * + * @since 20 + */ + NODE_LIST_FOCUS_WRAP_MODE = 1003015, /** * @brief Defines whether to enable loop playback for the swiper. @@ -8143,6 +8270,16 @@ typedef enum { ARKUI_NODE_CUSTOM_EVENT_ON_FOREGROUND_DRAW = 1 << 3, /** Overlay type. */ ARKUI_NODE_CUSTOM_EVENT_ON_OVERLAY_DRAW = 1 << 4, + /** + * Draw front type. + * @since 20 + */ + ARKUI_NODE_CUSTOM_EVENT_ON_DRAW_FRONT = 1 << 5, + /** + * Draw behind type. + * @since 20 + */ + ARKUI_NODE_CUSTOM_EVENT_ON_DRAW_BEHIND = 1 << 6, } ArkUI_NodeCustomEventType; /** @@ -9604,6 +9741,32 @@ ArkUI_ErrorCode OH_ArkUI_RemoveSupportedUIStates(ArkUI_NodeHandle node, int32_t */ int32_t OH_ArkUI_RunTaskInScope(ArkUI_ContextHandle uiContext, void* userData, void(*callback)(void* userData)); +/** + * @brief Get the node handle by uniqueId. + * + * @param uniqueId The uniqueId of the target node handle. + * @param node The handle of target node handle. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} success. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. + * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. + * @since 20 + */ +int32_t OH_ArkUI_NodeUtils_GetNodeHandleByUniqueId(const uint32_t uniqueId, ArkUI_NodeHandle* node); + +/** + * @brief Get the uniqueId of the target node handle. + * + * @param node The ArkUI-NodeHandle pointer. + * @param uniqueId The uniqueId of the target node handle, default value is -1. + * @return Error code. + * {@link ARKUI_ERROR_CODE_NO_ERROR} success. + * {@link ARKUI_ERROR_CODE_PARAM_INVALID} Function parameter exception. + * {@link ARKUI_ERROR_CODE_CAPI_INIT_ERROR} if the CAPI init error. + * @since 20 + */ +int32_t OH_ArkUI_NodeUtils_GetNodeUniqueId(ArkUI_NodeHandle node, int32_t* uniqueId); + #ifdef __cplusplus }; #endif diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 828ba5b7d30727b121c7536c4bc4bf9731f6fec9..92126f66d37869788db81eb6fd7ffa705b37e039 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -389,6 +389,22 @@ typedef enum { ARKUI_TEXT_ALIGNMENT_JUSTIFY, } ArkUI_TextAlignment; +/** + * @brief Enumerates text vertical alignment styles. + * + * @since 20 + */ +typedef enum { + /** Aligned to the baseline. */ + ARKUI_TEXT_VERTICAL_ALIGNMENT_BASELINE = 0, + /** Bottom aligned. */ + ARKUI_TEXT_VERTICAL_ALIGNMENT_BOTTOM, + /** Center aligned. */ + ARKUI_TEXT_VERTICAL_ALIGNMENT_CENTER, + /** Top aligned. */ + ARKUI_TEXT_VERTICAL_ALIGNMENT_TOP, +} ArkUI_TextVerticalAlignment; + /** * @brief Enumerates the types of the Enter key for a single-line text box. * @@ -1273,6 +1289,12 @@ typedef enum { ARKUI_IMAGE_SPAN_ALIGNMENT_CENTER, /** The image is top aligned with the text. */ ARKUI_IMAGE_SPAN_ALIGNMENT_TOP, + /** + * The image alignment mode follows the text component's alignment mode. + * + * @since 20 + */ + ARKUI_IMAGE_SPAN_ALIGNMENT_FOLLOW_PARAGRAPH, } ArkUI_ImageSpanAlignment; /** @@ -2263,6 +2285,11 @@ typedef enum { * @since 15 */ ARKUI_ERROR_CODE_POST_CLONED_NO_COMPONENT_HIT_TO_RESPOND_TO_THE_EVENT = 180005, + /** + * @error Input event type not supported. + * @since 20 + */ + ARKUI_ERROR_INPUT_EVENT_TYPE_NOT_SUPPORTED = 180006, /** * @error invalid styled string. * @since 14 diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index b8c6b17d73aad0a599b1da75cabc6a6f1c43ee8f..fac4d040d1a31ca20eb17f5dc256ca37526d3917 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -1272,6 +1272,25 @@ int32_t OH_ArkUI_PointerEvent_SetClonedEventFingerIdByIndex( */ int32_t OH_ArkUI_PointerEvent_PostClonedEvent(ArkUI_NodeHandle node, const ArkUI_UIInputEvent* event); +/** + * @brief Use this method to obtain the execution status of the latest UI input related method. + * + * In most cases, this method is unnecessary unless you need to determine if the return value indicates an error. + * Here's an example of usage: For return values like float (where 0.0 doesn't indicate an error), use GetLatestStatus + * to confirm if an error occurred. + * float x = OH_ArkUI_PointerEvent_GetX(event); + * if (ARKUI_ERROR_CODE_NO_ERROR != OH_ArkUI_UIInputEvent_GetLatestStatus()) { + * // error + * return; + * } + * Note: The system clears the status of the previous function call each time a UIInput-related function is executed, + * ensuring you always get the latest status. + * + * @return Returns the ArkUI_ErrorCode. + * @since 20 + */ +ArkUI_ErrorCode OH_ArkUI_UIInputEvent_GetLatestStatus(); + #ifdef __cplusplus }; #endif diff --git a/arkui/napi/libnapi.ndk.json b/arkui/napi/libnapi.ndk.json index 7460d98aed06b385f9036a8fe808bafaa9ddad7d..5bdd52c3319ed72b1336febe33d107efccf6a98d 100644 --- a/arkui/napi/libnapi.ndk.json +++ b/arkui/napi/libnapi.ndk.json @@ -247,6 +247,10 @@ "first_introduced": "20", "name": "napi_create_ark_context" }, + { + "first_introduced": "20", + "name": "napi_switch_ark_context" + }, { "first_introduced": "20", "name": "napi_destroy_ark_context" diff --git a/arkui/napi/native_api.h b/arkui/napi/native_api.h index 332995c92cb80ba89252dfdafc64689d39b164bb..d1dc1c45c882003315bf1882a8f288f42ba8ddfe 100644 --- a/arkui/napi/native_api.h +++ b/arkui/napi/native_api.h @@ -1653,6 +1653,18 @@ NAPI_EXTERN napi_status napi_define_class(napi_env env, */ NAPI_EXTERN napi_status napi_create_ark_context(napi_env env, napi_env *newEnv); +/** + * @brief To switch a virtual machine context which is expected to be used later. + * @param env Designated Virtual machine context which is expected to be used as the current virtual machine context. + * + * @return Returns the function execution status. + * {@link napi_ok } If the function executed successfully.\n + * {@link napi_invalid_arg } If the param env is nullptr.\n + * {@link napi_pending_exception } If have uncaught exception, or exception occurs in execution.\n + * @since 20 + */ +NAPI_EXTERN napi_status napi_switch_ark_context(napi_env env); + /** * @brief To destroy a virtual machine context which will not be used again. * @param env Virtual machine context expected to be destroyed. diff --git a/arkui/window_manager/libwm.ndk.json b/arkui/window_manager/libwm.ndk.json index 53d45ba82333b7ffa112fc80dbfff290f61d0ff6..c7b330e107a8fa95811f825c86ea47d339fcfa3c 100644 --- a/arkui/window_manager/libwm.ndk.json +++ b/arkui/window_manager/libwm.ndk.json @@ -93,7 +93,11 @@ }, { "first_instroduced":"20", - "name":"OH_PictureInPicture_CreatePip" + "name":"OH_PictureInPicture_CreatePipConfig" + }, + { + "first_instroduced":"20", + "name":"OH_PictureInPicture_DestroyPipConfig" }, { "first_instroduced":"20", @@ -115,6 +119,10 @@ "first_instroduced":"20", "name":"OH_PictureInPicture_SetPipNapiEnv" }, + { + "first_instroduced":"20", + "name":"OH_PictureInPicture_CreatePip" + }, { "first_instroduced":"20", "name":"OH_PictureInPicture_DeletePip" @@ -127,6 +135,10 @@ "first_instroduced":"20", "name":"OH_PictureInPicture_StopPip" }, + { + "first_instroduced":"20", + "name":"OH_PictureInPicture_UpdatePipContentSize" + }, { "first_instroduced":"20", "name":"OH_PictureInPicture_UpdatePipControlStatus" @@ -149,15 +161,15 @@ }, { "first_instroduced":"20", - "name":"OH_PictureInPicture_RegisterLifeCycleListener" + "name":"OH_PictureInPicture_RegisterLifecycleListener" }, { "first_instroduced":"20", - "name":"OH_PictureInPicture_UnregisterLifeCycleListener" + "name":"OH_PictureInPicture_UnregisterLifecycleListener" }, { "first_instroduced":"20", - "name":"OH_PictureInPicture_UnregisterAllLifeCycleListeners" + "name":"OH_PictureInPicture_UnregisterAllLifecycleListeners" }, { "first_instroduced":"20", diff --git a/arkui/window_manager/oh_window_pip.h b/arkui/window_manager/oh_window_pip.h index 157722cd902547579dc4778a88a1ab2338c2b04c..9dad3a483b81304d8d0ce14c74995d1849cc8975 100644 --- a/arkui/window_manager/oh_window_pip.h +++ b/arkui/window_manager/oh_window_pip.h @@ -34,6 +34,12 @@ extern "C" { #endif +/** + * @brief Picture in picture config. + * @since 20 + */ +typedef void* PictureInPicture_PipConfig; + /** * @brief Enumerates picture in picture template type. * @since 20 @@ -103,8 +109,6 @@ typedef enum { CAMERA_SWITCH = 7, /** mute switch. */ MUTE_SWITCH = 8, - /** end. */ - END, } PictureInPicture_PipControlType; /** @@ -157,7 +161,7 @@ typedef void (*WebPipStartPipCallback)(uint32_t controllerId, uint8_t requestId, * @param errcode The picture-in-picture error code * @since 20 */ -typedef void (*WebPipLifeCycleCallback)(uint32_t controllerId, PictureInPicture_PipState state, int32_t errcode); +typedef void (*WebPipLifecycleCallback)(uint32_t controllerId, PictureInPicture_PipState state, int32_t errcode); /** * @brief The picture-in-picture control event callback @@ -180,21 +184,29 @@ typedef void (*WebPipControlEventCallback)(uint32_t controllerId, PictureInPictu typedef void (*WebPipResizeCallback)(uint32_t controllerId, uint32_t width, uint32_t height, double scale); /** - * @brief Create picture-in-picture controller. - * @param controllerId The picture-in-picture controller ID + * @brief Create picture-in-picture config. + * @param pipConfig The picture-in-picture config * @return Return the result code. * {@link OK} the function call is successful. * {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} parameter error. - * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. - * {@link WINDOW_MANAGER_ERRORCODE_PIP_INTERNAL_ERROR} pip internal error. * @since 20 */ -int32_t OH_PictureInPicture_CreatePip(uint32_t* controllerId); +int32_t OH_PictureInPicture_CreatePipConfig(PictureInPicture_PipConfig* pipConfig); + +/** + * @brief Destroy picture-in-picture config. + * @param pipConfig The picture-in-picture config + * @return Return the result code. + * {@link OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} parameter error. + * @since 20 + */ +int32_t OH_PictureInPicture_DestroyPipConfig(PictureInPicture_PipConfig* pipConfig); /** * @brief Set picture-in-picture mainWindowId. * - * @param controllerId The picture-in-picture controller ID + * @param pipConfig The picture-in-picture config * @param mainWindowId WindowId of corresponding mainWindow * @return Return the result code. * {@link OK} the function call is successful. @@ -202,12 +214,12 @@ int32_t OH_PictureInPicture_CreatePip(uint32_t* controllerId); * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. * @since 20 */ -int32_t OH_PictureInPicture_SetPipMainWindowId(uint32_t controllerId, uint32_t mainWindowId); +int32_t OH_PictureInPicture_SetPipMainWindowId(PictureInPicture_PipConfig pipConfig, uint32_t mainWindowId); /** * @brief Set picture-in-picture templateType. * - * @param controllerId The picture-in-picture controller ID + * @param pipConfig The picture-in-picture config * @param pipTemplateType The picture-in-picture template type * @return Return the result code. * {@link OK} the function call is successful. @@ -215,12 +227,13 @@ int32_t OH_PictureInPicture_SetPipMainWindowId(uint32_t controllerId, uint32_t m * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. * @since 20 */ -int32_t OH_PictureInPicture_SetPipTemplateType(uint32_t controllerId, PictureInPicture_PipTemplateType pipTemplateType); +int32_t OH_PictureInPicture_SetPipTemplateType(PictureInPicture_PipConfig pipConfig, + PictureInPicture_PipTemplateType pipTemplateType); /** * @brief Set picture-in-picture rect. * - * @param controllerId The picture-in-picture controller ID + * @param pipConfig The picture-in-picture config * @param width The picture-in-picture window width * @param height The picture-in-picture window height * @return Return the result code. @@ -229,12 +242,12 @@ int32_t OH_PictureInPicture_SetPipTemplateType(uint32_t controllerId, PictureInP * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. * @since 20 */ -int32_t OH_PictureInPicture_SetPipRect(uint32_t controllerId, uint32_t width, uint32_t height); +int32_t OH_PictureInPicture_SetPipRect(PictureInPicture_PipConfig pipConfig, uint32_t width, uint32_t height); /** * @brief Set picture-in-picture control group. * - * @param controllerId The picture-in-picture controller ID + * @param pipConfig The picture-in-picture config * @param controlGroup The picture-in-picture control group * @param controlGroupLength The length of picture-in-picture control group * @return Return the result code. @@ -243,13 +256,13 @@ int32_t OH_PictureInPicture_SetPipRect(uint32_t controllerId, uint32_t width, ui * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. * @since 20 */ -int32_t OH_PictureInPicture_SetPipControlGroup(uint32_t controllerId, PictureInPicture_PipControlGroup* controlGroup, - uint8_t controlGroupLength); +int32_t OH_PictureInPicture_SetPipControlGroup(PictureInPicture_PipConfig pipConfig, + PictureInPicture_PipControlGroup* controlGroup, uint8_t controlGroupLength); /** * @brief Set picture-in-picture napi env. * - * @param controllerId The picture-in-picture controller ID + * @param pipConfig The picture-in-picture config * @param env The picture-in-picture napi env * @return Return the result code. * {@link OK} the function call is successful. @@ -257,7 +270,20 @@ int32_t OH_PictureInPicture_SetPipControlGroup(uint32_t controllerId, PictureInP * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. * @since 20 */ -int32_t OH_PictureInPicture_SetPipNapiEnv(uint32_t controllerId, void* env); +int32_t OH_PictureInPicture_SetPipNapiEnv(PictureInPicture_PipConfig pipConfig, void* env); + +/** + * @brief Create picture-in-picture controller. + * @param pipConfig The picture-in-picture config + * @param controllerId The picture-in-picture controller ID + * @return Return the result code. + * {@link OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. + * {@link WINDOW_MANAGER_ERRORCODE_PIP_INTERNAL_ERROR} pip internal error. + * @since 20 + */ +int32_t OH_PictureInPicture_CreatePip(PictureInPicture_PipConfig pipConfig, uint32_t* controllerId); /** * @brief Delete picture-in-picture controller. @@ -280,6 +306,7 @@ int32_t OH_PictureInPicture_DeletePip(uint32_t controllerId); * {@link WINDOW_MANAGER_ERRORCODE_PIP_CREATE_FAILED} failed to create the PiP window. * {@link WINDOW_MANAGER_ERRORCODE_ERRORCODE_PIP_INTERNAL_ERROR} pip internal error. * {@link WINDOW_MANAGER_ERRORCODE_PIP_REPEATED_OPERATION} repeated PiP operation. + * {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} parameter error. * @since 20 */ int32_t OH_PictureInPicture_StartPip(uint32_t controllerId); @@ -294,6 +321,7 @@ int32_t OH_PictureInPicture_StartPip(uint32_t controllerId); * {@link WINDOW_MANAGER_ERRORCODE_PIP_STATE_ABNORMAL} the PiP window state is abnormal. * {@link WINDOW_MANAGER_ERRORCODE_ERRORCODE_PIP_INTERNAL_ERROR} pip internal error. * {@link WINDOW_MANAGER_ERRORCODE_PIP_REPEATED_OPERATION} repeated PiP operation. + * {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} parameter error. * @since 20 */ int32_t OH_PictureInPicture_StopPip(uint32_t controllerId); @@ -304,9 +332,13 @@ int32_t OH_PictureInPicture_StopPip(uint32_t controllerId); * @param controllerId The picture-in-picture controller ID * @param width The picture-in-picture content width * @param height The picture-in-picture content height + * @return Return the result code. + * {@link OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_PIP_INTERNAL_ERROR} pip internal error. * @since 20 */ -void OH_PictureInPicture_UpdatePipContentSize(uint32_t controllerId, uint32_t width, uint32_t height); +int32_t OH_PictureInPicture_UpdatePipContentSize(uint32_t controllerId, uint32_t width, uint32_t height); /** * @brief Update picture-in-picture control status. @@ -314,9 +346,13 @@ void OH_PictureInPicture_UpdatePipContentSize(uint32_t controllerId, uint32_t wi * @param controllerId The picture-in-picture controller ID * @param controlType The picture-in-picture control type. * @param status The picture-in-picture control status. - * @since 20 + * @return Return the result code. + * {@link OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_PIP_INTERNAL_ERROR} pip internal error. + * @since 20 */ -void OH_PictureInPicture_UpdatePipControlStatus(uint32_t controllerId, PictureInPicture_PipControlType controlType, +int32_t OH_PictureInPicture_UpdatePipControlStatus(uint32_t controllerId, PictureInPicture_PipControlType controlType, PictureInPicture_PipControlStatus status); /** @@ -325,9 +361,13 @@ void OH_PictureInPicture_UpdatePipControlStatus(uint32_t controllerId, PictureIn * @param controllerId The picture-in-picture controller ID * @param controlType The picture-in-picture control type. * @param enabled Indicate the picture-in-picture control is enabled. + * @return Return the result code. + * {@link OK} the function call is successful. + * {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} parameter error. + * {@link WINDOW_MANAGER_ERRORCODE_PIP_INTERNAL_ERROR} pip internal error. * @since 20 */ -void OH_PictureInPicture_SetPipControlEnabled(uint32_t controllerId, PictureInPicture_PipControlType controlType, +int32_t OH_PictureInPicture_SetPipControlEnabled(uint32_t controllerId, PictureInPicture_PipControlType controlType, bool enabled); /** @@ -372,7 +412,7 @@ int32_t OH_PictureInPicture_UnregisterStartPipCallback(uint32_t controllerId, We int32_t OH_PictureInPicture_UnregisterAllStartPipCallbacks(uint32_t controllerId); /** - * @brief Register picture-in-picture life cycle listener callback. + * @brief Register picture-in-picture lifecycle listener callback. * * @param controllerId The picture-in-picture controller ID * @param callback The picture-in-picture lifecycle callback. @@ -383,10 +423,10 @@ int32_t OH_PictureInPicture_UnregisterAllStartPipCallbacks(uint32_t controllerId * {@link WINDOW_MANAGER_ERRORCODE_PIP_INTERNAL_ERROR} pip internal error. * @since 20 */ -int32_t OH_PictureInPicture_RegisterLifeCycleListener(uint32_t controllerId, WebPipLifeCycleCallback callback); +int32_t OH_PictureInPicture_RegisterLifecycleListener(uint32_t controllerId, WebPipLifecycleCallback callback); /** - * @brief Unregister picture-in-picture life cycle listener callback. + * @brief Unregister picture-in-picture lifecycle listener callback. * * @param controllerId The picture-in-picture controller ID * @param callback The picture-in-picture lifecycle callback. @@ -397,10 +437,10 @@ int32_t OH_PictureInPicture_RegisterLifeCycleListener(uint32_t controllerId, Web * {@link WINDOW_MANAGER_ERRORCODE_PIP_INTERNAL_ERROR} pip internal error. * @since 20 */ -int32_t OH_PictureInPicture_UnregisterLifeCycleListener(uint32_t controllerId, WebPipLifeCycleCallback callback); +int32_t OH_PictureInPicture_UnregisterLifecycleListener(uint32_t controllerId, WebPipLifecycleCallback callback); /** - * @brief Unregister all picture-in-picture life cycle listener callbacks. + * @brief Unregister all picture-in-picture lifecycle listener callbacks. * * @param controllerId The picture-in-picture controller ID * @return Return the result code. @@ -410,7 +450,7 @@ int32_t OH_PictureInPicture_UnregisterLifeCycleListener(uint32_t controllerId, W * {@link WINDOW_MANAGER_ERRORCODE_PIP_INTERNAL_ERROR} pip internal error. * @since 20 */ -int32_t OH_PictureInPicture_UnregisterAllLifeCycleListeners(uint32_t controllerId); +int32_t OH_PictureInPicture_UnregisterAllLifecycleListeners(uint32_t controllerId); /** * @brief Register picture-in-picture control event listener callback. diff --git a/backgroundtasks/transient/include/transient_task_api.h b/backgroundtasks/transient/include/transient_task_api.h index f6ce7b65929ee41f1a59318c332a5edaeb01b555..2182d6c8b84e20a3816f952f19d04432caad097c 100644 --- a/backgroundtasks/transient/include/transient_task_api.h +++ b/backgroundtasks/transient/include/transient_task_api.h @@ -101,7 +101,7 @@ int32_t OH_BackgroundTaskManager_GetRemainingDelayTime(int32_t requestId, int32_ int32_t OH_BackgroundTaskManager_CancelSuspendDelay(int32_t requestId); /** - * @brief Obtains all the transient task. + * @brief Obtains transient task info. * * @param transientTaskInfo Indicates the transient task info of an application. * @return {@link ERR_TRANSIENT_TASK_OK} 0 - Success. @@ -111,7 +111,7 @@ int32_t OH_BackgroundTaskManager_CancelSuspendDelay(int32_t requestId); * @since 20 * @version 1.0 */ -int32_t OH_BackgroundTaskManager_GetAllTransientTasks(TransientTask_TransientTaskInfo *transientTaskInfo); +int32_t OH_BackgroundTaskManager_GetTransientTaskInfo(TransientTask_TransientTaskInfo *transientTaskInfo); #ifdef __cplusplus } diff --git a/backgroundtasks/transient/libtransient_task.ndk.json b/backgroundtasks/transient/libtransient_task.ndk.json index 5d777b0199821083afb17eec109e90fe93bcb50e..1702643bae76c1cc7a540a8a1704149589c2b599 100644 --- a/backgroundtasks/transient/libtransient_task.ndk.json +++ b/backgroundtasks/transient/libtransient_task.ndk.json @@ -13,6 +13,6 @@ }, { "first_introduced": "20", - "name": "OH_BackgroundTaskManager_GetAllTransientTasks" + "name": "OH_BackgroundTaskManager_GetTransientTaskInfo" } ] \ No newline at end of file diff --git a/distributeddatamgr/udmf/include/udmf.h b/distributeddatamgr/udmf/include/udmf.h index 5e4b93caba7730a28c8961a40cd00c36019dc3fe..595301e03b0b9497d1e83d3d31d3a0142a307ddd 100644 --- a/distributeddatamgr/udmf/include/udmf.h +++ b/distributeddatamgr/udmf/include/udmf.h @@ -146,6 +146,23 @@ typedef enum Udmf_ProgressIndicator { UDMF_DEFAULT = 1 } Udmf_ProgressIndicator; +/** + * @brief Describe the visibility range of data + * + * @since 20 + */ +typedef enum Udmf_Visibility { + /** + * @brief The visibility level that specifies that any hap or native can be obtained. + */ + UDMF_ALL, + + /** + * @brief The visibility level that specifies that only data providers can be obtained. + */ + UDMF_OWN_PROCESS +} Udmf_Visibility; + /** * @brief Describes the unified data type. * @@ -910,6 +927,29 @@ int OH_UdmfOptions_SetIntention(OH_UdmfOptions* pThis, Udmf_Intention intention) */ int OH_UdmfOptions_Reset(OH_UdmfOptions* pThis); +/** + * @brief Get visibility from the {@link OH_UdmfOptions}. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdmfOptions}. + * @return Returns {@link Udmf_Visibility} value. + * @see OH_UdmfOptions Udmf_Visibility + * @since 20 + */ +Udmf_Visibility OH_UdmfOptions_GetVisibility(OH_UdmfOptions* pThis); + +/** + * @brief Set visibility value to {@link OH_UdmfOptions}. + * + * @param pThis Represents a pointer to an instance of {@link OH_UdmfOptions}. + * @param visibility Represents new {@link Udmf_Visibility} param. + * @return Returns the status code of the execution. See {@link Udmf_ErrCode}. + * {@link UDMF_E_OK} success. + * {@link UDMF_E_INVALID_PARAM} The error code for common invalid args. + * @see OH_UdmfOptions Udmf_Visibility Udmf_ErrCode. + * @since 20 + */ +int OH_UdmfOptions_SetVisibility(OH_UdmfOptions* pThis, Udmf_Visibility visibility); + /** * @brief Get {@link OH_UdmfData} data from udmf database. * @@ -1007,9 +1047,9 @@ int OH_Udmf_UpdateUnifiedData(OH_UdmfOptions* options, OH_UdmfData* unifiedData) int OH_Udmf_DeleteUnifiedData(OH_UdmfOptions* options, OH_UdmfData** dataArray, unsigned int* dataSize); /** - * @brief Destory data array memory. + * @brief Destroy data array memory. * - * @param dataArray Represents a pointer to {@link OH_UdmfData}. + * @param dataArray Represents a point to {@link OH_UdmfData}. * @param dataSize Represents data size in list. * @see OH_UdmfData * @since 20 diff --git a/distributeddatamgr/udmf/libudmf.ndk.json b/distributeddatamgr/udmf/libudmf.ndk.json index 27336bceb3ece67a30f87fed92fb10e208ceba22..7b8eed1feb372bfd02a72cbe31e8f13f958b02d8 100644 --- a/distributeddatamgr/udmf/libudmf.ndk.json +++ b/distributeddatamgr/udmf/libudmf.ndk.json @@ -650,5 +650,13 @@ { "first_introduced": "20", "name": "OH_UdmfDataLoadInfo_SetRecordCount" + }, + { + "first_introduced": "20", + "name": "OH_UdmfOptions_GetVisibility" + }, + { + "first_introduced": "20", + "name": "OH_UdmfOptions_SetVisibility" } ] \ No newline at end of file diff --git a/drivers/external_device_manager/usb/BUILD.gn b/drivers/external_device_manager/usb/BUILD.gn index 1729e897005913abbd141b0e619bcf88a366a735..d20a1208686e760879e9cebf52dbdb71e32d0c94 100644 --- a/drivers/external_device_manager/usb/BUILD.gn +++ b/drivers/external_device_manager/usb/BUILD.gn @@ -30,6 +30,5 @@ ohos_ndk_library("libusb_ndk") { system_capability_headers = [ "usb/usb_ddk_api.h", "usb/usb_ddk_types.h", - "base/ddk_types.h", ] } diff --git a/graphic/graphic_2d/native_drawing/drawing_brush.h b/graphic/graphic_2d/native_drawing/drawing_brush.h index d677d9aece287b7ae8621ffe19e86cf1d0ee2627..08677fec0f2b0f2d73fcce46de47e6dc988ed248 100644 --- a/graphic/graphic_2d/native_drawing/drawing_brush.h +++ b/graphic/graphic_2d/native_drawing/drawing_brush.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -40,12 +40,19 @@ #ifndef C_INCLUDE_DRAWING_BRUSH_H #define C_INCLUDE_DRAWING_BRUSH_H +#include "drawing_error_code.h" #include "drawing_types.h" #ifdef __cplusplus extern "C" { #endif +/** + * @brief Defines a colorspace manager. Introduces the color space information defined by ColorManager. + * @since 20 + */ +typedef struct OH_NativeColorSpaceManager OH_NativeColorSpaceManager; + /** * @brief Creates an OH_Drawing_Brush object. * @@ -148,6 +155,83 @@ uint8_t OH_Drawing_BrushGetAlpha(const OH_Drawing_Brush* brush); */ void OH_Drawing_BrushSetAlpha(OH_Drawing_Brush* brush, uint8_t alpha); +/** + * @brief Sets the color for a brush. The color will be used by the brush to fill in a shape. + * The color is an ARGB structure described by floating point numbers and interpreted as being in the colorSpaceManager. + * If colorSpaceManager is nullptr, then color is assumed to be in the sRGB color space. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param brush Indicates the pointer to an OH_Drawing_Brush object. + * @param a Indicates the alpha component of color, represented as a floating point number between 0 and 1. + * @param r Indicates the red component of color, represented as a floating point number between 0 and 1. + * @param g Indicates the green component of color, represented as a floating point number between 0 and 1. + * @param b Indicates the blue component of color, represented as a floating point number between 0 and 1. + * @param colorSpaceManager Indicates the pointer to an OH_NativeColorSpaceManager object. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if brush is nullptr. + * @since 20 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_BrushSetColor4f(OH_Drawing_Brush* brush, float a, float r, float g, float b, + OH_NativeColorSpaceManager* colorSpaceManager); + +/** + * @brief Obtains the alpha component of a brush. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param brush Indicates the pointer to an OH_Drawing_Brush object. + * @param a Indicates the alpha component of color. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if brush or a is nullptr. + * @since 20 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_BrushGetAlphaFloat(const OH_Drawing_Brush* brush, float* a); + +/** + * @brief Obtains the red component of a brush. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param brush Indicates the pointer to an OH_Drawing_Brush object. + * @param r Indicates the red component of color. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if brush or r is nullptr. + * @since 20 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_BrushGetRedFloat(const OH_Drawing_Brush* brush, float* r); + +/** + * @brief Obtains the green component of a brush. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param brush Indicates the pointer to an OH_Drawing_Brush object. + * @param g Indicates the green component of color. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if brush or g is nullptr. + * @since 20 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_BrushGetGreenFloat(const OH_Drawing_Brush* brush, float* g); + +/** + * @brief Obtains the blue component of a brush. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param brush Indicates the pointer to an OH_Drawing_Brush object. + * @param b Indicates the blue component of color. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if brush or b is nullptr. + * @since 20 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_BrushGetBlueFloat(const OH_Drawing_Brush* brush, float* b); + /** * @brief Sets the shaderEffect for a brush. * diff --git a/graphic/graphic_2d/native_drawing/drawing_font.h b/graphic/graphic_2d/native_drawing/drawing_font.h index 81cb70dc035b8d94b015cf22cf033d68f4dfbe3c..cf187736558372d7ca3989b87fdfab5c0ec065d0 100644 --- a/graphic/graphic_2d/native_drawing/drawing_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_font.h @@ -300,7 +300,7 @@ OH_Drawing_ErrorCode OH_Drawing_FontMeasureText(const OH_Drawing_Font* font, con * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_FontMeasureTextWithBrushOrPen(const OH_Drawing_Font* font, const void* text, - size_t byteLength, OH_Drawing_TextEncoding encoding, const OH_Drawing_Brush* brush, const OH_Drawing_Brush* pen, + size_t byteLength, OH_Drawing_TextEncoding encoding, const OH_Drawing_Brush* brush, const OH_Drawing_Pen* pen, OH_Drawing_Rect* bounds, float* textWidth); /** @@ -322,7 +322,7 @@ OH_Drawing_ErrorCode OH_Drawing_FontMeasureTextWithBrushOrPen(const OH_Drawing_F * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_FontGetWidthsBounds(const OH_Drawing_Font* font, const uint16_t* glyphs, int count, - const OH_Drawing_Brush* brush, const OH_Drawing_Brush* pen, float* widths, OH_Drawing_Array* bounds); + const OH_Drawing_Brush* brush, const OH_Drawing_Pen* pen, float* widths, OH_Drawing_Array* bounds); /** * @brief Retrieves the positions for each glyph, beginning at the specified origin. @@ -332,7 +332,7 @@ OH_Drawing_ErrorCode OH_Drawing_FontGetWidthsBounds(const OH_Drawing_Font* font, * @param glyphs Indicates the array of glyph indices to be measured. * @param count Indicates the number of glyphs. * @param origin Indicates the location of the first glyph. - * @param points Indicates the relative position for each glyph returned to tha caller. + * @param points Indicates the relative position for each glyph returned to the caller. * @return Returns the error code. * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if any of font, glyphs and points is nullptr or @@ -341,7 +341,7 @@ OH_Drawing_ErrorCode OH_Drawing_FontGetWidthsBounds(const OH_Drawing_Font* font, * @version 1.0 */ OH_Drawing_ErrorCode OH_Drawing_FontGetPos(const OH_Drawing_Font* font, const uint16_t* glyphs, int count, - const OH_Drawing_Point* origin, OH_Drawing_Point2D* bounds); + const OH_Drawing_Point* origin, OH_Drawing_Point2D* points); /** * @brief Returns the recommended spacing between lines. diff --git a/graphic/graphic_2d/native_drawing/drawing_path.h b/graphic/graphic_2d/native_drawing/drawing_path.h index 713456d67c7d1256b241f24c6ec811b4841129ae..1f4e18a2f17b7c4730a780a539dd4665a6de7a2d 100644 --- a/graphic/graphic_2d/native_drawing/drawing_path.h +++ b/graphic/graphic_2d/native_drawing/drawing_path.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -761,6 +761,66 @@ bool OH_Drawing_PathOp(OH_Drawing_Path* path, const OH_Drawing_Path* other, OH_D bool OH_Drawing_PathGetMatrix(OH_Drawing_Path* path, bool forceClosed, float distance, OH_Drawing_Matrix* matrix, OH_Drawing_PathMeasureMatrixFlags flag); +/** + * @brief Approximates the path with a series of line segments. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param path Indicates the pointer to an OH_Drawing_Path object. + * @param acceptableError Indicates the acceptable error for a line on the path. Should be no less than 0. + * @param vals Indicates the storage for the computed array containing point components. + * There are three components for each point: + * 1.Fraction along the length of the path that the point resides. + * 2.The x coordinate of the point. + * 3.The y coordinate of the point. + * @param count Returns with the size of array. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if path, vals or count is nullptr, or acceptableError is + * less than 0. + * @since 20 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_PathApproximate(OH_Drawing_Path* path, float acceptableError, float* vals, + uint32_t* count); + +/** + * @brief Performs interpolation between the current path and another path based on a given weight, and stores the + * result in the target path object. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param path Indicates the pointer to an OH_Drawing_Path object. + * @param other Indicates the pointer to an OH_Drawing_Path object to be interpolated with path. + * @param weight Indicates the interpolation weight, which must be in the range [0, 1]. + * @param success Indicates the interpolation is success or not. + * @param interpolatedPath Indicates the pointer to an OH_Drawing_Path object to store the result. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if eiter path, other, success or interpolatedPath is + * nullptr, or weight is outside the range [0, 1]. + * @since 20 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_PathInterpolate(OH_Drawing_Path* path, OH_Drawing_Path* other, + float weight, bool* success, OH_Drawing_Path* interpolatedPath); + +/** + * @brief Checks whether the current path is compatible with another path (other) for interpolation, which means + * they have exactly the same structure, both paths must have the same operations, in the same order. + * If any of the operations are of type CONIC, then the weights of those conics must also match. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param path Indicates the pointer to an OH_Drawing_Path object. + * @param other Indicates the pointer to an OH_Drawing_Path object to be interpolated with path. + * @param result Indicates whether the current path and the other path are compatible for interpolation. + * The value is true if the paths are compatible, and false otherwise. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if eiter path, other or result is nullptr. + * @since 20 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_PathIsInterpolate(OH_Drawing_Path* path, OH_Drawing_Path* other, bool* result); + #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/drawing_pen.h b/graphic/graphic_2d/native_drawing/drawing_pen.h index 7465f4ebafab88b6f35210b83fa11910015328ba..0446d7d1132a0457a1572c8e04537baefcc091e5 100644 --- a/graphic/graphic_2d/native_drawing/drawing_pen.h +++ b/graphic/graphic_2d/native_drawing/drawing_pen.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -40,12 +40,19 @@ #ifndef C_INCLUDE_DRAWING_PEN_H #define C_INCLUDE_DRAWING_PEN_H +#include "drawing_error_code.h" #include "drawing_types.h" #ifdef __cplusplus extern "C" { #endif +/** + * @brief Defines a colorspace manager. Introduces the color space information defined by ColorManager. + * @since 20 + */ +typedef struct OH_NativeColorSpaceManager OH_NativeColorSpaceManager; + /** * @brief Creates an OH_Drawing_Pen object. * @@ -148,6 +155,83 @@ uint8_t OH_Drawing_PenGetAlpha(const OH_Drawing_Pen* pen); */ void OH_Drawing_PenSetAlpha(OH_Drawing_Pen* pen, uint8_t alpha); +/** + * @brief Sets the color for a pen. The color will be used by the pen to fill in a shape. + * The color is an ARGB structure described by floating point numbers and interpreted as being in the colorSpaceManager. + * If colorSpaceManager is nullptr, then color is assumed to be in the sRGB color space. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param pen Indicates the pointer to an OH_Drawing_Pen object. + * @param a Indicates the alpha component of color, represented as a floating point number between 0 and 1. + * @param r Indicates the red component of color, represented as a floating point number between 0 and 1. + * @param g Indicates the green component of color, represented as a floating point number between 0 and 1. + * @param b Indicates the blue component of color, represented as a floating point number between 0 and 1. + * @param colorSpaceManager Indicates the pointer to an OH_NativeColorSpaceManager object. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if pen is nullptr. + * @since 20 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_PenSetColor4f(OH_Drawing_Pen* pen, float a, float r, float g, float b, + OH_NativeColorSpaceManager* colorSpaceManager); + +/** + * @brief Obtains the alpha component of a pen. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param pen Indicates the pointer to an OH_Drawing_Pen object. + * @param a Indicates the alpha component of color. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if pen or a is nullptr. + * @since 20 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_PenGetAlphaFloat(OH_Drawing_Pen* pen, float* a); + +/** + * @brief Obtains the red component of a pen. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param pen Indicates the pointer to an OH_Drawing_Pen object. + * @param r Indicates the red component of color. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if pen or r is nullptr. + * @since 20 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_PenGetRedFloat(OH_Drawing_Pen* pen, float* r); + +/** + * @brief Obtains the green component of a pen. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param pen Indicates the pointer to an OH_Drawing_Pen object. + * @param g Indicates the green component of color. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if pen or g is nullptr. + * @since 20 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_PenGetGreenFloat(OH_Drawing_Pen* pen, float* g); + +/** + * @brief Obtains the blue component of a pen. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param pen Indicates the pointer to an OH_Drawing_Pen object. + * @param b Indicates the blue component of color. + * @return Returns the error code. + * Returns {@link OH_DRAWING_SUCCESS} if the operation is successful. + * Returns {@link OH_DRAWING_ERROR_INVALID_PARAMETER} if pen or b is nullptr. + * @since 20 + * @version 1.0 + */ +OH_Drawing_ErrorCode OH_Drawing_PenGetBlueFloat(OH_Drawing_Pen* pen, float* b); + /** * @brief Obtains the thickness of a pen. This thickness determines the width of the outline of a shape. * diff --git a/graphic/graphic_2d/native_drawing/drawing_register_font.h b/graphic/graphic_2d/native_drawing/drawing_register_font.h index 2ffdbbfec66f1ff8bdee46f3aa5969d7e6aef0ba..c2b6bcc3aeb294daded6ca80484eda8446b0d323 100644 --- a/graphic/graphic_2d/native_drawing/drawing_register_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_register_font.h @@ -75,6 +75,19 @@ uint32_t OH_Drawing_RegisterFont(OH_Drawing_FontCollection*, const char* fontFam uint32_t OH_Drawing_RegisterFontBuffer(OH_Drawing_FontCollection*, const char* fontFamily, uint8_t* fontBuffer, size_t length); +/** + * @brief Unregister a customized font by the font family. + * Unregistering a font that is currently in use by UI components may lead to text rendering anomalies, + * including garbled characters or missing glyphs. + * All typography using the unregistered font family should be destroyed and re-created. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param fontCollection Indicates the pointer to an OH_Drawing_FontCollection object. + * @param fontFamily Indicates the family-name of the font which need to be unregistered. + * @return error code. + * @since 20 + */ +uint32_t OH_Drawing_UnregisterFont(OH_Drawing_FontCollection* fontCollection, const char* fontFamily); #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/drawing_text_global.h b/graphic/graphic_2d/native_drawing/drawing_text_global.h index 7a7493c9445b39e8ab696f87d49f98b25bda81e2..39c9f8bc59adc4e0a9256aad7dbd3a8d6b50d822 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_global.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_global.h @@ -58,6 +58,18 @@ typedef enum { TEXT_APP_ENABLE_HIGH_CONTRAST } OH_Drawing_TextHighContrast; +/** + * @brief Visual representations for undefined (.notdef) glyphs. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @since 20 + */ +typedef enum { + /** Uses the glyph defined in the font file, which could be an empty box, blank space, or custom symbol etc. */ + TEXT_NO_GLYPH_USE_DEFAULT = 0, + /** Always render tofu blocks for missing glyphs. */ + TEXT_NO_GLYPH_USE_TOFU = 1, +} OH_Drawing_TextUndefinedGlyphDisplay; /** * @brief Sets high contrast mode of text rendering. @@ -68,6 +80,14 @@ typedef enum { */ void OH_Drawing_SetTextHighContrast(OH_Drawing_TextHighContrast action); +/** + * @brief Controls how undefined glyphs are visually presented, affects all text rendered after this call. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param undefinedGlyphDisplay Indicates a OH_Drawing_TextUndefinedGlyphDisplay to be set. + * @since 20 + */ +void OH_Drawing_SetTextUndefinedGlyphDisplay(OH_Drawing_TextUndefinedGlyphDisplay undefinedGlyphDisplay); #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/drawing_text_run.h b/graphic/graphic_2d/native_drawing/drawing_text_run.h index 8873eaaf23e7389d04a20395f7281ebdd6a0ba39..cd9dff6ea2fdb187fd1547507b679bf408314914 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_run.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_run.h @@ -41,6 +41,7 @@ #define C_INCLUDE_DRAWING_TEXT_RUN_H #include "drawing_text_declaration.h" +#include "drawing_text_typography.h" #include "drawing_types.h" #ifdef __cplusplus @@ -208,6 +209,59 @@ void OH_Drawing_DestroyRunPositions(OH_Drawing_Array* positions); * @since 18 */ uint32_t OH_Drawing_GetRunGlyphCount(OH_Drawing_Run* run); + +/** + * @brief Gets the Font Object of run. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param run Indicates the pointer to an OH_Drawing_Run object. + * @return The Font Object of run. + * @since 20 + * @version 1.0 + */ +OH_Drawing_Font* OH_Drawing_GetRunFont(OH_Drawing_Run* run); + +/** + * @brief Get the text direction. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param run Indicates the pointer to an OH_Drawing_Run object. + * @return Return the text direction of an OH_Drawing_TextDirection object. + * @since 20 + */ +OH_Drawing_TextDirection OH_Drawing_GetRunTextDirection(OH_Drawing_Run* run); + +/** + * @brief Gets the glyph advance array. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param run Indicates the pointer to an OH_Drawing_Run object. + * @param start The run of start index. + * @param length The run of length, if start and length are set to 0, then get all of the current run. + * @return Indicates the pointer to the glyph advance array object OH_Drawing_Array. + * @since 20 + */ +OH_Drawing_Array* OH_Drawing_GetRunGlyphAdvances(OH_Drawing_Run* run, uint32_t start, uint32_t length); + +/** + * @brief Gets the glyph advance by index. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param advances The glyph advance array object OH_Drawing_Array. + * @param index The run of glyph index. + * @return Run of glyph advance pointer to an OH_Drawing_Point object. + * @since 20 + */ +OH_Drawing_Point* OH_Drawing_GetRunGlyphAdvanceByIndex(OH_Drawing_Array* advances, size_t index); + +/** + * @brief Releases the memory of glyph advance array. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param advances The run of glyph advance array object OH_Drawing_Array. + * @since 20 + */ +void OH_Drawing_DestroyRunGlyphAdvances(OH_Drawing_Array* advances); #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 8a704ced57b0a924345ff14edaf9a85fba79c2ad..7e66d405e791b2726904fe24fd5d2219aa034f55 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -196,6 +196,11 @@ typedef enum { ALIGNMENT_BOTTOM_OF_ROW_BOX, /** Center of Row Box */ ALIGNMENT_CENTER_OF_ROW_BOX, + /** + * Follow paragraph setting + * @since 20 + */ + ALIGNMENT_FOLLOW_PARAGRAPH, } OH_Drawing_PlaceholderVerticalAlignment; /** @@ -592,6 +597,23 @@ typedef enum OH_Drawing_TextBadgeType { TEXT_SUBSCRIPT, } OH_Drawing_TextBadgeType; +/** + * @brief Type of vertical alignment. + * + * @since 20 + * @version 1.0 + */ +typedef enum OH_Drawing_TextVerticalAlignment { + /** Baseline of text line */ + TEXT_VERTICAL_ALIGNMENT_BASELINE, + /** Bottom of text line */ + TEXT_VERTICAL_ALIGNMENT_BOTTOM, + /** Center of text line */ + TEXT_VERTICAL_ALIGNMENT_CENTER, + /** Top of text line */ + TEXT_VERTICAL_ALIGNMENT_TOP +} OH_Drawing_TextVerticalAlignment; + /** * @brief Defines the font style struct. * @@ -2360,6 +2382,19 @@ double OH_Drawing_TextStyleGetFontHeight(OH_Drawing_TextStyle* style); */ bool OH_Drawing_TextStyleGetHalfLeading(OH_Drawing_TextStyle* style); +/** + * @brief Sets the typography vertical alignment mode. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param style Indicates the pointer to an OH_Drawing_TypographyStyle object. + * @param align Indicates the typography vertical alignment mode. For details, + * see the enum OH_Drawing_TextVerticalAlignment. + * @since 20 + * @version 1.0 + */ +void OH_Drawing_SetTypographyVerticalAlignment(OH_Drawing_TypographyStyle* style, + OH_Drawing_TextVerticalAlignment align); + /** * @brief Gets the locale. * @@ -2683,6 +2718,17 @@ void OH_Drawing_TypographyUpdateDecorationThicknessScale(OH_Drawing_Typography* void OH_Drawing_TypographyUpdateDecorationStyle(OH_Drawing_Typography* typography, OH_Drawing_TextDecorationStyle decorationStyle); +/** + * @brief Updates the decoration color of the paragraph. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param typography Indicates the pointer to the text OH_Drawing_Typography object. + * @param color Indicates the text decoration color to update. + * @since 20 + * @version 1.0 + */ +void OH_Drawing_TypographyUpdateDecorationColor(OH_Drawing_Typography* typography, uint32_t color); + /** * @brief Get whether the text layout enables line styles. * diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index cd1b53c1f7bb7eb8770b6dd0710b07bb72a65d1e..a80868f7a590263336d70c51c2127e344aec7a69 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -29,12 +29,32 @@ }, { "name": "OH_Drawing_BrushDestroy" }, { "name": "OH_Drawing_BrushGetAlpha" }, + { + "first_introduced": "20", + "name": "OH_Drawing_BrushGetAlphaFloat" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_BrushGetRedFloat" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_BrushGetGreenFloat" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_BrushGetBlueFloat" + }, { "name": "OH_Drawing_BrushSetAlpha" }, { "name": "OH_Drawing_BrushSetBlendMode" }, { "name": "OH_Drawing_BrushIsAntiAlias" }, { "name": "OH_Drawing_BrushSetAntiAlias" }, { "name": "OH_Drawing_BrushGetColor" }, { "name": "OH_Drawing_BrushSetColor" }, + { + "first_introduced": "20", + "name": "OH_Drawing_BrushSetColor4f" + }, { "name": "OH_Drawing_BrushSetFilter" }, { "first_introduced": "12", @@ -567,6 +587,18 @@ "first_introduced": "20", "name": "OH_Drawing_PathSetPath" }, + { + "first_introduced": "20", + "name": "OH_Drawing_PathApproximate" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_PathInterpolate" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_PathIsInterpolate" + }, { "first_introduced": "12", "name": "OH_Drawing_PenCopy" @@ -575,11 +607,31 @@ { "name": "OH_Drawing_PenDestroy" }, { "name": "OH_Drawing_PenGetAlpha" }, { "name": "OH_Drawing_PenSetAlpha" }, + { + "first_introduced": "20", + "name": "OH_Drawing_PenGetAlphaFloat" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_PenGetRedFloat" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_PenGetGreenFloat" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_PenGetBlueFloat" + }, { "name": "OH_Drawing_PenSetBlendMode" }, { "name": "OH_Drawing_PenIsAntiAlias" }, { "name": "OH_Drawing_PenSetAntiAlias" }, { "name": "OH_Drawing_PenGetColor" }, { "name": "OH_Drawing_PenSetColor" }, + { + "first_introduced": "20", + "name": "OH_Drawing_PenSetColor4f" + }, { "name": "OH_Drawing_PenGetWidth" }, { "name": "OH_Drawing_PenSetWidth" }, { "name": "OH_Drawing_PenGetMiterLimit" }, @@ -1034,6 +1086,10 @@ "first_introduced": "11", "name": "OH_Drawing_RegisterFontBuffer" }, + { + "first_introduced": "20", + "name": "OH_Drawing_UnregisterFont" + }, { "first_introduced": "12", "name": "OH_Drawing_TypographyGetLineTextRange" @@ -1554,6 +1610,10 @@ "first_introduced": "20", "name": "OH_Drawing_TypographyUpdateDecorationStyle" }, + { + "first_introduced": "20", + "name": "OH_Drawing_TypographyUpdateDecorationColor" + }, { "first_introduced": "12", "name": "OH_Drawing_TypographyTextGetLineStyle" @@ -1854,10 +1914,30 @@ "first_introduced": "18", "name":"OH_Drawing_GetRunGlyphCount" }, + { + "first_introduced": "20", + "name":"OH_Drawing_GetRunTextDirection" + }, + { + "first_introduced": "20", + "name":"OH_Drawing_GetRunGlyphAdvances" + }, + { + "first_introduced": "20", + "name":"OH_Drawing_GetRunGlyphAdvanceByIndex" + }, + { + "first_introduced": "20", + "name":"OH_Drawing_DestroyRunGlyphAdvances" + }, { "first_introduced": "14", "name":"OH_Drawing_GetFontCollectionGlobalInstance" }, + { + "first_introduced": "20", + "name":"OH_Drawing_GetRunFont" + }, { "first_introduced": "18", "name":"OH_Drawing_CanvasQuickRejectPath" @@ -1897,5 +1977,17 @@ { "first_introduced": "20", "name": "OH_Drawing_SetTextHighContrast" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_SetTextUndefinedGlyphDisplay" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_SetTypographyVerticalAlignment" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_TypographyHandlerAddEncodedText" } ] \ No newline at end of file diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h index 8ea6331c1ec187318c181a78a2f75c1d26b9d4c0..6e41ae61a964e2c11718042081c58d57b14072a8 100644 --- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h +++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h @@ -740,6 +740,21 @@ int OH_HiAppEvent_SetCustomConfig(HiAppEvent_Processor* processor, const char* k */ int OH_HiAppEvent_SetConfigId(HiAppEvent_Processor* processor, int configId); +/** + * @brief The interface to set config Name for processor. + * + * @param processor The pointer to the HiAppEvent_Processor instance. + * @param configName The configName of processor. + * @return set result. + * {@link HIAPPEVENT_SUCCESS} The operation is successful. + * {@link HIAPPEVENT_PROCESSOR_IS_NULL} The processor is nullptr. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE} Invalid Param value. + * {@link HIAPPEVENT_INVALID_UID} Invalid uid. + * {@link HIAPPEVENT_INVALID_PARAM_VALUE_LENGTH} Invalid param value length. + * @since 20 + */ +int OH_HiAppEvent_SetConfigName(HiAppEvent_Processor* processor, const char* configName); + /** * @brief The interface to set user info for processor. * diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h index 63dc8cf01461d7d464400904b94cff1dfc51f386..06f186ed5ad34d88e25247429d918dc164c83242 100644 --- a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h +++ b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h @@ -160,6 +160,14 @@ extern "C" { */ #define EVENT_APP_HICOLLIE "APP_HICOLLIE" +/** + * @brief app killed event. + * + * @since 20 + * @version 1.0 + */ +#define EVENT_APP_KILLED "APP_KILLED" + /** * @brief OS domain. * diff --git a/hiviewdfx/hiappevent/libhiappevent.ndk.json b/hiviewdfx/hiappevent/libhiappevent.ndk.json index 98c62ebeb65bc817b449d7317bca0ced0b136539..23733dddea6a5c4cc23a05e62cef08ec49b5a5d7 100644 --- a/hiviewdfx/hiappevent/libhiappevent.ndk.json +++ b/hiviewdfx/hiappevent/libhiappevent.ndk.json @@ -158,5 +158,9 @@ { "first_introduced": "18", "name": "OH_HiAppEvent_RemoveProcessor" + }, + { + "first_introduced": "20", + "name": "OH_HiAppEvent_SetConfigName" } ] diff --git a/multimedia/audio_framework/audio_capturer/native_audiocapturer.h b/multimedia/audio_framework/audio_capturer/native_audiocapturer.h index f2f256e49b492c8895f44798b638091ec5336a7a..9f1644a90b9ca449eea68c8a0d9e2b416e13fcbb 100644 --- a/multimedia/audio_framework/audio_capturer/native_audiocapturer.h +++ b/multimedia/audio_framework/audio_capturer/native_audiocapturer.h @@ -296,7 +296,7 @@ OH_AudioStream_Result OH_AudioCapturer_GetOverflowCount(OH_AudioCapturer* captur * @param audioData Audio data pointer, where user should read. * @param audioDataSize Size of audio data that user should read. * @see OH_AudioCapturer_Callbacks_Struct.OH_AudioCapturer_OnReadData - * @since 19 + * @since 20 */ typedef void (*OH_AudioCapturer_OnReadDataCallback)(OH_AudioCapturer* capturer, void* userData, void* audioData, int32_t audioDataSize); @@ -310,7 +310,7 @@ typedef void (*OH_AudioCapturer_OnReadDataCallback)(OH_AudioCapturer* capturer, * @param userData User data which is passed by user. * @param deviceArray Array of AudioDeviceDescriptor where the capturing data from. * @see OH_AudioCapturer_Callbacks_Struct.OH_AudioCapturer_OnStreamEvent - * @since 19 + * @since 20 */ typedef void (*OH_AudioCapturer_OnDeviceChangeCallback)(OH_AudioCapturer* capturer, void* userData, OH_AudioDeviceDescriptorArray* deviceArray); @@ -325,7 +325,7 @@ typedef void (*OH_AudioCapturer_OnDeviceChangeCallback)(OH_AudioCapturer* captur * @param type Force type of this interrupt event. * @param hint Hint of this interrupt event. * @see OH_AudioCapturer_Callbacks_Struct.OH_AudioCapturer_OnInterruptEvent. - * @since 19 + * @since 20 */ typedef void (*OH_AudioCapturer_OnInterruptCallback)(OH_AudioCapturer* capturer, void* userData, OH_AudioInterrupt_ForceType type, OH_AudioInterrupt_Hint hint); @@ -339,11 +339,39 @@ typedef void (*OH_AudioCapturer_OnInterruptCallback)(OH_AudioCapturer* capturer, * @param userData User data which is passed by user. * @param error Error while using AudioCapturer. * @see OH_AudioCapturer_Callbacks_Struct.OH_AudioCapturer_OnError - * @since 19 + * @since 20 */ typedef void (*OH_AudioCapturer_OnErrorCallback)(OH_AudioCapturer* renderer, void* userData, OH_AudioStream_Result error); +/** + * @brief Gets audio capturer running status, check if it works in fast status. + * + * @param capturer Reference created by OH_AudioStreamBuilder_GenerateCapturer. + * @param status Pointer to a variable to receive the status. + * @return + * {@link AUDIOSTREAM_SUCCESS} if the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} the param of capturer is nullptr. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} function called in invalid state, only available before release state. + * @since 20 + */ +OH_AudioStream_Result OH_AudioCapturer_GetFastStatus(OH_AudioCapturer* capturer, + OH_AudioStream_FastStatus* status); + +/** + * @brief Callback function of fast status change event for audio capturer. + * + * @param capturer Pointer to an audio capturer instance for which this callback occurs. + * @param userData Userdata which is passed by register. + * @param status Current fast status. + * @since 20 + */ +typedef void (*OH_AudioCapturer_OnFastStatusChange)( + OH_AudioCapturer* capturer, + void* userData, + OH_AudioStream_FastStatus status +); + #ifdef __cplusplus } #endif diff --git a/multimedia/audio_framework/audio_manager/native_audio_stream_manager.h b/multimedia/audio_framework/audio_manager/native_audio_stream_manager.h index 34b4af643f192d43887a5e06814ac2c8b46e7c17..4069e64394a547f571e187c4bb6384ddc10fd8d3 100644 --- a/multimedia/audio_framework/audio_manager/native_audio_stream_manager.h +++ b/multimedia/audio_framework/audio_manager/native_audio_stream_manager.h @@ -110,6 +110,34 @@ OH_AudioCommon_Result OH_AudioStreamManager_IsAcousticEchoCancelerSupported( OH_AudioStream_SourceType sourceType, bool *supported); +/** + * @brief Return if fast playback is supported for the specific audio stream info and usage type + * in current device situation. + * + * @param streamManager {@link OH_AudioStreamManager} handle + * provided by {@link OH_AudioManager_GetAudioStreamManager}. + * @param streamInfo reference of stream info structure to describe basic audio format. + * @param usage stream usage type used to decide the audio device and pipe type selection result. + * @return {@code true} if fast playback is supported in this situation. + * @since 20 + */ +bool OH_AudioStreamManager_IsFastPlaybackSupported( + OH_AudioStreamManager *streamManager, OH_AudioStreamInfo *streamInfo, OH_AudioStream_Usage usage); + +/** + * @brief Return if fast recording is supported for the specific audio stream info and source type + * in current device situation. + * + * @param streamManager {@link OH_AudioStreamManager} handle + * provided by {@link OH_AudioManager_GetAudioStreamManager}. + * @param streamInfo reference of stream info structure to describe basic audio format. + * @param source stream source type used to decide the audio device and pipe type selection result. + * @return {@code true} if fast recording is supported in this situation. + * @since 20 + */ +bool OH_AudioStreamManager_IsFastRecordingSupported( + OH_AudioStreamManager *streamManager, OH_AudioStreamInfo *streamInfo, OH_AudioStream_SourceType source); + #ifdef __cplusplus } #endif diff --git a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h index f048de6e57e0434b425da0c569508e18077185b9..a2b5dff7d94bb3a890bc911f763c0e16a4f5682d 100644 --- a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h +++ b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h @@ -243,6 +243,10 @@ OH_AudioStream_Result OH_AudioRenderer_GetFramesWritten(OH_AudioRenderer* render /** * Query the the time at which a particular frame was presented. * + * It is recommended to use new api {@link OH_AudioRenderer_GetAudioTimestampInfo} + * because it adapts to playback speed change, but current api does not. The + * increasing speed for position will not change when speed become fast. + * * @since 10 * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() @@ -517,6 +521,9 @@ OH_AudioStream_Result OH_AudioRenderer_SetDefaultOutputDevice( * This interface also adapts to playback speed change. For example, the increseing speed for * position will be double for 2x speed playback. * + * For video synchronization usage, there is a best practice document for developer to refer + * **AV Synchronization**. + * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param framePosition Pointer to a variable to receive the position * @param timestamp Pointer to a variable to receive the timestamp @@ -545,7 +552,7 @@ OH_AudioStream_Result OH_AudioRenderer_GetAudioTimestampInfo(OH_AudioRenderer* r * @param type Force type of this interrupt event. * @param hint Hint of this interrupt event. * @see OH_AudioRenderer_Callbacks_Struct.OH_AudioRenderer_OnInterruptEvent. - * @since 19 + * @since 20 */ typedef void (*OH_AudioRenderer_OnInterruptCallback)(OH_AudioRenderer* renderer, void* userData, OH_AudioInterrupt_ForceType type, OH_AudioInterrupt_Hint hint); @@ -559,11 +566,39 @@ typedef void (*OH_AudioRenderer_OnInterruptCallback)(OH_AudioRenderer* renderer, * @param userData User data which is passed by user. * @param error Error while using AudioRenderer. * @see OH_AudioRenderer_Callbacks_Struct.OH_AudioRenderer_OnError - * @since 19 + * @since 20 */ typedef void (*OH_AudioRenderer_OnErrorCallback)(OH_AudioRenderer* renderer, void* userData, OH_AudioStream_Result error); +/** + * @brief Gets audio renderer running status, check if it works in fast status. + * + * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer. + * @param status Pointer to a variable to receive the status. + * @return + * {@link AUDIOSTREAM_SUCCESS} if the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} the param of renderer is nullptr. + * {@link AUDIOSTREAM_ERROR_ILLEGAL_STATE} function called in invalid state, only available before release state. + * @since 20 + */ +OH_AudioStream_Result OH_AudioRenderer_GetFastStatus(OH_AudioRenderer* renderer, + OH_AudioStream_FastStatus* status); + +/** + * @brief Callback function of fast status change event for audio renderer. + * + * @param renderer Pointer to an audio renderer instance for which this callback occurs. + * @param userData Userdata which is passed by register. + * @param status Current fast status. + * @since 20 + */ +typedef void (*OH_AudioRenderer_OnFastStatusChange)( + OH_AudioRenderer* renderer, + void* userData, + OH_AudioStream_FastStatus status +); + #ifdef __cplusplus } #endif diff --git a/multimedia/audio_framework/common/native_audio_device_base.h b/multimedia/audio_framework/common/native_audio_device_base.h index beb3a54559f23dea6559396ca0f19c567053d112..6654ae3209c905afa660b751f94669125d815732 100644 --- a/multimedia/audio_framework/common/native_audio_device_base.h +++ b/multimedia/audio_framework/common/native_audio_device_base.h @@ -168,6 +168,12 @@ typedef enum { */ AUDIO_DEVICE_TYPE_LINE_DIGITAL = 28, + /** + * @brief Nearlink device. + * @since 20 + */ + AUDIO_DEVICE_TYPE_NEARLINK = 31, + /** * @brief Default device type. */ diff --git a/multimedia/audio_framework/common/native_audiostream_base.h b/multimedia/audio_framework/common/native_audiostream_base.h index 28643a2469467b7917a896712d932200b6ee3083..9b763054bc9bff2e1bf5b9b4490f33b99a52fbce 100644 --- a/multimedia/audio_framework/common/native_audiostream_base.h +++ b/multimedia/audio_framework/common/native_audiostream_base.h @@ -350,7 +350,7 @@ typedef enum { /** * @brief Define the audio event. * - * @deprecated since 19 + * @deprecated since 20 * @useinstead OH_AudioRenderer_OutputDeviceChangeCallback. * @since 10 */ @@ -358,7 +358,7 @@ typedef enum { /** * The routing of the audio has changed. * - * @deprecated since 19 + * @deprecated since 20 * @useinstead OH_AudioRenderer_OutputDeviceChangeCallback. * @since 10 */ @@ -591,6 +591,22 @@ typedef enum { EFFECT_DEFAULT = 1, } OH_AudioStream_AudioEffectMode; +/** + * @brief Defines the fast status. + * + * @since 20 + */ +typedef enum { + /** + * normal status + */ + AUDIOSTREAM_FASTSTATUS_NORMAL = 0, + /** + * fast status + */ + AUDIOSTREAM_FASTSTATUS_FAST = 1 +} OH_AudioStream_FastStatus; + /** * @brief Declaring the audio stream builder. * The instance of builder is used for creating audio stream. @@ -618,7 +634,7 @@ typedef struct OH_AudioCapturerStruct OH_AudioCapturer; /** * @brief Declaring the callback struct for renderer stream. * - * @deprecated since 19 + * @deprecated since 20 * @useinstead Use the callback type: OH_AudioRenderer_OnWriteDataCallback, OH_AudioRenderer_OutputDeviceChangeCallback, * OH_AudioRenderer_OnInterruptEvent, OH_AudioRenderer_OnErrorCallback separately. * @since 10 @@ -628,7 +644,7 @@ typedef struct OH_AudioRenderer_Callbacks_Struct { * This function pointer will point to the callback function that * is used to write audio data * - * @deprecated since 19 + * @deprecated since 20 * @useinstead OH_AudioRenderer_OnWriteDataCallback. * @since 10 */ @@ -642,7 +658,7 @@ typedef struct OH_AudioRenderer_Callbacks_Struct { * This function pointer will point to the callback function that * is used to handle audio renderer stream events. * - * @deprecated since 19 + * @deprecated since 20 * @useinstead OH_AudioRenderer_OutputDeviceChangeCallback. * @since 10 */ @@ -655,7 +671,7 @@ typedef struct OH_AudioRenderer_Callbacks_Struct { * This function pointer will point to the callback function that * is used to handle audio interrupt events. * - * @deprecated since 19 + * @deprecated since 20 * @useinstead OH_AudioRenderer_OnInterruptCallback. * @since 10 */ @@ -669,7 +685,7 @@ typedef struct OH_AudioRenderer_Callbacks_Struct { * This function pointer will point to the callback function that * is used to handle audio error result. * - * @deprecated since 19 + * @deprecated since 20 * @useinstead OH_AudioRenderer_OnErrorCallback. * @since 10 */ @@ -682,7 +698,7 @@ typedef struct OH_AudioRenderer_Callbacks_Struct { /** * @brief Declaring the callback struct for capturer stream. * - * @deprecated since 19 + * @deprecated since 20 * @useinstead Use the callback type: OH_AudioCapturer_OnReadDataCallback, OH_AudioCapturer_OnDeviceChangeCallback, * OH_AudioCapturer_OnInterruptCallback and OH_AudioCapturer_OnErrorCallback separately. * @since 10 @@ -692,7 +708,7 @@ typedef struct OH_AudioCapturer_Callbacks_Struct { * This function pointer will point to the callback function that * is used to read audio data. * - * @deprecated since 19 + * @deprecated since 20 * @useinstead OH_AudioCapturer_OnReadDataCallback * @since 10 */ @@ -706,7 +722,7 @@ typedef struct OH_AudioCapturer_Callbacks_Struct { * This function pointer will point to the callback function that * is used to handle audio capturer stream events. * - * @deprecated since 19 + * @deprecated since 20 * @useinstead OH_AudioRenderer_OutputDeviceChangeCallback * @since 10 */ @@ -719,7 +735,7 @@ typedef struct OH_AudioCapturer_Callbacks_Struct { * This function pointer will point to the callback function that * is used to handle audio interrupt events. * - * @deprecated since 19 + * @deprecated since 20 * @useinstead OH_AudioCapturer_OnInterruptCallback * @since 10 */ @@ -733,7 +749,7 @@ typedef struct OH_AudioCapturer_Callbacks_Struct { * This function pointer will point to the callback function that * is used to handle audio error result. * - * @deprecated since 19 + * @deprecated since 20 * @useinstead OH_AudioCapturer_OnErrorCallback * @since 10 */ diff --git a/multimedia/audio_framework/common/native_audiostreambuilder.h b/multimedia/audio_framework/common/native_audiostreambuilder.h index dd84c6e4678d0b64b9b1cfea1fcf0b44fcd50c3a..a557a9342e477a1dcc481e38bd5b34d74a7dccaf 100644 --- a/multimedia/audio_framework/common/native_audiostreambuilder.h +++ b/multimedia/audio_framework/common/native_audiostreambuilder.h @@ -197,7 +197,7 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerInfo(OH_AudioStreamBuilde /** * Set the callbacks for the renderer client * - * @deprecated since 19 + * @deprecated since 20 * @useinstead Set the callback functions separately using OH_AudioStreamBuilder_SetRendererWriteDataCallback, * OH_AudioStreamBuilder_SetRendererInterruptCallback, OH_AudioStreamBuilder_SetRendererOutputDeviceChangeCallback * and OH_AudioStreamBuilder_SetRendererErrorCallback. @@ -251,7 +251,7 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererPrivacy(OH_AudioStreamBui /** * Set the callbacks for the capturer client * - * @deprecated since 19 + * @deprecated since 20 * @useinstead Set the callback functions separately using OH_AudioStreamBuilder_SetCapturerReadDataCallback, * OH_AudioStreamBuilder_SetCapturerDeviceChangeCallback, OH_AudioStreamBuilder_SetCapturerInterruptCallback * and OH_AudioStreamBuilder_SetCapturerErrorCallback. @@ -276,17 +276,16 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerCallback(OH_AudioStreamBu * When using AudioRenderer apis, there are many instructions for application * to achieve better performance and lower power consumption: * In music or audiobook background playback situation, you can have low power - * consumption by following this best practices document [Low-Power Rules in Music Playback Scenarios]{@link - * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-music-playback-scenarios}. - * And for navigation situation, you can follow [Low-Power Rules in Navigation and Positioning Scenarios]{@link - * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-navigation-scenarios}. + * consumption by following this best practices document **Low-Power Rules in Music Playback Scenarios**. + * And for navigation situation, you can follow **Low-Power Rules in Navigation and Positioning Scenarios**. * * Application developer should also be careful when app goes to background, please check if your audio playback - * is still needed, see [Audio Resources]{@link - * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-reasonable-audio-use}. + * is still needed, see **Audio Resources** in best practices document. * And avoiding to send silence audio data continuously to waste system resources, otherwise system will take - * control measures when this behavior is detected, see [Audio Playback]{@link - * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-reasonable-audio-playback-use}. + * control measures when this behavior is detected, see **Audio Playback** in best practices document. + * + * If you want to use AudioRenderer api to implement a music playback application, there are also many interactive + * scenes to consider, see **Developing an Audio Application** in best practices document. * * @since 10 * @@ -414,7 +413,7 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetVolumeMode(OH_AudioStreamBuilder* * @return Result code. * {@link AUDIOSTREAM_SUCCESS} Success. * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} Parameter is invalid, e.g. builder is nullptr, e.t.c. - * @since 19 + * @since 20 */ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererInterruptCallback(OH_AudioStreamBuilder* builder, OH_AudioRenderer_OnInterruptCallback callback, void* userData); @@ -431,7 +430,7 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererInterruptCallback(OH_Audi * @return Result code. * {@link AUDIOSTREAM_SUCCESS} Success. * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} Parameter is invalid, e.g. builder is nullptr, e.t.c. - * @since 19 + * @since 20 */ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererErrorCallback(OH_AudioStreamBuilder* builder, OH_AudioRenderer_OnErrorCallback callback, void* userData); @@ -448,7 +447,7 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererErrorCallback(OH_AudioStr * @return Result code. * {@link AUDIOSTREAM_SUCCESS} Success. * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} Parameter is invalid, e.g. builder is nullptr, e.t.c. - * @since 19 + * @since 20 */ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerReadDataCallback(OH_AudioStreamBuilder* builder, OH_AudioCapturer_OnReadDataCallback callback, void* userData); @@ -465,7 +464,7 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerReadDataCallback(OH_Audio * @return Result code. * {@link AUDIOSTREAM_SUCCESS} Success. * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} Parameter is invalid, e.g. builder is nullptr, e.t.c. - * @since 19 + * @since 20 */ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerDeviceChangeCallback(OH_AudioStreamBuilder* builder, OH_AudioCapturer_OnDeviceChangeCallback callback, void* userData); @@ -482,7 +481,7 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerDeviceChangeCallback(OH_A * @return Result code. * {@link AUDIOSTREAM_SUCCESS} Success. * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} Parameter is invalid, e.g. builder is nullptr, e.t.c. - * @since 19 + * @since 20 */ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerInterruptCallback(OH_AudioStreamBuilder* builder, OH_AudioCapturer_OnInterruptCallback callback, void* userData); @@ -499,7 +498,7 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerInterruptCallback(OH_Audi * @return Result code. * {@link AUDIOSTREAM_SUCCESS} Success. * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} Parameter is invalid, e.g. builder is nullptr, e.t.c. - * @since 19 + * @since 20 */ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerErrorCallback(OH_AudioStreamBuilder* builder, OH_AudioCapturer_OnErrorCallback callback, void* userData); @@ -517,6 +516,35 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerErrorCallback(OH_AudioStr OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerWillMuteWhenInterrupted(OH_AudioStreamBuilder* builder, bool muteWhenInterrupted); +/** + * @brief Set the callback of fast status change event for audio renderer. + * + * @param builder Builder provided by OH_AudioStreamBuilder_Create() + * @param callback Callback function that will recevie the fast status change event. + * @param userData Pointer to an application data structure that will be passed to the callback functions. + * @return + * {@link AUDIOSTREAM_SUCCESS} if the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} the param of builder or callback is nullptr. + * @since 20 + */ +OH_AudioStream_Result OH_AudioStreamBuilder_SetRendererFastStatusChangeCallback(OH_AudioStreamBuilder* builder, + OH_AudioRenderer_OnFastStatusChange callback, void* userData); + +/** + * @brief Set the callback of fast status change event for audio capturer. + * + * @param builder Builder provided by OH_AudioStreamBuilder_Create() + * @param callback Callback function that will recevie the fast status change event. + * @param userData Pointer to an application data structure that will be passed to the callback functions. + * @return + * {@link AUDIOSTREAM_SUCCESS} if the execution is successful. + * {@link AUDIOSTREAM_ERROR_INVALID_PARAM} the param of builder or callback is nullptr. + * @since 20 + */ +OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerFastStatusChangeCallback(OH_AudioStreamBuilder* builder, + OH_AudioCapturer_OnFastStatusChange callback, void* userData); + + #ifdef __cplusplus } #endif diff --git a/multimedia/audio_framework/ohaudio.ndk.json b/multimedia/audio_framework/ohaudio.ndk.json index 048a15b035fb726b4e9b022855a27b3c461726a3..73e3be08e86836e8e8812bff4ed8b606c5574574 100644 --- a/multimedia/audio_framework/ohaudio.ndk.json +++ b/multimedia/audio_framework/ohaudio.ndk.json @@ -389,36 +389,36 @@ }, { "first_introduced": "19", - "name": "OH_AudioStreamBuilder_SetRendererInterruptCallback" + "name": "OH_AudioManager_GetAudioStreamManager" }, { "first_introduced": "19", + "name": "OH_AudioStreamManager_GetDirectPlaybackSupport" + }, + { + "first_introduced": "20", + "name": "OH_AudioStreamBuilder_SetRendererInterruptCallback" + }, + { + "first_introduced": "20", "name": "OH_AudioStreamBuilder_SetRendererErrorCallback" }, { - "first_introduced": "19", + "first_introduced": "20", "name": "OH_AudioStreamBuilder_SetCapturerReadDataCallback" }, { - "first_introduced": "19", + "first_introduced": "20", "name": "OH_AudioStreamBuilder_SetCapturerDeviceChangeCallback" }, { - "first_introduced": "19", + "first_introduced": "20", "name": "OH_AudioStreamBuilder_SetCapturerInterruptCallback" }, { - "first_introduced": "19", + "first_introduced": "20", "name": "OH_AudioStreamBuilder_SetCapturerErrorCallback" }, - { - "first_introduced": "19", - "name": "OH_AudioManager_GetAudioStreamManager" - }, - { - "first_introduced": "19", - "name": "OH_AudioStreamManager_GetDirectPlaybackSupport" - }, { "first_introduced": "20", "name": "OH_AudioStreamManager_IsAcousticEchoCancelerSupported" @@ -474,5 +474,29 @@ { "first_introduced": "20", "name": "OH_AudioVolumeManager_UnregisterRingerModeChangeCallback" + }, + { + "first_introduced": "20", + "name": "OH_AudioRenderer_GetFastStatus" + }, + { + "first_introduced": "20", + "name": "OH_AudioCapturer_GetFastStatus" + }, + { + "first_introduced": "20", + "name": "OH_AudioStreamManager_IsFastPlaybackSupported" + }, + { + "first_introduced": "20", + "name": "OH_AudioStreamManager_IsFastRecordingSupported" + }, + { + "first_introduced": "20", + "name": "OH_AudioStreamBuilder_SetRendererFastStatusChangeCallback" + }, + { + "first_introduced": "20", + "name": "OH_AudioStreamBuilder_SetCapturerFastStatusChangeCallback" } ] diff --git a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json index 8077a4119567a7bc3f9a471c6a9ffd51076c841b..34f5bb854e5f0d244051756e681d588d15bb67fe 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -423,6 +423,22 @@ "first_introduced": "18", "name": "OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_MAX_COUNT" }, + { + "first_introduced": "20", + "name": "OH_MD_KEY_VIDEO_ENCODER_ROI_PARAMS" + }, + { + "first_introduced": "20", + "name": "OH_MD_KEY_SQR_FACTOR" + }, + { + "first_introduced": "20", + "name": "OH_MD_KEY_MAX_BITRATE" + }, + { + "first_introduced": "20", + "name": "OH_MD_KEY_VIDEO_ENCODER_ENABLE_PTS_BASED_RATECONTROL" + }, { "first_introduced": "10", "name": "OH_AVCodec_GetCapability" diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 609dc238e0af050156bd7952e9cbb0237a1cc935..67075d05f5650463704f7c7db7ff32423dcc0490 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1031,6 +1031,50 @@ extern const char *OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_FRAME_AFTER; * @since 18 */ extern const char *OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_MAX_COUNT; +/** + * @brief Key to set the region of interest(ROI) as QpOffset-Rects, value type is string in the format + * "Top1,Left1-Bottom1,Right1=Offset1;Top2,Left2-Bottom2,Right2=Offset2;". Each "Top,Left-Bottom,Right=Offset" + * represents the coordinate information and quantization parameter of one ROI. Each "=Offset" in the string + * can be omitted, like "Top1,Left1-Bottom1,Right1;Top2,Left2-Bottom2,Right2=Offset2;", the encoder + * will use the default quantization parameter to perform the ROI encoding on the first ROI and + * use Offset2 on the second ROI. + * + * This is an optional key that applies only to video encoder. + * It is used in running process and is set with each frame. + * In surface mode, it is used in {@link OH_VideoEncoder_OnNeedInputParameter}. + * In buffer mode, it is configured via {@link OH_AVBuffer_SetParameter}. + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 20 + */ +extern const char *OH_MD_KEY_VIDEO_ENCODER_ROI_PARAMS; +/** + * @brief Key for the desired encoding quality, value type is int32_t, this key is only + * supported for encoders that are configured in Stable Quality RateControl, the higher + * values generally result in more efficient(smaller-sized) encoding. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 20 + */ +extern const char *OH_MD_KEY_SQR_FACTOR; +/** + * @brief Key for maximum bitrate, value type is int64_t. + * + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 20 + */ +extern const char *OH_MD_KEY_MAX_BITRATE; + +/** + * @brief Key to enable Bitrate Control Based on Presentation Time Stamp(PTS), + * value type is int32_t (0 or 1):1 is enabled, 0 otherwise. + * + * This is an optional key that applies only to video encoder, default is 0. + * If enabled, the PTS information must be carried in each video frame and sent to the encoder. + * It is used in configure. + * @syscap SystemCapability.Multimedia.Media.CodecBase + * @since 20 +*/ +extern const char *OH_MD_KEY_VIDEO_ENCODER_ENABLE_PTS_BASED_RATECONTROL; /** * @brief Media type. @@ -1562,7 +1606,11 @@ typedef enum OH_BitrateMode { /** Variable Bit rate mode. */ BITRATE_MODE_VBR = 1, /** Constant Quality mode. */ - BITRATE_MODE_CQ = 2 + BITRATE_MODE_CQ = 2, + /** Stable Quality Rate Control mode. + * @since 20 + */ + BITRATE_MODE_SQR = 3 } OH_BitrateMode; #ifdef __cplusplus diff --git a/multimedia/camera_framework/camera.h b/multimedia/camera_framework/camera.h index 274390abd1f8e5c21d6699f604f0454fb2ccba0f..5dace12f1ffeb111228510ab4835efd27798f999 100644 --- a/multimedia/camera_framework/camera.h +++ b/multimedia/camera_framework/camera.h @@ -1152,6 +1152,49 @@ typedef struct Camera_ConcurrentInfo { uint32_t modeAndCapabilitySize; } Camera_ConcurrentInfo; +/** + * @brief Enumerates the white balance modes. + * + * @since 20 + * @version 1.0 + */ +typedef enum Camera_WhiteBalanceMode { + /** + * Auto white balance mode. + */ + CAMERA_WHITE_BALANCE_MODE_AUTO = 0, + + /** + * Cloudy white balance mode. + */ + CAMERA_WHITE_BALANCE_MODE_CLOUDY = 1, + + /** + * Incandescent white balance mode. + */ + CAMERA_WHITE_BALANCE_MODE_INCANDESCENT = 2, + + /** + * Fluorescent white balance mode. + */ + CAMERA_WHITE_BALANCE_MODE_FLUORESCENT = 3, + + /** + * Daylight white balance mode. + */ + CAMERA_WHITE_BALANCE_MODE_DAYLIGHT = 4, + + /** + * Manual white balance mode. + */ + CAMERA_WHITE_BALANCE_MODE_MANUAL = 5, + + /** + * Locked white balance mode. + */ + CAMERA_WHITE_BALANCE_MODE_LOCKED = 6 +} Camera_WhiteBalanceMode; + #ifdef __cplusplus } #endif diff --git a/multimedia/camera_framework/camera.ndk.json b/multimedia/camera_framework/camera.ndk.json index e92a2841fea73cf29949a8c360cd504a751e337d..5bb71a86e196c8a5e8a3dae1e1ec126fbda71d0f 100644 --- a/multimedia/camera_framework/camera.ndk.json +++ b/multimedia/camera_framework/camera.ndk.json @@ -670,5 +670,29 @@ { "first_introduced": "19", "name": "OH_CaptureSession_EnableMacro" + }, + { + "first_introduced": "20", + "name": "OH_CaptureSession_IsWhiteBalanceModeSupported" + }, + { + "first_introduced": "20", + "name": "OH_CaptureSession_GetWhiteBalanceMode" + }, + { + "first_introduced": "20", + "name": "OH_CaptureSession_GetWhiteBalanceRange" + }, + { + "first_introduced": "20", + "name": "OH_CaptureSession_GetWhiteBalance" + }, + { + "first_introduced": "20", + "name": "OH_CaptureSession_SetWhiteBalance" + }, + { + "first_introduced": "20", + "name": "OH_CaptureSession_SetWhiteBalanceMode" } ] diff --git a/multimedia/camera_framework/capture_session.h b/multimedia/camera_framework/capture_session.h index 93e77e11881b41895cb9d56b4ba5141c5056c2e1..34ea4d17f5288707b307bb5394703ced8186b0b6 100644 --- a/multimedia/camera_framework/capture_session.h +++ b/multimedia/camera_framework/capture_session.h @@ -956,6 +956,90 @@ Camera_ErrorCode OH_CaptureSession_IsMacroSupported(Camera_CaptureSession* sessi */ Camera_ErrorCode OH_CaptureSession_EnableMacro(Camera_CaptureSession* session, bool enabled); +/** + * @brief Checks whether the specified white balance mode is supported. + * + * @param session Pointer to an {@link Camera_CaptureSession} instance. + * @param whiteBalanceMode White balance mode. + * @param isSupported Pointer to the check result. + * @return Result code. + * {@link #CAMERA_OK} is returned if the function is called successfully. + * {@link #CAMERA_INVALID_ARGUMENT} is returned if the input parameter is missing or the parameter type is incorrect. + * {@link #CAMERA_SESSION_NOT_CONFIG} is returned if the camera session is not configured. + * @since 20 + */ +Camera_ErrorCode OH_CaptureSession_IsWhiteBalanceModeSupported( + Camera_CaptureSession *session, Camera_WhiteBalanceMode whiteBalanceMode, bool *isSupported); + +/** + * @brief Obtains the white balance mode in use. + * + * @param session Pointer to an {@link Camera_CaptureSession} instance. + * @param whiteBalanceMode Pointer to the white balance mode. + * @return Result code. + * {@link #CAMERA_OK} is returned if the function is called successfully. + * {@link #CAMERA_INVALID_ARGUMENT} is returned if the input parameter is missing or the parameter type is incorrect. + * {@link #CAMERA_SESSION_NOT_CONFIG} is returned if the camera session is not configured. + * @since 20 + */ +Camera_ErrorCode OH_CaptureSession_GetWhiteBalanceMode( + Camera_CaptureSession *session, Camera_WhiteBalanceMode *whiteBalanceMode); + +/** + * @brief Obtains the supported white balance color temperature range. + * + * @param session Pointer to an {@link Camera_CaptureSession} instance. + * @param minColorTemperature Pointer to the minimum color temperature. + * @param maxColorTemperature Pointer to the maximum color temperature. + * @return Result code. + * {@link #CAMERA_OK} is returned if the function is called successfully. + * {@link #CAMERA_INVALID_ARGUMENT} is returned if the input parameter is missing or the parameter type is incorrect. + * {@link #CAMERA_SESSION_NOT_CONFIG} is returned if the camera session is not configured. + * @since 20 + */ +Camera_ErrorCode OH_CaptureSession_GetWhiteBalanceRange( + Camera_CaptureSession *session, int32_t *minColorTemperature, int32_t *maxColorTemperature); + +/** + * @brief Obtains the white balance color temperature. + * + * @param session Pointer to an {@link Camera_CaptureSession} instance. + * @param colorTemperature Pointer to the color temperature. + * @return Result code. + * {@link #CAMERA_OK} is returned if the function is called successfully. + * {@link #CAMERA_INVALID_ARGUMENT} is returned if the input parameter is missing or the parameter type is incorrect. + * {@link #CAMERA_SESSION_NOT_CONFIG} is returned if the camera session is not configured. + * @since 20 + */ +Camera_ErrorCode OH_CaptureSession_GetWhiteBalance(Camera_CaptureSession *session, int32_t *colorTemperature); + +/** + * @brief Sets the white balance color temperature. + * + * @param session Pointer to an {@link Camera_CaptureSession} instance. + * @param colorTemperature Color temperature. + * @return Result code. + * {@link #CAMERA_OK} is returned if the function is called successfully. + * {@link #CAMERA_INVALID_ARGUMENT} is returned if the input parameter is missing or the parameter type is incorrect. + * {@link #CAMERA_SESSION_NOT_CONFIG} is returned if the camera session is not configured. + * @since 20 + */ +Camera_ErrorCode OH_CaptureSession_SetWhiteBalance(Camera_CaptureSession *session, int32_t colorTemperature); + +/** + * @brief Sets a white balance mode. + * + * @param session Pointer to an {@link Camera_CaptureSession} instance. + * @param whiteBalanceMode White balance mode. + * @return Result code. + * {@link #CAMERA_OK} is returned if the function is called successfully. + * {@link #CAMERA_INVALID_ARGUMENT} is returned if the input parameter is missing or the parameter type is incorrect. + * {@link #CAMERA_SESSION_NOT_CONFIG} is returned if the camera session is not configured. + * @since 20 + */ +Camera_ErrorCode OH_CaptureSession_SetWhiteBalanceMode( + Camera_CaptureSession *session, Camera_WhiteBalanceMode whiteBalanceMode); + #ifdef __cplusplus } #endif diff --git a/multimedia/image_effect/image_effect.h b/multimedia/image_effect/image_effect.h index db65c16e4f0dd1adefa49191e099835b530cb2cb..225906bd6d43e6be2b4d7f8da74c0a862a072d33 100644 --- a/multimedia/image_effect/image_effect.h +++ b/multimedia/image_effect/image_effect.h @@ -343,6 +343,36 @@ ImageEffect_ErrorCode OH_ImageEffect_SetInputPicture(OH_ImageEffect *imageEffect */ ImageEffect_ErrorCode OH_ImageEffect_SetOutputPicture(OH_ImageEffect *imageEffect, OH_PictureNative *picture); +/** + * @brief Sets the ID of the input texture that contains the image information. + * + * @syscap SystemCapability.Multimedia.ImageEffect.Core + * @param { OH_ImageEffect } imageEffect Pointer to an instance of the OH_ImageEffect struct. + * @param textureId ID of the texture that contains the image information. This ID must be valid and have been + * bound bound to a texture of a GL_TEXTURE_2D type. + * @param colorSpace Color space of the image. + * @return Returns EFFECT_SUCCESS if the operation is successful; returns EFFECT_ERROR_PARAM_INVALID if the + * parameter parameter is missing or incorrect. + * @since 20 + */ +ImageEffect_ErrorCode OH_ImageEffect_SetInputTextureId(OH_ImageEffect *imageEffect, int32_t textureId, + int32_t colorSpace); + +/** + * @brief Sets the ID of the output texture that contains the rendered image information. + * + * @syscap SystemCapability.Multimedia.ImageEffect.Core + * @param imageEffect Pointer to an instance of the OH_ImageEffect struct. + * @param textureId ID of the texture that contains the rendered image information. This ID must be valid. If + * it it is not bound to a texture, it will automatically be bound to a GL_TEXTURE_2D type. If the texture is + * already already bound and the size is inappropriate, the rendered result may be cropped or partially filled + * into into this texture. + * @return Returns EFFECT_SUCCESS if the operation is successful; returns EFFECT_ERROR_PARAM_INVALID if the + * parameter parameter is missing or incorrect. + * @since 20 + */ +ImageEffect_ErrorCode OH_ImageEffect_SetOutputTextureId(OH_ImageEffect *imageEffect, int32_t textureId); + /** * @brief Render the filter effects that can be a single filter or a chain of filters * diff --git a/multimedia/image_effect/image_effect_filter.h b/multimedia/image_effect/image_effect_filter.h index d42de85d79a133d034657731d24c0339bdd72839..9307189da155784f3c9332b7a7d335cb6b80ec6e 100644 --- a/multimedia/image_effect/image_effect_filter.h +++ b/multimedia/image_effect/image_effect_filter.h @@ -534,6 +534,30 @@ ImageEffect_ErrorCode OH_EffectBufferInfo_SetTimestamp(OH_EffectBufferInfo *info */ ImageEffect_ErrorCode OH_EffectBufferInfo_GetTimestamp(OH_EffectBufferInfo *info, int64_t *timestamp); +/** + * @brief Sets the texture ID of the image for an OH_EffectBufferInfo struct. + * + * @syscap SystemCapability.Multimedia.ImageEffect.Core + * @param info Pointer to an instance of the OH_EffectBufferInfo struct. + * @param textureId Pointer to the texture ID of the image. + * @return Returns EFFECT_SUCCESS if the operation is successful; returns EFFECT_ERROR_PARAM_INVALID if the + * parameter parameter is missing. + * @since 20 + */ +ImageEffect_ErrorCode OH_EffectBufferInfo_SetTextureId(OH_EffectBufferInfo *info, int32_t textureId); + +/** + * @brief Obtains the texture ID of an image from an OH_EffectBufferInfo struct. + * + * @syscap SystemCapability.Multimedia.ImageEffect.Core + * @param info Pointer to an instance of the OH_EffectBufferInfo struct. + * @param textureId Texture ID of the image. + * @return Returns EFFECT_SUCCESS if the operation is successful; returns EFFECT_ERROR_PARAM_INVALID if the + * parameter parameter is missing. + * @since 20 + */ +ImageEffect_ErrorCode OH_EffectBufferInfo_GetTextureId(OH_EffectBufferInfo *info, int32_t *textureId); + /** * @brief Clear the internal resources of the OH_EffectBufferInfo and destroy the OH_EffectBufferInfo instance * @@ -765,6 +789,25 @@ ImageEffect_ErrorCode OH_EffectFilter_LookupFilterInfo(const char *name, OH_Effe ImageEffect_ErrorCode OH_EffectFilter_Render(OH_EffectFilter *filter, OH_PixelmapNative *inputPixelmap, OH_PixelmapNative *outputPixelmap); +/** + * @brief Applies the filter effect using texture IDs. This function does not support using the same texture + * for for both input and output. + * + * @syscap SystemCapability.Multimedia.ImageEffect.Core + * @param filter Pointer to an instance of the OH_EffectFilter struct. + * @param inputTextureId ID of the input texture. This ID must be valid and bound to a texture of the + * GL_TEXTURE_2D GL_TEXTURE_2D type. + * @param outputTextureId ID of the output texture. This ID must be valid. If it is not bound to a texture, it + * will will automatically be bound to a GL_TEXTURE_2D type. If the texture is already bound and the size is + * inappropriate, inappropriate, the rendered result may be cropped or partially filled into this texture. + * @param colorSpace Color space of the image. + * @return Returns EFFECT_SUCCESS if the operation is successful; returns EFFECT_ERROR_PARAM_INVALID if the + * parameter parameter is missing. + * @since 20 + */ +ImageEffect_ErrorCode OH_EffectFilter_RenderWithTextureId(OH_EffectFilter *filter, int32_t inputTextureId, + int32_t outputTextureId, int32_t colorSpace); + /** * @brief Clear the internal resources of the OH_EffectFilter and destroy the OH_EffectFilter instance * diff --git a/multimedia/image_effect/libimage_effect.ndk.json b/multimedia/image_effect/libimage_effect.ndk.json index 16f31e29f19a30b0443d3c5c819da543c176fcbe..abaca9dcbe23271a4bac92648fb267104145e107 100644 --- a/multimedia/image_effect/libimage_effect.ndk.json +++ b/multimedia/image_effect/libimage_effect.ndk.json @@ -83,6 +83,14 @@ "first_introduced": "12", "name": "OH_EffectBufferInfo_GetTimestamp" }, + { + "first_introduced": "20", + "name": "OH_EffectBufferInfo_SetTextureId" + }, + { + "first_introduced": "20", + "name": "OH_EffectBufferInfo_GetTextureId" + }, { "first_introduced": "12", "name": "OH_EffectBufferInfo_Release" @@ -119,6 +127,10 @@ "first_introduced": "12", "name": "OH_EffectFilter_Render" }, + { + "first_introduced": "20", + "name": "OH_EffectFilter_RenderWithTextureId" + }, { "first_introduced": "12", "name": "OH_EffectFilter_Release" @@ -211,6 +223,14 @@ "first_introduced": "13", "name": "OH_ImageEffect_SetOutputPicture" }, + { + "first_introduced": "20", + "name": "OH_ImageEffect_SetInputTextureId" + }, + { + "first_introduced": "20", + "name": "OH_ImageEffect_SetOutputTextureId" + }, { "first_introduced": "12", "name": "OH_ImageEffect_Start" diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h index 05662665f7622428f79b631d69dbd92d62918bd0..da856df52a9446447127398237c7c82134962e86 100644 --- a/multimedia/image_framework/include/image/image_common.h +++ b/multimedia/image_framework/include/image/image_common.h @@ -184,6 +184,12 @@ typedef enum { * @since 15 */ IMAGE_LOCK_UNLOCK_FAILED = 7600303, + /** + * @error unsupported allocator mode, e.g., use share memory to create a HDR image as only + * DMA supported hdr metadata. + * @since 20 + */ + IMAGE_ALLOCATOR_MODE_UNSUPPORTED = 7600501, /** unknown error */ IMAGE_UNKNOWN_ERROR = 7600901, /** decode data source exception */ @@ -227,6 +233,11 @@ typedef enum { IMAGE_PACKER_INVALID_PARAMETER = 7800202, /** encode failed */ IMAGE_ENCODE_FAILED = 7800301, + /** + * @error Invalid parameter for ImageReceiver. + * @since 20 + */ + IMAGE_RECEIVER_INVALID_PARAMETER = 7900201, } Image_ErrorCode; /** @@ -245,6 +256,32 @@ typedef enum { FRAGMENT_METADATA = 2, } Image_MetadataType; +/** + * @brief Type of allocator used to allocate memory of a PixelMap. + * + * @since 20 + */ +typedef enum { + /** + * The system determines which memory to use to create the PixelMap. + * + * @since 20 + */ + IMAGE_ALLOCATOR_MODE_AUTO = 0, + /** + * Use DMA buffer to create the PixelMap. + * + * @since 20 + */ + IMAGE_ALLOCATOR_MODE_DMA = 1, + /** + * Use share memory to create the PixelMap. + * + * @since 20 + */ + IMAGE_ALLOCATOR_MODE_SHARED_MEMORY = 2, +} IMAGE_ALLOCATOR_MODE; + /** * @brief Creates a PictureMetadata object. * diff --git a/multimedia/image_framework/include/image/image_receiver_native.h b/multimedia/image_framework/include/image/image_receiver_native.h index 09fef3b1bf4b489e1d845f9f49922c2b175ccf33..526cd49ed865873b955e2b08f34fe999404da2a8 100644 --- a/multimedia/image_framework/include/image/image_receiver_native.h +++ b/multimedia/image_framework/include/image/image_receiver_native.h @@ -76,6 +76,13 @@ typedef struct OH_ImageReceiverOptions OH_ImageReceiverOptions; */ typedef void (*OH_ImageReceiver_OnCallback)(OH_ImageReceiverNative *receiver); +/** + * @brief Defines the callback for the ImageArrive event. + * + * @since 20 + */ +typedef void (*OH_ImageReceiver_ImageArriveCallback)(OH_ImageReceiverNative *receiver, void *userData); + /** * @brief Creates an OH_ImageReceiverOptions object at the application layer. * @@ -223,6 +230,32 @@ Image_ErrorCode OH_ImageReceiverNative_On(OH_ImageReceiverNative* receiver, OH_I */ Image_ErrorCode OH_ImageReceiverNative_Off(OH_ImageReceiverNative* receiver); +/** + * Registers an {@link OH_ImageReceiver_ImageArriveCallback} callback. + * + * @param receiver Pointer to an OH_ImageReceiverNative object that processes the callback. + * @param callback OH_ImageReceiver_ImageArriveCallback to register. + * @param userData Pointer to the user data passed to the callback. + * @return Result code. {@link Image_ErrorCode} IMAGE_SUCCESS is returned if the operation is successful. + * {@link Image_ErrorCode} IMAGE_RECEIVER_INVALID_PARAMETER is returned if receiver or callback is null. + * @since 20 + */ +Image_ErrorCode OH_ImageReceiverNative_OnImageArrive(OH_ImageReceiverNative *receiver, + OH_ImageReceiver_ImageArriveCallback callback, void *userData); + +/** + * Unregisters an {@link OH_ImageReceiver_ImageArriveCallback} callback. + * + * @param receiver Pointer to an OH_ImageReceiverNative object that processes the callback. + * @param callback OH_ImageReceiver_ImageArriveCallback callback to unregister. + * @return {@link Image_ErrorCode} IMAGE_SUCCESS - Operation succeeded. + * {@link Image_ErrorCode} IMAGE_RECEIVER_INVALID_PARAMETER - receiver is empty or callback is not + * registered. + * @since 20 +*/ +Image_ErrorCode OH_ImageReceiverNative_OffImageArrive(OH_ImageReceiverNative *receiver, + OH_ImageReceiver_ImageArriveCallback callback); + /** * @brief Obtains the size of the image receiver through an {@link OH_ImageReceiverNative} object. * diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 9d3f1075ec4b584992f03308a5933bc5538e137f..6c7507067e1cc24f45bbeb1997791a2bf01914b9 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -571,6 +571,18 @@ Image_ErrorCode OH_PixelmapImageInfo_GetWidth(OH_Pixelmap_ImageInfo *info, uint3 */ Image_ErrorCode OH_PixelmapImageInfo_GetHeight(OH_Pixelmap_ImageInfo *info, uint32_t *height); +/** + * @brief Get alphaMode number for imageinfo struct. + * + * @param info The imageinfo pointer will be operated. + * @param alphaMode The number of imageinfo alphaMode. + * @return Image functions result code. + * {@link IMAGE_SUCCESS} if the execution is successful. + * {@link IMAGE_BAD_PARAMETER} info is nullptr, or alphaMode is nullptr. + * @since 20 + */ +Image_ErrorCode OH_PixelmapImageInfo_GetAlphaMode(OH_Pixelmap_ImageInfo *info, int32_t *alphaMode); + /** * @brief Get rowStride number for imageinfo struct. * @@ -634,6 +646,30 @@ Image_ErrorCode OH_PixelmapImageInfo_Release(OH_Pixelmap_ImageInfo *info); Image_ErrorCode OH_PixelmapNative_CreatePixelmap(uint8_t *data, size_t dataLength, OH_Pixelmap_InitializationOptions *options, OH_PixelmapNative **pixelmap); +/** + * @brief Creates a pixelmap based on options {@link OH_Pixelmap_InitializationOptions}, the memory type used by the + * pixelmap can be specified by allocatorType {@link IMAGE_ALLOCATOR_MODE}. By default, the system selects the memory + * type based on the image type, image size, platform capability, etc. When processing the pixelmap returned by this + * interface, please always consider the impact of stride. + * + * @param data Input color buffer in BGRA_8888 format by default. + * @param dataLength Length of input buffer in bytes. + * @param options Pixelmap initialization properties including size, pixel format, alpha type, and editable flags. + * @param allocator Indicate which memory type will be used by the returned pixelmap. + * @param pixelmap Output parameter receiving the created pixelmap object pointer. + * @return Function result code: + * {@link IMAGE_SUCCESS} If the operation is successful. + * {@link IMAGE_BAD_PARAMETER} If the param is nullptr or invalid. + * {@link IMAGE_TOO_LARGE} too large data or image. + * {@link IMAGE_UNSUPPORTED_OPERATION} unsupported operations. + * {@link IMAGE_DMA_OPERATION_FAILED} DMA operation failed. + * {@link IMAGE_ALLOCATOR_MODE_UNSUPPROTED} unsupported allocator mode, e.g., + * use share memory to create a HDR image as only DMA supported hdr metadata. + * @since 20 + */ +Image_ErrorCode OH_PixelmapNative_CreatePixelmapUsingAllocator(uint8_t *data, size_t dataLength, + OH_Pixelmap_InitializationOptions *options, IMAGE_ALLOCATOR_MODE allocator, OH_PixelmapNative **pixelmap); + /** * @brief Convert a native PixelMap object to PixelMap napi object. * @@ -881,6 +917,27 @@ Image_ErrorCode OH_PixelmapNative_ConvertAlphaFormat(OH_PixelmapNative* srcpixel Image_ErrorCode OH_PixelmapNative_CreateEmptyPixelmap( OH_Pixelmap_InitializationOptions *options, OH_PixelmapNative **pixelmap); +/** + * @brief Creates a empty pixelmap based on options {@link OH_Pixelmap_InitializationOptions}, the memory type used by the + * pixelmap can be specified by allocatorType {@link IMAGE_ALLOCATOR_MODE}. By default, the system selects the memory + * type based on the image type, image size, platform capability, etc. When processing the pixelmap returned by this + * interface, please always consider the impact of stride. + * + * @param options Pixelmap initialization properties including size, pixel format, alpha type, and editable flags. + * @param allocator Indicate which memory type will be used by the returned pixelmap. + * @param pixelmap Output parameter receiving the created pixelmap object pointer. + * @return Function result code: + * {@link IMAGE_SUCCESS} If the operation is successful. + * {@link IMAGE_BAD_PARAMETER} If the param is nullptr or invalid. + * {@link IMAGE_TOO_LARGE} too large data or image. + * {@link IMAGE_UNSUPPORTED_OPERATION} unsupported operations. + * {@link IMAGE_ALLOCATOR_MODE_UNSUPPROTED} unsupported allocator mode, e.g., use + * share memory to create a HDR image as only DMA supported hdr metadata. + * @since 20 + */ +Image_ErrorCode OH_PixelmapNative_CreateEmptyPixelmapUsingAllocator( + OH_Pixelmap_InitializationOptions *options, IMAGE_ALLOCATOR_MODE allocator, OH_PixelmapNative **pixelmap); + /** * @brief Get metadata. * diff --git a/multimedia/image_framework/libimage_receiver.ndk.json b/multimedia/image_framework/libimage_receiver.ndk.json index 95058723f5c2455b4ffd8eb1c03ccd6f1a6d1ee9..2ff42d64319862310faa9044a89b6aae267067b6 100644 --- a/multimedia/image_framework/libimage_receiver.ndk.json +++ b/multimedia/image_framework/libimage_receiver.ndk.json @@ -47,6 +47,14 @@ "first_introduced": "12", "name": "OH_ImageReceiverNative_Off" }, + { + "first_introduced": "20", + "name": "OH_ImageReceiverNative_OnImageArrive" + }, + { + "first_introduced": "20", + "name": "OH_ImageReceiverNative_OffImageArrive" + }, { "first_introduced": "12", "name": "OH_ImageReceiverNative_GetSize" diff --git a/multimedia/image_framework/libpixelmap.ndk.json b/multimedia/image_framework/libpixelmap.ndk.json index 68d85046276151ae05e2923ec77bb88316355363..f52699ef6d0da891a2527337596a9dc8098f80ab 100644 --- a/multimedia/image_framework/libpixelmap.ndk.json +++ b/multimedia/image_framework/libpixelmap.ndk.json @@ -15,6 +15,10 @@ "first_introduced": "12", "name": "OH_PixelmapInitializationOptions_GetHeight" }, + { + "first_introduced": "20", + "name": "OH_PixelmapImageInfo_GetAlphaMode" + }, { "first_introduced": "12", "name": "OH_PixelmapInitializationOptions_SetHeight" @@ -99,6 +103,10 @@ "first_introduced": "12", "name": "OH_PixelmapNative_CreatePixelmap" }, + { + "first_introduced": "20", + "name": "OH_PixelmapNative_CreatePixelmapUsingAllocator" + }, { "first_introduced": "12", "name": "OH_PixelmapNative_ReadPixels" @@ -171,6 +179,10 @@ "first_introduced": "12", "name": "OH_PixelmapNative_CreateEmptyPixelmap" }, + { + "first_introduced": "20", + "name": "OH_PixelmapNative_CreateEmptyPixelmapUsingAllocator" + }, { "first_introduced": "12", "name": "OH_PixelmapNative_GetMetadata" diff --git a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json index 48aa9a0d410a24e264c62d7adf781a29da55bbee..7229854286eaca809f9ecab1d45265599474ec73 100644 --- a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json +++ b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json @@ -134,5 +134,21 @@ { "first_introduced": "20", "name": "OH_AVScreenCapture_SetCaptureArea" + }, + { + "first_introduced": "20", + "name": "OH_AVScreenCapture_StrategyForPrivacyMaskMode" + }, + { + "first_introduced": "20", + "name": "OH_AVScreenCapture_SetSelectionCallback" + }, + { + "first_introduced": "20", + "name": "OH_AVScreenCapture_GetCaptureTypeSelected" + }, + { + "first_introduced": "20", + "name": "OH_AVScreenCapture_GetDisplayIdSelected" } ] \ No newline at end of file diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index 5bf1e8487f6e1160e1e74fcc7dd1130e05057679..091e3ccf863bf3553911868f96f192da7a690338 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -540,6 +540,65 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetCaptureContentChangedCallback( */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetCaptureArea(struct OH_AVScreenCapture *capture, uint64_t displayId, OH_Rect* area); + +/** + * @brief Set the fill mode for screen capture when a privacy window exists + * @syscap SystemCapability.Multimedia.Media.AVScreenCapture + * @param {OH_AVScreenCapture_CaptureStrategy*} strategy Pointer to an OH_AVScreenCapture_CaptureStrategy instance + * @param {int32_t} value + * If set to 0, it means that when there is a privacy window interface, the output screen image is completely black. + * If set to 1, it means that when there is a privacy window interface, only the privacy window area of the output + * screen becomes black, and other values returns an error. + * @return Function result code. + * {@link AV_SCREEN_CAPTURE_ERR_OK} if the execution is successful. + * {@link AV_SCREEN_CAPTURE_ERR_INVALID_VAL} strategy is nullptr or value is invalid. + * @since 20 + */ +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_StrategyForPrivacyMaskMode( + OH_AVScreenCapture_CaptureStrategy *strategy, int32_t value); + +/** + * @brief Register user selection notification callback function + * @syscap SystemCapability.Multimedia.Media.AVScreenCapture + * @param {OH_AVScreenCapture*} capture Pointer to OH_AVScreenCapture which want to handle user selection info + * @param {OH_AVScreenCapture_OnUserSelected} callback user selection callback function, see + * {@link OH_AVScreenCapture_OnUserSelected} + * @param {void*} userData The control block pointer passed by the application is carried to the application when it + * is returned + * @return Function result code. + * {@link AV_SCREEN_CAPTURE_ERR_OK} if the execution is successful. + * {@link AV_SCREEN_CAPTURE_ERR_INVALID_VAL} input capture is nullptr. + * @since 20 + */ +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetSelectionCallback(struct OH_AVScreenCapture *capture, + OH_AVScreenCapture_OnUserSelected callback, void *userData); + +/** + * @brief Get the recording content type selected by the user in the confirmation interface + * @syscap SystemCapability.Multimedia.Media.AVScreenCapture + * @param {OH_AVScreenCapture_UserSelectionInfo*} selection Pointer to an OH_AVScreenCapture_UserSelectionInfo instance + * @param {int32_t*} type The capture object type selected by the user, 0: represents the screen, 1: represents the + * window. + * @return Function result code. + * {@link AV_SCREEN_CAPTURE_ERR_OK} if the execution is successful. + * {@link AV_SCREEN_CAPTURE_ERR_INVALID_VAL} if selections is nullptr. + * @since 20 + */ +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_GetCaptureTypeSelected(OH_AVScreenCapture_UserSelectionInfo *selection, + int32_t* type); + +/** + * @brief Get the Display ID of user selections in the confirmation interface + * @syscap SystemCapability.Multimedia.Media.AVScreenCapture + * @param {OH_AVScreenCapture_UserSelectionInfo*} selection Pointer to an OH_AVScreenCapture_UserSelectionInfo instance + * @param {uint64_t*} displayId Returns the screen ID value selected by the user + * @return Function result code. + * {@link AV_SCREEN_CAPTURE_ERR_OK} if the execution is successful. + * {@link AV_SCREEN_CAPTURE_ERR_INVALID_VAL} if selections is nullptr. + * @since 20 + */ +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_GetDisplayIdSelected(OH_AVScreenCapture_UserSelectionInfo *selection, + uint64_t* displayId); #ifdef __cplusplus } #endif diff --git a/multimedia/player_framework/native_avscreen_capture_base.h b/multimedia/player_framework/native_avscreen_capture_base.h index 7b00c4201ecc631bd3d84d656d9cafc3089280de..966a09b4eabc013ae6d7d9667ec1935b3822ca76 100644 --- a/multimedia/player_framework/native_avscreen_capture_base.h +++ b/multimedia/player_framework/native_avscreen_capture_base.h @@ -569,6 +569,27 @@ typedef struct OH_AVScreenCapture_CaptureStrategy OH_AVScreenCapture_CaptureStra typedef void (*OH_AVScreenCapture_OnCaptureContentChanged)(OH_AVScreenCapture* capture, OH_AVScreenCaptureContentChangedEvent event, OH_Rect* area, void *userData); +/** + * @brief Initialization of OH_AVScreenCapture_UserSelectionInfo + * @syscap SystemCapability.Multimedia.Media.AVScreenCapture + * + * @since 20 + */ +typedef struct OH_AVScreenCapture_UserSelectionInfo OH_AVScreenCapture_UserSelectionInfo; + +/** +* @brief When the user selects parameters in the authorization interface (selection interface), +* the function interface returns the parameters to the application. +* @syscap SystemCapability.Multimedia.Media.AVScreenCapture +* @param {OH_AVScreenCapture*} capture Pointer to an OH_AVScreenCapture instance +* @param {OH_AVScreenCapture_UserSelectionInfo*} selections The recording parameter information +* selected by the user on the authorization interface +* @param {void*} userData Pointer to user specific data +* +* @since 20 +*/ +typedef void (*OH_AVScreenCapture_OnUserSelected)(OH_AVScreenCapture* capture, + OH_AVScreenCapture_UserSelectionInfo* selections, void *userData); #ifdef __cplusplus } #endif diff --git a/ndk_targets.gni b/ndk_targets.gni index 9c7db45fd1843849d8505c79b70d4805f1bb67eb..6609db3e1dd5e597303453542e0ed6f6ca90a186 100644 --- a/ndk_targets.gni +++ b/ndk_targets.gni @@ -60,7 +60,6 @@ _ndk_library_targets = [ "//interface/sdk_c/arkui/ace_engine/native:ace_header", "//interface/sdk_c/arkui/ace_engine/native:arkui_header", "//interface/sdk_c/arkui/ace_engine/native:libace_ndk", - "//interface/sdk_c/ani:ani_header", "//interface/sdk_c/arkui/napi:libnapi_ndk", "//interface/sdk_c/arkui/napi:napi_header", "//interface/sdk_c/arkui/window_manager:window_manager_header", diff --git a/network/netssl/BUILD.gn b/network/netssl/BUILD.gn index a561b30af7b8f4d2829f6dd12b5cdd03f3ef112c..3f3a388fe1fa03641bc618efceb8f98df93f750a 100644 --- a/network/netssl/BUILD.gn +++ b/network/netssl/BUILD.gn @@ -19,7 +19,7 @@ ohos_ndk_library("libnet_ssl_ndk") { output_extension = "so" ndk_description_file = "./libnet_ssl_c.json" min_compact_version = "1" - system_capability = "SystemCapability.Communication.Netstack" + system_capability = "SystemCapability.Communication.NetStack" system_capability_headers = [ "network/netstack/net_ssl/net_ssl_c.h", diff --git a/ani/BUILD.gn b/network/netstack/net_http/BUILD.gn similarity index 55% rename from ani/BUILD.gn rename to network/netstack/net_http/BUILD.gn index 2beab540516c6ae6ebcc9f2af27ca94336c12544..1e95172283bfa492e2ca8dbdfd64df16f1be0bcc 100644 --- a/ani/BUILD.gn +++ b/network/netstack/net_http/BUILD.gn @@ -13,7 +13,22 @@ import("//build/ohos.gni") -ohos_ndk_headers("ani_header") { - dest_dir = "$ndk_headers_out_dir/ani" - sources = [ "./ani.h" ] +ohos_ndk_library("libnet_http") { + output_name = "net_http" + output_extension = "so" + ndk_description_file = "./libnet_http.ndk.json" + min_compact_version = "1" + system_capability = "SystemCapability.Communication.NetStack" + system_capability_headers = [ + "network/netstack/net_http.h", + "network/netstack/net_http_type.h", + ] +} + +ohos_ndk_headers("nethttp_header") { + dest_dir = "$ndk_headers_out_dir/network/netstack" + sources = [ + "net_http.h", + "net_http_type.h", + ] } diff --git a/network/netstack/net_http/libnet_http.ndk.json b/network/netstack/net_http/libnet_http.ndk.json new file mode 100644 index 0000000000000000000000000000000000000000..5a00aa6f2e8511bf6bc1cffefff8260590a71d2c --- /dev/null +++ b/network/netstack/net_http/libnet_http.ndk.json @@ -0,0 +1,38 @@ +[ + { + "first_introduced":"20", + "name": "OH_Http_CreateHeaders" + }, + { + "first_introduced":"20", + "name": "OH_Http_DestroyHeaders" + }, + { + "first_introduced":"20", + "name": "OH_Http_SetHeaderValue" + }, + { + "first_introduced":"20", + "name": "OH_Http_CreateRequest" + }, + { + "first_introduced":"20", + "name": "OH_Http_Request" + }, + { + "first_introduced":"20", + "name": "OH_Http_Destroy" + }, + { + "first_introduced":"20", + "name": "OH_Http_GetHeaderValue" + }, + { + "first_introduced":"20", + "name": "OH_Http_GetHeaderEntries" + }, + { + "first_introduced":"20", + "name": "OH_Http_DestroyHeaderEntries" + } +] \ No newline at end of file diff --git a/network/netstack/net_http/net_http.h b/network/netstack/net_http/net_http.h new file mode 100644 index 0000000000000000000000000000000000000000..24878f4da63d389fe98b71b811af5b6a2c64675c --- /dev/null +++ b/network/netstack/net_http/net_http.h @@ -0,0 +1,144 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup netstack + * @{ + * + * @brief Defines the APIs for http. + * + * @syscap SystemCapability.Communication.NetStack + * @since 20 + */ + +/** + * @file net_http.h + * @brief Defines the APIs for http. + * + * @library libnet_http.so + * @kit NetworkKit + * @syscap SystemCapability.Communication.NetStack + * @since 20 + */ + +#ifndef NET_HTTP_H +#define NET_HTTP_H + +#include +#include + +#include "net_http_type.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Creates headers for a request or response. + * + * @return Http_Headers* Pointer to {@link Http_Headers}. + * @syscap SystemCapability.Communication.NetStack + * @since 20 + */ +Http_Headers *OH_Http_CreateHeaders(void); + +/** + * @brief Destroys the headers of a request or response. + * + * @param headers Pointer to the {@link Http_Headers} to be destroyed, headers ends with null. + * @syscap SystemCapability.Communication.NetStack + * @since 20 + */ +void OH_Http_DestroyHeaders(Http_Headers **headers); + +/** + * @brief Sets the key-value pair of the request or response header. + * + * @param headers Pointer to the {@link Http_Headers} to be set. + * @param name Key. + * @param value Value. + * @return uint32_t 0 - success. 401 - Parameter error. 2300027 - Out of memory. + * @syscap SystemCapability.Communication.NetStack + * @since 20 + */ +uint32_t OH_Http_SetHeaderValue(struct Http_Headers *headers, const char *name, const char *value); + +/** + * @brief Obtains the value of a request or response header by key. + * + * @param headers Pointer to {@link Http_Headers}. + * @param name Key. + * @return Http_HeaderValue* Pointer to the obtained {@link Http_HeaderValue}. + * @syscap SystemCapability.Communication.NetStack + * @since 20 + */ +Http_HeaderValue *OH_Http_GetHeaderValue(Http_Headers *headers, const char *name); + +/** + * @brief Obtains all the key-value pairs of a request or response header. + * + * @param headers Pointer to {@link Http_Headersaders}. + * @return Http_HeaderEntry* Pointers to all obtained key-value pairs {@link Http_HeaderEntry}. + * @syscap SystemCapability.Communication.NetStack + * @since 20 + */ +Http_HeaderEntry *OH_Http_GetHeaderEntries(Http_Headers *headers); + +/** + * @brief Destroys all key-value pairs obtained in {@link OH_Http_GetHeaderEntries}. + * + * @param headerEntry Pointer to the {@link Http_HeaderEntry} to be destroyed, headerEntry ends with null. + * @syscap SystemCapability.Communication.NetStack + * @since 20 + */ +void OH_Http_DestroyHeaderEntries(Http_HeaderEntry **headerEntry); + +/** + * @brief Create a http request. + * + * @param url Http request url. + * @return Pointer of HttpRequest if success; Null otherwise. + * @syscap SystemCapability.Communication.NetStack + * @since 20 + */ +Http_Request *OH_Http_CreateRequest(const char *url); + +/** + * @brief Initiates an HTTP request. + * + * @param request Pointer to {@link Http_Request}. + * @param callback Http response info, pointer to {@link Http_ResponseCallback} + * @param handler Callbacks to watch different events, pointer to {@link Http_EventsHandler}. + * @return 0 if success; non-0 otherwise. For details about error codes, see {@link Http_ErrCode}. + * @permission ohos.permission.INTERNET + * @syscap SystemCapability.Communication.NetStack + * @since 20 + */ +int OH_Http_Request(Http_Request *request, Http_ResponseCallback callback, Http_EventsHandler handler); + +/** + * @brief Destroy the HTTP request. + * + * @param request Pointer to the http request {@link Http_Request}. + * @syscap SystemCapability.Communication.NetStack + * @since 20 + */ +void OH_Http_Destroy(struct Http_Request **request); +#ifdef __cplusplus +} +#endif +#endif // NET_HTTP_H + +/** @} */ \ No newline at end of file diff --git a/network/netstack/net_http/net_http_type.h b/network/netstack/net_http/net_http_type.h new file mode 100644 index 0000000000000000000000000000000000000000..f02019792b4646bfbc8e0cd235b857bf65e51da0 --- /dev/null +++ b/network/netstack/net_http/net_http_type.h @@ -0,0 +1,572 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup netstack + * @{ + * + * @brief Provides C APIs for the Http client module. + * + * @since 20 + */ + +/** + * @file net_http_type.h + * @brief Defines the data structure for the C APIs of the http module. + * + * @library libnet_http.so + * @kit NetworkKit + * @syscap SystemCapability.Communication.NetStack + * @since 20 + */ + +#ifndef NET_HTTP_TYPE_H +#define NET_HTTP_TYPE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define OHOS_HTTP_MAX_PATH_LEN 128 +#define OHOS_HTTP_MAX_STR_LEN 256 +#define OHOS_HTTP_DNS_SERVER_NUM_MAX 3 + +/** + * @brief Defines http error code. + * + * @since 20 + */ +typedef enum Http_ErrCode { + /** Operation success. */ + OH_HTTP_RESULT_OK = 0, + /** @brief Parameter error. */ + OH_HTTP_PARAMETER_ERROR = 401, + /** @brief Permission denied. */ + OH_HTTP_PERMISSION_DENIED = 201, + /** @brief Error code base. */ + OH_HTTP_NETSTACK_E_BASE = 2300000, + /** @brief Unsupported protocol. */ + OH_HTTP_UNSUPPORTED_PROTOCOL = (OH_HTTP_NETSTACK_E_BASE + 1), + /** @brief Invalid URL format or missing URL. */ + OH_HTTP_INVALID_URL = (OH_HTTP_NETSTACK_E_BASE + 3), + /** @brief Failed to resolve the proxy name. */ + OH_HTTP_RESOLVE_PROXY_FAILED = (OH_HTTP_NETSTACK_E_BASE + 5), + /** @brief Failed to resolve the host name. */ + OH_HTTP_RESOLVE_HOST_FAILED = (OH_HTTP_NETSTACK_E_BASE + 6), + /** @brief Failed to connect to the server. */ + OH_HTTP_CONNECT_SERVER_FAILED = (OH_HTTP_NETSTACK_E_BASE + 7), + /** @brief Invalid server response. */ + OH_HTTP_INVALID_SERVER_RESPONSE = (OH_HTTP_NETSTACK_E_BASE + 8), + /** @brief Access to the remote resource denied. */ + OH_HTTP_ACCESS_REMOTE_DENIED = (OH_HTTP_NETSTACK_E_BASE + 9), + /** @brief Error in the HTTP2 framing layer. */ + OH_HTTP_HTTP2_FRAMING_ERROR = (OH_HTTP_NETSTACK_E_BASE + 16), + /** @brief Transferred a partial file. */ + OH_HTTP_TRANSFER_PARTIAL_FILE = (OH_HTTP_NETSTACK_E_BASE + 18), + /** @brief Failed to write the received data to the disk or application. */ + OH_HTTP_WRITE_DATA_FAILED = (OH_HTTP_NETSTACK_E_BASE + 23), + /** @brief Upload failed. */ + OH_HTTP_UPLOAD_FAILED = (OH_HTTP_NETSTACK_E_BASE + 25), + /** @brief Failed to open or read local data from the file or application. */ + OH_HTTP_OPEN_LOCAL_DATA_FAILED = (OH_HTTP_NETSTACK_E_BASE + 26), + /** @brief Out of memory. */ + OH_HTTP_OUT_OF_MEMORY = (OH_HTTP_NETSTACK_E_BASE + 27), + /** @brief Operation timeout. */ + OH_HTTP_OPERATION_TIMEOUT = (OH_HTTP_NETSTACK_E_BASE + 28), + /** @brief The number of redirections reaches the maximum allowed. */ + OH_HTTP_TOO_MANY_REDIRECTIONS = (OH_HTTP_NETSTACK_E_BASE + 47), + /** @brief The server returned nothing (no header or data). */ + OH_HTTP_SERVER_RETURNED_NOTHING = (OH_HTTP_NETSTACK_E_BASE + 52), + /** @brief Failed to send data to the peer. */ + OH_HTTP_SEND_DATA_FAILED = (OH_HTTP_NETSTACK_E_BASE + 55), + /** @brief Failed to receive data from the peer. */ + OH_HTTP_RECEIVE_DATA_FAILED = (OH_HTTP_NETSTACK_E_BASE + 56), + /** @brief Local SSL certificate error. */ + OH_HTTP_SSL_CERTIFICATE_ERROR = (OH_HTTP_NETSTACK_E_BASE + 58), + /** @brief The specified SSL cipher cannot be used. */ + OH_HTTP_SSL_CIPHER_USED_ERROR = (OH_HTTP_NETSTACK_E_BASE + 59), + /** @brief Invalid SSL peer certificate or SSH remote key. */ + OH_HTTP_INVALID_SSL_PEER_CERT = (OH_HTTP_NETSTACK_E_BASE + 60), + /** @brief Invalid HTTP encoding format. */ + OH_HTTP_INVALID_ENCODING_FORMAT = (OH_HTTP_NETSTACK_E_BASE + 61), + /** @brief Maximum file size exceeded. */ + OH_HTTP_FILE_TOO_LARGE = (OH_HTTP_NETSTACK_E_BASE + 63), + /** @brief Remote disk full. */ + OH_HTTP_REMOTE_DISK_FULL = (OH_HTTP_NETSTACK_E_BASE + 70), + /** @brief Remote file already exists. */ + OH_HTTP_REMOTE_FILE_EXISTS = (OH_HTTP_NETSTACK_E_BASE + 73), + /** @brief The SSL CA certificate does not exist or is inaccessible. */ + OH_HTTP_SSL_CA_NOT_EXIST = (OH_HTTP_NETSTACK_E_BASE + 77), + /** @brief Remote file not found. */ + OH_HTTP_REMOTE_FILE_NOT_FOUND = (OH_HTTP_NETSTACK_E_BASE + 78), + /** @brief Authentication error. */ + OH_HTTP_AUTHENTICATION_ERROR = (OH_HTTP_NETSTACK_E_BASE + 94), + /** @brief It is not allowed to access this domain. */ + OH_HTTP_ACCESS_DOMAIN_NOT_ALLOWED = (OH_HTTP_NETSTACK_E_BASE + 998), + /** @brief Unknown error. */ + OH_HTTP_UNKNOWN_ERROR = (OH_HTTP_NETSTACK_E_BASE + 999) +} Http_ErrCode; + +/** + * @brief Defines http response code. + * + * @since 20 + */ +typedef enum Http_ResponseCode { + /** @brief The request was successful. */ + OH_HTTP_OK = 200, + /** @brief Successfully requested and created a new resource. */ + OH_HTTP_CREATED = 201, + /** @brief The request has been accepted but has not been processed completely. */ + OH_HTTP_ACCEPTED = 202, + /** @brief Unauthorized information. The request was successful. */ + OH_HTTP_NOT_AUTHORITATIVE = 203, + /** @brief No content. The server successfully processed, but did not return content. */ + OH_HTTP_NO_CONTENT = 204, + /** @brief Reset the content. */ + OH_HTTP_RESET = 205, + /** @brief Partial content. The server successfully processed some GET requests. */ + OH_HTTP_PARTIAL = 206, + /** @brief Multiple options. */ + OH_HTTP_MULT_CHOICE = 300, + /** + * @brief Permanently move. The requested resource has been permanently moved to a new URI, + * and the returned information will include the new URI. The browser will automatically redirect to the new URI. + */ + OH_HTTP_MOVED_PERM = 301, + /** @brief Temporary movement. */ + OH_HTTP_MOVED_TEMP = 302, + /** @brief View other addresses. */ + OH_HTTP_SEE_OTHER = 303, + /** @brief Not modified. */ + OH_HTTP_NOT_MODIFIED = 304, + /** @brief Using proxies. */ + OH_HTTP_USE_PROXY = 305, + /** @brief The server cannot understand the syntax error error requested by the client. */ + OH_HTTP_BAD_REQUEST = 400, + /** @brief Request for user authentication. */ + OH_HTTP_UNAUTHORIZED = 401, + /** @brief Reserved for future use. */ + OH_HTTP_PAYMENT_REQUIRED = 402, + /** @brief The server understands the request from the requesting client, but refuses to execute it. */ + OH_HTTP_FORBIDDEN = 403, + /** @brief The server was unable to find resources (web pages) based on the client's request. */ + OH_HTTP_NOT_FOUND = 404, + /** @brief The method in the client request is prohibited. */ + OH_HTTP_BAD_METHOD = 405, + /** @brief The server unabled to complete request based on the content characteristics requested by the client. */ + OH_HTTP_NOT_ACCEPTABLE = 406, + /** @brief Request authentication of the proxy's identity. */ + OH_HTTP_PROXY_AUTH = 407, + /** @brief The request took too long and timed out. */ + OH_HTTP_CLIENT_TIMEOUT = 408, + /** + * @brief The server may have returned this code when completing the client's PUT request, + * as there was a conflict when the server was processing the request. + */ + OH_HTTP_CONFLICT = 409, + /** @brief The resource requested by the client no longer exists. */ + OH_HTTP_GONE = 410, + /** @brief The server is unable to process request information sent by the client without Content Length. */ + OH_HTTP_LENGTH_REQUIRED = 411, + /** @brief The prerequisite for requesting information from the client is incorrect. */ + OH_HTTP_PRECON_FAILED = 412, + /** @brief The request was rejected because the requested entity was too large for the server to process. */ + OH_HTTP_ENTITY_TOO_LARGE = 413, + /** @brief The requested URI is too long (usually a URL) and the server cannot process it. */ + OH_HTTP_REQ_TOO_LONG = 414, + /** @brief The server is unable to process the requested format. */ + OH_HTTP_UNSUPPORTED_TYPE = 415, + /** @brief Requested Range not satisfiable. */ + OH_HTTP_RANGE_NOT_SATISFIABLE = 416, + /** @brief Internal server error, unable to complete the request. */ + OH_HTTP_INTERNAL_ERROR = 500, + /** @brief The server does not support the requested functionality and cannot complete the request. */ + OH_HTTP_NOT_IMPLEMENTED = 501, + /** @brief The server acting as a gateway or proxy received an invalid request from the remote server. */ + OH_HTTP_BAD_GATEWAY = 502, + /** @brief Due to overload or system maintenance, the server is temporarily unable to process client requests. */ + OH_HTTP_UNAVAILABLE = 503, + /** @brief The server acting as gateway did not obtain requests from the remote server in a timely manner. */ + OH_HTTP_GATEWAY_TIMEOUT = 504, + /** @brief The version of the HTTP protocol requested by the server. */ + OH_HTTP_VERSION = 505 +} Http_ResponseCode; + +/** + * @brief Buffer. + * + * @since 20 + */ +typedef struct Http_Buffer { + /** Content. Buffer will not be copied. */ + const char *buffer; + /** Buffer length. */ + uint32_t length; +} Http_Buffer; + +/** + * @brief Defines the address Family. + * + * @since 20 + */ +typedef enum Http_AddressFamilyType { + /** Default, The system automatically selects the IPv4 or IPv6 address of the domain name. */ + HTTP_ADDRESS_FAMILY_DEFAULT = 0, + /** IPv4, Selects the IPv4 address of the domain name. */ + HTTP_ADDRESS_FAMILY_ONLY_V4 = 1, + /** IPv6, Selects the IPv4 address of the domain name. */ + HTTP_ADDRESS_FAMILY_ONLY_V6 = 2 +} Http_AddressFamilyType; + +/** + * @brief HTTP get method. + * + * @since 20 + */ +#define NET_HTTP_METHOD_GET "GET" + +/** + * @brief HTTP head method. + * + * @since 20 + */ +#define NET_HTTPMETHOD_HEAD "HEAD" + +/** + * @brief HTTP options method. + * + * @since 20 + */ +#define NET_HTTPMETHOD_OPTIONS "OPTIONS" + +/** + * @brief HTTP trace method. + * + * @since 20 + */ +#define NET_HTTPMETHOD_TRACE "TRACE" +/** + * @brief HTTP delete method. + * @since 20 + */ +#define NET_HTTPMETHOD_DELETE "DELETE" + +/** + * @brief HTTP post method. + * + * @since 20 + */ +#define NET_HTTP_METHOD_POST "POST" + +/** + * @brief HTTP put method. + * + * @since 20 + */ +#define NET_HTTP_METHOD_PUT "PUT" + +/** + * @brief HTTP connect method. + * + * @since 20 + */ +#define NET_HTTP_METHOD_PATCH "CONNECT" + +/** + * @brief Defines the HTTP version. + * + * @since 20 + */ +typedef enum Http_HttpProtocol { + /** Default choose by curl. */ + OH_HTTP_NONE = 0, + /** HTTP 1.1 version. */ + OH_HTTP1_1, + /** HTTP 2 version. */ + OH_HTTP2, + /** HTTP 3 version. */ + OH_HTTP3 +} Http_HttpProtocol; + +/** + * @brief Defines the Cert Type. + * + * @since 20 + */ +typedef enum Http_CertType { + /** PEM Cert Type. */ + OH_HTTP_PEM = 0, + /** DER Cert Type. */ + OH_HTTP_DER = 1, + /** P12 Cert Type. */ + OH_HTTP_P12 = 2 +} Http_CertType; + +/** + * @brief Headers of the request or response. + * + * @since 20 + */ +typedef struct Http_Headers Http_Headers; + +/** + * @brief The value type of the header map of the request or response. + * + * @since 20 + */ +typedef struct Http_HeaderValue { + /** Value. */ + char *value; + /** Point to the next {@link Http_HeaderValue}. */ + struct Http_HeaderValue *next; +} Http_HeaderValue; + +/** + * @brief All key-value pairs of the headers of the request or response. + * + * @since 20 + */ +typedef struct Http_HeaderEntry { + /** Key. */ + char *key; + /** Value, see {@link Http_HeaderValue}. */ + Http_HeaderValue *value; + /** Points to the next key-value pair {@link Http_HeaderEntry} */ + struct Http_HeaderEntry *next; +} Http_HeaderEntry; + +/** + * @brief Client certificate which is sent to the remote server, the the remote server will use it to verify the + * client's identification. + * + * @since 20 + */ +typedef struct Http_ClientCert { + /** A path to a client certificate. */ + char *certPath; + /** Client certificate type, see {@link Http_CertType}. */ + Http_CertType type; + /** File path of your client certificate private key. */ + char *keyPath; + /** Password for your client certificate private key. */ + char *keyPassword; +} Http_ClientCert; + +/** + * @brief Proxy type. Used to distinguish different proxy configurations. + * + * @since 20 + */ +typedef enum Http_ProxyType { + /** No proxy */ + HTTP_PROXY_NOT_USE, + /** System proxy */ + HTTP_PROXY_SYSTEM, + /** Use custom proxy */ + HTTP_PROXY_CUSTOM +} Http_ProxyType; + +/** + * @brief Custom proxy configuration. + * + * @since 20 + */ +typedef struct Http_CustomProxy { + /** Indicates the URL of the proxy server. If you do not set port explicitly, port will be 1080. */ + const char *host; + int32_t port; + const char *exclusionLists; +} Http_CustomProxy; + +/** + * @brief Proxy configuration. + * + * @since 20 + */ +typedef struct Http_Proxy { + /** Distinguish the proxy type used by the request, see {@link Http_ProxyType}. */ + Http_ProxyType proxyType; + /** Custom proxy configuration, see {@link Http_CustomProxy}. */ + Http_CustomProxy customProxy; +} Http_Proxy; + +/** + * @brief Response timing information. It will be collected in {@link Http_Response.performanceTiming}. + * + * @since 20 + */ +typedef struct Http_PerformanceTiming { + /** The total time in milliseconds for the HTTP transfer, including name resolving, TCP connect etc. */ + double dnsTiming; + /** The time in milliseconds from the start until the remote host name was resolved. */ + double tcpTiming; + /** The time in milliseconds from the start until the connection to the remote host (or proxy) was completed. */ + double tlsTiming; + /** The time in milliseconds, it took from the start until the transfer is just about to begin. */ + double firstSendTiming; + /** The time in milliseconds from last modification time of the remote file. */ + double firstReceiveTiming; + /** The time in milliseconds, it took from the start until the first byte is received. */ + double totalFinishTiming; + /** The time in milliseconds it took for all redirection steps including name lookup, connect, etc.*/ + double redirectTiming; +} Http_PerformanceTiming; + +/** + * @brief Defines the parameters for http request options. + * + * @since 20 + */ +typedef struct Http_RequestOptions { + /** Request method. */ + const char *method; + /** Priority of http requests. A larger value indicates a higher priority. */ + uint32_t priority; + /** Header of http requests, see {@link Http_Headers}. */ + Http_Headers *headers; + /** Read timeout interval. */ + uint32_t readTimeout; + /** Connection timeout interval. */ + uint32_t connectTimeout; + /** Use the protocol. The default value is automatically specified by the system, see {@link Http_HttpProtocol}. */ + Http_HttpProtocol httpProtocol; + /** + * Indicates whether to use the HTTP proxy. The default value is false, + * and http proxy config, see {@link Http_Proxy}. + */ + Http_Proxy *httpProxy; + /** CA certificate of the user-specified path. */ + const char *caPath; + /** Set the download start position. This parameter can be used only in the GET method. */ + int64_t resumeFrom; + /** Set the download end position. This parameter can be used only in the GET method. */ + int64_t resumeTo; + /** Client certificates can be transferred, see {@link Http_ClientCert}. */ + Http_ClientCert *clientCert; + /** Set the DNS resolution for the https server. */ + const char *dnsOverHttps; + /** Maximum number of bytes in a response message. */ + uint32_t maxLimit; + /** The address family can be specified when target domain name is resolved, see {@link Http_AddressFamilyType}. */ + Http_AddressFamilyType addressFamily; +} Http_RequestOptions; + +/** + * @brief Defines the parameters for http response. + * + * @since 20 + */ +typedef struct Http_Response { + /** Response body, see {@link Http_Buffer}. */ + Http_Buffer body; + /** Server status code, see {@link Http_ResponseCode}. */ + Http_ResponseCode responseCode; + /** Header of http response, see {@link Http_Headers}. */ + Http_Headers *headers; + /** Cookies returned by the server. */ + char *cookies; + /** The time taken of various stages of HTTP request, see {@link Http_PerformanceTiming}. */ + Http_PerformanceTiming *performanceTiming; + /** + * @brief Response deletion function. + * + * @param response Indicates the response to be deleted. It is a pointer that points to {@link Http_Response}. + * @since 20 + */ + void (*destroyResponse)(struct Http_Response **response); +} Http_Response; + +/** + * @brief Http request. + * + * @since 20 + */ +typedef struct Http_Request { + /** The request id for every single request. Generated by system. */ + uint32_t requestId; + /** Request url. */ + char *url; + /** Request options, see {@link Http_RequestOptions}. */ + Http_RequestOptions *options; +} Http_Request; + +/** + * @brief Callback function that is invoked when response is received. + * + * @param response Http response struct, see {@link Http_Response}. + * @param errCode Response error code. + * @since 20 + */ +typedef void (*Http_ResponseCallback)(struct Http_Response *response, uint32_t errCode); + +/** + * @brief Callback function that is invoked when a response body is received. + * + * @param data Response body. + * @return size_t the length of response body. + * @since 20 + */ +typedef size_t (*Http_OnDataReceiveCallback)(const char *data); + +/** + * @brief Callback function invoked during request/response data transmission. + * + * @param totalSize total size. + * @param transferredSize transferred size. + * @since 20 + */ +typedef void (*Http_OnProgressCallback)(uint64_t totalSize, uint64_t transferredSize); + +/** + * @brief Callback called when header are received. + * + * @param headers Headers of the received requests, which points to the pointer of {@link Http_Headers}. + * @since 20 + */ +typedef void (*Http_OnHeaderReceiveCallback)(Http_Headers *headers); + +/** + * @brief Empty callback function for requested DataEnd or Canceled event callback + * + * @since 20 + */ +typedef void (*Http_OnVoidCallback)(void); + +/** + * @brief Callbacks to watch different events. + * + * @since 20 + */ +typedef struct Http_EventsHandler { + /** Callback function when the response body is received */ + Http_OnDataReceiveCallback onDataReceive; + /** Callback function during uploading */ + Http_OnProgressCallback onUploadProgress; + /** Callback function during downloading */ + Http_OnProgressCallback onDownloadProgress; + /** Callback function when a header is received */ + Http_OnHeaderReceiveCallback onHeadersReceive; + /** Callback function at the end of the transfer */ + Http_OnVoidCallback onDataEnd; + /** Callback function when a request is canceled */ + Http_OnVoidCallback onCanceled; +} Http_EventsHandler; +#ifdef __cplusplus +} +#endif +#endif // NET_HTTP_TYPE_H + +/** @} */ \ No newline at end of file diff --git a/startup/init/syscap/include/deviceinfo.h b/startup/init/syscap/include/deviceinfo.h index 9e7dc927b7c9b373ecfff3f8cc581ec12d31c418..c8e888cb6c9eb94a16c722a341427b1ac89fb537 100644 --- a/startup/init/syscap/include/deviceinfo.h +++ b/startup/init/syscap/include/deviceinfo.h @@ -44,91 +44,78 @@ extern "C" { * Obtains the device type represented by a string, * which can be {@code phone} (or {@code default} for phones), {@code wearable}, {@code liteWearable}, * {@code tablet}, {@code tv}, {@code car}, or {@code smartVision}. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetDeviceType(void); /** * Obtains the device manufacturer represented by a string. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetManufacture(void); /** * Obtains the device brand represented by a string. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetBrand(void); /** * Obtains the product name speaded in the market - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetMarketName(void); /** * Obtains the product series represented by a string. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetProductSeries(void); /** * Obtains the product model represented by a string. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetProductModel(void); /** * Obtains the software model represented by a string. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetSoftwareModel(void); /** * Obtains the hardware model represented by a string. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetHardwareModel(void); /** * Obtains the bootloader version number represented by a string. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetBootloaderVersion(void); /** * Obtains the application binary interface (Abi) list represented by a string. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetAbiList(void); /** * Obtains the security patch tag represented by a string. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetSecurityPatchTag(void); /** * Obtains the product version displayed for customer represented by a string. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetDisplayVersion(void); /** * Obtains the incremental version represented by a string. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetIncrementalVersion(void); @@ -138,88 +125,76 @@ const char *OH_GetIncrementalVersion(void); * *

The OS release category can be {@code Release}, {@code Beta}, or {@code Canary}. * The specific release type may be {@code Release}, {@code Beta1}, or others alike. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetOsReleaseType(void); /** * Obtains the OS full version name represented by a string. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetOSFullName(void); /** * Obtains the SDK API version number. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ int OH_GetSdkApiVersion(void); /** * Obtains the sdk minor api version number. - * @syscap SystemCapability.Startup.SystemInfo * @return 0 ~ 999 - the sdk minor api version * -1 - not found the sdk minor api version number, or failed to invoke the internal interface. - * @since 19 + * @since 20 */ int OH_GetSdkMinorApiVersion(void); /** * Obtains the sdk patch api version number. - * @syscap SystemCapability.Startup.SystemInfo * @return 0 ~ 999 - the sdk patch api version * -1 - not found the sdk patch api version number, or failed to invoke the internal interface. - * @since 19 + * @since 20 */ int OH_GetSdkPatchApiVersion(void); /** * Obtains the first API version number. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ int OH_GetFirstApiVersion(void); /** * Obtains the version ID by a string. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetVersionId(void); /** * Obtains the build type of the current running OS. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetBuildType(void); /** * Obtains the build user of the current running OS. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetBuildUser(void); /** * Obtains the build host of the current running OS. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetBuildHost(void); /** * Obtains the build time of the current running OS. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetBuildTime(void); /** * Obtains the version hash of the current running OS. - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetBuildRootHash(void); @@ -229,7 +204,6 @@ const char *OH_GetBuildRootHash(void); * *

Independent Software Vendor (ISV) may distribute OHOS with their own OS name. * If ISV not specified, it will return an empty string - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetDistributionOSName(void); @@ -237,7 +211,6 @@ const char *OH_GetDistributionOSName(void); /** * Obtains the ISV distribution OS version represented by a string. * If ISV not specified, it will return the same value as OH_GetOSFullName - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetDistributionOSVersion(void); @@ -245,7 +218,6 @@ const char *OH_GetDistributionOSVersion(void); /** * Obtains the ISV distribution OS api version represented by a integer. * If ISV not specified, it will return the same value as OH_GetSdkApiVersion - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ int OH_GetDistributionOSApiVersion(void); @@ -253,7 +225,6 @@ int OH_GetDistributionOSApiVersion(void); /** * Obtains the ISV distribution OS release type represented by a string. * If ISV not specified, it will return the same value as OH_GetOsReleaseType - * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ const char *OH_GetDistributionOSReleaseType(void); diff --git a/startup/init/syscap/include/syscap_ndk.h b/startup/init/syscap/include/syscap_ndk.h index 023107e51debc4806ad0d94cc62eea8ee98fec1f..e6045e8553f3d2b0dc81e811cb00816b404b37b4 100644 --- a/startup/init/syscap/include/syscap_ndk.h +++ b/startup/init/syscap/include/syscap_ndk.h @@ -47,15 +47,15 @@ bool canIUse(const char *cap); /** * @brief determine whether the current operating system version is greater than or equal to the given value. * - * @param majorVersion The major version number which betwen 1 and 999, such as 19 in api version 19.1.2 - * @param minorVersion The minor version number which betwen 0 and 999, such as 1 in api version 19.1.2 - * @param patchVersion The patch version number which betwen 0 and 999, such as 2 in api version 19.1.2 + * @param majorVersion The major version number which betwen 1 and 999, such as 20 in api version 20.1.2 + * @param minorVersion The minor version number which betwen 0 and 999, such as 1 in api version 20.1.2 + * @param patchVersion The patch version number which betwen 0 and 999, such as 2 in api version 20.1.2 * @return true - operating system version is greater than or equal to the given value * false - operating system version is less than the given value or invalid api version - * @since 19 - * @example given version is "19.1" - * if (OH_IsApiVersionGreaterOrEqual(19, 1, 0)) { - * // Use 19.1 APIs. + * @since 20 + * @example given version is "20.1" + * if (OH_IsApiVersionGreaterOrEqual(20, 1, 0)) { + * // Use 20.1 APIs. * } else { * // Alternative code for earlier versions. * } diff --git a/third_party/musl/ndk_script/adapter/libc.ndk.json b/third_party/musl/ndk_script/adapter/libc.ndk.json index f9a52a2fd1d89ea1af4c48096b2131dff8643d22..14cb1dc8553712a7339abb0a3af6d4dd7cf43e21 100644 --- a/third_party/musl/ndk_script/adapter/libc.ndk.json +++ b/third_party/musl/ndk_script/adapter/libc.ndk.json @@ -758,11 +758,11 @@ { "name": "malloc" }, { "name": "mallopt" }, { - "first_introduced":"19", + "first_introduced":"20", "name": "mallinfo" }, { - "first_introduced":"19", + "first_introduced":"20", "name": "mallinfo2" }, { "name": "malloc_usable_size" },