fix ipc problem

Signed-off-by: shilei <shilei91@huawei.com>
Change-Id: I9da7aae99efdb0f384fb0455cbf6522334f2bcc7
This commit is contained in:
shilei
2022-07-21 22:18:08 +08:00
parent 80c7687ad4
commit 11757b888c
8 changed files with 18 additions and 3 deletions
@@ -16,7 +16,6 @@
#ifndef OHOS_BUNDLEMS_SLITE_CLIENT_H
#define OHOS_BUNDLEMS_SLITE_CLIENT_H
#include "iproxy_client.h"
#include "nocopyable.h"
#include "want.h"
#include "bundle_install_msg.h"
@@ -16,7 +16,9 @@
#ifndef OHOS_ELEMENT_NAME_UTILS_H
#define OHOS_ELEMENT_NAME_UTILS_H
#ifndef __LITEOS_M__
#include <serializer.h>
#endif
#include "element_name.h"
#ifdef __cplusplus
@@ -25,11 +27,13 @@ extern "C" {
#endif
#endif // __cplusplus
#ifndef __LITEOS_M__
#ifdef OHOS_APPEXECFWK_BMS_BUNDLEMANAGER
bool SerializeElement(IpcIo *io, const ElementName *element);
bool DeserializeElement(ElementName *element, IpcIo *io);
#endif
#endif
#ifdef __cplusplus
#if __cplusplus
@@ -19,6 +19,7 @@
#include "utils.h"
#ifndef __LITEOS_M__
#ifdef OHOS_APPEXECFWK_BMS_BUNDLEMANAGER
namespace {
constexpr int VALUE_NULL = 0;
@@ -28,6 +29,7 @@ namespace {
constexpr int MAX_DEVICE_ID = 1024;
}
#endif
#endif
void ClearElement(ElementName *element)
{
@@ -73,6 +75,7 @@ bool SetElementAbilityName(ElementName *element, const char *abilityName)
return element->abilityName != nullptr;
}
#ifndef __LITEOS_M__
#ifdef OHOS_APPEXECFWK_BMS_BUNDLEMANAGER
bool SerializeElement(IpcIo *io, const ElementName *element)
{
@@ -133,4 +136,5 @@ bool DeserializeElement(ElementName *element, IpcIo *io)
}
return true;
}
#endif
#endif
@@ -17,7 +17,11 @@
#define OHOS_BMS_INTERFACE_H
#include "feature.h"
#ifndef __LITEOS_M__
#include "iproxy_server.h"
#else
#include "iunknown.h"
#endif
#include "want.h"
#include "install_param.h"
#include "bundle_manager.h"
@@ -42,9 +42,11 @@
#ifndef OHOS_ELEMENT_NAME_H
#define OHOS_ELEMENT_NAME_H
#ifndef __LITEOS_M__
#ifdef OHOS_APPEXECFWK_BMS_BUNDLEMANAGER
#include <serializer.h>
#endif
#endif
#include <stdbool.h>
/**
@@ -110,10 +112,12 @@ bool SetElementBundleName(ElementName *element, const char *bundleName);
*/
bool SetElementAbilityName(ElementName *element, const char *abilityName);
#ifndef __LITEOS_M__
#ifdef OHOS_APPEXECFWK_BMS_BUNDLEMANAGER
bool SerializeElement(IpcIo *io, const ElementName *element);
bool DeserializeElement(ElementName *element, IpcIo *io);
#endif
#endif
#ifdef __cplusplus
#if __cplusplus
}
@@ -40,7 +40,6 @@
#include "ability_info.h"
#include "bundle_info.h"
#include "bundle_status_callback.h"
#include "install_param.h"
#include "stdint.h"
#include "want.h"
@@ -20,10 +20,12 @@
#include "bundle_info.h"
#include "utils_list.h"
#include "stdint.h"
#ifndef __LITEOS_M__
#ifdef OHOS_APPEXECFWK_BMS_BUNDLEMANAGER
#include <string>
#include <vector>
#endif
#endif
#include "cJSON.h"
#ifdef __LITEOS_M__
@@ -15,7 +15,6 @@
#include "bundle_mgr_slite_feature.h"
#include "bundle_service_interface.h"
#include "bundlems_log.h"
#include "ohos_init.h"
#include "samgr_lite.h"