From b11162696f7c27d7c869187a567c21bd08b3ad1a Mon Sep 17 00:00:00 2001 From: sty Date: Tue, 10 Jun 2025 21:31:45 +0800 Subject: [PATCH] =?UTF-8?q?native=5Fchild=5Fprocess=5Finterface=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=B8=8D=E4=B8=80=E8=87=B4=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sty Change-Id: I5d173a584ef7a4f1bc4945b433dc414cb6e3c336 --- .../child_process/native_child_process.h | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/ability/ability_runtime/child_process/native_child_process.h b/ability/ability_runtime/child_process/native_child_process.h index ce59adf74..796b79205 100644 --- a/ability/ability_runtime/child_process/native_child_process.h +++ b/ability/ability_runtime/child_process/native_child_process.h @@ -152,13 +152,13 @@ typedef struct Ability_ChildProcessConfigs Ability_ChildProcessConfigs; Ability_ChildProcessConfigs* OH_Ability_CreateChildProcessConfigs(); /** - * @brief Destroys a child process configs object and releases associated rescources. + * @brief Destroys a child process configs object and releases associated resources. * * @param configs Pointer to the child process configs object to be destroyed. * After this call, the pointer becomes invalid and must not be used. * Passing nullptr is allowed and will be ignored. * @return Returns {@link NCP_NO_ERROR} if the operation is successful or if the input is nullptr. - * Returns {@link NCP_NO_ERR_INVALID_PARAM} if the input parameters are invalid. + * Returns {@link NCP_ERR_INVALID_PARAM} if the input parameters are invalid. * @since 20 */ Ability_NativeChildProcess_ErrCode OH_Ability_DestroyChildProcessConfigs(Ability_ChildProcessConfigs* configs); @@ -169,8 +169,8 @@ Ability_NativeChildProcess_ErrCode OH_Ability_DestroyChildProcessConfigs(Ability * * @param configs Pointer to the child process configs object. Must not be nullptr. * @param isolationMode The isolation mode to set. See {@link NativeChildProcess_IsolationMode} for details. - * @return Returns {@link NCP_NO_ERROR} if the isolation mode is set successful. - * Returns {@link NCP_NO_ERR_INVALID_PARAM} if the input parameters are invalid. + * @return Returns {@link NCP_NO_ERROR} if the isolation mode is set successfully. + * Returns {@link NCP_ERR_INVALID_PARAM} if the input parameters are invalid. * @since 20 */ Ability_NativeChildProcess_ErrCode OH_Ability_ChildProcessConfigs_SetIsolationMode( @@ -184,8 +184,8 @@ Ability_NativeChildProcess_ErrCode OH_Ability_ChildProcessConfigs_SetIsolationMo * Must be a non-empty string containing only letters, digits, or underscores. * Maximum length is 64 characters. * The name ultimately assigned to the process is {bundleName}:{processName}. - * @return Returns {@link NCP_NO_ERROR} if the process name is set successful. - * Returns {@link NCP_NO_ERR_INVALID_PARAM} if the input parameters are invalid. + * @return Returns {@link NCP_NO_ERROR} if the process name is set successfully. + * Returns {@link NCP_ERR_INVALID_PARAM} if the input parameters are invalid. * @since 20 */ Ability_NativeChildProcess_ErrCode OH_Ability_ChildProcessConfigs_SetProcessName(Ability_ChildProcessConfigs* configs, @@ -426,7 +426,7 @@ Ability_NativeChildProcess_ErrCode OH_Ability_StartNativeChildProcessWithConfigs NativeChildProcess_Args* OH_Ability_GetCurrentChildProcessArgs(); /** - * @brief Define a callback function to handle the exit of a native child process. + * @brief Defines a callback function to handle the exit of a native child process. * * @param pid The pid of the exited native child process. * @param signal The signal of the exited native child process. @@ -434,14 +434,13 @@ NativeChildProcess_Args* OH_Ability_GetCurrentChildProcessArgs(); */ typedef void (*OH_Ability_OnNativeChildProcessExit)(int32_t pid, int32_t signal); -/** + /** * @brief Register a native child process exit callback. * Registering the same callback repeatedly will only keep one. * * @param onProcessExit Pointer to the callback function to handle the exit of a native child process. * For details, see {@link OH_Ability_OnNativeChildProcessExit}. * @return Returns {@link NCP_NO_ERROR} if the call is successful. - * Returns {@link NCP_ERR_INVALID_PARAM} if the param is invalid. * Returns {@link NCP_ERR_INTERNAL} if internal error occurs. * For details, see {@link Ability_NativeChildProcess_ErrCode}. * @since 20 @@ -449,13 +448,12 @@ typedef void (*OH_Ability_OnNativeChildProcessExit)(int32_t pid, int32_t signal) Ability_NativeChildProcess_ErrCode OH_Ability_RegisterNativeChildProcessExitCallback( OH_Ability_OnNativeChildProcessExit onProcessExit); -/** + /** * @brief Unregister a native child process exit callback. * * @param onProcessExit Pointer to the callback function to handle the exit of a native child process. * For details, see {@link OH_Ability_OnNativeChildProcessExit}. * @return Returns {@link NCP_NO_ERROR} if the call is successful. - * Returns {@link NCP_ERR_INVALID_PARAM} if the param is invalid. * Returns {@link NCP_ERR_INTERNAL} if internal error occurs. * Returns {@link NCP_ERR_CALLBACK_NOT_EXIST} if the callback is not exist. * For details, see {@link Ability_NativeChildProcess_ErrCode}. -- Gitee