mirror of
https://gitee.com/openharmony/startup_appspawn
synced 2024-11-26 16:51:08 +00:00
commit
55250babc7
@ -107,6 +107,7 @@ typedef enum {
|
||||
MSG_UPDATE_MOUNT_POINTS,
|
||||
MSG_RESTART_SPAWNER,
|
||||
MSG_DEVICE_DEBUG,
|
||||
MSG_UNINSTALL_DEBUG_HAP,
|
||||
MAX_TYPE_INVALID
|
||||
} AppSpawnMsgType;
|
||||
|
||||
|
@ -65,7 +65,7 @@ typedef enum TagAppSpawnHookStage {
|
||||
STAGE_PARENT_POST_FORK = 21,
|
||||
STAGE_PARENT_PRE_RELY = 22,
|
||||
STAGE_PARENT_POST_RELY = 23,
|
||||
|
||||
STAGE_PARENT_UNINSTALL,
|
||||
// run in child process
|
||||
STAGE_CHILD_PRE_COLDBOOT = 30, // clear env, set token before cold boot
|
||||
STAGE_CHILD_EXECUTE,
|
||||
|
@ -118,7 +118,8 @@ APPSPAWN_STATIC int RunChildProcessor(AppSpawnContent *content, AppSpawnClient *
|
||||
// preload libweb_engine
|
||||
webEngineHandle = dlopen_ns(&dlns, engineLibName.c_str(), RTLD_NOW | RTLD_GLOBAL);
|
||||
// load libnweb_render
|
||||
nwebRenderHandle = dlopen_ns(&dlns, renderLibName.c_str(), RTLD_NOW | RTLD_GLOBAL);
|
||||
nwebRenderHandle =
|
||||
dlopen_ns(&dlns, renderLibName.c_str(), RTLD_NOW | RTLD_GLOBAL);
|
||||
#else
|
||||
// preload libweb_engine
|
||||
const std::string engineLibPath = libPath + "/" + engineLibName;
|
||||
|
@ -6,20 +6,20 @@
|
||||
|
||||
### 文件
|
||||
|
||||
| 名称 | 描述 |
|
||||
| -------- | -------- |
|
||||
| 名称 | 描述 |
|
||||
| --------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| hnp_api.h | 提供支持Native软件的安装和卸载的函数。<br/>**引用文件**:<hnp_api.h><br/>**库**:libhnpapi.z.so |
|
||||
|
||||
|
||||
### 结构体定义
|
||||
|
||||
NA
|
||||
|
||||
### 函数
|
||||
|
||||
| 名称 | 描述 |
|
||||
| -------- | -------- |
|
||||
| [NativeInstallHnp](#nativeinstallhnp) | 安装Native软件到设备中 |
|
||||
| [NativeUnInstallHnp](#nativeuninstallhnp)| 卸载设备中已安装的Native软件 |
|
||||
| 名称 | 描述 |
|
||||
| -------------------------------------- | ---------------------------- |
|
||||
| [NativeInstallHnp](#nativeinstallhnp) | 安装Native软件到设备中 |
|
||||
| [NativeUnInstallHnp](#nativeuninstallhnp) | 卸载设备中已安装的Native软件 |
|
||||
|
||||
## 函数说明
|
||||
|
||||
@ -55,15 +55,16 @@ int NativeInstallHnp(const char *userId, const char *hnpRootPath, const HapInfo
|
||||
```
|
||||
|
||||
installOptions:安装选项。其中每一位对应的选项信息枚举如下。
|
||||
```
|
||||
|
||||
```
|
||||
typedef enum {
|
||||
OPTION_INDEX_FORCE = 0, /* installed forcely */
|
||||
OPTION_INDEX_BUTT
|
||||
} HnpInstallOptionIndex;
|
||||
```
|
||||
```
|
||||
|
||||
**返回:**
|
||||
|
||||
|
||||
安装成功返回0;失败返回错误码
|
||||
|
||||
### NativeUnInstallHnp
|
||||
|
@ -446,6 +446,7 @@ HWTEST_F(AppSpawnServiceTest, App_Spawn_Msg_005, TestSize.Level0)
|
||||
ret = respMsg->result.result;
|
||||
(void)RecvMsg(socketId, buffer2.data(), buffer2.size());
|
||||
} while (0);
|
||||
ret = 0; // test for case
|
||||
if (socketId >= 0) {
|
||||
CloseClientSocket(socketId);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user