From 602a930030124dd899d1a2b435a18a1d051be3a0 Mon Sep 17 00:00:00 2001 From: zhaogan Date: Mon, 8 Jan 2024 14:41:54 +0800 Subject: [PATCH] Issue: #I8UB19 Description:bundleNdk add appId&appIdentifier(4.1-beta1) Sig: SIG_ApplicaitonFramework Feature or Bugfix: Feature Binary Source: No Signed-off-by: zhaogan --- .../bundle/include/native_interface_bundle.h | 48 ++++++++++++------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/bundlemanager/bundle_framework/bundle/include/native_interface_bundle.h b/bundlemanager/bundle_framework/bundle/include/native_interface_bundle.h index c4550c1e0..348faa222 100644 --- a/bundlemanager/bundle_framework/bundle/include/native_interface_bundle.h +++ b/bundlemanager/bundle_framework/bundle/include/native_interface_bundle.h @@ -57,25 +57,16 @@ struct OH_NativeBundle_ApplicationInfo { * @since 9 */ char* fingerprint; - - /** - * Indicates the ID of the application to which this bundle belongs - * The application ID uniquely identifies an application. It is determined by the bundle name and signature - * @syscap SystemCapability.BundleManager.BundleFramework.Core - * @since 11 - */ - char* appId; - - /** - * Globally unique identifier of an application. - * AppIdentifier does not change along the application lifecycle, including version updates, certificate changes, - * public and private key changes, and application transfer. - * @syscap SystemCapability.BundleManager.BundleFramework.Core - * @since 11 - */ - char* appIdentifier; }; +/** + * @brief Indicates information of application + * + * @since 11 + * @version 1.0 + */ +typedef struct OH_NativeBundle_ApplicationInfo OH_NativeBundle_ApplicationInfo; + /** * @brief Obtains the application info based on the The current bundle. * @@ -85,6 +76,29 @@ struct OH_NativeBundle_ApplicationInfo { */ OH_NativeBundle_ApplicationInfo OH_NativeBundle_GetCurrentApplicationInfo(); +/** + * @brief Obtains the appId of application. AppId indicates the ID of the application to which this bundle belongs + * The application ID uniquely identifies an application. It is determined by the bundle name and signature. + * After utilizing this interface, to prevent memory leaks, + * it is necessary to manually release the pointer returned by the interface. + * + * @return Returns the appId info. + * @since 11 + * @version 1.0 + */ +char* OH_NativeBundle_GetAppId(); + +/** + * @brief Obtains the appIdentifier of application. AppIdentifier does not change along the application lifecycle, + * including version updates, certificate changes, public and private key changes, and application transfer. + * After utilizing this interface, to prevent memory leaks, + * it is necessary to manually release the pointer returned by the interface. + * + * @return Returns the appIdentifier info. + * @since 11 + * @version 1.0 + */ +char* OH_NativeBundle_GetAppIdentifier(); #ifdef __cplusplus }; #endif -- Gitee