From 8d5a758da5a3ce09bb4f99cb065f00dbcc62cbd4 Mon Sep 17 00:00:00 2001 From: wangxiuxiu96 Date: Thu, 15 May 2025 13:25:32 +0800 Subject: [PATCH 001/100] feat:sliderCAPI Signed-off-by: wangxiuxiu96 --- arkui/ace_engine/native/native_node.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f3d238f72..a1801f56a 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -4590,6 +4590,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. -- Gitee From ab9595a8b6db9ac54efa826b195ea8feac7ac9d4 Mon Sep 17 00:00:00 2001 From: royce-ls Date: Fri, 16 May 2025 15:45:03 +0800 Subject: [PATCH 002/100] =?UTF-8?q?=E3=80=90DatePicker=E3=80=91=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=88=97=E5=BE=AA=E7=8E=AF=E5=8F=AF=E9=85=8D=E7=BD=AE?= =?UTF-8?q?C-API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: royce-ls Change-Id: I105981e66e03627e13c4bdefdbd00c0cfb4fcab9 --- arkui/ace_engine/native/native_node.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index c3fb83c32..75b775047 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3904,6 +3904,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. -- Gitee From 470a519c4ce3ab00365488bdd4f4489871de4459 Mon Sep 17 00:00:00 2001 From: wangyaohui Date: Sat, 17 May 2025 18:52:05 +0800 Subject: [PATCH 003/100] =?UTF-8?q?[fix]=20json=E4=B8=AD=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangyaohui --- arkui/window_manager/libwm.ndk.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arkui/window_manager/libwm.ndk.json b/arkui/window_manager/libwm.ndk.json index 2b377c479..d0c2a436e 100644 --- a/arkui/window_manager/libwm.ndk.json +++ b/arkui/window_manager/libwm.ndk.json @@ -123,6 +123,10 @@ "first_instroduced":"20", "name":"OH_PictureInPicture_StopPip" }, + { + "first_instroduced":"20", + "name":"OH_PictureInPicture_UpdatePipContentSize" + }, { "first_instroduced":"20", "name":"OH_PictureInPicture_UpdatePipControlStatus" -- Gitee From 8c49a8584bf3a59c380bbc3eca5f5084a9ea871c Mon Sep 17 00:00:00 2001 From: wangyaohui Date: Mon, 19 May 2025 12:02:12 +0800 Subject: [PATCH 004/100] =?UTF-8?q?[fix]=E6=8E=A5=E5=8F=A3=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=EF=BC=8C=E5=A2=9E=E5=8A=A0PipConfig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangyaohui --- arkui/window_manager/oh_window_pip.h | 58 ++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/arkui/window_manager/oh_window_pip.h b/arkui/window_manager/oh_window_pip.h index 157722cd9..306ae7d2c 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 @@ -180,21 +186,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 +216,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 +229,12 @@ 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 +243,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 +257,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 +271,19 @@ 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 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(uint32_t* controllerId); /** * @brief Delete picture-in-picture controller. -- Gitee From b917ed854046da65048f9e4493ba5992780f8787 Mon Sep 17 00:00:00 2001 From: wangyaohui Date: Mon, 19 May 2025 12:05:38 +0800 Subject: [PATCH 005/100] =?UTF-8?q?[fix]=20createPip=E5=A2=9E=E5=8A=A0conf?= =?UTF-8?q?ig=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangyaohui --- arkui/window_manager/oh_window_pip.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arkui/window_manager/oh_window_pip.h b/arkui/window_manager/oh_window_pip.h index 306ae7d2c..55aaf4a90 100644 --- a/arkui/window_manager/oh_window_pip.h +++ b/arkui/window_manager/oh_window_pip.h @@ -275,6 +275,7 @@ int32_t OH_PictureInPicture_SetPipNapiEnv(PictureInPicture_PipConfig pipConfig, /** * @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. @@ -283,7 +284,7 @@ int32_t OH_PictureInPicture_SetPipNapiEnv(PictureInPicture_PipConfig pipConfig, * {@link WINDOW_MANAGER_ERRORCODE_PIP_INTERNAL_ERROR} pip internal error. * @since 20 */ -int32_t OH_PictureInPicture_CreatePip(uint32_t* controllerId); +int32_t OH_PictureInPicture_CreatePip(PictureInPicture_PipConfig pipConfig, uint32_t* controllerId); /** * @brief Delete picture-in-picture controller. -- Gitee From c1c7e4381e026a2aa9d989fff2e0a984f182a2b7 Mon Sep 17 00:00:00 2001 From: wangyaohui Date: Mon, 19 May 2025 21:52:15 +0800 Subject: [PATCH 006/100] =?UTF-8?q?[fix]=20json=E6=96=87=E4=BB=B6=E4=B8=AD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangyaohui --- arkui/window_manager/libwm.ndk.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arkui/window_manager/libwm.ndk.json b/arkui/window_manager/libwm.ndk.json index d0c2a436e..2b448afcc 100644 --- a/arkui/window_manager/libwm.ndk.json +++ b/arkui/window_manager/libwm.ndk.json @@ -89,7 +89,11 @@ }, { "first_instroduced":"20", - "name":"OH_PictureInPicture_CreatePip" + "name":"OH_PictureInPicture_CreatePipConfig" + }, + { + "first_instroduced":"20", + "name":"OH_PictureInPicture_DestroyPipConfig" }, { "first_instroduced":"20", @@ -111,6 +115,10 @@ "first_instroduced":"20", "name":"OH_PictureInPicture_SetPipNapiEnv" }, + { + "first_instroduced":"20", + "name":"OH_PictureInPicture_CreatePip" + }, { "first_instroduced":"20", "name":"OH_PictureInPicture_DeletePip" -- Gitee From babdb357b7fc46187c2ae0d22fac666cd5ecab35 Mon Sep 17 00:00:00 2001 From: liufei Date: Fri, 16 May 2025 16:32:33 +0800 Subject: [PATCH 007/100] add ndk c Signed-off-by: liufei --- .../native_drawing/drawing_register_font.h | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_register_font.h b/graphic/graphic_2d/native_drawing/drawing_register_font.h index 2ffdbbfec..3f4ebbdf6 100644 --- a/graphic/graphic_2d/native_drawing/drawing_register_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_register_font.h @@ -75,6 +75,42 @@ 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 fontFamily. + * Unregistering a font that is currently in use by UI components may lead to text rendering anomalies, + * including garbled characters or missing glyphs. + * + * @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 + * @version 1.0 + */ +uint32_t OH_Drawing_UnRegisterFont(OH_Drawing_FontCollection* fontCollection, const char* fontFamily); + +/** + * @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.. */ + OH_DRAWING_NO_GLYPH_USE_DEFAULT = 0, + /** Always render tofu blocks for missing glyphs. */ + OH_DRAWING_NO_GLYPH_USE_TOFU +} OH_Drawing_NoGlyphShow; + +/** + * @brief Controls how undefined glyphs are visually presented + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param noGlyphShow Indicates a OH_Drawing_NoGlyphShow to be set. + * @since 20 + * @version 1.0 + */ +void OH_Drawing_SetNoGlyphShow(OH_Drawing_NoGlyphShow noGlyphShow); #ifdef __cplusplus } #endif -- Gitee From 4a04488b93dfc847bf3b3d01aceae61e10b1c03e Mon Sep 17 00:00:00 2001 From: liufei Date: Fri, 16 May 2025 16:35:26 +0800 Subject: [PATCH 008/100] update Signed-off-by: liufei --- graphic/graphic_2d/native_drawing/drawing_register_font.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_register_font.h b/graphic/graphic_2d/native_drawing/drawing_register_font.h index 3f4ebbdf6..0fb2fde55 100644 --- a/graphic/graphic_2d/native_drawing/drawing_register_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_register_font.h @@ -76,7 +76,7 @@ uint32_t OH_Drawing_RegisterFontBuffer(OH_Drawing_FontCollection*, const char* f size_t length); /** - * @brief Unregister a customized font by the fontFamily. + * @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. * @@ -90,20 +90,20 @@ uint32_t OH_Drawing_RegisterFontBuffer(OH_Drawing_FontCollection*, const char* f uint32_t OH_Drawing_UnRegisterFont(OH_Drawing_FontCollection* fontCollection, const char* fontFamily); /** - * @brief Visual representations for undefined (.notdef) glyphs + * @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.. */ + /** Uses the glyph defined in the font file, which could be an empty box, blank space, or custom symbol etc. */ OH_DRAWING_NO_GLYPH_USE_DEFAULT = 0, /** Always render tofu blocks for missing glyphs. */ OH_DRAWING_NO_GLYPH_USE_TOFU } OH_Drawing_NoGlyphShow; /** - * @brief Controls how undefined glyphs are visually presented + * @brief Controls how undefined glyphs are visually presented, affects all text rendered after this call. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param noGlyphShow Indicates a OH_Drawing_NoGlyphShow to be set. -- Gitee From 14f7ceaede84d8cecd199f6bd8a2e9eea7f1fe07 Mon Sep 17 00:00:00 2001 From: liufei Date: Wed, 21 May 2025 10:20:31 +0800 Subject: [PATCH 009/100] refactor(graphic): move font-related functions and enums - Move OH_Drawing_UnregisterFont function to drawing_text_global.h - Move OH_Drawing_NoGlyphShow enum and related function to drawing_text_global.h - Update function and enum placements for better organization Signed-off-by: liufei --- .../native_drawing/drawing_register_font.h | 25 +------------------ .../native_drawing/drawing_text_global.h | 21 ++++++++++++++++ 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_register_font.h b/graphic/graphic_2d/native_drawing/drawing_register_font.h index 0fb2fde55..f9de2ab12 100644 --- a/graphic/graphic_2d/native_drawing/drawing_register_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_register_font.h @@ -87,30 +87,7 @@ uint32_t OH_Drawing_RegisterFontBuffer(OH_Drawing_FontCollection*, const char* f * @since 20 * @version 1.0 */ -uint32_t OH_Drawing_UnRegisterFont(OH_Drawing_FontCollection* fontCollection, const char* fontFamily); - -/** - * @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. */ - OH_DRAWING_NO_GLYPH_USE_DEFAULT = 0, - /** Always render tofu blocks for missing glyphs. */ - OH_DRAWING_NO_GLYPH_USE_TOFU -} OH_Drawing_NoGlyphShow; - -/** - * @brief Controls how undefined glyphs are visually presented, affects all text rendered after this call. - * - * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param noGlyphShow Indicates a OH_Drawing_NoGlyphShow to be set. - * @since 20 - * @version 1.0 - */ -void OH_Drawing_SetNoGlyphShow(OH_Drawing_NoGlyphShow noGlyphShow); +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 7a7493c94..823f2542c 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. */ + OH_DRAWING_NO_GLYPH_USE_DEFAULT = 0, + /** Always render tofu blocks for missing glyphs. */ + OH_DRAWING_NO_GLYPH_USE_TOFU +} OH_Drawing_NoGlyphShow; /** * @brief Sets high contrast mode of text rendering. @@ -68,6 +80,15 @@ 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 noGlyphShow Indicates a OH_Drawing_NoGlyphShow to be set. + * @since 20 + * @version 1.0 + */ +void OH_Drawing_SetNoGlyphShow(OH_Drawing_NoGlyphShow noGlyphShow); #ifdef __cplusplus } #endif -- Gitee From 8774b75387be91a4cfe6909530f79431d1d6b670 Mon Sep 17 00:00:00 2001 From: wangyaohui Date: Wed, 21 May 2025 10:42:28 +0800 Subject: [PATCH 010/100] =?UTF-8?q?[fix]=20=E4=B8=89=E4=B8=AA=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=BF=94=E5=9B=9E=E9=94=99=E8=AF=AF=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangyaohui --- arkui/window_manager/oh_window_pip.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/arkui/window_manager/oh_window_pip.h b/arkui/window_manager/oh_window_pip.h index 55aaf4a90..678abd042 100644 --- a/arkui/window_manager/oh_window_pip.h +++ b/arkui/window_manager/oh_window_pip.h @@ -331,9 +331,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. @@ -341,9 +345,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); /** @@ -352,9 +360,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); /** -- Gitee From a1366e153bd385c3c927a825aa6e7ee902adb777 Mon Sep 17 00:00:00 2001 From: liufei Date: Wed, 21 May 2025 15:22:53 +0800 Subject: [PATCH 011/100] add function to json Signed-off-by: liufei --- .../graphic_2d/native_drawing/libnative_drawing.ndk.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 997496104..a621643bf 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1014,6 +1014,10 @@ "first_introduced": "11", "name": "OH_Drawing_RegisterFontBuffer" }, + { + "first_introduced": "20", + "name": "OH_Drawing_UnegisterFont" + }, { "first_introduced": "12", "name": "OH_Drawing_TypographyGetLineTextRange" @@ -1853,5 +1857,9 @@ { "first_introduced": "20", "name": "OH_Drawing_SetTextHighContrast" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_SetNoGlyphShow" } ] \ No newline at end of file -- Gitee From 7bc25f7a6e63323ba872af710c78915805f34d01 Mon Sep 17 00:00:00 2001 From: mobHot Date: Wed, 21 May 2025 15:22:55 +0800 Subject: [PATCH 012/100] add the interface of glyph drawing. Signed-off-by: mobHot Change-Id: If0ea70672777e3247722d2435e6caab62edf90b0 --- .../native_drawing/drawing_text_run.h | 54 +++++++++++++++++++ .../native_drawing/drawing_text_typography.h | 11 ++++ .../native_drawing/libnative_drawing.ndk.json | 24 +++++++++ 3 files changed, 89 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_run.h b/graphic/graphic_2d/native_drawing/drawing_text_run.h index 8873eaaf2..790efd05c 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 width 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 width 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 width by index. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param positions The glyph width array object OH_Drawing_Array. + * @param index The run of glyph index. + * @return The width of glyph. + * @since 20 + */ +double OH_Drawing_GetRunGlyphAdvanceByIndex(OH_Drawing_Array* advances, size_t index); + +/** + * @brief Releases the memory of glyph width array. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing + * @param advances The run of glyph width 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 8a704ced5..712747bca 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_typography.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_typography.h @@ -2683,6 +2683,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 cf0944999..7fa265331 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1534,6 +1534,10 @@ "first_introduced": "20", "name": "OH_Drawing_TypographyUpdateDecorationStyle" }, + { + "first_introduced": "20", + "name": "OH_Drawing_TypographyUpdateDecorationColor" + }, { "first_introduced": "12", "name": "OH_Drawing_TypographyTextGetLineStyle" @@ -1834,10 +1838,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" -- Gitee From f74987e7ec4c7befedacb7947c779850810c266f Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Wed, 21 May 2025 16:15:04 +0800 Subject: [PATCH 013/100] CAPI:minAndMaxLines Signed-off-by: wangweiyuan Change-Id: I1f13425ccab5e9624181dc546935fbad9607f624 --- arkui/ace_engine/native/native_node.h | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 5d5bf16f7..c008883ef 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3573,6 +3573,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. * -- Gitee From 004fe75918c7bbff537384f390d1cba6409606d0 Mon Sep 17 00:00:00 2001 From: wangyaohui Date: Wed, 21 May 2025 16:20:34 +0800 Subject: [PATCH 014/100] =?UTF-8?q?[fix]=20=E5=88=A0=E9=99=A4=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangyaohui --- arkui/window_manager/oh_window_pip.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arkui/window_manager/oh_window_pip.h b/arkui/window_manager/oh_window_pip.h index 678abd042..a5d3ca751 100644 --- a/arkui/window_manager/oh_window_pip.h +++ b/arkui/window_manager/oh_window_pip.h @@ -109,8 +109,6 @@ typedef enum { CAMERA_SWITCH = 7, /** mute switch. */ MUTE_SWITCH = 8, - /** end. */ - END, } PictureInPicture_PipControlType; /** -- Gitee From 64a4d9366b048bf456b650145b99de038c902a01 Mon Sep 17 00:00:00 2001 From: Trouvaille Date: Fri, 23 May 2025 15:54:47 +0800 Subject: [PATCH 015/100] =?UTF-8?q?=E5=B1=8F=E5=B9=95=E5=BD=95=E5=88=B6?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE=E9=9A=90=E7=A7=81=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E5=B1=8F=E8=94=BD=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Trouvaille --- .../player_framework/native_avscreen_capture.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index eb62b5feb..3d078f65a 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -526,6 +526,22 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_StrategyForKeepCaptureDuringCall( */ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetCaptureContentChangedCallback(struct OH_AVScreenCapture *capture, OH_AVScreenCapture_OnCaptureContentChanged callback, void *userData); + +/** + * @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); #ifdef __cplusplus } #endif -- Gitee From c64ba91550cbe8257d26e08d906cc95c987b957e Mon Sep 17 00:00:00 2001 From: Trouvaille Date: Fri, 23 May 2025 15:57:26 +0800 Subject: [PATCH 016/100] =?UTF-8?q?=E5=B1=8F=E5=B9=95=E5=BD=95=E5=88=B6?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE=E9=9A=90=E7=A7=81=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E5=B1=8F=E8=94=BD=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Trouvaille --- .../avscreen_capture/libnative_avscreen_capture.ndk.json | 4 ++++ 1 file changed, 4 insertions(+) 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 0c790e079..e287be198 100644 --- a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json +++ b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json @@ -130,5 +130,9 @@ { "first_introduced": "20", "name": "OH_AVScreenCapture_SetCaptureContentChangedCallback" + }, + { + "first_introduced": "20", + "name": "OH_AVScreenCapture_StrategyForPrivacyMaskMode" } ] \ No newline at end of file -- Gitee From 32387173ddd69e256317a2d864776f9d8bd7f071 Mon Sep 17 00:00:00 2001 From: liuleimin_hw Date: Fri, 23 May 2025 16:17:20 +0800 Subject: [PATCH 017/100] =?UTF-8?q?HTTP=20C=E6=8E=A5=E5=8F=A3=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuleimin_hw --- network/netstack/net_http/BUILD.gn | 34 + .../netstack/net_http/libnet_http.ndk.json | 38 ++ network/netstack/net_http/net_http.h | 155 +++++ network/netstack/net_http/net_http_type.h | 606 ++++++++++++++++++ 4 files changed, 833 insertions(+) create mode 100644 network/netstack/net_http/BUILD.gn create mode 100644 network/netstack/net_http/libnet_http.ndk.json create mode 100644 network/netstack/net_http/net_http.h create mode 100644 network/netstack/net_http/net_http_type.h diff --git a/network/netstack/net_http/BUILD.gn b/network/netstack/net_http/BUILD.gn new file mode 100644 index 000000000..c13c6ad39 --- /dev/null +++ b/network/netstack/net_http/BUILD.gn @@ -0,0 +1,34 @@ +# 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. + +import("//build/ohos.gni") + +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", + ] +} \ No newline at end of file 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 000000000..5a00aa6f2 --- /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 000000000..25cf8a3d9 --- /dev/null +++ b/network/netstack/net_http/net_http.h @@ -0,0 +1,155 @@ +/* + * 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 + * @version 1.0 + */ + +/** + * @file net_http.h + * @brief Defines the APIs for http. + * + * @library libnet_http.so + * @kit NetworkKit + * @syscap SystemCapability.Communication.NetStack + * @since 20 + * @version 1.0 + */ + +#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 + * @version 1.0 + */ +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. + * @syscap SystemCapability.Communication.NetStack + * @since 20 + * @version 1.0 + */ +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 + * @version 1.0 + */ +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 + * @version 1.0 + */ +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 + * @version 1.0 + */ +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. + * @syscap SystemCapability.Communication.NetStack + * @since 20 + * @version 1.0 + */ +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 + * @version 1.0 + */ +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 + * @version 1.0 + */ +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 + * @version 1.0 + */ +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 000000000..0019faf84 --- /dev/null +++ b/network/netstack/net_http/net_http_type.h @@ -0,0 +1,606 @@ +/* + * 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 + * @version 1.0 + */ + +/** + * @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 + * @version 1.0 + */ + +#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 + * @version 1.0 + */ +typedef enum Http_ErrCode { + /** Operation success. */ + RESULT_OK = 0, + /** @brief Parameter error. */ + PARAMETER_ERROR = 401, + /** @brief Permission denied. */ + PERMISSION_DENIED = 201, + /** @brief Error code base. */ + NETSTACK_E_BASE = 2300000, + /** @brief Unsupported protocol. */ + UNSUPPORTED_PROTOCOL = (NETSTACK_E_BASE + 1), + /** @brief Invalid URL format or missing URL. */ + INVALID_URL = (NETSTACK_E_BASE + 3), + /** @brief Failed to resolve the proxy name. */ + RESOLVE_PROXY_FAILED = (NETSTACK_E_BASE + 5), + /** @brief Failed to resolve the host name. */ + RESOLVE_HOST_FAILED = (NETSTACK_E_BASE + 6), + /** @brief Failed to connect to the server. */ + CONNECT_SERVER_FAILED = (NETSTACK_E_BASE + 7), + /** @brief Invalid server response. */ + INVALID_SERVER_RESPONSE = (NETSTACK_E_BASE + 8), + /** @brief Access to the remote resource denied. */ + ACCESS_REMOTE_DENIED = (NETSTACK_E_BASE + 9), + /** @brief Error in the HTTP2 framing layer. */ + HTTP2_FRAMING_ERROR = (NETSTACK_E_BASE + 16), + /** @brief Transferred a partial file. */ + TRANSFER_PARTIAL_FILE = (NETSTACK_E_BASE + 18), + /** @brief Failed to write the received data to the disk or application. */ + WRITE_DATA_FAILED = (NETSTACK_E_BASE + 23), + /** @brief Upload failed. */ + UPLOAD_FAILED = (NETSTACK_E_BASE + 25), + /** @brief Failed to open or read local data from the file or application. */ + OPEN_LOCAL_DATA_FAILED = (NETSTACK_E_BASE + 26), + /** @brief Out of memory. */ + OUT_OF_MEMORY = (NETSTACK_E_BASE + 27), + /** @brief Operation timeout. */ + OPERATION_TIMEOUT = (NETSTACK_E_BASE + 28), + /** @brief The number of redirections reaches the maximum allowed. */ + REDIRECTIONS_TOO_LARGE = (NETSTACK_E_BASE + 47), + /** @brief The server returned nothing (no header or data). */ + SERVER_RETURNED_NOTHING = (NETSTACK_E_BASE + 52), + /** @brief Failed to send data to the peer. */ + SEND_DATA_FAILED = (NETSTACK_E_BASE + 55), + /** @brief Failed to receive data from the peer. */ + RECEIVE_DATA_FAILED = (NETSTACK_E_BASE + 56), + /** @brief Local SSL certificate error. */ + SSL_CERTIFICATE_ERROR = (NETSTACK_E_BASE + 58), + /** @brief The specified SSL cipher cannot be used. */ + SSL_CIPHER_USED_ERROR = (NETSTACK_E_BASE + 59), + /** @brief Invalid SSL peer certificate or SSH remote key. */ + INVALID_SSL_PEER_CERT = (NETSTACK_E_BASE + 60), + /** @brief Invalid HTTP encoding format. */ + INVALID_ENCODING_FORMAT = (NETSTACK_E_BASE + 61), + /** @brief Maximum file size exceeded. */ + FILE_TOO_LARGE = (NETSTACK_E_BASE + 63), + /** @brief Remote disk full. */ + REMOTE_DISK_FULL = (NETSTACK_E_BASE + 70), + /** @brief Remote file already exists. */ + REMOTE_FILE_EXISTS = (NETSTACK_E_BASE + 73), + /** @brief The SSL CA certificate does not exist or is inaccessible. */ + SSL_CA_NOT_EXIST = (NETSTACK_E_BASE + 77), + /** @brief Remote file not found. */ + REMOTE_FILE_NOT_FOUND = (NETSTACK_E_BASE + 78), + /** @brief Authentication error. */ + AUTHENTICATION_ERROR = (NETSTACK_E_BASE + 94), + /** @brief It is not allowed to access this domain. */ + ACCESS_DOMAIN_NOT_ALLOWED = (NETSTACK_E_BASE + 998), + /** @brief Unknown error. */ + UNKNOWN_ERROR = (NETSTACK_E_BASE + 999) +} Http_ErrCode; + +/** + * @brief Defines http response code. + * + * @since 20 + * @version 1.0 + */ +typedef enum Http_ResponseCode { + /** @brief The request was successful. */ + HTTP_OK = 200, + /** @brief Successfully requested and created a new resource. */ + CREATED = 201, + /** @brief The request has been accepted but has not been processed completely. */ + ACCEPTED = 202, + /** @brief Unauthorized information. The request was successful. */ + NOT_AUTHORITATIVE = 203, + /** @brief No content. The server successfully processed, but did not return content. */ + NO_CONTENT = 204, + /** @brief Reset the content. */ + RESET = 205, + /** @brief Partial content. The server successfully processed some GET requests. */ + PARTIAL = 206, + /** @brief Multiple options. */ + 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. + */ + MOVED_PERM = 301, + /** @brief Temporary movement. */ + MOVED_TEMP = 302, + /** @brief View other addresses. */ + SEE_OTHER = 303, + /** @brief Not modified. */ + NOT_MODIFIED = 304, + /** @brief Using proxies. */ + USE_PROXY = 305, + /** @brief The server cannot understand the syntax error error requested by the client. */ + BAD_REQUEST = 400, + /** @brief Request for user authentication. */ + UNAUTHORIZED = 401, + /** @brief Reserved for future use. */ + PAYMENT_REQUIRED = 402, + /** @brief The server understands the request from the requesting client, but refuses to execute it. */ + FORBIDDEN = 403, + /** @brief The server was unable to find resources (web pages) based on the client's request. */ + NOT_FOUND = 404, + /** @brief The method in the client request is prohibited. */ + BAD_METHOD = 405, + /** @brief The server unabled to complete request based on the content characteristics requested by the client. */ + NOT_ACCEPTABLE = 406, + /** @brief Request authentication of the proxy's identity. */ + PROXY_AUTH = 407, + /** @brief The request took too long and timed out. */ + 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. + */ + CONFLICT = 409, + /** @brief The resource requested by the client no longer exists. */ + GONE = 410, + /** @brief The server is unable to process request information sent by the client without Content Length. */ + LENGTH_REQUIRED = 411, + /** @brief The prerequisite for requesting information from the client is incorrect. */ + PRECON_FAILED = 412, + /** @brief The request was rejected because the requested entity was too large for the server to process. */ + ENTITY_TOO_LARGE = 413, + /** @brief The requested URI is too long (usually a URL) and the server cannot process it. */ + REQ_TOO_LONG = 414, + /** @brief The server is unable to process the requested format. */ + UNSUPPORTED_TYPE = 415, + /** @brief Requested Range not satisfiable. */ + RANGE_NOT_SATISFIABLE = 416, + /** @brief Internal server error, unable to complete the request. */ + INTERNAL_ERROR = 500, + /** @brief * The server does not support the requested functionality and cannot complete the request. */ + NOT_IMPLEMENTED = 501, + /** @brief The server acting as a gateway or proxy received an invalid request from the remote server. */ + BAD_GATEWAY = 502, + /** @brief Due to overload or system maintenance, the server is temporarily unable to process client requests. */ + UNAVAILABLE = 503, + /** @brief The server acting as gateway did not obtain requests from the remote server in a timely manner. */ + GATEWAY_TIMEOUT = 504, + /** @brief The version of the HTTP protocol requested by the server. */ + VERSION = 505 +} Http_ResponseCode; + +/** + * @brief Buffer. + * + * @since 20 + * @version 1.0 + */ +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 + * @version 1.0 + */ +typedef enum Http_AddressFamilyType { + /** Default, The system automatically selects the IPv4 or IPv6 address of the domain name. */ + DEFAULT = 0, + /** IPv4, Selects the IPv4 address of the domain name. */ + ONLY_V4 = 1, + /** IPv6, Selects the IPv4 address of the domain name. */ + ONLY_V6 = 2 +} Http_AddressFamilyType; + +/** + * @brief HTTP get method. + * + * @since 20 + * @version 1.0 + */ +#define NET_HTTP_METHOD_GET "GET" + +/** + * @brief HTTP head method. + * + * @since 20 + * @version 1.0 + */ +#define NET_HTTPMETHOD_HEAD "HEAD" + +/** + * @brief HTTP options method. + * + * @since 20 + * @version 1.0 + */ +#define NET_HTTPMETHOD_OPTIONS "OPTIONS" + +/** + * @brief HTTP trace method. + * + * @since 20 + * @version 1.0 + */ +#define NET_HTTPMETHOD_TRACE "TRACE" +/** + * @brief HTTP delete method. + * @since 20 + * @version 1.0 + */ +#define NET_HTTPMETHOD_DELETE "DELETE" + +/** + * @brief HTTP post method. + * + * @since 20 + * @version 1.0 + */ +#define NET_HTTP_METHOD_POST "POST" + +/** + * @brief HTTP put method. + * + * @since 20 + * @version 1.0 + */ +#define NET_HTTP_METHOD_PUT "PUT" + +/** + * @brief HTTP connect method. + * + * @since 20 + * @version 1.0 + */ +#define NET_HTTP_METHOD_PATCH "CONNECT" + +/** + * @brief Defines the HTTP version. + * + * @since 20 + * @version 1.0 + */ +typedef enum Http_HttpProtocol { + /** Default choose by curl. */ + HTTP_NONE = 0, + /** HTTP 1.1 version. */ + HTTP1_1, + /** HTTP 2 version. */ + HTTP2, + /** HTTP 3 version. */ + HTTP3 +} Http_HttpProtocol; + +/** + * @brief Defines the Cert Type. + * + * @since 20 + * @version 1.0 + */ +typedef enum Http_CertType { + /** PEM Cert Type. */ + PEM = 0, + /** DER Cert Type. */ + DER = 1, + /** P12 Cert Type. */ + P12 = 2 +} Http_CertType; + +/** + * @brief Headers of the request or response. + * + * @since 20 + * @version 1.0 + */ +typedef struct Http_Headers Http_Headers; + +/** + * @brief The value type of the header map of the request or response. + * + * @since 20 + * @version 1.0 + */ +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 + * @version 1.0 + */ +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 + * @version 1.0 + */ +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 + * @version 1.0 + */ +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 + * @version 1.0 + */ +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 + * @version 1.0 + */ +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 + * @version 1.0 + */ +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 + * @version 1.0 + */ +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 + * @version 1.0 + */ +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 + * @version 1.0 + */ + void (*destroyResponse)(struct Http_Response **response); +} Http_Response; + +/** + * @brief Http request. + * + * @since 20 + * @version 1.0 + */ +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 + * @version 1.0 + */ +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 + * @version 1.0 + */ +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 + * @version 1.0 + */ +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 + * @version 1.0 + */ +typedef void (*Http_OnHeaderReceiveCallback)(Http_Headers *headers); + +/** + * @brief Empty callback function for requested DataEnd or Canceled event callback。 + * + * @since 20 + * @version 1.0 + */ +typedef void (*Http_OnVoidCallback)(void); + +/** + * @brief Callbacks to watch different events. + * + * @since 20 + * @version 1.0 + */ +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 -- Gitee From e0c96f6cd957eccaad2c4700da4720809f261d1c Mon Sep 17 00:00:00 2001 From: liuleimin_hw Date: Fri, 23 May 2025 09:19:29 +0000 Subject: [PATCH 018/100] update network/netstack/net_http/BUILD.gn. Signed-off-by: liuleimin_hw --- network/netstack/net_http/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network/netstack/net_http/BUILD.gn b/network/netstack/net_http/BUILD.gn index c13c6ad39..1e9517228 100644 --- a/network/netstack/net_http/BUILD.gn +++ b/network/netstack/net_http/BUILD.gn @@ -31,4 +31,4 @@ ohos_ndk_headers("nethttp_header") { "net_http.h", "net_http_type.h", ] -} \ No newline at end of file +} -- Gitee From 185856910ecf98289db420815e1bfb28594cfc4d Mon Sep 17 00:00:00 2001 From: LeechyLiang Date: Fri, 23 May 2025 17:17:00 +0800 Subject: [PATCH 019/100] Remove ANI From Master Signed-off-by: LeechyLiang Change-Id: If6c7287b397b02639022713f7f72acf36d4391d8 --- ani/BUILD.gn | 19 - ani/ani.h | 7506 ----------------------------------------------- ndk_targets.gni | 1 - 3 files changed, 7526 deletions(-) delete mode 100644 ani/BUILD.gn delete mode 100644 ani/ani.h diff --git a/ani/BUILD.gn b/ani/BUILD.gn deleted file mode 100644 index 2beab5405..000000000 --- a/ani/BUILD.gn +++ /dev/null @@ -1,19 +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. - -import("//build/ohos.gni") - -ohos_ndk_headers("ani_header") { - dest_dir = "$ndk_headers_out_dir/ani" - sources = [ "./ani.h" ] -} diff --git a/ani/ani.h b/ani/ani.h deleted file mode 100644 index 58b27279a..000000000 --- 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/ndk_targets.gni b/ndk_targets.gni index 3ac0d4002..116c203b4 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", -- Gitee From f4cebfa9f7449e72d73639fa8cb2241f86d596aa Mon Sep 17 00:00:00 2001 From: huchang Date: Sun, 25 May 2025 14:09:08 +0800 Subject: [PATCH 020/100] change to 20 Signed-off-by: huchang --- .../audio_capturer/native_audiocapturer.h | 8 +++--- .../audio_renderer/native_audiorenderer.h | 4 +-- .../common/native_audiostream_base.h | 24 ++++++++--------- .../common/native_audiostreambuilder.h | 16 ++++++------ multimedia/audio_framework/ohaudio.ndk.json | 26 +++++++++---------- 5 files changed, 39 insertions(+), 39 deletions(-) diff --git a/multimedia/audio_framework/audio_capturer/native_audiocapturer.h b/multimedia/audio_framework/audio_capturer/native_audiocapturer.h index f2f256e49..caf548af2 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,7 +339,7 @@ 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); diff --git a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h index f048de6e5..6ad655177 100644 --- a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h +++ b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h @@ -545,7 +545,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,7 +559,7 @@ 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); diff --git a/multimedia/audio_framework/common/native_audiostream_base.h b/multimedia/audio_framework/common/native_audiostream_base.h index 28643a246..a951df9ad 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 */ @@ -618,7 +618,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 +628,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 +642,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 +655,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 +669,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 +682,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 +692,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 +706,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 +719,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 +733,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 dd84c6e46..acd0beba1 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. @@ -414,7 +414,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 +431,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 +448,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 +465,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 +482,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 +499,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); diff --git a/multimedia/audio_framework/ohaudio.ndk.json b/multimedia/audio_framework/ohaudio.ndk.json index 048a15b03..94c965bd4 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" -- Gitee From c571ebc90e5e9a3175a8724448ee5e278cceb8ea Mon Sep 17 00:00:00 2001 From: qianyong325 Date: Mon, 26 May 2025 09:35:13 +0800 Subject: [PATCH 021/100] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: qianyong325 --- distributeddatamgr/udmf/include/udmf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distributeddatamgr/udmf/include/udmf.h b/distributeddatamgr/udmf/include/udmf.h index 32d57814f..ec6cc0f20 100644 --- a/distributeddatamgr/udmf/include/udmf.h +++ b/distributeddatamgr/udmf/include/udmf.h @@ -984,9 +984,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 -- Gitee From b50664c81eb1aba0992157723a87fe66235af971 Mon Sep 17 00:00:00 2001 From: liufei Date: Mon, 26 May 2025 10:50:14 +0800 Subject: [PATCH 022/100] remove ui components and add prefix text Signed-off-by: liufei --- .../graphic_2d/native_drawing/drawing_register_font.h | 2 +- .../graphic_2d/native_drawing/drawing_text_global.h | 10 +++++----- .../native_drawing/libnative_drawing.ndk.json | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_register_font.h b/graphic/graphic_2d/native_drawing/drawing_register_font.h index f9de2ab12..e82bea243 100644 --- a/graphic/graphic_2d/native_drawing/drawing_register_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_register_font.h @@ -77,7 +77,7 @@ uint32_t OH_Drawing_RegisterFontBuffer(OH_Drawing_FontCollection*, const char* f /** * @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, + * Unregistering a font that is currently in used may lead to text rendering anomalies, * including garbled characters or missing glyphs. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing diff --git a/graphic/graphic_2d/native_drawing/drawing_text_global.h b/graphic/graphic_2d/native_drawing/drawing_text_global.h index 823f2542c..bebff3e94 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_global.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_global.h @@ -66,10 +66,10 @@ typedef enum { */ typedef enum { /** Uses the glyph defined in the font file, which could be an empty box, blank space, or custom symbol etc. */ - OH_DRAWING_NO_GLYPH_USE_DEFAULT = 0, + TEXT_NO_GLYPH_USE_DEFAULT = 0, /** Always render tofu blocks for missing glyphs. */ - OH_DRAWING_NO_GLYPH_USE_TOFU -} OH_Drawing_NoGlyphShow; + TEXT_NO_GLYPH_USE_TOFU = 1, +} OH_Drawing_TextNoGlyphShow; /** * @brief Sets high contrast mode of text rendering. @@ -84,11 +84,11 @@ 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 noGlyphShow Indicates a OH_Drawing_NoGlyphShow to be set. + * @param noGlyphShow Indicates a OH_Drawing_TextNoGlyphShow to be set. * @since 20 * @version 1.0 */ -void OH_Drawing_SetNoGlyphShow(OH_Drawing_NoGlyphShow noGlyphShow); +void OH_Drawing_SetTextNoGlyphShow(OH_Drawing_TextNoGlyphShow noGlyphShow); #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index a621643bf..405224423 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1016,7 +1016,7 @@ }, { "first_introduced": "20", - "name": "OH_Drawing_UnegisterFont" + "name": "OH_Drawing_UnregisterFont" }, { "first_introduced": "12", @@ -1860,6 +1860,6 @@ }, { "first_introduced": "20", - "name": "OH_Drawing_SetNoGlyphShow" + "name": "OH_Drawing_SetTextNoGlyphShow" } ] \ No newline at end of file -- Gitee From 6adcacacb288c34af28018cec018e40b65886a3e Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Sun, 4 May 2025 20:35:10 +0800 Subject: [PATCH 023/100] =?UTF-8?q?capi=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E7=BB=98=E5=88=B6=E5=B1=82=E7=BA=A7=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangweiyuan 注释修正 Signed-off-by: wangweiyuan 注释修正 Signed-off-by: wangweiyuan --- arkui/ace_engine/native/native_node.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index c1458a02f..39609fc27 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -7856,6 +7856,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; /** -- Gitee From d152fa5a2f96961a0caa717f5737628ec93f113b Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Mon, 26 May 2025 11:32:14 +0800 Subject: [PATCH 024/100] =?UTF-8?q?Text=E6=8E=A7=E4=BB=B6=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=8E=BB=E9=99=A4=E8=A1=8C=E5=B0=BE=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangweiyuan --- arkui/ace_engine/native/native_node.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index eb051dfae..aa7fe4e3b 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. -- Gitee From eb70f86e83e7ba80d5dad72a2c9cb96762942737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=91=E5=B1=91=E5=B1=91?= Date: Mon, 26 May 2025 15:10:54 +0800 Subject: [PATCH 025/100] add create with dma interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 屑屑屑 --- .../include/image/image_common.h | 29 ++++++++++ .../include/image/pixelmap_native.h | 57 +++++++++++++++++++ .../image_framework/libpixelmap.ndk.json | 12 ++++ 3 files changed, 98 insertions(+) diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h index 67d972adf..6d08b76ae 100644 --- a/multimedia/image_framework/include/image/image_common.h +++ b/multimedia/image_framework/include/image/image_common.h @@ -179,6 +179,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_UNSUPPROTED = 7600501, /** unknown error */ IMAGE_UNKNOWN_ERROR = 7600901, /** decode data source exception */ @@ -230,6 +236,29 @@ 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. + * + */ + IMAGE_ALLOCATOR_MODE_AUTO = 0, + /** + * Use DMA buffer to create the PixelMap. + * + */ + IMAGE_ALLOCATOR_MODE_DMA = 1, + /** + * Use share memory to create the PixelMap. + * + */ + IMAGE_ALLOCATOR_MODE_SHARED_MEMORY = 2, +} IMAGE_ALLOCATOR_MODE; + /** * @brief Creates a PictureMetadata object. * diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 1fa825bab..503e48bb2 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -576,6 +576,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} pixelmapNative is nullptr, or pixelmapNapi is not a pixelmap. + * @since 20 + */ +Image_ErrorCode OH_PixelmapImageInfo_GetAlphaMode(OH_Pixelmap_ImageInfo *info, int32_t *alphaMode); + /** * @brief Get rowStride number for imageinfo struct. * @@ -639,6 +651,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. * @@ -886,6 +922,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/libpixelmap.ndk.json b/multimedia/image_framework/libpixelmap.ndk.json index 68d850462..f52699ef6 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" -- Gitee From de2e629e8a0ce162988042fca72c1b3564ebddcd Mon Sep 17 00:00:00 2001 From: wangmengyao111 Date: Mon, 26 May 2025 08:45:25 +0000 Subject: [PATCH 026/100] update network/netssl/BUILD.gn. Signed-off-by: wangmengyao111 --- network/netssl/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network/netssl/BUILD.gn b/network/netssl/BUILD.gn index a561b30af..3f3a388fe 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", -- Gitee From d1bed85851c1cbca0f492f813a5df8049c05a698 Mon Sep 17 00:00:00 2001 From: liuleimin_hw Date: Mon, 26 May 2025 09:29:51 +0000 Subject: [PATCH 027/100] update network/netstack/net_http/net_http_type.h. Signed-off-by: liuleimin_hw --- network/netstack/net_http/net_http_type.h | 172 +++++++++------------- 1 file changed, 69 insertions(+), 103 deletions(-) diff --git a/network/netstack/net_http/net_http_type.h b/network/netstack/net_http/net_http_type.h index 0019faf84..ff83f1a35 100644 --- a/network/netstack/net_http/net_http_type.h +++ b/network/netstack/net_http/net_http_type.h @@ -20,7 +20,6 @@ * @brief Provides C APIs for the Http client module. * * @since 20 - * @version 1.0 */ /** @@ -31,7 +30,6 @@ * @kit NetworkKit * @syscap SystemCapability.Communication.NetStack * @since 20 - * @version 1.0 */ #ifndef NET_HTTP_TYPE_H @@ -49,171 +47,168 @@ extern "C" { * @brief Defines http error code. * * @since 20 - * @version 1.0 */ typedef enum Http_ErrCode { /** Operation success. */ - RESULT_OK = 0, + HTTP_RESULT_OK = 0, /** @brief Parameter error. */ - PARAMETER_ERROR = 401, + HTTP_PARAMETER_ERROR = 401, /** @brief Permission denied. */ - PERMISSION_DENIED = 201, + HTTP_PERMISSION_DENIED = 201, /** @brief Error code base. */ - NETSTACK_E_BASE = 2300000, + HTTP_NETSTACK_E_BASE = 2300000, /** @brief Unsupported protocol. */ - UNSUPPORTED_PROTOCOL = (NETSTACK_E_BASE + 1), + HTTP_UNSUPPORTED_PROTOCOL = (NETSTACK_E_BASE + 1), /** @brief Invalid URL format or missing URL. */ - INVALID_URL = (NETSTACK_E_BASE + 3), + HTTP_INVALID_URL = (NETSTACK_E_BASE + 3), /** @brief Failed to resolve the proxy name. */ - RESOLVE_PROXY_FAILED = (NETSTACK_E_BASE + 5), + HTTP_RESOLVE_PROXY_FAILED = (NETSTACK_E_BASE + 5), /** @brief Failed to resolve the host name. */ - RESOLVE_HOST_FAILED = (NETSTACK_E_BASE + 6), + HTTP_RESOLVE_HOST_FAILED = (NETSTACK_E_BASE + 6), /** @brief Failed to connect to the server. */ - CONNECT_SERVER_FAILED = (NETSTACK_E_BASE + 7), + HTTP_CONNECT_SERVER_FAILED = (NETSTACK_E_BASE + 7), /** @brief Invalid server response. */ - INVALID_SERVER_RESPONSE = (NETSTACK_E_BASE + 8), + HTTP_INVALID_SERVER_RESPONSE = (NETSTACK_E_BASE + 8), /** @brief Access to the remote resource denied. */ - ACCESS_REMOTE_DENIED = (NETSTACK_E_BASE + 9), + HTTP_ACCESS_REMOTE_DENIED = (NETSTACK_E_BASE + 9), /** @brief Error in the HTTP2 framing layer. */ - HTTP2_FRAMING_ERROR = (NETSTACK_E_BASE + 16), + HTTP_HTTP2_FRAMING_ERROR = (NETSTACK_E_BASE + 16), /** @brief Transferred a partial file. */ - TRANSFER_PARTIAL_FILE = (NETSTACK_E_BASE + 18), + HTTP_TRANSFER_PARTIAL_FILE = (NETSTACK_E_BASE + 18), /** @brief Failed to write the received data to the disk or application. */ - WRITE_DATA_FAILED = (NETSTACK_E_BASE + 23), + HTTP_WRITE_DATA_FAILED = (NETSTACK_E_BASE + 23), /** @brief Upload failed. */ - UPLOAD_FAILED = (NETSTACK_E_BASE + 25), + HTTP_UPLOAD_FAILED = (NETSTACK_E_BASE + 25), /** @brief Failed to open or read local data from the file or application. */ - OPEN_LOCAL_DATA_FAILED = (NETSTACK_E_BASE + 26), + HTTP_OPEN_LOCAL_DATA_FAILED = (NETSTACK_E_BASE + 26), /** @brief Out of memory. */ - OUT_OF_MEMORY = (NETSTACK_E_BASE + 27), + HTTP_OUT_OF_MEMORY = (NETSTACK_E_BASE + 27), /** @brief Operation timeout. */ - OPERATION_TIMEOUT = (NETSTACK_E_BASE + 28), + HTTP_OPERATION_TIMEOUT = (NETSTACK_E_BASE + 28), /** @brief The number of redirections reaches the maximum allowed. */ - REDIRECTIONS_TOO_LARGE = (NETSTACK_E_BASE + 47), + HTTP_REDIRECTIONS_TOO_LARGE = (NETSTACK_E_BASE + 47), /** @brief The server returned nothing (no header or data). */ - SERVER_RETURNED_NOTHING = (NETSTACK_E_BASE + 52), + HTTP_SERVER_RETURNED_NOTHING = (NETSTACK_E_BASE + 52), /** @brief Failed to send data to the peer. */ - SEND_DATA_FAILED = (NETSTACK_E_BASE + 55), + HTTP_SEND_DATA_FAILED = (NETSTACK_E_BASE + 55), /** @brief Failed to receive data from the peer. */ - RECEIVE_DATA_FAILED = (NETSTACK_E_BASE + 56), + HTTP_RECEIVE_DATA_FAILED = (NETSTACK_E_BASE + 56), /** @brief Local SSL certificate error. */ - SSL_CERTIFICATE_ERROR = (NETSTACK_E_BASE + 58), + HTTP_SSL_CERTIFICATE_ERROR = (NETSTACK_E_BASE + 58), /** @brief The specified SSL cipher cannot be used. */ - SSL_CIPHER_USED_ERROR = (NETSTACK_E_BASE + 59), + HTTP_SSL_CIPHER_USED_ERROR = (NETSTACK_E_BASE + 59), /** @brief Invalid SSL peer certificate or SSH remote key. */ - INVALID_SSL_PEER_CERT = (NETSTACK_E_BASE + 60), + HTTP_INVALID_SSL_PEER_CERT = (NETSTACK_E_BASE + 60), /** @brief Invalid HTTP encoding format. */ - INVALID_ENCODING_FORMAT = (NETSTACK_E_BASE + 61), + HTTP_INVALID_ENCODING_FORMAT = (NETSTACK_E_BASE + 61), /** @brief Maximum file size exceeded. */ - FILE_TOO_LARGE = (NETSTACK_E_BASE + 63), + HTTP_FILE_TOO_LARGE = (NETSTACK_E_BASE + 63), /** @brief Remote disk full. */ - REMOTE_DISK_FULL = (NETSTACK_E_BASE + 70), + HTTP_REMOTE_DISK_FULL = (NETSTACK_E_BASE + 70), /** @brief Remote file already exists. */ - REMOTE_FILE_EXISTS = (NETSTACK_E_BASE + 73), + HTTP_REMOTE_FILE_EXISTS = (NETSTACK_E_BASE + 73), /** @brief The SSL CA certificate does not exist or is inaccessible. */ - SSL_CA_NOT_EXIST = (NETSTACK_E_BASE + 77), + HTTP_SSL_CA_NOT_EXIST = (NETSTACK_E_BASE + 77), /** @brief Remote file not found. */ - REMOTE_FILE_NOT_FOUND = (NETSTACK_E_BASE + 78), + HTTP_REMOTE_FILE_NOT_FOUND = (NETSTACK_E_BASE + 78), /** @brief Authentication error. */ - AUTHENTICATION_ERROR = (NETSTACK_E_BASE + 94), + HTTP_AUTHENTICATION_ERROR = (NETSTACK_E_BASE + 94), /** @brief It is not allowed to access this domain. */ - ACCESS_DOMAIN_NOT_ALLOWED = (NETSTACK_E_BASE + 998), + HTTP_ACCESS_DOMAIN_NOT_ALLOWED = (NETSTACK_E_BASE + 998), /** @brief Unknown error. */ - UNKNOWN_ERROR = (NETSTACK_E_BASE + 999) + HTTP_UNKNOWN_ERROR = (NETSTACK_E_BASE + 999) } Http_ErrCode; /** * @brief Defines http response code. * * @since 20 - * @version 1.0 */ typedef enum Http_ResponseCode { /** @brief The request was successful. */ HTTP_OK = 200, /** @brief Successfully requested and created a new resource. */ - CREATED = 201, + HTTP_CREATED = 201, /** @brief The request has been accepted but has not been processed completely. */ - ACCEPTED = 202, + HTTP_ACCEPTED = 202, /** @brief Unauthorized information. The request was successful. */ - NOT_AUTHORITATIVE = 203, + HTTP_NOT_AUTHORITATIVE = 203, /** @brief No content. The server successfully processed, but did not return content. */ - NO_CONTENT = 204, + HTTP_NO_CONTENT = 204, /** @brief Reset the content. */ - RESET = 205, + HTTP_RESET = 205, /** @brief Partial content. The server successfully processed some GET requests. */ - PARTIAL = 206, + HTTP_PARTIAL = 206, /** @brief Multiple options. */ - MULT_CHOICE = 300, + 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. */ - MOVED_PERM = 301, + HTTP_MOVED_PERM = 301, /** @brief Temporary movement. */ - MOVED_TEMP = 302, + HTTP_MOVED_TEMP = 302, /** @brief View other addresses. */ - SEE_OTHER = 303, + HTTP_SEE_OTHER = 303, /** @brief Not modified. */ - NOT_MODIFIED = 304, + HTTP_NOT_MODIFIED = 304, /** @brief Using proxies. */ - USE_PROXY = 305, + HTTP_USE_PROXY = 305, /** @brief The server cannot understand the syntax error error requested by the client. */ - BAD_REQUEST = 400, + HTTP_BAD_REQUEST = 400, /** @brief Request for user authentication. */ - UNAUTHORIZED = 401, + HTTP_UNAUTHORIZED = 401, /** @brief Reserved for future use. */ - PAYMENT_REQUIRED = 402, + HTTP_PAYMENT_REQUIRED = 402, /** @brief The server understands the request from the requesting client, but refuses to execute it. */ - FORBIDDEN = 403, + HTTP_FORBIDDEN = 403, /** @brief The server was unable to find resources (web pages) based on the client's request. */ - NOT_FOUND = 404, + HTTP_NOT_FOUND = 404, /** @brief The method in the client request is prohibited. */ - BAD_METHOD = 405, + HTTP_BAD_METHOD = 405, /** @brief The server unabled to complete request based on the content characteristics requested by the client. */ - NOT_ACCEPTABLE = 406, + HTTP_NOT_ACCEPTABLE = 406, /** @brief Request authentication of the proxy's identity. */ - PROXY_AUTH = 407, + HTTP_PROXY_AUTH = 407, /** @brief The request took too long and timed out. */ - CLIENT_TIMEOUT = 408, + 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. */ - CONFLICT = 409, + HTTP_CONFLICT = 409, /** @brief The resource requested by the client no longer exists. */ - GONE = 410, + HTTP_GONE = 410, /** @brief The server is unable to process request information sent by the client without Content Length. */ - LENGTH_REQUIRED = 411, + HTTP_LENGTH_REQUIRED = 411, /** @brief The prerequisite for requesting information from the client is incorrect. */ - PRECON_FAILED = 412, + HTTP_PRECON_FAILED = 412, /** @brief The request was rejected because the requested entity was too large for the server to process. */ - ENTITY_TOO_LARGE = 413, + HTTP_ENTITY_TOO_LARGE = 413, /** @brief The requested URI is too long (usually a URL) and the server cannot process it. */ - REQ_TOO_LONG = 414, + HTTP_REQ_TOO_LONG = 414, /** @brief The server is unable to process the requested format. */ - UNSUPPORTED_TYPE = 415, + HTTP_UNSUPPORTED_TYPE = 415, /** @brief Requested Range not satisfiable. */ - RANGE_NOT_SATISFIABLE = 416, + HTTP_RANGE_NOT_SATISFIABLE = 416, /** @brief Internal server error, unable to complete the request. */ - INTERNAL_ERROR = 500, + HTTP_INTERNAL_ERROR = 500, /** @brief * The server does not support the requested functionality and cannot complete the request. */ - NOT_IMPLEMENTED = 501, + HTTP_NOT_IMPLEMENTED = 501, /** @brief The server acting as a gateway or proxy received an invalid request from the remote server. */ - BAD_GATEWAY = 502, + HTTP_BAD_GATEWAY = 502, /** @brief Due to overload or system maintenance, the server is temporarily unable to process client requests. */ - UNAVAILABLE = 503, + HTTP_UNAVAILABLE = 503, /** @brief The server acting as gateway did not obtain requests from the remote server in a timely manner. */ - GATEWAY_TIMEOUT = 504, + HTTP_GATEWAY_TIMEOUT = 504, /** @brief The version of the HTTP protocol requested by the server. */ - VERSION = 505 + HTTP_VERSION = 505 } Http_ResponseCode; /** * @brief Buffer. * * @since 20 - * @version 1.0 */ typedef struct Http_Buffer { /** Content. Buffer will not be copied. */ @@ -226,7 +221,6 @@ typedef struct Http_Buffer { * @brief Defines the address Family. * * @since 20 - * @version 1.0 */ typedef enum Http_AddressFamilyType { /** Default, The system automatically selects the IPv4 or IPv6 address of the domain name. */ @@ -241,7 +235,6 @@ typedef enum Http_AddressFamilyType { * @brief HTTP get method. * * @since 20 - * @version 1.0 */ #define NET_HTTP_METHOD_GET "GET" @@ -249,7 +242,6 @@ typedef enum Http_AddressFamilyType { * @brief HTTP head method. * * @since 20 - * @version 1.0 */ #define NET_HTTPMETHOD_HEAD "HEAD" @@ -257,7 +249,6 @@ typedef enum Http_AddressFamilyType { * @brief HTTP options method. * * @since 20 - * @version 1.0 */ #define NET_HTTPMETHOD_OPTIONS "OPTIONS" @@ -265,13 +256,11 @@ typedef enum Http_AddressFamilyType { * @brief HTTP trace method. * * @since 20 - * @version 1.0 */ #define NET_HTTPMETHOD_TRACE "TRACE" /** * @brief HTTP delete method. * @since 20 - * @version 1.0 */ #define NET_HTTPMETHOD_DELETE "DELETE" @@ -279,7 +268,6 @@ typedef enum Http_AddressFamilyType { * @brief HTTP post method. * * @since 20 - * @version 1.0 */ #define NET_HTTP_METHOD_POST "POST" @@ -287,7 +275,6 @@ typedef enum Http_AddressFamilyType { * @brief HTTP put method. * * @since 20 - * @version 1.0 */ #define NET_HTTP_METHOD_PUT "PUT" @@ -295,7 +282,6 @@ typedef enum Http_AddressFamilyType { * @brief HTTP connect method. * * @since 20 - * @version 1.0 */ #define NET_HTTP_METHOD_PATCH "CONNECT" @@ -303,7 +289,6 @@ typedef enum Http_AddressFamilyType { * @brief Defines the HTTP version. * * @since 20 - * @version 1.0 */ typedef enum Http_HttpProtocol { /** Default choose by curl. */ @@ -320,7 +305,6 @@ typedef enum Http_HttpProtocol { * @brief Defines the Cert Type. * * @since 20 - * @version 1.0 */ typedef enum Http_CertType { /** PEM Cert Type. */ @@ -335,7 +319,6 @@ typedef enum Http_CertType { * @brief Headers of the request or response. * * @since 20 - * @version 1.0 */ typedef struct Http_Headers Http_Headers; @@ -343,7 +326,6 @@ typedef struct Http_Headers Http_Headers; * @brief The value type of the header map of the request or response. * * @since 20 - * @version 1.0 */ typedef struct Http_HeaderValue { /** Value. */ @@ -356,7 +338,6 @@ typedef struct Http_HeaderValue { * @brief All key-value pairs of the headers of the request or response. * * @since 20 - * @version 1.0 */ typedef struct Http_HeaderEntry { /** Key. */ @@ -372,7 +353,6 @@ typedef struct Http_HeaderEntry { * client's identification. * * @since 20 - * @version 1.0 */ typedef struct Http_ClientCert { /** A path to a client certificate. */ @@ -389,7 +369,6 @@ typedef struct Http_ClientCert { * @brief Proxy type. Used to distinguish different proxy configurations. * * @since 20 - * @version 1.0 */ typedef enum Http_ProxyType { /** No proxy */ @@ -404,7 +383,6 @@ typedef enum Http_ProxyType { * @brief Custom proxy configuration. * * @since 20 - * @version 1.0 */ typedef struct Http_CustomProxy { /** Indicates the URL of the proxy server. If you do not set port explicitly, port will be 1080. */ @@ -417,7 +395,6 @@ typedef struct Http_CustomProxy { * @brief Proxy configuration. * * @since 20 - * @version 1.0 */ typedef struct Http_Proxy { /** Distinguish the proxy type used by the request, see {@link Http_ProxyType}. */ @@ -430,7 +407,6 @@ typedef struct Http_Proxy { * @brief Response timing information. It will be collected in {@link Http_Response.performanceTiming}. * * @since 20 - * @version 1.0 */ typedef struct Http_PerformanceTiming { /** The total time in milliseconds for the HTTP transfer, including name resolving, TCP connect etc. */ @@ -453,7 +429,6 @@ typedef struct Http_PerformanceTiming { * @brief Defines the parameters for http request options. * * @since 20 - * @version 1.0 */ typedef struct Http_RequestOptions { /** Request method. */ @@ -493,7 +468,6 @@ typedef struct Http_RequestOptions { * @brief Defines the parameters for http response. * * @since 20 - * @version 1.0 */ typedef struct Http_Response { /** Response body, see {@link Http_Buffer}. */ @@ -511,7 +485,6 @@ typedef struct Http_Response { * * @param response Indicates the response to be deleted. It is a pointer that points to {@link Http_Response}. * @since 20 - * @version 1.0 */ void (*destroyResponse)(struct Http_Response **response); } Http_Response; @@ -520,7 +493,6 @@ typedef struct Http_Response { * @brief Http request. * * @since 20 - * @version 1.0 */ typedef struct Http_Request { /** The request id for every single request. Generated by system. */ @@ -537,7 +509,6 @@ typedef struct Http_Request { * @param response Http response struct, see {@link Http_Response}. * @param errCode Response error code. * @since 20 - * @version 1.0 */ typedef void (*Http_ResponseCallback)(struct Http_Response *response, uint32_t errCode); @@ -547,7 +518,6 @@ typedef void (*Http_ResponseCallback)(struct Http_Response *response, uint32_t e * @param data Response body. * @return size_t the length of response body. * @since 20 - * @version 1.0 */ typedef size_t (*Http_OnDataReceiveCallback)(const char *data); @@ -557,7 +527,6 @@ typedef size_t (*Http_OnDataReceiveCallback)(const char *data); * @param totalSize total size. * @param transferredSize transferred size. * @since 20 - * @version 1.0 */ typedef void (*Http_OnProgressCallback)(uint64_t totalSize, uint64_t transferredSize); @@ -566,7 +535,6 @@ typedef void (*Http_OnProgressCallback)(uint64_t totalSize, uint64_t transferred * * @param headers Headers of the received requests, which points to the pointer of {@link Http_Headers}. * @since 20 - * @version 1.0 */ typedef void (*Http_OnHeaderReceiveCallback)(Http_Headers *headers); @@ -574,7 +542,6 @@ typedef void (*Http_OnHeaderReceiveCallback)(Http_Headers *headers); * @brief Empty callback function for requested DataEnd or Canceled event callback。 * * @since 20 - * @version 1.0 */ typedef void (*Http_OnVoidCallback)(void); @@ -582,7 +549,6 @@ typedef void (*Http_OnVoidCallback)(void); * @brief Callbacks to watch different events. * * @since 20 - * @version 1.0 */ typedef struct Http_EventsHandler { /** Callback function when the response body is received */ -- Gitee From 2094c7e5125951cb16cfcde1c79ce12b6e453720 Mon Sep 17 00:00:00 2001 From: liuleimin_hw Date: Mon, 26 May 2025 09:34:34 +0000 Subject: [PATCH 028/100] update network/netstack/net_http/net_http.h. Signed-off-by: liuleimin_hw --- network/netstack/net_http/net_http.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/network/netstack/net_http/net_http.h b/network/netstack/net_http/net_http.h index 25cf8a3d9..58d78cd21 100644 --- a/network/netstack/net_http/net_http.h +++ b/network/netstack/net_http/net_http.h @@ -60,7 +60,7 @@ 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. + * @param headers Pointer to the {@link Http_Headers} to be destroyed, headers ends with null. * @syscap SystemCapability.Communication.NetStack * @since 20 * @version 1.0 @@ -106,7 +106,7 @@ 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. + * @param headerEntry Pointer to the {@link Http_HeaderEntry} to be destroyed, headerEntry ends with null. * @syscap SystemCapability.Communication.NetStack * @since 20 * @version 1.0 -- Gitee From ded2ab71892d5a951187869de5f6f21be452d513 Mon Sep 17 00:00:00 2001 From: liuleimin_hw Date: Mon, 26 May 2025 09:36:01 +0000 Subject: [PATCH 029/100] update network/netstack/net_http/net_http.h. Signed-off-by: liuleimin_hw --- network/netstack/net_http/net_http.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/network/netstack/net_http/net_http.h b/network/netstack/net_http/net_http.h index 58d78cd21..24878f4da 100644 --- a/network/netstack/net_http/net_http.h +++ b/network/netstack/net_http/net_http.h @@ -21,7 +21,6 @@ * * @syscap SystemCapability.Communication.NetStack * @since 20 - * @version 1.0 */ /** @@ -32,7 +31,6 @@ * @kit NetworkKit * @syscap SystemCapability.Communication.NetStack * @since 20 - * @version 1.0 */ #ifndef NET_HTTP_H @@ -53,7 +51,6 @@ extern "C" { * @return Http_Headers* Pointer to {@link Http_Headers}. * @syscap SystemCapability.Communication.NetStack * @since 20 - * @version 1.0 */ Http_Headers *OH_Http_CreateHeaders(void); @@ -63,7 +60,6 @@ Http_Headers *OH_Http_CreateHeaders(void); * @param headers Pointer to the {@link Http_Headers} to be destroyed, headers ends with null. * @syscap SystemCapability.Communication.NetStack * @since 20 - * @version 1.0 */ void OH_Http_DestroyHeaders(Http_Headers **headers); @@ -76,7 +72,6 @@ void OH_Http_DestroyHeaders(Http_Headers **headers); * @return uint32_t 0 - success. 401 - Parameter error. 2300027 - Out of memory. * @syscap SystemCapability.Communication.NetStack * @since 20 - * @version 1.0 */ uint32_t OH_Http_SetHeaderValue(struct Http_Headers *headers, const char *name, const char *value); @@ -88,7 +83,6 @@ uint32_t OH_Http_SetHeaderValue(struct Http_Headers *headers, const char *name, * @return Http_HeaderValue* Pointer to the obtained {@link Http_HeaderValue}. * @syscap SystemCapability.Communication.NetStack * @since 20 - * @version 1.0 */ Http_HeaderValue *OH_Http_GetHeaderValue(Http_Headers *headers, const char *name); @@ -99,7 +93,6 @@ Http_HeaderValue *OH_Http_GetHeaderValue(Http_Headers *headers, const char *name * @return Http_HeaderEntry* Pointers to all obtained key-value pairs {@link Http_HeaderEntry}. * @syscap SystemCapability.Communication.NetStack * @since 20 - * @version 1.0 */ Http_HeaderEntry *OH_Http_GetHeaderEntries(Http_Headers *headers); @@ -109,7 +102,6 @@ Http_HeaderEntry *OH_Http_GetHeaderEntries(Http_Headers *headers); * @param headerEntry Pointer to the {@link Http_HeaderEntry} to be destroyed, headerEntry ends with null. * @syscap SystemCapability.Communication.NetStack * @since 20 - * @version 1.0 */ void OH_Http_DestroyHeaderEntries(Http_HeaderEntry **headerEntry); @@ -120,7 +112,6 @@ void OH_Http_DestroyHeaderEntries(Http_HeaderEntry **headerEntry); * @return Pointer of HttpRequest if success; Null otherwise. * @syscap SystemCapability.Communication.NetStack * @since 20 - * @version 1.0 */ Http_Request *OH_Http_CreateRequest(const char *url); @@ -134,7 +125,6 @@ Http_Request *OH_Http_CreateRequest(const char *url); * @permission ohos.permission.INTERNET * @syscap SystemCapability.Communication.NetStack * @since 20 - * @version 1.0 */ int OH_Http_Request(Http_Request *request, Http_ResponseCallback callback, Http_EventsHandler handler); @@ -144,7 +134,6 @@ int OH_Http_Request(Http_Request *request, Http_ResponseCallback callback, Http_ * @param request Pointer to the http request {@link Http_Request}. * @syscap SystemCapability.Communication.NetStack * @since 20 - * @version 1.0 */ void OH_Http_Destroy(struct Http_Request **request); #ifdef __cplusplus -- Gitee From 25e2bfb39a7d1366a0e2d28a37226ba0cef65537 Mon Sep 17 00:00:00 2001 From: liuleimin_hw Date: Mon, 26 May 2025 10:37:15 +0000 Subject: [PATCH 030/100] update network/netstack/net_http/net_http_type.h. Signed-off-by: liuleimin_hw --- network/netstack/net_http/net_http_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network/netstack/net_http/net_http_type.h b/network/netstack/net_http/net_http_type.h index ff83f1a35..fb4c181f9 100644 --- a/network/netstack/net_http/net_http_type.h +++ b/network/netstack/net_http/net_http_type.h @@ -539,7 +539,7 @@ typedef void (*Http_OnProgressCallback)(uint64_t totalSize, uint64_t transferred typedef void (*Http_OnHeaderReceiveCallback)(Http_Headers *headers); /** - * @brief Empty callback function for requested DataEnd or Canceled event callback。 + * @brief Empty callback function for requested DataEnd or Canceled event callback. * * @since 20 */ -- Gitee From 1f9a554ea8c84f611a4eae5d988521aae8e6e820 Mon Sep 17 00:00:00 2001 From: liuleimin_hw Date: Mon, 26 May 2025 10:46:02 +0000 Subject: [PATCH 031/100] update network/netstack/net_http/net_http_type.h. Signed-off-by: liuleimin_hw --- network/netstack/net_http/net_http_type.h | 60 +++++++++++------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/network/netstack/net_http/net_http_type.h b/network/netstack/net_http/net_http_type.h index fb4c181f9..d495ef7b2 100644 --- a/network/netstack/net_http/net_http_type.h +++ b/network/netstack/net_http/net_http_type.h @@ -58,65 +58,65 @@ typedef enum Http_ErrCode { /** @brief Error code base. */ HTTP_NETSTACK_E_BASE = 2300000, /** @brief Unsupported protocol. */ - HTTP_UNSUPPORTED_PROTOCOL = (NETSTACK_E_BASE + 1), + HTTP_UNSUPPORTED_PROTOCOL = (HTTP_NETSTACK_E_BASE + 1), /** @brief Invalid URL format or missing URL. */ - HTTP_INVALID_URL = (NETSTACK_E_BASE + 3), + HTTP_INVALID_URL = (HTTP_NETSTACK_E_BASE + 3), /** @brief Failed to resolve the proxy name. */ - HTTP_RESOLVE_PROXY_FAILED = (NETSTACK_E_BASE + 5), + HTTP_RESOLVE_PROXY_FAILED = (HTTP_NETSTACK_E_BASE + 5), /** @brief Failed to resolve the host name. */ - HTTP_RESOLVE_HOST_FAILED = (NETSTACK_E_BASE + 6), + HTTP_RESOLVE_HOST_FAILED = (HTTP_NETSTACK_E_BASE + 6), /** @brief Failed to connect to the server. */ - HTTP_CONNECT_SERVER_FAILED = (NETSTACK_E_BASE + 7), + HTTP_CONNECT_SERVER_FAILED = (HTTP_NETSTACK_E_BASE + 7), /** @brief Invalid server response. */ - HTTP_INVALID_SERVER_RESPONSE = (NETSTACK_E_BASE + 8), + HTTP_INVALID_SERVER_RESPONSE = (HTTP_NETSTACK_E_BASE + 8), /** @brief Access to the remote resource denied. */ - HTTP_ACCESS_REMOTE_DENIED = (NETSTACK_E_BASE + 9), + HTTP_ACCESS_REMOTE_DENIED = (HTTP_NETSTACK_E_BASE + 9), /** @brief Error in the HTTP2 framing layer. */ - HTTP_HTTP2_FRAMING_ERROR = (NETSTACK_E_BASE + 16), + HTTP_HTTP2_FRAMING_ERROR = (HTTP_NETSTACK_E_BASE + 16), /** @brief Transferred a partial file. */ - HTTP_TRANSFER_PARTIAL_FILE = (NETSTACK_E_BASE + 18), + HTTP_TRANSFER_PARTIAL_FILE = (HTTP_NETSTACK_E_BASE + 18), /** @brief Failed to write the received data to the disk or application. */ - HTTP_WRITE_DATA_FAILED = (NETSTACK_E_BASE + 23), + HTTP_WRITE_DATA_FAILED = (HTTP_NETSTACK_E_BASE + 23), /** @brief Upload failed. */ - HTTP_UPLOAD_FAILED = (NETSTACK_E_BASE + 25), + HTTP_UPLOAD_FAILED = (HTTP_NETSTACK_E_BASE + 25), /** @brief Failed to open or read local data from the file or application. */ - HTTP_OPEN_LOCAL_DATA_FAILED = (NETSTACK_E_BASE + 26), + HTTP_OPEN_LOCAL_DATA_FAILED = (HTTP_NETSTACK_E_BASE + 26), /** @brief Out of memory. */ - HTTP_OUT_OF_MEMORY = (NETSTACK_E_BASE + 27), + HTTP_OUT_OF_MEMORY = (HTTP_NETSTACK_E_BASE + 27), /** @brief Operation timeout. */ - HTTP_OPERATION_TIMEOUT = (NETSTACK_E_BASE + 28), + HTTP_OPERATION_TIMEOUT = (HTTP_NETSTACK_E_BASE + 28), /** @brief The number of redirections reaches the maximum allowed. */ - HTTP_REDIRECTIONS_TOO_LARGE = (NETSTACK_E_BASE + 47), + HTTP_REDIRECTIONS_TOO_LARGE = (HTTP_NETSTACK_E_BASE + 47), /** @brief The server returned nothing (no header or data). */ - HTTP_SERVER_RETURNED_NOTHING = (NETSTACK_E_BASE + 52), + HTTP_SERVER_RETURNED_NOTHING = (HTTP_NETSTACK_E_BASE + 52), /** @brief Failed to send data to the peer. */ - HTTP_SEND_DATA_FAILED = (NETSTACK_E_BASE + 55), + HTTP_SEND_DATA_FAILED = (HTTP_NETSTACK_E_BASE + 55), /** @brief Failed to receive data from the peer. */ - HTTP_RECEIVE_DATA_FAILED = (NETSTACK_E_BASE + 56), + HTTP_RECEIVE_DATA_FAILED = (HTTP_NETSTACK_E_BASE + 56), /** @brief Local SSL certificate error. */ - HTTP_SSL_CERTIFICATE_ERROR = (NETSTACK_E_BASE + 58), + HTTP_SSL_CERTIFICATE_ERROR = (HTTP_NETSTACK_E_BASE + 58), /** @brief The specified SSL cipher cannot be used. */ - HTTP_SSL_CIPHER_USED_ERROR = (NETSTACK_E_BASE + 59), + HTTP_SSL_CIPHER_USED_ERROR = (HTTP_NETSTACK_E_BASE + 59), /** @brief Invalid SSL peer certificate or SSH remote key. */ - HTTP_INVALID_SSL_PEER_CERT = (NETSTACK_E_BASE + 60), + HTTP_INVALID_SSL_PEER_CERT = (HTTP_NETSTACK_E_BASE + 60), /** @brief Invalid HTTP encoding format. */ - HTTP_INVALID_ENCODING_FORMAT = (NETSTACK_E_BASE + 61), + HTTP_INVALID_ENCODING_FORMAT = (HTTP_NETSTACK_E_BASE + 61), /** @brief Maximum file size exceeded. */ - HTTP_FILE_TOO_LARGE = (NETSTACK_E_BASE + 63), + HTTP_FILE_TOO_LARGE = (HTTP_NETSTACK_E_BASE + 63), /** @brief Remote disk full. */ - HTTP_REMOTE_DISK_FULL = (NETSTACK_E_BASE + 70), + HTTP_REMOTE_DISK_FULL = (HTTP_NETSTACK_E_BASE + 70), /** @brief Remote file already exists. */ - HTTP_REMOTE_FILE_EXISTS = (NETSTACK_E_BASE + 73), + HTTP_REMOTE_FILE_EXISTS = (HTTP_NETSTACK_E_BASE + 73), /** @brief The SSL CA certificate does not exist or is inaccessible. */ - HTTP_SSL_CA_NOT_EXIST = (NETSTACK_E_BASE + 77), + HTTP_SSL_CA_NOT_EXIST = (HTTP_NETSTACK_E_BASE + 77), /** @brief Remote file not found. */ - HTTP_REMOTE_FILE_NOT_FOUND = (NETSTACK_E_BASE + 78), + HTTP_REMOTE_FILE_NOT_FOUND = (HTTP_NETSTACK_E_BASE + 78), /** @brief Authentication error. */ - HTTP_AUTHENTICATION_ERROR = (NETSTACK_E_BASE + 94), + HTTP_AUTHENTICATION_ERROR = (HTTP_NETSTACK_E_BASE + 94), /** @brief It is not allowed to access this domain. */ - HTTP_ACCESS_DOMAIN_NOT_ALLOWED = (NETSTACK_E_BASE + 998), + HTTP_ACCESS_DOMAIN_NOT_ALLOWED = (HTTP_NETSTACK_E_BASE + 998), /** @brief Unknown error. */ - HTTP_UNKNOWN_ERROR = (NETSTACK_E_BASE + 999) + HTTP_UNKNOWN_ERROR = (HTTP_NETSTACK_E_BASE + 999) } Http_ErrCode; /** -- Gitee From 4eb0cc251fd3ed07ea9b5710661b687a1d620543 Mon Sep 17 00:00:00 2001 From: liuleimin_hw Date: Mon, 26 May 2025 11:22:56 +0000 Subject: [PATCH 032/100] update network/netstack/net_http/net_http_type.h. Signed-off-by: liuleimin_hw --- network/netstack/net_http/net_http_type.h | 70 +++++++++++------------ 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/network/netstack/net_http/net_http_type.h b/network/netstack/net_http/net_http_type.h index d495ef7b2..dd6f9bbc0 100644 --- a/network/netstack/net_http/net_http_type.h +++ b/network/netstack/net_http/net_http_type.h @@ -50,73 +50,73 @@ extern "C" { */ typedef enum Http_ErrCode { /** Operation success. */ - HTTP_RESULT_OK = 0, + HTTP_NDK_RESULT_OK = 0, /** @brief Parameter error. */ - HTTP_PARAMETER_ERROR = 401, + HTTP_NDK_PARAMETER_ERROR = 401, /** @brief Permission denied. */ - HTTP_PERMISSION_DENIED = 201, + HTTP_NDK_PERMISSION_DENIED = 201, /** @brief Error code base. */ - HTTP_NETSTACK_E_BASE = 2300000, + HTTP_NDK_NETSTACK_E_BASE = 2300000, /** @brief Unsupported protocol. */ - HTTP_UNSUPPORTED_PROTOCOL = (HTTP_NETSTACK_E_BASE + 1), + HTTP_NDK_UNSUPPORTED_PROTOCOL = (HTTP_NDK_NETSTACK_E_BASE + 1), /** @brief Invalid URL format or missing URL. */ - HTTP_INVALID_URL = (HTTP_NETSTACK_E_BASE + 3), + HTTP_NDK_INVALID_URL = (HTTP_NDK_NETSTACK_E_BASE + 3), /** @brief Failed to resolve the proxy name. */ - HTTP_RESOLVE_PROXY_FAILED = (HTTP_NETSTACK_E_BASE + 5), + HTTP_NDK_RESOLVE_PROXY_FAILED = (HTTP_NDK_NETSTACK_E_BASE + 5), /** @brief Failed to resolve the host name. */ - HTTP_RESOLVE_HOST_FAILED = (HTTP_NETSTACK_E_BASE + 6), + HTTP_NDK_RESOLVE_HOST_FAILED = (HTTP_NDK_NETSTACK_E_BASE + 6), /** @brief Failed to connect to the server. */ - HTTP_CONNECT_SERVER_FAILED = (HTTP_NETSTACK_E_BASE + 7), + HTTP_NDK_CONNECT_SERVER_FAILED = (HTTP_NDK_NETSTACK_E_BASE + 7), /** @brief Invalid server response. */ - HTTP_INVALID_SERVER_RESPONSE = (HTTP_NETSTACK_E_BASE + 8), + HTTP_NDK_INVALID_SERVER_RESPONSE = (HTTP_NDK_NETSTACK_E_BASE + 8), /** @brief Access to the remote resource denied. */ - HTTP_ACCESS_REMOTE_DENIED = (HTTP_NETSTACK_E_BASE + 9), + HTTP_NDK_ACCESS_REMOTE_DENIED = (HTTP_NDK_NETSTACK_E_BASE + 9), /** @brief Error in the HTTP2 framing layer. */ - HTTP_HTTP2_FRAMING_ERROR = (HTTP_NETSTACK_E_BASE + 16), + HTTP_NDK_HTTP2_FRAMING_ERROR = (HTTP_NDK_NETSTACK_E_BASE + 16), /** @brief Transferred a partial file. */ - HTTP_TRANSFER_PARTIAL_FILE = (HTTP_NETSTACK_E_BASE + 18), + HTTP_NDK_TRANSFER_PARTIAL_FILE = (HTTP_NDK_NETSTACK_E_BASE + 18), /** @brief Failed to write the received data to the disk or application. */ - HTTP_WRITE_DATA_FAILED = (HTTP_NETSTACK_E_BASE + 23), + HTTP_NDK_WRITE_DATA_FAILED = (HTTP_NDK_NETSTACK_E_BASE + 23), /** @brief Upload failed. */ - HTTP_UPLOAD_FAILED = (HTTP_NETSTACK_E_BASE + 25), + HTTP_NDK_UPLOAD_FAILED = (HTTP_NDK_NETSTACK_E_BASE + 25), /** @brief Failed to open or read local data from the file or application. */ - HTTP_OPEN_LOCAL_DATA_FAILED = (HTTP_NETSTACK_E_BASE + 26), + HTTP_NDK_OPEN_LOCAL_DATA_FAILED = (HTTP_NDK_NETSTACK_E_BASE + 26), /** @brief Out of memory. */ - HTTP_OUT_OF_MEMORY = (HTTP_NETSTACK_E_BASE + 27), + HTTP_NDK_OUT_OF_MEMORY = (HTTP_NDK_NETSTACK_E_BASE + 27), /** @brief Operation timeout. */ - HTTP_OPERATION_TIMEOUT = (HTTP_NETSTACK_E_BASE + 28), + HTTP_NDK_OPERATION_TIMEOUT = (HTTP_NDK_NETSTACK_E_BASE + 28), /** @brief The number of redirections reaches the maximum allowed. */ - HTTP_REDIRECTIONS_TOO_LARGE = (HTTP_NETSTACK_E_BASE + 47), + HTTP_NDK_REDIRECTIONS_TOO_LARGE = (HTTP_NDK_NETSTACK_E_BASE + 47), /** @brief The server returned nothing (no header or data). */ - HTTP_SERVER_RETURNED_NOTHING = (HTTP_NETSTACK_E_BASE + 52), + HTTP_NDK_SERVER_RETURNED_NOTHING = (HTTP_NDK_NETSTACK_E_BASE + 52), /** @brief Failed to send data to the peer. */ - HTTP_SEND_DATA_FAILED = (HTTP_NETSTACK_E_BASE + 55), + HTTP_NDK_SEND_DATA_FAILED = (HTTP_NDK_NETSTACK_E_BASE + 55), /** @brief Failed to receive data from the peer. */ - HTTP_RECEIVE_DATA_FAILED = (HTTP_NETSTACK_E_BASE + 56), + HTTP_NDK_RECEIVE_DATA_FAILED = (HTTP_NDK_NETSTACK_E_BASE + 56), /** @brief Local SSL certificate error. */ - HTTP_SSL_CERTIFICATE_ERROR = (HTTP_NETSTACK_E_BASE + 58), + HTTP_NDK_SSL_CERTIFICATE_ERROR = (HTTP_NDK_NETSTACK_E_BASE + 58), /** @brief The specified SSL cipher cannot be used. */ - HTTP_SSL_CIPHER_USED_ERROR = (HTTP_NETSTACK_E_BASE + 59), + HTTP_NDK_SSL_CIPHER_USED_ERROR = (HTTP_NDK_NETSTACK_E_BASE + 59), /** @brief Invalid SSL peer certificate or SSH remote key. */ - HTTP_INVALID_SSL_PEER_CERT = (HTTP_NETSTACK_E_BASE + 60), + HTTP_NDK_INVALID_SSL_PEER_CERT = (HTTP_NDK_NETSTACK_E_BASE + 60), /** @brief Invalid HTTP encoding format. */ - HTTP_INVALID_ENCODING_FORMAT = (HTTP_NETSTACK_E_BASE + 61), + HTTP_NDK_INVALID_ENCODING_FORMAT = (HTTP_NDK_NETSTACK_E_BASE + 61), /** @brief Maximum file size exceeded. */ - HTTP_FILE_TOO_LARGE = (HTTP_NETSTACK_E_BASE + 63), + HTTP_NDK_FILE_TOO_LARGE = (HTTP_NDK_NETSTACK_E_BASE + 63), /** @brief Remote disk full. */ - HTTP_REMOTE_DISK_FULL = (HTTP_NETSTACK_E_BASE + 70), + HTTP_NDK_REMOTE_DISK_FULL = (HTTP_NDK_NETSTACK_E_BASE + 70), /** @brief Remote file already exists. */ - HTTP_REMOTE_FILE_EXISTS = (HTTP_NETSTACK_E_BASE + 73), + HTTP_NDK_REMOTE_FILE_EXISTS = (HTTP_NDK_NETSTACK_E_BASE + 73), /** @brief The SSL CA certificate does not exist or is inaccessible. */ - HTTP_SSL_CA_NOT_EXIST = (HTTP_NETSTACK_E_BASE + 77), + HTTP_NDK_SSL_CA_NOT_EXIST = (HTTP_NDK_NETSTACK_E_BASE + 77), /** @brief Remote file not found. */ - HTTP_REMOTE_FILE_NOT_FOUND = (HTTP_NETSTACK_E_BASE + 78), + HTTP_NDK_REMOTE_FILE_NOT_FOUND = (HTTP_NDK_NETSTACK_E_BASE + 78), /** @brief Authentication error. */ - HTTP_AUTHENTICATION_ERROR = (HTTP_NETSTACK_E_BASE + 94), + HTTP_NDK_AUTHENTICATION_ERROR = (HTTP_NDK_NETSTACK_E_BASE + 94), /** @brief It is not allowed to access this domain. */ - HTTP_ACCESS_DOMAIN_NOT_ALLOWED = (HTTP_NETSTACK_E_BASE + 998), + HTTP_NDK_ACCESS_DOMAIN_NOT_ALLOWED = (HTTP_NDK_NETSTACK_E_BASE + 998), /** @brief Unknown error. */ - HTTP_UNKNOWN_ERROR = (HTTP_NETSTACK_E_BASE + 999) + HTTP_NDK_UNKNOWN_ERROR = (HTTP_NDK_NETSTACK_E_BASE + 999) } Http_ErrCode; /** @@ -539,7 +539,7 @@ typedef void (*Http_OnProgressCallback)(uint64_t totalSize, uint64_t transferred typedef void (*Http_OnHeaderReceiveCallback)(Http_Headers *headers); /** - * @brief Empty callback function for requested DataEnd or Canceled event callback. + * @brief Empty callback function for requested DataEnd or Canceled event callback * * @since 20 */ -- Gitee From 8a7a0ecdce0391266cd6decfc196eab9407b62c4 Mon Sep 17 00:00:00 2001 From: liufei Date: Mon, 26 May 2025 19:24:48 +0800 Subject: [PATCH 033/100] refactor(graphic): rename text no glyph show related API - Rename OH_Drawing_TextNoGlyphShow to OH_Drawing_TextUndefinedGlyphDisplay - Rename OH_Drawing_SetTextNoGlyphShow to OH_Drawing_SetTextUndefinedGlyphDisplay - Update related header file and JSON documentation Signed-off-by: liufei --- graphic/graphic_2d/native_drawing/drawing_text_global.h | 6 +++--- .../graphic_2d/native_drawing/libnative_drawing.ndk.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_global.h b/graphic/graphic_2d/native_drawing/drawing_text_global.h index bebff3e94..3785e7476 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_global.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_global.h @@ -69,7 +69,7 @@ typedef enum { TEXT_NO_GLYPH_USE_DEFAULT = 0, /** Always render tofu blocks for missing glyphs. */ TEXT_NO_GLYPH_USE_TOFU = 1, -} OH_Drawing_TextNoGlyphShow; +} OH_Drawing_TextUndefinedGlyphDisplay; /** * @brief Sets high contrast mode of text rendering. @@ -84,11 +84,11 @@ 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 noGlyphShow Indicates a OH_Drawing_TextNoGlyphShow to be set. + * @param undefinedGlyphDisplay Indicates a OH_Drawing_TextUndefinedGlyphDisplay to be set. * @since 20 * @version 1.0 */ -void OH_Drawing_SetTextNoGlyphShow(OH_Drawing_TextNoGlyphShow noGlyphShow); +void OH_Drawing_SetTextUndefinedGlyphDisplay(OH_Drawing_TextUndefinedGlyphDisplay undefinedGlyphDisplay); #ifdef __cplusplus } #endif diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 405224423..f1a54e964 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1860,6 +1860,6 @@ }, { "first_introduced": "20", - "name": "OH_Drawing_SetTextNoGlyphShow" + "name": "OH_Drawing_SetTextUndefinedGlyphDisplay" } ] \ No newline at end of file -- Gitee From 094024de0cd35cbad66526f2c3fac8c80fd0694c Mon Sep 17 00:00:00 2001 From: guanzengkun Date: Mon, 26 May 2025 19:17:00 +0800 Subject: [PATCH 034/100] =?UTF-8?q?Image=E6=96=B0=E5=A2=9Esyncload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: guanzengkun --- arkui/ace_engine/native/native_node.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index eb051dfae..f7bd3c684 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -2687,6 +2687,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. -- Gitee From f3b72c80d05c7a61faec40ae5a1090a261b6d621 Mon Sep 17 00:00:00 2001 From: liuleimin_hw Date: Mon, 26 May 2025 12:10:37 +0000 Subject: [PATCH 035/100] update network/netstack/net_http/net_http_type.h. Signed-off-by: liuleimin_hw --- network/netstack/net_http/net_http_type.h | 72 +++++++++++------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/network/netstack/net_http/net_http_type.h b/network/netstack/net_http/net_http_type.h index dd6f9bbc0..75dc035ba 100644 --- a/network/netstack/net_http/net_http_type.h +++ b/network/netstack/net_http/net_http_type.h @@ -126,83 +126,83 @@ typedef enum Http_ErrCode { */ typedef enum Http_ResponseCode { /** @brief The request was successful. */ - HTTP_OK = 200, + HTTP_NDK_OK = 200, /** @brief Successfully requested and created a new resource. */ - HTTP_CREATED = 201, + HTTP_NDK_CREATED = 201, /** @brief The request has been accepted but has not been processed completely. */ - HTTP_ACCEPTED = 202, + HTTP_NDK_ACCEPTED = 202, /** @brief Unauthorized information. The request was successful. */ - HTTP_NOT_AUTHORITATIVE = 203, + HTTP_NDK_NOT_AUTHORITATIVE = 203, /** @brief No content. The server successfully processed, but did not return content. */ - HTTP_NO_CONTENT = 204, + HTTP_NDK_NO_CONTENT = 204, /** @brief Reset the content. */ - HTTP_RESET = 205, + HTTP_NDK_RESET = 205, /** @brief Partial content. The server successfully processed some GET requests. */ - HTTP_PARTIAL = 206, + HTTP_NDK_PARTIAL = 206, /** @brief Multiple options. */ - HTTP_MULT_CHOICE = 300, + HTTP_NDK_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. */ - HTTP_MOVED_PERM = 301, + HTTP_NDK_MOVED_PERM = 301, /** @brief Temporary movement. */ - HTTP_MOVED_TEMP = 302, + HTTP_NDK_MOVED_TEMP = 302, /** @brief View other addresses. */ - HTTP_SEE_OTHER = 303, + HTTP_NDK_SEE_OTHER = 303, /** @brief Not modified. */ - HTTP_NOT_MODIFIED = 304, + HTTP_NDK_NOT_MODIFIED = 304, /** @brief Using proxies. */ - HTTP_USE_PROXY = 305, + HTTP_NDK_USE_PROXY = 305, /** @brief The server cannot understand the syntax error error requested by the client. */ - HTTP_BAD_REQUEST = 400, + HTTP_NDK_BAD_REQUEST = 400, /** @brief Request for user authentication. */ - HTTP_UNAUTHORIZED = 401, + HTTP_NDK_UNAUTHORIZED = 401, /** @brief Reserved for future use. */ - HTTP_PAYMENT_REQUIRED = 402, + HTTP_NDK_PAYMENT_REQUIRED = 402, /** @brief The server understands the request from the requesting client, but refuses to execute it. */ - HTTP_FORBIDDEN = 403, + HTTP_NDK_FORBIDDEN = 403, /** @brief The server was unable to find resources (web pages) based on the client's request. */ - HTTP_NOT_FOUND = 404, + HTTP_NDK_NOT_FOUND = 404, /** @brief The method in the client request is prohibited. */ - HTTP_BAD_METHOD = 405, + HTTP_NDK_BAD_METHOD = 405, /** @brief The server unabled to complete request based on the content characteristics requested by the client. */ - HTTP_NOT_ACCEPTABLE = 406, + HTTP_NDK_NOT_ACCEPTABLE = 406, /** @brief Request authentication of the proxy's identity. */ - HTTP_PROXY_AUTH = 407, + HTTP_NDK_PROXY_AUTH = 407, /** @brief The request took too long and timed out. */ - HTTP_CLIENT_TIMEOUT = 408, + HTTP_NDK_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. */ - HTTP_CONFLICT = 409, + HTTP_NDK_CONFLICT = 409, /** @brief The resource requested by the client no longer exists. */ - HTTP_GONE = 410, + HTTP_NDK_GONE = 410, /** @brief The server is unable to process request information sent by the client without Content Length. */ - HTTP_LENGTH_REQUIRED = 411, + HTTP_NDK_LENGTH_REQUIRED = 411, /** @brief The prerequisite for requesting information from the client is incorrect. */ - HTTP_PRECON_FAILED = 412, + HTTP_NDK_PRECON_FAILED = 412, /** @brief The request was rejected because the requested entity was too large for the server to process. */ - HTTP_ENTITY_TOO_LARGE = 413, + HTTP_NDK_ENTITY_TOO_LARGE = 413, /** @brief The requested URI is too long (usually a URL) and the server cannot process it. */ - HTTP_REQ_TOO_LONG = 414, + HTTP_NDK_REQ_TOO_LONG = 414, /** @brief The server is unable to process the requested format. */ - HTTP_UNSUPPORTED_TYPE = 415, + HTTP_NDK_UNSUPPORTED_TYPE = 415, /** @brief Requested Range not satisfiable. */ - HTTP_RANGE_NOT_SATISFIABLE = 416, + HTTP_NDK_RANGE_NOT_SATISFIABLE = 416, /** @brief Internal server error, unable to complete the request. */ - HTTP_INTERNAL_ERROR = 500, + HTTP_NDK_INTERNAL_ERROR = 500, /** @brief * The server does not support the requested functionality and cannot complete the request. */ - HTTP_NOT_IMPLEMENTED = 501, + HTTP_NDK_NOT_IMPLEMENTED = 501, /** @brief The server acting as a gateway or proxy received an invalid request from the remote server. */ - HTTP_BAD_GATEWAY = 502, + HTTP_NDK_BAD_GATEWAY = 502, /** @brief Due to overload or system maintenance, the server is temporarily unable to process client requests. */ - HTTP_UNAVAILABLE = 503, + HTTP_NDK_UNAVAILABLE = 503, /** @brief The server acting as gateway did not obtain requests from the remote server in a timely manner. */ - HTTP_GATEWAY_TIMEOUT = 504, + HTTP_NDK_GATEWAY_TIMEOUT = 504, /** @brief The version of the HTTP protocol requested by the server. */ - HTTP_VERSION = 505 + HTTP_NDK_VERSION = 505 } Http_ResponseCode; /** -- Gitee From d045bee0c057ea21691d84010519c430a6a0b927 Mon Sep 17 00:00:00 2001 From: liuleimin_hw Date: Mon, 26 May 2025 13:57:09 +0000 Subject: [PATCH 036/100] update network/netstack/net_http/net_http_type.h. Signed-off-by: liuleimin_hw --- network/netstack/net_http/net_http_type.h | 140 +++++++++++----------- 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/network/netstack/net_http/net_http_type.h b/network/netstack/net_http/net_http_type.h index 75dc035ba..0c0055ba1 100644 --- a/network/netstack/net_http/net_http_type.h +++ b/network/netstack/net_http/net_http_type.h @@ -50,73 +50,73 @@ extern "C" { */ typedef enum Http_ErrCode { /** Operation success. */ - HTTP_NDK_RESULT_OK = 0, + OH_HTTP_RESULT_OK = 0, /** @brief Parameter error. */ - HTTP_NDK_PARAMETER_ERROR = 401, + OH_HTTP_PARAMETER_ERROR = 401, /** @brief Permission denied. */ - HTTP_NDK_PERMISSION_DENIED = 201, + OH_HTTP_PERMISSION_DENIED = 201, /** @brief Error code base. */ - HTTP_NDK_NETSTACK_E_BASE = 2300000, + OH_HTTP_NETSTACK_E_BASE = 2300000, /** @brief Unsupported protocol. */ - HTTP_NDK_UNSUPPORTED_PROTOCOL = (HTTP_NDK_NETSTACK_E_BASE + 1), + OH_HTTP_UNSUPPORTED_PROTOCOL = (OH_HTTP_NETSTACK_E_BASE + 1), /** @brief Invalid URL format or missing URL. */ - HTTP_NDK_INVALID_URL = (HTTP_NDK_NETSTACK_E_BASE + 3), + OH_HTTP_INVALID_URL = (OH_HTTP_NETSTACK_E_BASE + 3), /** @brief Failed to resolve the proxy name. */ - HTTP_NDK_RESOLVE_PROXY_FAILED = (HTTP_NDK_NETSTACK_E_BASE + 5), + OH_HTTP_RESOLVE_PROXY_FAILED = (OH_HTTP_NETSTACK_E_BASE + 5), /** @brief Failed to resolve the host name. */ - HTTP_NDK_RESOLVE_HOST_FAILED = (HTTP_NDK_NETSTACK_E_BASE + 6), + OH_HTTP_RESOLVE_HOST_FAILED = (OH_HTTP_NETSTACK_E_BASE + 6), /** @brief Failed to connect to the server. */ - HTTP_NDK_CONNECT_SERVER_FAILED = (HTTP_NDK_NETSTACK_E_BASE + 7), + OH_HTTP_CONNECT_SERVER_FAILED = (OH_HTTP_NETSTACK_E_BASE + 7), /** @brief Invalid server response. */ - HTTP_NDK_INVALID_SERVER_RESPONSE = (HTTP_NDK_NETSTACK_E_BASE + 8), + OH_HTTP_INVALID_SERVER_RESPONSE = (OH_HTTP_NETSTACK_E_BASE + 8), /** @brief Access to the remote resource denied. */ - HTTP_NDK_ACCESS_REMOTE_DENIED = (HTTP_NDK_NETSTACK_E_BASE + 9), + OH_HTTP_ACCESS_REMOTE_DENIED = (OH_HTTP_NETSTACK_E_BASE + 9), /** @brief Error in the HTTP2 framing layer. */ - HTTP_NDK_HTTP2_FRAMING_ERROR = (HTTP_NDK_NETSTACK_E_BASE + 16), + OH_HTTP_HTTP2_FRAMING_ERROR = (OH_HTTP_NETSTACK_E_BASE + 16), /** @brief Transferred a partial file. */ - HTTP_NDK_TRANSFER_PARTIAL_FILE = (HTTP_NDK_NETSTACK_E_BASE + 18), + OH_HTTP_TRANSFER_PARTIAL_FILE = (OH_HTTP_NETSTACK_E_BASE + 18), /** @brief Failed to write the received data to the disk or application. */ - HTTP_NDK_WRITE_DATA_FAILED = (HTTP_NDK_NETSTACK_E_BASE + 23), + OH_HTTP_WRITE_DATA_FAILED = (OH_HTTP_NETSTACK_E_BASE + 23), /** @brief Upload failed. */ - HTTP_NDK_UPLOAD_FAILED = (HTTP_NDK_NETSTACK_E_BASE + 25), + OH_HTTP_UPLOAD_FAILED = (OH_HTTP_NETSTACK_E_BASE + 25), /** @brief Failed to open or read local data from the file or application. */ - HTTP_NDK_OPEN_LOCAL_DATA_FAILED = (HTTP_NDK_NETSTACK_E_BASE + 26), + OH_HTTP_OPEN_LOCAL_DATA_FAILED = (OH_HTTP_NETSTACK_E_BASE + 26), /** @brief Out of memory. */ - HTTP_NDK_OUT_OF_MEMORY = (HTTP_NDK_NETSTACK_E_BASE + 27), + OH_HTTP_OUT_OF_MEMORY = (OH_HTTP_NETSTACK_E_BASE + 27), /** @brief Operation timeout. */ - HTTP_NDK_OPERATION_TIMEOUT = (HTTP_NDK_NETSTACK_E_BASE + 28), + OH_HTTP_OPERATION_TIMEOUT = (OH_HTTP_NETSTACK_E_BASE + 28), /** @brief The number of redirections reaches the maximum allowed. */ - HTTP_NDK_REDIRECTIONS_TOO_LARGE = (HTTP_NDK_NETSTACK_E_BASE + 47), + OH_HTTP_REDIRECTIONS_TOO_LARGE = (OH_HTTP_NETSTACK_E_BASE + 47), /** @brief The server returned nothing (no header or data). */ - HTTP_NDK_SERVER_RETURNED_NOTHING = (HTTP_NDK_NETSTACK_E_BASE + 52), + OH_HTTP_SERVER_RETURNED_NOTHING = (OH_HTTP_NETSTACK_E_BASE + 52), /** @brief Failed to send data to the peer. */ - HTTP_NDK_SEND_DATA_FAILED = (HTTP_NDK_NETSTACK_E_BASE + 55), + OH_HTTP_SEND_DATA_FAILED = (OH_HTTP_NETSTACK_E_BASE + 55), /** @brief Failed to receive data from the peer. */ - HTTP_NDK_RECEIVE_DATA_FAILED = (HTTP_NDK_NETSTACK_E_BASE + 56), + OH_HTTP_RECEIVE_DATA_FAILED = (OH_HTTP_NETSTACK_E_BASE + 56), /** @brief Local SSL certificate error. */ - HTTP_NDK_SSL_CERTIFICATE_ERROR = (HTTP_NDK_NETSTACK_E_BASE + 58), + OH_HTTP_SSL_CERTIFICATE_ERROR = (OH_HTTP_NETSTACK_E_BASE + 58), /** @brief The specified SSL cipher cannot be used. */ - HTTP_NDK_SSL_CIPHER_USED_ERROR = (HTTP_NDK_NETSTACK_E_BASE + 59), + OH_HTTP_SSL_CIPHER_USED_ERROR = (OH_HTTP_NETSTACK_E_BASE + 59), /** @brief Invalid SSL peer certificate or SSH remote key. */ - HTTP_NDK_INVALID_SSL_PEER_CERT = (HTTP_NDK_NETSTACK_E_BASE + 60), + OH_HTTP_INVALID_SSL_PEER_CERT = (OH_HTTP_NETSTACK_E_BASE + 60), /** @brief Invalid HTTP encoding format. */ - HTTP_NDK_INVALID_ENCODING_FORMAT = (HTTP_NDK_NETSTACK_E_BASE + 61), + OH_HTTP_INVALID_ENCODING_FORMAT = (OH_HTTP_NETSTACK_E_BASE + 61), /** @brief Maximum file size exceeded. */ - HTTP_NDK_FILE_TOO_LARGE = (HTTP_NDK_NETSTACK_E_BASE + 63), + OH_HTTP_FILE_TOO_LARGE = (OH_HTTP_NETSTACK_E_BASE + 63), /** @brief Remote disk full. */ - HTTP_NDK_REMOTE_DISK_FULL = (HTTP_NDK_NETSTACK_E_BASE + 70), + OH_HTTP_REMOTE_DISK_FULL = (OH_HTTP_NETSTACK_E_BASE + 70), /** @brief Remote file already exists. */ - HTTP_NDK_REMOTE_FILE_EXISTS = (HTTP_NDK_NETSTACK_E_BASE + 73), + OH_HTTP_REMOTE_FILE_EXISTS = (OH_HTTP_NETSTACK_E_BASE + 73), /** @brief The SSL CA certificate does not exist or is inaccessible. */ - HTTP_NDK_SSL_CA_NOT_EXIST = (HTTP_NDK_NETSTACK_E_BASE + 77), + OH_HTTP_SSL_CA_NOT_EXIST = (OH_HTTP_NETSTACK_E_BASE + 77), /** @brief Remote file not found. */ - HTTP_NDK_REMOTE_FILE_NOT_FOUND = (HTTP_NDK_NETSTACK_E_BASE + 78), + OH_HTTP_REMOTE_FILE_NOT_FOUND = (OH_HTTP_NETSTACK_E_BASE + 78), /** @brief Authentication error. */ - HTTP_NDK_AUTHENTICATION_ERROR = (HTTP_NDK_NETSTACK_E_BASE + 94), + OH_HTTP_AUTHENTICATION_ERROR = (OH_HTTP_NETSTACK_E_BASE + 94), /** @brief It is not allowed to access this domain. */ - HTTP_NDK_ACCESS_DOMAIN_NOT_ALLOWED = (HTTP_NDK_NETSTACK_E_BASE + 998), + OH_HTTP_ACCESS_DOMAIN_NOT_ALLOWED = (OH_HTTP_NETSTACK_E_BASE + 998), /** @brief Unknown error. */ - HTTP_NDK_UNKNOWN_ERROR = (HTTP_NDK_NETSTACK_E_BASE + 999) + OH_HTTP_UNKNOWN_ERROR = (OH_HTTP_NETSTACK_E_BASE + 999) } Http_ErrCode; /** @@ -126,83 +126,83 @@ typedef enum Http_ErrCode { */ typedef enum Http_ResponseCode { /** @brief The request was successful. */ - HTTP_NDK_OK = 200, + OH_HTTP_OK = 200, /** @brief Successfully requested and created a new resource. */ - HTTP_NDK_CREATED = 201, + OH_HTTP_CREATED = 201, /** @brief The request has been accepted but has not been processed completely. */ - HTTP_NDK_ACCEPTED = 202, + OH_HTTP_ACCEPTED = 202, /** @brief Unauthorized information. The request was successful. */ - HTTP_NDK_NOT_AUTHORITATIVE = 203, + OH_HTTP_NOT_AUTHORITATIVE = 203, /** @brief No content. The server successfully processed, but did not return content. */ - HTTP_NDK_NO_CONTENT = 204, + OH_HTTP_NO_CONTENT = 204, /** @brief Reset the content. */ - HTTP_NDK_RESET = 205, + OH_HTTP_RESET = 205, /** @brief Partial content. The server successfully processed some GET requests. */ - HTTP_NDK_PARTIAL = 206, + OH_HTTP_PARTIAL = 206, /** @brief Multiple options. */ - HTTP_NDK_MULT_CHOICE = 300, + 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. */ - HTTP_NDK_MOVED_PERM = 301, + OH_HTTP_MOVED_PERM = 301, /** @brief Temporary movement. */ - HTTP_NDK_MOVED_TEMP = 302, + OH_HTTP_MOVED_TEMP = 302, /** @brief View other addresses. */ - HTTP_NDK_SEE_OTHER = 303, + OH_HTTP_SEE_OTHER = 303, /** @brief Not modified. */ - HTTP_NDK_NOT_MODIFIED = 304, + OH_HTTP_NOT_MODIFIED = 304, /** @brief Using proxies. */ - HTTP_NDK_USE_PROXY = 305, + OH_HTTP_USE_PROXY = 305, /** @brief The server cannot understand the syntax error error requested by the client. */ - HTTP_NDK_BAD_REQUEST = 400, + OH_HTTP_BAD_REQUEST = 400, /** @brief Request for user authentication. */ - HTTP_NDK_UNAUTHORIZED = 401, + OH_HTTP_UNAUTHORIZED = 401, /** @brief Reserved for future use. */ - HTTP_NDK_PAYMENT_REQUIRED = 402, + OH_HTTP_PAYMENT_REQUIRED = 402, /** @brief The server understands the request from the requesting client, but refuses to execute it. */ - HTTP_NDK_FORBIDDEN = 403, + OH_HTTP_FORBIDDEN = 403, /** @brief The server was unable to find resources (web pages) based on the client's request. */ - HTTP_NDK_NOT_FOUND = 404, + OH_HTTP_NOT_FOUND = 404, /** @brief The method in the client request is prohibited. */ - HTTP_NDK_BAD_METHOD = 405, + OH_HTTP_BAD_METHOD = 405, /** @brief The server unabled to complete request based on the content characteristics requested by the client. */ - HTTP_NDK_NOT_ACCEPTABLE = 406, + OH_HTTP_NOT_ACCEPTABLE = 406, /** @brief Request authentication of the proxy's identity. */ - HTTP_NDK_PROXY_AUTH = 407, + OH_HTTP_PROXY_AUTH = 407, /** @brief The request took too long and timed out. */ - HTTP_NDK_CLIENT_TIMEOUT = 408, + 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. */ - HTTP_NDK_CONFLICT = 409, + OH_HTTP_CONFLICT = 409, /** @brief The resource requested by the client no longer exists. */ - HTTP_NDK_GONE = 410, + OH_HTTP_GONE = 410, /** @brief The server is unable to process request information sent by the client without Content Length. */ - HTTP_NDK_LENGTH_REQUIRED = 411, + OH_HTTP_LENGTH_REQUIRED = 411, /** @brief The prerequisite for requesting information from the client is incorrect. */ - HTTP_NDK_PRECON_FAILED = 412, + OH_HTTP_PRECON_FAILED = 412, /** @brief The request was rejected because the requested entity was too large for the server to process. */ - HTTP_NDK_ENTITY_TOO_LARGE = 413, + OH_HTTP_ENTITY_TOO_LARGE = 413, /** @brief The requested URI is too long (usually a URL) and the server cannot process it. */ - HTTP_NDK_REQ_TOO_LONG = 414, + OH_HTTP_REQ_TOO_LONG = 414, /** @brief The server is unable to process the requested format. */ - HTTP_NDK_UNSUPPORTED_TYPE = 415, + OH_HTTP_UNSUPPORTED_TYPE = 415, /** @brief Requested Range not satisfiable. */ - HTTP_NDK_RANGE_NOT_SATISFIABLE = 416, + OH_HTTP_RANGE_NOT_SATISFIABLE = 416, /** @brief Internal server error, unable to complete the request. */ - HTTP_NDK_INTERNAL_ERROR = 500, + OH_HTTP_INTERNAL_ERROR = 500, /** @brief * The server does not support the requested functionality and cannot complete the request. */ - HTTP_NDK_NOT_IMPLEMENTED = 501, + OH_HTTP_NOT_IMPLEMENTED = 501, /** @brief The server acting as a gateway or proxy received an invalid request from the remote server. */ - HTTP_NDK_BAD_GATEWAY = 502, + OH_HTTP_BAD_GATEWAY = 502, /** @brief Due to overload or system maintenance, the server is temporarily unable to process client requests. */ - HTTP_NDK_UNAVAILABLE = 503, + OH_HTTP_UNAVAILABLE = 503, /** @brief The server acting as gateway did not obtain requests from the remote server in a timely manner. */ - HTTP_NDK_GATEWAY_TIMEOUT = 504, + OH_HTTP_GATEWAY_TIMEOUT = 504, /** @brief The version of the HTTP protocol requested by the server. */ - HTTP_NDK_VERSION = 505 + OH_HTTP_VERSION = 505 } Http_ResponseCode; /** -- Gitee From f35887250cd0b9c02417440bb7ebd4ab0c6a7116 Mon Sep 17 00:00:00 2001 From: liuleimin_hw Date: Mon, 26 May 2025 14:27:13 +0000 Subject: [PATCH 037/100] update network/netstack/net_http/net_http_type.h. Signed-off-by: liuleimin_hw --- network/netstack/net_http/net_http_type.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/network/netstack/net_http/net_http_type.h b/network/netstack/net_http/net_http_type.h index 0c0055ba1..0ff183be8 100644 --- a/network/netstack/net_http/net_http_type.h +++ b/network/netstack/net_http/net_http_type.h @@ -224,11 +224,11 @@ typedef struct Http_Buffer { */ typedef enum Http_AddressFamilyType { /** Default, The system automatically selects the IPv4 or IPv6 address of the domain name. */ - DEFAULT = 0, + HTTP_ADDRESS_FAIMILY_DEFAULT = 0, /** IPv4, Selects the IPv4 address of the domain name. */ - ONLY_V4 = 1, + HTTP_ADDRESS_FAIMILY_ONLY_V4 = 1, /** IPv6, Selects the IPv4 address of the domain name. */ - ONLY_V6 = 2 + HTTP_ADDRESS_FAIMILY_ONLY_V6 = 2 } Http_AddressFamilyType; /** @@ -292,13 +292,13 @@ typedef enum Http_AddressFamilyType { */ typedef enum Http_HttpProtocol { /** Default choose by curl. */ - HTTP_NONE = 0, + OH_HTTP_NONE = 0, /** HTTP 1.1 version. */ - HTTP1_1, + OH_HTTP1_1, /** HTTP 2 version. */ - HTTP2, + OH_HTTP2, /** HTTP 3 version. */ - HTTP3 + OH_HTTP3 } Http_HttpProtocol; /** @@ -308,11 +308,11 @@ typedef enum Http_HttpProtocol { */ typedef enum Http_CertType { /** PEM Cert Type. */ - PEM = 0, + OH_HTTP_PEM = 0, /** DER Cert Type. */ - DER = 1, + OH_HTTP_DER = 1, /** P12 Cert Type. */ - P12 = 2 + OH_HTTP_P12 = 2 } Http_CertType; /** -- Gitee From 000c10d82433ec9df3b4305ab92be26555ed0e4f Mon Sep 17 00:00:00 2001 From: liuleimin_hw Date: Mon, 26 May 2025 14:28:34 +0000 Subject: [PATCH 038/100] update network/netstack/net_http/net_http_type.h. Signed-off-by: liuleimin_hw --- network/netstack/net_http/net_http_type.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/network/netstack/net_http/net_http_type.h b/network/netstack/net_http/net_http_type.h index 0ff183be8..849d50845 100644 --- a/network/netstack/net_http/net_http_type.h +++ b/network/netstack/net_http/net_http_type.h @@ -224,11 +224,11 @@ typedef struct Http_Buffer { */ typedef enum Http_AddressFamilyType { /** Default, The system automatically selects the IPv4 or IPv6 address of the domain name. */ - HTTP_ADDRESS_FAIMILY_DEFAULT = 0, + HTTP_ADDRESS_FAMILY_DEFAULT = 0, /** IPv4, Selects the IPv4 address of the domain name. */ - HTTP_ADDRESS_FAIMILY_ONLY_V4 = 1, + HTTP_ADDRESS_FAMILY_ONLY_V4 = 1, /** IPv6, Selects the IPv4 address of the domain name. */ - HTTP_ADDRESS_FAIMILY_ONLY_V6 = 2 + HTTP_ADDRESS_FAMILY_ONLY_V6 = 2 } Http_AddressFamilyType; /** -- Gitee From 956440b55fa60e1e83747793e18673a8b48adc18 Mon Sep 17 00:00:00 2001 From: liuleimin_hw Date: Mon, 26 May 2025 15:13:45 +0000 Subject: [PATCH 039/100] update network/netstack/net_http/net_http_type.h. Signed-off-by: liuleimin_hw --- network/netstack/net_http/net_http_type.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/network/netstack/net_http/net_http_type.h b/network/netstack/net_http/net_http_type.h index 849d50845..f02019792 100644 --- a/network/netstack/net_http/net_http_type.h +++ b/network/netstack/net_http/net_http_type.h @@ -86,7 +86,7 @@ typedef enum Http_ErrCode { /** @brief Operation timeout. */ OH_HTTP_OPERATION_TIMEOUT = (OH_HTTP_NETSTACK_E_BASE + 28), /** @brief The number of redirections reaches the maximum allowed. */ - OH_HTTP_REDIRECTIONS_TOO_LARGE = (OH_HTTP_NETSTACK_E_BASE + 47), + 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. */ @@ -193,7 +193,7 @@ typedef enum Http_ResponseCode { 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. */ + /** @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, -- Gitee From a6f52e89b2f0a43afdb56e295a9220ea94385ead Mon Sep 17 00:00:00 2001 From: wanyanglan Date: Sun, 25 May 2025 14:41:58 +0800 Subject: [PATCH 040/100] OH_Drawing_FontMeasureTextWithBrushOrPen and OH_Drawing_FontGetWidthsBounds parameter type change. Signed-off-by: wanyanglan --- graphic/graphic_2d/native_drawing/drawing_font.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_font.h b/graphic/graphic_2d/native_drawing/drawing_font.h index 81cb70dc0..cf1877365 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. -- Gitee From b104dee54c97e5710ee8be977ef38588b655af2a Mon Sep 17 00:00:00 2001 From: Jarvis Date: Tue, 27 May 2025 11:21:10 +0800 Subject: [PATCH 041/100] Add ROI Encoder Interface Signed-off-by: Jarvis --- multimedia/av_codec/native_avcodec_base.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 609dc238e..363901292 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1031,6 +1031,22 @@ 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 Media type. -- Gitee From c298d52f7b2a0f1609aa00396f61b7e7a97e4231 Mon Sep 17 00:00:00 2001 From: mobHot Date: Tue, 27 May 2025 11:32:10 +0800 Subject: [PATCH 042/100] fix the interface Signed-off-by: mobHot Change-Id: I499d22cf721b211c5bb43ff9574435e1cb56bd33 --- .../graphic_2d/native_drawing/drawing_text_run.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_run.h b/graphic/graphic_2d/native_drawing/drawing_text_run.h index 790efd05c..cd9dff6ea 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_run.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_run.h @@ -232,33 +232,33 @@ OH_Drawing_Font* OH_Drawing_GetRunFont(OH_Drawing_Run* run); OH_Drawing_TextDirection OH_Drawing_GetRunTextDirection(OH_Drawing_Run* run); /** - * @brief Gets the glyph width array. + * @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 width array object OH_Drawing_Array. + * @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 width by index. + * @brief Gets the glyph advance by index. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param positions The glyph width array object OH_Drawing_Array. + * @param advances The glyph advance array object OH_Drawing_Array. * @param index The run of glyph index. - * @return The width of glyph. + * @return Run of glyph advance pointer to an OH_Drawing_Point object. * @since 20 */ -double OH_Drawing_GetRunGlyphAdvanceByIndex(OH_Drawing_Array* advances, size_t index); +OH_Drawing_Point* OH_Drawing_GetRunGlyphAdvanceByIndex(OH_Drawing_Array* advances, size_t index); /** - * @brief Releases the memory of glyph width array. + * @brief Releases the memory of glyph advance array. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing - * @param advances The run of glyph width array object OH_Drawing_Array. + * @param advances The run of glyph advance array object OH_Drawing_Array. * @since 20 */ void OH_Drawing_DestroyRunGlyphAdvances(OH_Drawing_Array* advances); -- Gitee From b48b4b25f9e22ed4b1ce26ed3056c50afcb40cc3 Mon Sep 17 00:00:00 2001 From: zhaona45 Date: Tue, 27 May 2025 11:52:15 +0800 Subject: [PATCH 043/100] =?UTF-8?q?ImageReceiver=20on=E5=9B=9E=E8=B0=83?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E4=BC=A0=E5=85=A5=E7=94=A8=E6=88=B7=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaona45 --- .../include/image/image_common.h | 5 +++ .../include/image/image_receiver_native.h | 33 +++++++++++++++++++ .../libimage_receiver.ndk.json | 8 +++++ 3 files changed, 46 insertions(+) diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h index 43d681bb6..a001e34bf 100644 --- a/multimedia/image_framework/include/image/image_common.h +++ b/multimedia/image_framework/include/image/image_common.h @@ -233,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; /** diff --git a/multimedia/image_framework/include/image/image_receiver_native.h b/multimedia/image_framework/include/image/image_receiver_native.h index 09fef3b1b..526cd49ed 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/libimage_receiver.ndk.json b/multimedia/image_framework/libimage_receiver.ndk.json index 95058723f..2ff42d643 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" -- Gitee From 2356b69741e3ffb5ed346035cbdfaaf7edb2c59f Mon Sep 17 00:00:00 2001 From: liufei Date: Tue, 27 May 2025 15:06:16 +0800 Subject: [PATCH 044/100] refactor(graphic): rename text no glyph enum values - Rename TEXT_NO_GLYPH_USE_DEFAULT to TEXT_UNDEFINED_GLYPH_USE_DEFAULT - Rename TEXT_NO_GLYPH_USE_TOFU to TEXT_UNDEFINED_GLYPH_USE_TOFU Signed-off-by: liufei --- graphic/graphic_2d/native_drawing/drawing_text_global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_global.h b/graphic/graphic_2d/native_drawing/drawing_text_global.h index 3785e7476..eff903431 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_global.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_global.h @@ -66,9 +66,9 @@ typedef enum { */ 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, + TEXT_UNDEFINED_GLYPH_USE_DEFAULT = 0, /** Always render tofu blocks for missing glyphs. */ - TEXT_NO_GLYPH_USE_TOFU = 1, + TEXT_UNDEFINED_GLYPH_USE_TOFU = 1, } OH_Drawing_TextUndefinedGlyphDisplay; /** -- Gitee From f5f366280c04557caaa97b65c8e69aa5eccab7b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=91=E5=B1=91=E5=B1=91?= Date: Tue, 27 May 2025 15:21:04 +0800 Subject: [PATCH 045/100] fix interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 屑屑屑 --- multimedia/image_framework/include/image/image_common.h | 5 ++++- multimedia/image_framework/include/image/pixelmap_native.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h index 6d08b76ae..f86115ec5 100644 --- a/multimedia/image_framework/include/image/image_common.h +++ b/multimedia/image_framework/include/image/image_common.h @@ -184,7 +184,7 @@ typedef enum { * DMA supported hdr metadata. * @since 20 */ - IMAGE_ALLOCATOR_MODE_UNSUPPROTED = 7600501, + IMAGE_ALLOCATOR_MODE_UNSUPPORTED = 7600501, /** unknown error */ IMAGE_UNKNOWN_ERROR = 7600901, /** decode data source exception */ @@ -245,16 +245,19 @@ 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; diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 503e48bb2..c5578db6e 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -583,7 +583,7 @@ Image_ErrorCode OH_PixelmapImageInfo_GetHeight(OH_Pixelmap_ImageInfo *info, uint * @param alphaMode The number of imageinfo alphaMode. * @return Image functions result code. * {@link IMAGE_SUCCESS} if the execution is successful. - * {@link IMAGE_BAD_PARAMETER} pixelmapNative is nullptr, or pixelmapNapi is not a pixelmap. + * {@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); -- Gitee From 1c640d322c67343441f17468637dd3e6d10d00a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E4=BC=9F?= Date: Tue, 27 May 2025 07:43:23 +0000 Subject: [PATCH 046/100] update backgroundtasks/transient/libtransient_task.ndk.json. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 胡伟 --- backgroundtasks/transient/libtransient_task.ndk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backgroundtasks/transient/libtransient_task.ndk.json b/backgroundtasks/transient/libtransient_task.ndk.json index 5d777b019..1702643ba 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 -- Gitee From a138b2aade14542f5bb93bdcadd607391aa2447b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E4=BC=9F?= Date: Tue, 27 May 2025 07:44:30 +0000 Subject: [PATCH 047/100] update backgroundtasks/transient/include/transient_task_api.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 胡伟 --- backgroundtasks/transient/include/transient_task_api.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backgroundtasks/transient/include/transient_task_api.h b/backgroundtasks/transient/include/transient_task_api.h index f6ce7b659..b86753f5e 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 } -- Gitee From 44ab3c699844d9b0f24d978cbf6e31d3e00d4e4b Mon Sep 17 00:00:00 2001 From: liufei Date: Tue, 27 May 2025 16:44:41 +0800 Subject: [PATCH 048/100] style(graphic): remove redundant comments and adjust spacing - Remove duplicate comments for enum type - Adjust spacing in comments for better readability - Update file: graphic_2d/native_drawing/drawing_text_global.h Signed-off-by: liufei --- graphic/graphic_2d/native_drawing/drawing_text_global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_global.h b/graphic/graphic_2d/native_drawing/drawing_text_global.h index eff903431..a50a5402b 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_global.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_global.h @@ -60,7 +60,7 @@ typedef enum { /** * @brief Visual representations for undefined (.notdef) glyphs. - * + * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @since 20 */ @@ -82,7 +82,7 @@ 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 -- Gitee From fd33a161fcee136c723053b26e5e70f0863b0b78 Mon Sep 17 00:00:00 2001 From: shenkang Date: Tue, 27 May 2025 15:15:10 +0800 Subject: [PATCH 049/100] =?UTF-8?q?fix:=E8=B0=83=E6=95=B4system=5Fcapabili?= =?UTF-8?q?ty=5Fheaders=E5=A4=B4=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shenkang --- drivers/external_device_manager/usb/BUILD.gn | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/external_device_manager/usb/BUILD.gn b/drivers/external_device_manager/usb/BUILD.gn index 1729e8970..d20a12086 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", ] } -- Gitee From 2dc0f28dd7f285cafd28c674da4831d8f112a0e2 Mon Sep 17 00:00:00 2001 From: magekkkk Date: Mon, 28 Apr 2025 11:32:04 +0000 Subject: [PATCH 050/100] add perf doc part 2 Signed-off-by: magekkkk --- .../audio_framework/audio_renderer/native_audiorenderer.h | 8 ++++++++ .../audio_framework/common/native_audiostreambuilder.h | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h index 6ad655177..bf38bad7e 100644 --- a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h +++ b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h @@ -242,6 +242,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 * @@ -517,6 +521,10 @@ 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]{@link + * https://}. + * * @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 diff --git a/multimedia/audio_framework/common/native_audiostreambuilder.h b/multimedia/audio_framework/common/native_audiostreambuilder.h index acd0beba1..4d055545b 100644 --- a/multimedia/audio_framework/common/native_audiostreambuilder.h +++ b/multimedia/audio_framework/common/native_audiostreambuilder.h @@ -287,6 +287,10 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerCallback(OH_AudioStreamBu * 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}. + * + * 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]{@link + * https://}. * * @since 10 * -- Gitee From 15f94863be2273862adca6345ca5b78f8b499007 Mon Sep 17 00:00:00 2001 From: AOL Date: Tue, 29 Apr 2025 02:28:52 +0000 Subject: [PATCH 051/100] update urls Signed-off-by: AOL --- .../audio_framework/audio_renderer/native_audiorenderer.h | 2 +- multimedia/audio_framework/common/native_audiostreambuilder.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h index bf38bad7e..6789003ec 100644 --- a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h +++ b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h @@ -523,7 +523,7 @@ OH_AudioStream_Result OH_AudioRenderer_SetDefaultOutputDevice( * * For video synchronization usage, there is a best practice document for developer to refer * [AV Synchronization]{@link - * https://}. + * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-audio-video-synchronization}. * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param framePosition Pointer to a variable to receive the position diff --git a/multimedia/audio_framework/common/native_audiostreambuilder.h b/multimedia/audio_framework/common/native_audiostreambuilder.h index 4d055545b..67ee1de7f 100644 --- a/multimedia/audio_framework/common/native_audiostreambuilder.h +++ b/multimedia/audio_framework/common/native_audiostreambuilder.h @@ -290,7 +290,7 @@ OH_AudioStream_Result OH_AudioStreamBuilder_SetCapturerCallback(OH_AudioStreamBu * * 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]{@link - * https://}. + * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-audio-interaction-practice}. * * @since 10 * -- Gitee From f2fb22ac576b7e9d406558531550ff125042828d Mon Sep 17 00:00:00 2001 From: Trouvaille Date: Wed, 28 May 2025 15:47:18 +0800 Subject: [PATCH 052/100] =?UTF-8?q?=E5=B1=8F=E5=B9=95=E5=BD=95=E5=88=B6?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE=E9=9A=90=E7=A7=81=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E5=B1=8F=E8=94=BD=E6=A8=A1=E5=BC=8F=E6=96=B0=E5=A2=9E?= =?UTF-8?q?NDK=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Trouvaille --- multimedia/player_framework/native_avscreen_capture.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index 18d784d31..fd4fadf20 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -546,9 +546,9 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetCaptureArea(struct OH_AVScreen * @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. + * 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. -- Gitee From 4341b532be62c83800664afcbed4b255bcc7d78d Mon Sep 17 00:00:00 2001 From: Lumos235 Date: Wed, 28 May 2025 08:04:45 +0000 Subject: [PATCH 053/100] update third_party/musl/ndk_script/adapter/libc.ndk.json. Signed-off-by: Lumos235 --- third_party/musl/ndk_script/adapter/libc.ndk.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/musl/ndk_script/adapter/libc.ndk.json b/third_party/musl/ndk_script/adapter/libc.ndk.json index f9a52a2fd..14cb1dc85 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" }, -- Gitee From 6f5e033d9225374879a06b21df35c147b5d60700 Mon Sep 17 00:00:00 2001 From: yangbo_404 Date: Wed, 28 May 2025 15:51:58 +0800 Subject: [PATCH 054/100] change api version to 20 Signed-off-by: yangbo_404 --- startup/init/syscap/include/deviceinfo.h | 4 ++-- startup/init/syscap/include/syscap_ndk.h | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/startup/init/syscap/include/deviceinfo.h b/startup/init/syscap/include/deviceinfo.h index 9e7dc927b..f1c9e1577 100644 --- a/startup/init/syscap/include/deviceinfo.h +++ b/startup/init/syscap/include/deviceinfo.h @@ -162,7 +162,7 @@ int OH_GetSdkApiVersion(void); * @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); @@ -171,7 +171,7 @@ int OH_GetSdkMinorApiVersion(void); * @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); diff --git a/startup/init/syscap/include/syscap_ndk.h b/startup/init/syscap/include/syscap_ndk.h index 023107e51..e6045e855 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. * } -- Gitee From 092e818503cf855a2d0808edaef8010a6801d81a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E4=BC=9F?= Date: Wed, 28 May 2025 08:49:52 +0000 Subject: [PATCH 055/100] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E6=95=B4=E6=94=B9=EF=BC=8C=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 胡伟 --- backgroundtasks/transient/include/transient_task_api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backgroundtasks/transient/include/transient_task_api.h b/backgroundtasks/transient/include/transient_task_api.h index b86753f5e..2182d6c8b 100644 --- a/backgroundtasks/transient/include/transient_task_api.h +++ b/backgroundtasks/transient/include/transient_task_api.h @@ -111,7 +111,7 @@ int32_t OH_BackgroundTaskManager_CancelSuspendDelay(int32_t requestId); * @since 20 * @version 1.0 */ -int32_t OH_BackgroundTaskManager_GetTransientTaskInfo(TransientTask_TransientTaskInfo *transientTaskInfo); +int32_t OH_BackgroundTaskManager_GetTransientTaskInfo(TransientTask_TransientTaskInfo *transientTaskInfo); #ifdef __cplusplus } -- Gitee From 587bcac5d45a77004a365396ddcaa6b845c19c5c Mon Sep 17 00:00:00 2001 From: AOL Date: Wed, 7 May 2025 11:00:25 +0000 Subject: [PATCH 056/100] remove blank Signed-off-by: AOL Change-Id: Ie262ea254aaf5cf95f6ae0c65857f5f1655648c3 --- .../audio_renderer/native_audiorenderer.h | 5 ++--- .../common/native_audiostreambuilder.h | 17 ++++++----------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h index 6789003ec..8a59ae479 100644 --- a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h +++ b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h @@ -242,7 +242,7 @@ 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. @@ -522,8 +522,7 @@ OH_AudioStream_Result OH_AudioRenderer_SetDefaultOutputDevice( * position will be double for 2x speed playback. * * For video synchronization usage, there is a best practice document for developer to refer - * [AV Synchronization]{@link - * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-audio-video-synchronization}. + * **AV Synchronization**. * * @param renderer Reference created by OH_AudioStreamBuilder_GenerateRenderer() * @param framePosition Pointer to a variable to receive the position diff --git a/multimedia/audio_framework/common/native_audiostreambuilder.h b/multimedia/audio_framework/common/native_audiostreambuilder.h index 67ee1de7f..413d8d7f5 100644 --- a/multimedia/audio_framework/common/native_audiostreambuilder.h +++ b/multimedia/audio_framework/common/native_audiostreambuilder.h @@ -276,21 +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]{@link - * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-audio-interaction-practice}. + * scenes to consider, see **Developing an Audio Application** in best practices document. * * @since 10 * -- Gitee From 3801f9caf0e4f3d5811e15557be3e9f53a0535f5 Mon Sep 17 00:00:00 2001 From: wangyaohui Date: Wed, 28 May 2025 21:10:48 +0800 Subject: [PATCH 057/100] [fix] codeCheck Signed-off-by: wangyaohui --- arkui/window_manager/libwm.ndk.json | 6 +++--- arkui/window_manager/oh_window_pip.h | 23 +++++++++++++---------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/arkui/window_manager/libwm.ndk.json b/arkui/window_manager/libwm.ndk.json index 2b448afcc..29e1de339 100644 --- a/arkui/window_manager/libwm.ndk.json +++ b/arkui/window_manager/libwm.ndk.json @@ -157,15 +157,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 a5d3ca751..9dad3a483 100644 --- a/arkui/window_manager/oh_window_pip.h +++ b/arkui/window_manager/oh_window_pip.h @@ -161,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 @@ -191,7 +191,7 @@ typedef void (*WebPipResizeCallback)(uint32_t controllerId, uint32_t width, uint * {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} parameter error. * @since 20 */ -int32_t OH_PictureInPicture_CreatePipConfig(PictureInPicture_PipConfig pipConfig); +int32_t OH_PictureInPicture_CreatePipConfig(PictureInPicture_PipConfig* pipConfig); /** * @brief Destroy picture-in-picture config. @@ -201,7 +201,7 @@ int32_t OH_PictureInPicture_CreatePipConfig(PictureInPicture_PipConfig pipConfig * {@link WINDOW_MANAGER_ERRORCODE_INCORRECT_PARAM} parameter error. * @since 20 */ -int32_t OH_PictureInPicture_DestroyPipConfig(PictureInPicture_PipConfig pipConfig); +int32_t OH_PictureInPicture_DestroyPipConfig(PictureInPicture_PipConfig* pipConfig); /** * @brief Set picture-in-picture mainWindowId. @@ -227,7 +227,8 @@ int32_t OH_PictureInPicture_SetPipMainWindowId(PictureInPicture_PipConfig pipCon * {@link WINDOW_MANAGER_ERRORCODE_DEVICE_NOT_SUPPORTED} capability not supported. * @since 20 */ -int32_t OH_PictureInPicture_SetPipTemplateType(PictureInPicture_PipConfig pipConfig, PictureInPicture_PipTemplateType pipTemplateType); +int32_t OH_PictureInPicture_SetPipTemplateType(PictureInPicture_PipConfig pipConfig, + PictureInPicture_PipTemplateType pipTemplateType); /** * @brief Set picture-in-picture rect. @@ -305,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); @@ -319,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); @@ -409,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. @@ -420,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. @@ -434,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. @@ -447,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. -- Gitee From 2a363708a6819b453b7bcce1e3d15baf58701b45 Mon Sep 17 00:00:00 2001 From: wangdongyusky <15222869+wangdongyusky@user.noreply.gitee.com> Date: Wed, 28 May 2025 11:17:20 +0800 Subject: [PATCH 058/100] =?UTF-8?q?ndk=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wang --- multimedia/camera_framework/camera.h | 43 ++++++++++ multimedia/camera_framework/camera.ndk.json | 24 ++++++ multimedia/camera_framework/capture_session.h | 84 +++++++++++++++++++ 3 files changed, 151 insertions(+) diff --git a/multimedia/camera_framework/camera.h b/multimedia/camera_framework/camera.h index 274390abd..5dace12f1 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 e92a2841f..5bb71a86e 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 93e77e118..34ea4d17f 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 -- Gitee From 99200b3e2cb6949d88455952b329acbc9afead64 Mon Sep 17 00:00:00 2001 From: lw19901203 Date: Wed, 14 May 2025 10:36:11 +0800 Subject: [PATCH 059/100] add path ndk interface Signed-off-by: lw19901203 --- .../graphic_2d/native_drawing/drawing_path.h | 62 ++++++++++++++++++- .../native_drawing/libnative_drawing.ndk.json | 12 ++++ 2 files changed, 73 insertions(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_path.h b/graphic/graphic_2d/native_drawing/drawing_path.h index 713456d67..1f4e18a2f 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/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index cf0944999..1f6b04227 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -547,6 +547,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" -- Gitee From c38f7949e7c9f503eb140190b258821fd92112b5 Mon Sep 17 00:00:00 2001 From: wjnRance Date: Thu, 29 May 2025 20:08:21 +0800 Subject: [PATCH 060/100] =?UTF-8?q?=E6=96=87=E6=9C=AC=E5=9E=82=E7=9B=B4?= =?UTF-8?q?=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wjnRance --- arkui/ace_engine/native/native_node.h | 16 ++++++++++++++++ arkui/ace_engine/native/native_type.h | 22 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 3c85e8617..83f78efb5 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -2444,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. * diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 828ba5b7d..b94eb2080 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; /** -- Gitee From 0edf7f7e081cb20b1f21e8bf43d03e8715efdd83 Mon Sep 17 00:00:00 2001 From: Jarvis Date: Thu, 29 May 2025 20:52:21 +0800 Subject: [PATCH 061/100] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=BF=AE=E6=94=B9jso?= =?UTF-8?q?n=E6=96=87=E4=BB=B6=EF=BC=8C=E6=B7=BB=E5=8A=A0ROI=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E7=9B=B8=E5=85=B3=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jarvis --- .../av_codec/codec_base/libnative_media_codecbase.ndk.json | 4 ++++ 1 file changed, 4 insertions(+) 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 8077a4119..b985b076e 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,10 @@ "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": "10", "name": "OH_AVCodec_GetCapability" -- Gitee From a36498824a1d2bc3d6a51879d7ed0a7ecb36a7d9 Mon Sep 17 00:00:00 2001 From: Yanghaolong Date: Thu, 29 May 2025 13:31:48 +0000 Subject: [PATCH 062/100] add sqr to json Signed-off-by: Yanghaolong --- .../codec_base/libnative_media_codecbase.ndk.json | 8 ++++++++ 1 file changed, 8 insertions(+) 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 b985b076e..5da23bba5 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -427,6 +427,14 @@ "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": "10", "name": "OH_AVCodec_GetCapability" -- Gitee From 7cb82420f185af539a89913d3c0ab0c5265014e6 Mon Sep 17 00:00:00 2001 From: Yanghaolong Date: Thu, 29 May 2025 13:32:56 +0000 Subject: [PATCH 063/100] add sqr bitrate mode Signed-off-by: Yanghaolong --- multimedia/av_codec/native_avcodec_base.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 363901292..3069712f6 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1047,6 +1047,22 @@ extern const char *OH_MD_KEY_VIDEO_ENCODER_REPEAT_PREVIOUS_MAX_COUNT; * @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 Media type. -- Gitee From 4bcce198e365e43a6483525fa8527b6ae687c7f9 Mon Sep 17 00:00:00 2001 From: Yanghaolong Date: Thu, 29 May 2025 13:33:58 +0000 Subject: [PATCH 064/100] add sqr bitrate mode Signed-off-by: Yanghaolong --- multimedia/av_codec/native_avcodec_base.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 3069712f6..705b0d651 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1594,7 +1594,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 -- Gitee From 60c5420cbc42b143819291781c9f7352c7482562 Mon Sep 17 00:00:00 2001 From: Wang Hengshen Date: Thu, 29 May 2025 22:01:42 +0800 Subject: [PATCH 065/100] feat:add nearlink type Signed-off-by: Wang Hengshen --- .../audio_framework/common/native_audio_device_base.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/multimedia/audio_framework/common/native_audio_device_base.h b/multimedia/audio_framework/common/native_audio_device_base.h index beb3a5455..6654ae320 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. */ -- Gitee From c6e1b216cd5a571bbae5f37669e83e5355ad5272 Mon Sep 17 00:00:00 2001 From: zhangwenting3652 Date: Tue, 20 May 2025 14:19:36 +0800 Subject: [PATCH 066/100] add fast status query apis Signed-off-by: zhangwenting3652 --- .../audio_capturer/native_audiocapturer.h | 28 ++++++++++++++++++ .../native_audio_stream_manager.h | 28 ++++++++++++++++++ .../audio_renderer/native_audiorenderer.h | 28 ++++++++++++++++++ .../common/native_audiostream_base.h | 16 ++++++++++ .../common/native_audiostreambuilder.h | 29 +++++++++++++++++++ multimedia/audio_framework/ohaudio.ndk.json | 24 +++++++++++++++ 6 files changed, 153 insertions(+) diff --git a/multimedia/audio_framework/audio_capturer/native_audiocapturer.h b/multimedia/audio_framework/audio_capturer/native_audiocapturer.h index caf548af2..9f1644a90 100644 --- a/multimedia/audio_framework/audio_capturer/native_audiocapturer.h +++ b/multimedia/audio_framework/audio_capturer/native_audiocapturer.h @@ -344,6 +344,34 @@ typedef void (*OH_AudioCapturer_OnInterruptCallback)(OH_AudioCapturer* capturer, 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 34b4af643..4069e6439 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 6ad655177..4c7b6c24b 100644 --- a/multimedia/audio_framework/audio_renderer/native_audiorenderer.h +++ b/multimedia/audio_framework/audio_renderer/native_audiorenderer.h @@ -564,6 +564,34 @@ typedef void (*OH_AudioRenderer_OnInterruptCallback)(OH_AudioRenderer* renderer, 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_audiostream_base.h b/multimedia/audio_framework/common/native_audiostream_base.h index a951df9ad..9b763054b 100644 --- a/multimedia/audio_framework/common/native_audiostream_base.h +++ b/multimedia/audio_framework/common/native_audiostream_base.h @@ -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. diff --git a/multimedia/audio_framework/common/native_audiostreambuilder.h b/multimedia/audio_framework/common/native_audiostreambuilder.h index acd0beba1..590880183 100644 --- a/multimedia/audio_framework/common/native_audiostreambuilder.h +++ b/multimedia/audio_framework/common/native_audiostreambuilder.h @@ -517,6 +517,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 94c965bd4..73e3be08e 100644 --- a/multimedia/audio_framework/ohaudio.ndk.json +++ b/multimedia/audio_framework/ohaudio.ndk.json @@ -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" } ] -- Gitee From 7201af331c55c1caf7d569f4c6019d9449b5b968 Mon Sep 17 00:00:00 2001 From: liuwei Date: Fri, 30 May 2025 10:12:55 +0800 Subject: [PATCH 067/100] drawing colorspace interface C upload Signed-off-by: liuwei --- .../graphic_2d/native_drawing/drawing_brush.h | 86 ++++++++++++++++++- .../graphic_2d/native_drawing/drawing_pen.h | 86 ++++++++++++++++++- .../native_drawing/libnative_drawing.ndk.json | 40 +++++++++ 3 files changed, 210 insertions(+), 2 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_brush.h b/graphic/graphic_2d/native_drawing/drawing_brush.h index d677d9aec..08677fec0 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_pen.h b/graphic/graphic_2d/native_drawing/drawing_pen.h index 7465f4eba..0446d7d11 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/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index e13687d42..0f69ff4ac 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", @@ -523,11 +543,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" }, -- Gitee From 7fb50c5dd20e677c7303cf2a5d9bc3ff515d2cec Mon Sep 17 00:00:00 2001 From: liufei Date: Fri, 30 May 2025 17:28:20 +0800 Subject: [PATCH 068/100] remove @version Signed-off-by: liufei --- graphic/graphic_2d/native_drawing/drawing_register_font.h | 1 - graphic/graphic_2d/native_drawing/drawing_text_global.h | 1 - 2 files changed, 2 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_register_font.h b/graphic/graphic_2d/native_drawing/drawing_register_font.h index e82bea243..a05c06878 100644 --- a/graphic/graphic_2d/native_drawing/drawing_register_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_register_font.h @@ -85,7 +85,6 @@ uint32_t OH_Drawing_RegisterFontBuffer(OH_Drawing_FontCollection*, const char* f * @param fontFamily Indicates the family-name of the font which need to be unregistered. * @return error code. * @since 20 - * @version 1.0 */ uint32_t OH_Drawing_UnregisterFont(OH_Drawing_FontCollection* fontCollection, const char* fontFamily); #ifdef __cplusplus diff --git a/graphic/graphic_2d/native_drawing/drawing_text_global.h b/graphic/graphic_2d/native_drawing/drawing_text_global.h index a50a5402b..321d7de81 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_global.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_global.h @@ -86,7 +86,6 @@ void OH_Drawing_SetTextHighContrast(OH_Drawing_TextHighContrast action); * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param undefinedGlyphDisplay Indicates a OH_Drawing_TextUndefinedGlyphDisplay to be set. * @since 20 - * @version 1.0 */ void OH_Drawing_SetTextUndefinedGlyphDisplay(OH_Drawing_TextUndefinedGlyphDisplay undefinedGlyphDisplay); #ifdef __cplusplus -- Gitee From fe2854a26c2116466c64f288830707a868ebb062 Mon Sep 17 00:00:00 2001 From: shilei Date: Sun, 1 Jun 2025 16:49:56 +0800 Subject: [PATCH 069/100] add multicontext interface Signed-off-by: shilei Change-Id: I8d0ed6b68650b06643b0c08ee9463bc05fc279ba --- arkui/napi/libnapi.ndk.json | 4 ++++ arkui/napi/native_api.h | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/arkui/napi/libnapi.ndk.json b/arkui/napi/libnapi.ndk.json index 7460d98ae..5bdd52c33 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 332995c92..d1dc1c45c 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. -- Gitee From ae6207c6e3c0c795a255ed8aa5a4f001e190d7fb Mon Sep 17 00:00:00 2001 From: zhanghang Date: Mon, 26 May 2025 20:24:43 +0800 Subject: [PATCH 070/100] Add focus wrap mode for list Signed-off-by: zhanghang --- arkui/ace_engine/native/native_node.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index eb051dfae..b4f6c01a6 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5608,6 +5608,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. -- Gitee From 415314ef210a99edc7e6639abb9f82b7c9413597 Mon Sep 17 00:00:00 2001 From: liujiaxing19 Date: Mon, 2 Jun 2025 16:14:12 +0800 Subject: [PATCH 071/100] =?UTF-8?q?=E6=96=B0=E5=A2=9Eprocessor=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liujiaxing19 Change-Id: I04fdfc3769e9cc99fb1a8f8cb0e81fe686f7d4cb --- .../hiappevent/include/hiappevent/hiappevent.h | 15 +++++++++++++++ hiviewdfx/hiappevent/libhiappevent.ndk.json | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent.h index 8ea6331c1..6e41ae61a 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/libhiappevent.ndk.json b/hiviewdfx/hiappevent/libhiappevent.ndk.json index 98c62ebeb..23733ddde 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" } ] -- Gitee From 4c9f0cb8910d857fc8cad440f335b403e7f19ded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BE=8A=E5=A4=B4=E5=86=9B=E5=B8=88?= Date: Mon, 2 Jun 2025 11:13:17 +0800 Subject: [PATCH 072/100] add KILL_REASON event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 羊头军师 --- .../hiappevent/include/hiappevent/hiappevent_event.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h b/hiviewdfx/hiappevent/include/hiappevent/hiappevent_event.h index 63dc8cf01..06f186ed5 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. * -- Gitee From 3ae8cde61ad83b87579c52f4d01180fb17be9edb Mon Sep 17 00:00:00 2001 From: liufei Date: Tue, 3 Jun 2025 16:11:37 +0800 Subject: [PATCH 073/100] docs(graphic): update font unregister documentation - Add note to clarify that layout should be recalculated for all typography using the unregistered font family. Signed-off-by: liufei --- graphic/graphic_2d/native_drawing/drawing_register_font.h | 1 + 1 file changed, 1 insertion(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_register_font.h b/graphic/graphic_2d/native_drawing/drawing_register_font.h index a05c06878..222900415 100644 --- a/graphic/graphic_2d/native_drawing/drawing_register_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_register_font.h @@ -79,6 +79,7 @@ uint32_t OH_Drawing_RegisterFontBuffer(OH_Drawing_FontCollection*, const char* f * @brief Unregister a customized font by the font family. * Unregistering a font that is currently in used may lead to text rendering anomalies, * including garbled characters or missing glyphs. + * Layout should be recalculated for all typography using the unregistered font family. * * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing * @param fontCollection Indicates the pointer to an OH_Drawing_FontCollection object. -- Gitee From 98e7b0cfbfb5634d13a1966ffc34de118ee17e0f Mon Sep 17 00:00:00 2001 From: wangyaohui Date: Wed, 4 Jun 2025 09:36:59 +0800 Subject: [PATCH 074/100] add setInitRect interface to pip ndk Signed-off-by: wangyaohui --- arkui/window_manager/libwm.ndk.json | 8 ++++++++ arkui/window_manager/oh_window_pip.h | 29 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/arkui/window_manager/libwm.ndk.json b/arkui/window_manager/libwm.ndk.json index c7b330e10..d8df7651a 100644 --- a/arkui/window_manager/libwm.ndk.json +++ b/arkui/window_manager/libwm.ndk.json @@ -147,6 +147,14 @@ "first_instroduced":"20", "name":"OH_PictureInPicture_SetPipControlEnabled" }, + { + "first_instroduced":"20", + "name":"OH_PictureInPicture_SetPipInitialSurfaceRect" + }, + { + "first_instroduced":"20", + "name":"OH_PictureInPicture_UnsetPipInitialSurfaceRect" + }, { "first_instroduced":"20", "name":"OH_PictureInPicture_RegisterStartPipCallback" diff --git a/arkui/window_manager/oh_window_pip.h b/arkui/window_manager/oh_window_pip.h index 9dad3a483..66cd1a9e5 100644 --- a/arkui/window_manager/oh_window_pip.h +++ b/arkui/window_manager/oh_window_pip.h @@ -370,6 +370,35 @@ int32_t OH_PictureInPicture_UpdatePipControlStatus(uint32_t controllerId, Pictur int32_t OH_PictureInPicture_SetPipControlEnabled(uint32_t controllerId, PictureInPicture_PipControlType controlType, bool enabled); +/** + * @brief Set picture-in-picture initial surface rect. + * + * @param controllerId The picture-in-picture controller ID + * @param positionX The X position of the first frame when start picture-in-picture. + * @param positionY The Y position of the first frame when start picture-in-picture. + * @param width The width of the first frame when start picture-in-picture. + * @param height The height of the first frame when start picture-in-picture. + * @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. + * @since 20 + */ +int32_t OH_PictureInPicture_SetPipInitialSurfaceRect(uint32_t controllerId, uint32_t positionX, uint32_t positionY, + uint32_t width, uint32_t height); + +/** + * @brief Unset picture-in-picture initial surface rect. + * + * @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. + * @since 20 + */ +int32_t OH_PictureInPicture_UnsetPipInitialSurfaceRect(uint32_t controllerId); + /** * @brief Register picture-in-picture controller start callback. * -- Gitee From 13482981505d52658a47df6a15013bace98b0664 Mon Sep 17 00:00:00 2001 From: wangyaohui Date: Wed, 4 Jun 2025 09:40:29 +0800 Subject: [PATCH 075/100] reset Signed-off-by: wangyaohui --- arkui/window_manager/libwm.ndk.json | 8 -------- arkui/window_manager/oh_window_pip.h | 29 ---------------------------- 2 files changed, 37 deletions(-) diff --git a/arkui/window_manager/libwm.ndk.json b/arkui/window_manager/libwm.ndk.json index d8df7651a..c7b330e10 100644 --- a/arkui/window_manager/libwm.ndk.json +++ b/arkui/window_manager/libwm.ndk.json @@ -147,14 +147,6 @@ "first_instroduced":"20", "name":"OH_PictureInPicture_SetPipControlEnabled" }, - { - "first_instroduced":"20", - "name":"OH_PictureInPicture_SetPipInitialSurfaceRect" - }, - { - "first_instroduced":"20", - "name":"OH_PictureInPicture_UnsetPipInitialSurfaceRect" - }, { "first_instroduced":"20", "name":"OH_PictureInPicture_RegisterStartPipCallback" diff --git a/arkui/window_manager/oh_window_pip.h b/arkui/window_manager/oh_window_pip.h index 66cd1a9e5..9dad3a483 100644 --- a/arkui/window_manager/oh_window_pip.h +++ b/arkui/window_manager/oh_window_pip.h @@ -370,35 +370,6 @@ int32_t OH_PictureInPicture_UpdatePipControlStatus(uint32_t controllerId, Pictur int32_t OH_PictureInPicture_SetPipControlEnabled(uint32_t controllerId, PictureInPicture_PipControlType controlType, bool enabled); -/** - * @brief Set picture-in-picture initial surface rect. - * - * @param controllerId The picture-in-picture controller ID - * @param positionX The X position of the first frame when start picture-in-picture. - * @param positionY The Y position of the first frame when start picture-in-picture. - * @param width The width of the first frame when start picture-in-picture. - * @param height The height of the first frame when start picture-in-picture. - * @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. - * @since 20 - */ -int32_t OH_PictureInPicture_SetPipInitialSurfaceRect(uint32_t controllerId, uint32_t positionX, uint32_t positionY, - uint32_t width, uint32_t height); - -/** - * @brief Unset picture-in-picture initial surface rect. - * - * @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. - * @since 20 - */ -int32_t OH_PictureInPicture_UnsetPipInitialSurfaceRect(uint32_t controllerId); - /** * @brief Register picture-in-picture controller start callback. * -- Gitee From a870df2329f1f42c875f8b860a58eea8fda8511e Mon Sep 17 00:00:00 2001 From: liufei Date: Wed, 4 Jun 2025 11:26:03 +0800 Subject: [PATCH 076/100] docs(graphic): update font unregisteration documentation - Clarify the required action after unregistering a font family - Improve the documentation for OH_Drawing_UnregisterFontFamily function Signed-off-by: liufei --- graphic/graphic_2d/native_drawing/drawing_register_font.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_register_font.h b/graphic/graphic_2d/native_drawing/drawing_register_font.h index 222900415..57a063d8f 100644 --- a/graphic/graphic_2d/native_drawing/drawing_register_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_register_font.h @@ -79,7 +79,7 @@ uint32_t OH_Drawing_RegisterFontBuffer(OH_Drawing_FontCollection*, const char* f * @brief Unregister a customized font by the font family. * Unregistering a font that is currently in used may lead to text rendering anomalies, * including garbled characters or missing glyphs. - * Layout should be recalculated for all typography using the unregistered font family. + * 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. -- Gitee From bf9d13417c2d3c1f3471333b06487043fe9783cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=80=E9=B8=A3?= Date: Wed, 4 Jun 2025 16:19:48 +0800 Subject: [PATCH 077/100] add UserSelection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李一鸣 --- .../native_avscreen_capture.h | 41 +++++++++++++++++++ .../native_avscreen_capture_base.h | 22 +++++++++- 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index 5bf1e8487..e7833c49b 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -540,6 +540,47 @@ 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 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_AVErrCode 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_AVErrCode 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 7b00c4201..918cf9b28 100644 --- a/multimedia/player_framework/native_avscreen_capture_base.h +++ b/multimedia/player_framework/native_avscreen_capture_base.h @@ -568,7 +568,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 -- Gitee From a0760132e100956451492c5ee0a967dd884df9a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=80=E9=B8=A3?= Date: Wed, 4 Jun 2025 16:31:56 +0800 Subject: [PATCH 078/100] add json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李一鸣 --- .../libnative_avscreen_capture.ndk.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 48aa9a0d4..410f3d3a1 100644 --- a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json +++ b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json @@ -131,8 +131,20 @@ "first_introduced": "20", "name": "OH_AVScreenCapture_SetCaptureContentChangedCallback" }, + { + "first_introduced": "20", + "name": "OH_AVScreenCapture_SetSelectionCallback" + }, { "first_introduced": "20", "name": "OH_AVScreenCapture_SetCaptureArea" + }, + { + "first_introduced": "20", + "name": "OH_AVScreenCapture_GetCaptureTypeSelected" + }, + { + "first_introduced": "20", + "name": "OH_AVScreenCapture_GetDisplayIdSelected" } ] \ No newline at end of file -- Gitee From 0670a4cea30318c5c0c70a381b64caca6a34dac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=80=E9=B8=A3?= Date: Wed, 4 Jun 2025 16:32:42 +0800 Subject: [PATCH 079/100] fix typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李一鸣 --- .../avscreen_capture/libnative_avscreen_capture.ndk.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 410f3d3a1..d910cc1e3 100644 --- a/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json +++ b/multimedia/player_framework/avscreen_capture/libnative_avscreen_capture.ndk.json @@ -133,11 +133,11 @@ }, { "first_introduced": "20", - "name": "OH_AVScreenCapture_SetSelectionCallback" + "name": "OH_AVScreenCapture_SetCaptureArea" }, { "first_introduced": "20", - "name": "OH_AVScreenCapture_SetCaptureArea" + "name": "OH_AVScreenCapture_SetSelectionCallback" }, { "first_introduced": "20", -- Gitee From 3083638ae39a7f07826c180a29db401fa1cb9ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=80=E9=B8=A3?= Date: Wed, 4 Jun 2025 16:33:28 +0800 Subject: [PATCH 080/100] fix typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李一鸣 --- multimedia/player_framework/native_avscreen_capture_base.h | 1 + 1 file changed, 1 insertion(+) diff --git a/multimedia/player_framework/native_avscreen_capture_base.h b/multimedia/player_framework/native_avscreen_capture_base.h index 918cf9b28..966a09b4e 100644 --- a/multimedia/player_framework/native_avscreen_capture_base.h +++ b/multimedia/player_framework/native_avscreen_capture_base.h @@ -568,6 +568,7 @@ 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 -- Gitee From fd56fb6bf11f3b4d66b3c80b717974b91cd5edb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=80=E9=B8=A3?= Date: Wed, 4 Jun 2025 16:33:57 +0800 Subject: [PATCH 081/100] fix typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李一鸣 --- multimedia/player_framework/native_avscreen_capture.h | 1 + 1 file changed, 1 insertion(+) diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index e7833c49b..d4bd2e5f7 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -540,6 +540,7 @@ 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 Register user selection notification callback function * @syscap SystemCapability.Multimedia.Media.AVScreenCapture -- Gitee From f95445feb186e5d0405548139a423ba26c9905f2 Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Wed, 28 May 2025 11:53:04 +0800 Subject: [PATCH 082/100] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=A0=81=E8=8E=B7=E5=8F=96=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangweiyuan --- arkui/ace_engine/native/libace.ndk.json | 4 ++++ arkui/ace_engine/native/native_type.h | 5 +++++ arkui/ace_engine/native/ui_input_event.h | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 7a15d4e4f..59e5f3dd4 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -3426,5 +3426,9 @@ { "first_introduced": "20", "name": "OH_ArkUI_SurfaceCallback_SetSurfaceHideEvent" + }, + { + "first_introduced": "20", + "name": "OH_ArkUI_UIInputEvent_GetLatestStatus" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 828ba5b7d..0e59ab172 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2263,6 +2263,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 b8c6b17d7..fac4d040d 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 -- Gitee From 84c21073ab6e3bced4764556f5e5f46b97f1a43e Mon Sep 17 00:00:00 2001 From: qianyong325 Date: Tue, 3 Jun 2025 20:02:46 +0800 Subject: [PATCH 083/100] =?UTF-8?q?UDMF=E5=85=AC=E5=85=B1=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=80=9A=E8=B7=AF=E5=8F=AF=E8=A7=81=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: qianyong325 --- distributeddatamgr/udmf/include/udmf.h | 40 ++++++++++++++++++++++++ distributeddatamgr/udmf/libudmf.ndk.json | 8 +++++ 2 files changed, 48 insertions(+) diff --git a/distributeddatamgr/udmf/include/udmf.h b/distributeddatamgr/udmf/include/udmf.h index e3c38a098..595301e03 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. * diff --git a/distributeddatamgr/udmf/libudmf.ndk.json b/distributeddatamgr/udmf/libudmf.ndk.json index 27336bceb..7b8eed1fe 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 -- Gitee From 0722c10bc8d3c4c1eb13e082c3a644fcebe1d610 Mon Sep 17 00:00:00 2001 From: wangxiuxiu96 Date: Thu, 8 May 2025 11:20:24 +0800 Subject: [PATCH 084/100] CAPI-uniqueId Signed-off-by: wangxiuxiu96 Change-Id: Iff4faad63444a393598ccea99897ac80caa177e4 --- arkui/ace_engine/native/libace.ndk.json | 8 ++++++++ arkui/ace_engine/native/native_node.h | 26 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 59e5f3dd4..a8f6e0e5c 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -3430,5 +3430,13 @@ { "first_introduced": "20", "name": "OH_ArkUI_UIInputEvent_GetLatestStatus" + }, + { + "first_introduced": "20", + "name": "OH_ArkUI_NodeUtils_GetNodeHandleByUniqueId" + }, + { + "first_introduced": "20", + "name": "OH_ArkUI_NodeUtils_GetNodeUniqueId" } ] \ No newline at end of file diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index ee91a5297..a9b28a4b7 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -9725,6 +9725,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 -- Gitee From 282313c00eb5e798eea0fad7805d718a266d7ccc Mon Sep 17 00:00:00 2001 From: Trouvaille Date: Thu, 5 Jun 2025 10:28:23 +0800 Subject: [PATCH 085/100] =?UTF-8?q?=E5=B1=8F=E5=B9=95=E5=BD=95=E5=88=B6?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE=E9=9A=90=E7=A7=81=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E5=B1=8F=E8=94=BD=E6=A8=A1=E5=BC=8F=E6=96=B0=E5=A2=9E?= =?UTF-8?q?NDK=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Trouvaille --- multimedia/player_framework/native_avscreen_capture.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index fd4fadf20..ff900caff 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -547,11 +547,11 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetCaptureArea(struct OH_AVScreen * @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. + * 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. + * {@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( -- Gitee From 04b918da78b7c9215493933bc7da3048e3ffd510 Mon Sep 17 00:00:00 2001 From: Trouvaille Date: Thu, 5 Jun 2025 10:45:55 +0800 Subject: [PATCH 086/100] =?UTF-8?q?=E5=B1=8F=E5=B9=95=E5=BD=95=E5=88=B6?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE=E9=9A=90=E7=A7=81=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E5=B1=8F=E8=94=BD=E6=A8=A1=E5=BC=8F=E6=96=B0=E5=A2=9E?= =?UTF-8?q?NDK=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Trouvaille --- multimedia/player_framework/native_avscreen_capture.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index ff900caff..a5abf9c91 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -546,12 +546,12 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetCaptureArea(struct OH_AVScreen * @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. + * 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. + * {@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( -- Gitee From 0ec4e8321d11a4f02d9f137d84928fc1fd5dce95 Mon Sep 17 00:00:00 2001 From: liufei Date: Thu, 5 Jun 2025 11:20:37 +0800 Subject: [PATCH 087/100] sync with request Signed-off-by: liufei --- graphic/graphic_2d/native_drawing/drawing_register_font.h | 2 +- graphic/graphic_2d/native_drawing/drawing_text_global.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/graphic/graphic_2d/native_drawing/drawing_register_font.h b/graphic/graphic_2d/native_drawing/drawing_register_font.h index 57a063d8f..c2b6bcc3a 100644 --- a/graphic/graphic_2d/native_drawing/drawing_register_font.h +++ b/graphic/graphic_2d/native_drawing/drawing_register_font.h @@ -77,7 +77,7 @@ uint32_t OH_Drawing_RegisterFontBuffer(OH_Drawing_FontCollection*, const char* f /** * @brief Unregister a customized font by the font family. - * Unregistering a font that is currently in used may lead to text rendering anomalies, + * 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. * diff --git a/graphic/graphic_2d/native_drawing/drawing_text_global.h b/graphic/graphic_2d/native_drawing/drawing_text_global.h index 321d7de81..39c9f8bc5 100644 --- a/graphic/graphic_2d/native_drawing/drawing_text_global.h +++ b/graphic/graphic_2d/native_drawing/drawing_text_global.h @@ -66,9 +66,9 @@ typedef enum { */ typedef enum { /** Uses the glyph defined in the font file, which could be an empty box, blank space, or custom symbol etc. */ - TEXT_UNDEFINED_GLYPH_USE_DEFAULT = 0, + TEXT_NO_GLYPH_USE_DEFAULT = 0, /** Always render tofu blocks for missing glyphs. */ - TEXT_UNDEFINED_GLYPH_USE_TOFU = 1, + TEXT_NO_GLYPH_USE_TOFU = 1, } OH_Drawing_TextUndefinedGlyphDisplay; /** -- Gitee From 5c4389b814be03cbbb865c143b3743948fc0dacb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=80=E9=B8=A3?= Date: Thu, 5 Jun 2025 14:55:13 +0800 Subject: [PATCH 088/100] change return MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李一鸣 --- multimedia/player_framework/native_avscreen_capture.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index d4bd2e5f7..6c961789c 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -554,7 +554,7 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetCaptureArea(struct OH_AVScreen * {@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_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetSelectionCallback(struct OH_AVScreenCapture *capture, OH_AVScreenCapture_OnUserSelected callback, void *userData); /** @@ -568,7 +568,8 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetCaptureArea(struct OH_AVScreen * {@link AV_SCREEN_CAPTURE_ERR_INVALID_VAL} if selections is nullptr. * @since 20 */ -OH_AVErrCode OH_AVScreenCapture_GetCaptureTypeSelected(OH_AVScreenCapture_UserSelectionInfo *selection, int32_t* type); +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 @@ -580,7 +581,7 @@ OH_AVErrCode OH_AVScreenCapture_GetCaptureTypeSelected(OH_AVScreenCapture_UserSe * {@link AV_SCREEN_CAPTURE_ERR_INVALID_VAL} if selections is nullptr. * @since 20 */ -OH_AVErrCode OH_AVScreenCapture_GetDisplayIdSelected(OH_AVScreenCapture_UserSelectionInfo *selection, +OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_GetDisplayIdSelected(OH_AVScreenCapture_UserSelectionInfo *selection, uint64_t* displayId); #ifdef __cplusplus } -- Gitee From 982eca1ecfec48c0dbef8ef089549cbd73b1b6c8 Mon Sep 17 00:00:00 2001 From: FTL1ght Date: Wed, 4 Jun 2025 21:52:48 +0800 Subject: [PATCH 089/100] Text Vertical alignment sdk c Signed-off-by: FTL1ght Change-Id: Ie5c5874ebc1e03a95cbb2feb931746b222f261d4 --- .../native_drawing/drawing_text_typography.h | 35 +++++++++++++++++++ .../native_drawing/libnative_drawing.ndk.json | 4 +++ 2 files changed, 39 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/drawing_text_typography.h b/graphic/graphic_2d/native_drawing/drawing_text_typography.h index 8a704ced5..e562fcd76 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. * diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index 5479d9f0f..1275bbab1 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1917,5 +1917,9 @@ { "first_introduced": "20", "name": "OH_Drawing_SetTextUndefinedGlyphDisplay" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_SetTypographyVerticalAlignment" } ] \ No newline at end of file -- Gitee From 5350d84ba58080d9c38b8ce4c10bf95fd795e4e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B0=B8=E5=87=AF?= Date: Fri, 6 Jun 2025 00:00:58 +0800 Subject: [PATCH 090/100] add new interface touchTestDone MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘永凯 --- arkui/ace_engine/native/libace.ndk.json | 8 +++++ arkui/ace_engine/native/native_gesture.h | 39 ++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index a8f6e0e5c..f0145c3c8 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -3438,5 +3438,13 @@ { "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 aa4b37c23..5a4399108 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 -- Gitee From 9537378f46fd498c11359d0c4e22ab4a56aceda3 Mon Sep 17 00:00:00 2001 From: jinmingru Date: Fri, 6 Jun 2025 10:55:41 +0800 Subject: [PATCH 091/100] jinmingru1@huawei.com Signed-off-by: jinmingru --- multimedia/image_effect/image_effect.h | 30 +++++++++++++ multimedia/image_effect/image_effect_filter.h | 43 +++++++++++++++++++ .../image_effect/libimage_effect.ndk.json | 20 +++++++++ 3 files changed, 93 insertions(+) diff --git a/multimedia/image_effect/image_effect.h b/multimedia/image_effect/image_effect.h index db65c16e4..225906bd6 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 d42de85d7..9307189da 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 16f31e29f..abaca9dcb 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" -- Gitee From 51fbc1413a282785ca5c1f08d195e825cca159af Mon Sep 17 00:00:00 2001 From: colinhl Date: Fri, 6 Jun 2025 17:03:52 +0800 Subject: [PATCH 092/100] fps based pts Signed-off-by: colinhl --- .../codec_base/libnative_media_codecbase.ndk.json | 4 ++++ multimedia/av_codec/native_avcodec_base.h | 12 ++++++++++++ 2 files changed, 16 insertions(+) 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 5da23bba5..34f5bb854 100644 --- a/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json +++ b/multimedia/av_codec/codec_base/libnative_media_codecbase.ndk.json @@ -435,6 +435,10 @@ "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 705b0d651..67075d05f 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1064,6 +1064,18 @@ extern const char *OH_MD_KEY_SQR_FACTOR; */ 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. * -- Gitee From 6c5bb9d947c8002c43c4177572e085a77245acdd Mon Sep 17 00:00:00 2001 From: colinhl Date: Fri, 6 Jun 2025 19:41:01 +0800 Subject: [PATCH 093/100] fix Signed-off-by: colinhl --- multimedia/av_codec/native_avcodec_base.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 67075d05f..13582fbb7 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1065,16 +1065,17 @@ extern const char *OH_MD_KEY_SQR_FACTOR; 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. + * @brief Key to enable to set input parameters per frame for video encoder, + * value type is (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. + * This is an optional key, default is 0. Only use in synchronous mode. + * If enabled, the caller will set parameters for input surface of 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; + */ +extern const char *OH_MD_KEY_VIDEO_ENCODER_ENABLE_INPUT_PARAMETER_SYNC_MODE; /** * @brief Media type. -- Gitee From 02cc1f57b38154d95989c952d1034ab4ef9d3272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=80=E9=B8=A3?= Date: Fri, 6 Jun 2025 12:09:28 +0000 Subject: [PATCH 094/100] update multimedia/player_framework/native_avscreen_capture.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李一鸣 --- multimedia/player_framework/native_avscreen_capture.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/player_framework/native_avscreen_capture.h b/multimedia/player_framework/native_avscreen_capture.h index d3a3839df..091e3ccf8 100644 --- a/multimedia/player_framework/native_avscreen_capture.h +++ b/multimedia/player_framework/native_avscreen_capture.h @@ -547,8 +547,8 @@ OH_AVSCREEN_CAPTURE_ErrCode OH_AVScreenCapture_SetCaptureArea(struct OH_AVScreen * @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. + * 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. -- Gitee From b9b2af17ecf8d08fd8ac6d2fcb458104b842a203 Mon Sep 17 00:00:00 2001 From: colinhl Date: Sat, 7 Jun 2025 15:15:58 +0800 Subject: [PATCH 095/100] fix Signed-off-by: colinhl --- multimedia/av_codec/native_avcodec_base.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 13582fbb7..2703799a5 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1065,17 +1065,17 @@ extern const char *OH_MD_KEY_SQR_FACTOR; extern const char *OH_MD_KEY_MAX_BITRATE; /** - * @brief Key to enable to set input parameters per frame for video encoder, - * value type is (0 or 1):1 is enabled, 0 otherwise. + * @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, default is 0. Only use in synchronous mode. - * If enabled, the caller will set parameters for input surface of the encoder. + * 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_INPUT_PARAMETER_SYNC_MODE; +*/ +extern const char *OH_MD_KEY_VIDEO_ENCODER_ENABLE_PTS_BASED_RATECONTROL; /** * @brief Media type. -- Gitee From e3b374493f8d4a98bbc232dd24d5401ae719ffd6 Mon Sep 17 00:00:00 2001 From: colinhl Date: Sat, 7 Jun 2025 16:00:38 +0800 Subject: [PATCH 096/100] fix Signed-off-by: colinhl --- multimedia/av_codec/native_avcodec_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 2703799a5..1589e6ab5 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1071,7 +1071,7 @@ extern const char *OH_MD_KEY_MAX_BITRATE; * 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 */ -- Gitee From 665f0339bae453db7b5aa6c8d46b46dc809414f2 Mon Sep 17 00:00:00 2001 From: colinhl Date: Sat, 7 Jun 2025 16:27:59 +0800 Subject: [PATCH 097/100] fix Signed-off-by: colinhl --- multimedia/av_codec/native_avcodec_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index 1589e6ab5..de31790eb 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1074,7 +1074,7 @@ extern const char *OH_MD_KEY_MAX_BITRATE; * * @syscap SystemCapability.Multimedia.Media.CodecBase * @since 20 -*/ + */ extern const char *OH_MD_KEY_VIDEO_ENCODER_ENABLE_PTS_BASED_RATECONTROL; /** -- Gitee From 441e7bc7101b76992c64df168aa66498fe946cba Mon Sep 17 00:00:00 2001 From: colinhl Date: Mon, 9 Jun 2025 09:40:47 +0800 Subject: [PATCH 098/100] fix Signed-off-by: colinhl --- multimedia/av_codec/native_avcodec_base.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/multimedia/av_codec/native_avcodec_base.h b/multimedia/av_codec/native_avcodec_base.h index de31790eb..67075d05f 100644 --- a/multimedia/av_codec/native_avcodec_base.h +++ b/multimedia/av_codec/native_avcodec_base.h @@ -1071,10 +1071,9 @@ extern const char *OH_MD_KEY_MAX_BITRATE; * 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; /** -- Gitee From 3e7dc2e720d842246e4e398d0b29f10df6c746cc Mon Sep 17 00:00:00 2001 From: liufei Date: Mon, 9 Jun 2025 14:21:21 +0800 Subject: [PATCH 099/100] add interface OH_Drawing_TypographyHandlerAddEncodedText Signed-off-by: liufei --- graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json index eded3082f..a80868f7a 100644 --- a/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json +++ b/graphic/graphic_2d/native_drawing/libnative_drawing.ndk.json @@ -1985,5 +1985,9 @@ { "first_introduced": "20", "name": "OH_Drawing_SetTypographyVerticalAlignment" + }, + { + "first_introduced": "20", + "name": "OH_Drawing_TypographyHandlerAddEncodedText" } ] \ No newline at end of file -- Gitee From 197eb432a8abfb6c0a99308728d9f1981b1f005e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=BE=E9=98=B3=E7=86=A0?= Date: Mon, 9 Jun 2025 08:58:18 +0000 Subject: [PATCH 100/100] =?UTF-8?q?update=20startup/init/syscap/include/de?= =?UTF-8?q?viceinfo.h.=20Signed-off-by:=20=E4=B9=BE=E9=98=B3=E7=86=A0=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 乾阳熠 --- startup/init/syscap/include/deviceinfo.h | 29 ------------------------ 1 file changed, 29 deletions(-) diff --git a/startup/init/syscap/include/deviceinfo.h b/startup/init/syscap/include/deviceinfo.h index f1c9e1577..c8e888cb6 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,28 +125,24 @@ 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 20 @@ -168,7 +151,6 @@ 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 20 @@ -177,49 +159,42 @@ 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); -- Gitee