Independent compiler3

Signed-off-by: l30054665 <lishang21@huawei.com>
This commit is contained in:
l30054665
2024-03-29 17:13:42 +08:00
parent f89dee8034
commit d73e03ebe2
62 changed files with 37 additions and 861 deletions
@@ -33,8 +33,6 @@ ohos_unittest("distributed_input_white_list_test") {
"${services_sink_path}/transport/include",
"${frameworks_path}/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${service_common}/include",
"${utils_path}/include",
]
@@ -63,6 +61,7 @@ ohos_unittest("distributed_input_white_list_test") {
external_deps = [
"c_utils:utils",
"config_policy:configpolicy_util",
"distributed_hardware_fwk:distributedhardwareutils",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
"ipc:ipc_core",
@@ -1,38 +0,0 @@
/*
* Copyright (c) 2021-2022 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 OHOS_DISTRIBUTED_HARDWARE_LOG_H
#define OHOS_DISTRIBUTED_HARDWARE_LOG_H
#include <string>
#include "dh_log.h"
namespace OHOS {
namespace DistributedHardware {
#define DHLOGD(fmt, ...) DHLog(DH_LOG_DEBUG, \
(std::string("[") + DH_LOG_TAG + "][" + __FUNCTION__ + "]:" + fmt).c_str(), ##__VA_ARGS__)
#define DHLOGI(fmt, ...) DHLog(DH_LOG_INFO, \
(std::string("[") + DH_LOG_TAG + "][" + __FUNCTION__ + "]:" + fmt).c_str(), ##__VA_ARGS__)
#define DHLOGW(fmt, ...) DHLog(DH_LOG_WARN, \
(std::string("[") + DH_LOG_TAG + "][" + __FUNCTION__ + "]:" + fmt).c_str(), ##__VA_ARGS__)
#define DHLOGE(fmt, ...) DHLog(DH_LOG_ERROR, \
(std::string("[") + DH_LOG_TAG + "][" + __FUNCTION__ + "]:" + fmt).c_str(), ##__VA_ARGS__)
} // namespace DistributedHardware
} // namespace OHOS
#endif
-81
View File
@@ -1,81 +0,0 @@
/*
* Copyright (c) 2021-2023 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 OHOS_DISTRIBUTED_HARDWARE_CONSTANTS_H
#define OHOS_DISTRIBUTED_HARDWARE_CONSTANTS_H
#include <string>
#include <unistd.h>
namespace OHOS {
namespace DistributedHardware {
constexpr int32_t LOG_MAX_LEN = 4096;
constexpr int32_t ENABLE_TIMEOUT_MS = 1000;
constexpr int32_t DISABLE_TIMEOUT_MS = 500;
constexpr uint32_t MAX_MESSAGE_LEN = 40 * 1024 * 1024;
constexpr uint32_t MIN_MESSAGE_LEN = 0;
constexpr uint32_t MAX_ID_LEN = 256;
constexpr uint32_t MAX_TOPIC_SIZE = 128;
constexpr uint32_t MAX_LISTENER_SIZE = 256;
constexpr uint32_t MAX_COMP_SIZE = 128;
constexpr uint32_t MAX_DB_RECORD_SIZE = 10000;
constexpr uint32_t MAX_ONLINE_DEVICE_SIZE = 10000;
constexpr int32_t MODE_ENABLE = 0;
constexpr int32_t MODE_DISABLE = 1;
constexpr uint32_t MAX_SWITCH_SIZE = 256;
const std::string LOW_LATENCY_KEY = "identity";
const std::u16string DHMS_STUB_INTERFACE_TOKEN = u"ohos.distributedhardware.accessToken";
const std::string APP_ID = "dtbhardware_manager_service";
const std::string GLOBAL_CAPABILITY_ID = "global_capability_info";
const std::string GLOBAL_VERSION_ID = "global_version_info";
const std::string RESOURCE_SEPARATOR = "###";
const std::string DH_ID = "dh_id";
const std::string DEV_ID = "dev_id";
const std::string DEV_NAME = "dev_name";
const std::string DEV_TYPE = "dev_type";
const std::string DH_TYPE = "dh_type";
const std::string DH_ATTRS = "dh_attrs";
const std::string DH_SUBTYPE = "dh_subtype";
const std::string DH_LOG_TITLE_TAG = "DHFWK";
const std::string DH_VER = "dh_ver";
const std::string COMP_VER = "comp_ver";
const std::string NAME = "name";
const std::string TYPE = "type";
const std::string HANDLER = "handler";
const std::string SOURCE_VER = "source_ver";
const std::string SINK_VER = "sink_ver";
const std::string DH_TASK_NAME_PREFIX = "Task_";
const std::string DH_FWK_PKG_NAME = "ohos.dhardware";
const std::string DH_COMPONENT_VERSIONS = "componentVersions";
const std::string DH_COMPONENT_TYPE = "dhType";
const std::string DH_COMPONENT_SINK_VER = "version";
const std::string DH_COMPONENT_DEFAULT_VERSION = "1.0";
const std::string LOW_LATENCY_ENABLE = "low_latency_enable";
constexpr const char *DO_RECOVER = "DoRecover";
constexpr const char *SEND_ONLINE = "SendOnLine";
constexpr const char *DISABLE_TASK_INNER = "DisableTask";
constexpr const char *ENABLE_TASK_INNER = "EnableTask";
constexpr const char *OFFLINE_TASK_INNER = "OffLineTask";
constexpr const char *TRIGGER_TASK = "TriggerTask";
constexpr const char *EVENT_RUN = "EventRun";
constexpr const char *START_EVENT = "StartEvent";
constexpr const char *COMPONENTSLOAD_PROFILE_PATH =
"etc/distributedhardware/distributed_hardware_components_cfg.json";
const uint32_t EVENT_VERSION_INFO_DB_RECOVER = 101;
const uint32_t EVENT_CAPABILITY_INFO_DB_RECOVER = 201;
} // namespace DistributedHardware
} // namespace OHOS
#endif
-74
View File
@@ -1,74 +0,0 @@
/*
* Copyright (c) 2021-2023 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 OHOS_DISTRIBUTED_HARDWARE_DEVICE_TYPE_H
#define OHOS_DISTRIBUTED_HARDWARE_DEVICE_TYPE_H
#include <string>
#include <unordered_map>
namespace OHOS {
namespace DistributedHardware {
enum class DHType : uint32_t {
UNKNOWN = 0x0, // unknown device
CAMERA = 0x01, // Camera
AUDIO = 0x02, // Mic
SCREEN = 0x08, // Display
GPS = 0x10, // GPS
INPUT = 0x20, // Key board
HFP = 0x40, // HFP External device
A2D = 0x80, // A2DP External device
VIRMODEM_AUDIO = 0x100, // Cellular call AUDIO
MAX_DH = 0x80000000
};
enum class DHSubtype : uint32_t {
CAMERA = 0x01, // Camera
SCREEN = 0x08, // Display
INPUT = 0x20, // Key board
AUDIO_MIC = 0x400, // AUDIO Mic
AUDIO_SPEAKER = 0x800 // AUDIO Speaker
};
const std::unordered_map<DHType, std::string> DHTypeStrMap = {
{ DHType::CAMERA, "CAMERA" },
{ DHType::AUDIO, "AUDIO" },
{ DHType::SCREEN, "SCREEN" },
{ DHType::GPS, "GPS" },
{ DHType::INPUT, "INPUT" },
{ DHType::HFP, "HFP" },
{ DHType::A2D, "A2D" },
{ DHType::VIRMODEM_AUDIO, "VIRMODEM_AUDIO" },
};
struct DeviceInfo {
std::string uuid;
std::string deviceId;
std::string deviceName;
uint16_t deviceType;
explicit DeviceInfo(std::string uuid, std::string deviceId, std::string deviceName, uint16_t deviceType)
: uuid(uuid), deviceId(deviceId), deviceName(deviceName), deviceType(deviceType) {}
};
/* The key is DHType, the value is the prefix of DHId */
const std::unordered_map<DHType, std::string> DHTypePrefixMap = {
{DHType::CAMERA, "Camera"},
{DHType::SCREEN, "Screen"},
{DHType::INPUT, "Input"},
};
} // namespace DistributedHardware
} // namespace OHOS
#endif
@@ -1,41 +0,0 @@
/*
* Copyright (c) 2023 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 OHOS_DHARDWARE_IPC_INTERFACE_CODE_H
#define OHOS_DHARDWARE_IPC_INTERFACE_CODE_H
#include <cstdint>
/* SAID: 4801 */
namespace OHOS {
namespace DistributedHardware {
enum class DHMsgInterfaceCode : uint32_t {
REG_PUBLISHER_LISTNER = 48001,
UNREG_PUBLISHER_LISTENER = 48002,
PUBLISH_MESSAGE = 48003,
INIT_CTL_CEN = 48004,
RELEASE_CTL_CEN = 48005,
CREATE_CTL_CEN_CHANNEL = 48006,
NOTIFY_AV_EVENT = 48007,
REGISTER_CTL_CEN_CALLBACK = 48008,
QUERY_LOCAL_SYS_SPEC = 48009,
PAUSE_DISTRIBUTED_HARDWARE = 480010,
RESUME_DISTRIBUTED_HARDWARE = 480011,
STOP_DISTRIBUTED_HARDWARE = 480012,
NOTIFY_SOURCE_DEVICE_REMOTE_DMSDP_STARTED = 1,
};
} // namespace DistributedHardware
} // namespace OHOS
#endif
@@ -1,116 +0,0 @@
/*
* Copyright (c) 2021-2022 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 OHOS_DISTRIBUTED_HARDWARE_ERRNO
#define OHOS_DISTRIBUTED_HARDWARE_ERRNO
#include <cstdint>
namespace OHOS {
namespace DistributedHardware {
/*
* The distributed hardware module define errno, range: [-10000, -19999]
* Here's common errno, range: [-10000, -10199]
*/
constexpr int32_t DH_FWK_SUCCESS = 0;
constexpr int32_t ERR_DH_FWK_PARA_INVALID = -10000;
constexpr int32_t ERR_DH_FWK_REMOTE_NETWORK_ID_IS_EMPTY = -10001;
constexpr int32_t ERR_DH_FWK_REMOTE_DEVICE_ID_IS_EMPTY = -10002;
constexpr int32_t ERR_DH_FWK_TYPE_NOT_EXIST = -10003;
constexpr int32_t ERR_DH_FWK_JSON_PARSE_FAILED = -10004;
constexpr int32_t ERR_DH_FWK_POINTER_IS_NULL = -10005;
/* VersionManager errno, range: [-10200, -10299] */
constexpr int32_t ERR_DH_FWK_VERSION_DEVICE_ID_NOT_EXIST = -10200;
/* ComponentManager errno, range: [-10300, -10399] */
constexpr int32_t ERR_DH_FWK_COMPONENT_INIT_SOURCE_FAILED = -10300;
constexpr int32_t ERR_DH_FWK_COMPONENT_INIT_SINK_FAILED = -10301;
constexpr int32_t ERR_DH_FWK_COMPONENT_ENABLE_FAILED = -10302;
constexpr int32_t ERR_DH_FWK_COMPONENT_DISABLE_FAILED = -10303;
constexpr int32_t ERR_DH_FWK_COMPONENT_ENABLE_TIMEOUT = -10304;
constexpr int32_t ERR_DH_FWK_COMPONENT_DISABLE_TIMEOUT = -10305;
constexpr int32_t ERR_DH_FWK_COMPONENT_REGISTER_FAILED = -10306;
constexpr int32_t ERR_DH_FWK_COMPONENT_UNREGISTER_FAILED = -10007;
constexpr int32_t ERR_DH_FWK_COMPONENT_GET_REMOTE_SA_FAILED = -10008;
constexpr int32_t ERR_DH_FWK_COMPONENT_GET_SINK_VERSION_FAILED = -10009;
constexpr int32_t ERR_DH_FWK_COMPONENT_DHTYPE_NOT_FOUND = -10010;
constexpr int32_t ERR_DH_FWK_COMPONENT_MONITOR_NULL = -10011;
/* ResourceManager errno, range: [-10400, -10499] */
constexpr int32_t ERR_DH_FWK_RESOURCE_DB_ADAPTER_POINTER_NULL = -10400;
constexpr int32_t ERR_DH_FWK_RESOURCE_KV_STORAGE_POINTER_NULL = -10401;
constexpr int32_t ERR_DH_FWK_RESOURCE_DB_ADAPTER_OPERATION_FAIL = -10402;
constexpr int32_t ERR_DH_FWK_RESOURCE_KV_STORAGE_OPERATION_FAIL = -10403;
constexpr int32_t ERR_DH_FWK_RESOURCE_CAPABILITY_MAP_NOT_FOUND = -10404;
constexpr int32_t ERR_DH_FWK_RESOURCE_DB_MANUAL_SYNC_FAIL = -10405;
constexpr int32_t ERR_DH_FWK_RESOURCE_INIT_DB_FAILED = -10406;
constexpr int32_t ERR_DH_FWK_RESOURCE_UNINIT_DB_FAILED = -10407;
constexpr int32_t ERR_DH_FWK_RESOURCE_REGISTER_DB_FAILED = -10408;
constexpr int32_t ERR_DH_FWK_RESOURCE_UNREGISTER_DB_FAILED = -10409;
constexpr int32_t ERR_DH_FWK_RESOURCE_KEY_IS_EMPTY = -10410;
constexpr int32_t ERR_DH_FWK_RESOURCE_SYNC_VERSIONINFO_FAIL = -10411;
constexpr int32_t ERR_DH_FWK_RESOURCE_DEVICE_ID_NOT_EXIST = -10412;
constexpr int32_t ERR_DH_FWK_RESOURCE_UUID_NOT_FOUND = -10413;
constexpr int32_t ERR_DH_FWK_RESOURCE_CAPINFO_POINTER_NULL = -10414;
constexpr int32_t ERR_DH_FWK_RESOURCE_RES_DB_DATA_INVALID = -10415;
/* DistributedHardwareManager errno, range: [-10500, -10599] */
constexpr int32_t ERR_DH_FWK_HARDWARE_MANAGER_DEVICE_REPEAT_ONLINE = -10500;
constexpr int32_t ERR_DH_FWK_HARDWARE_MANAGER_DEVICE_REPEAT_OFFLINE = -10501;
constexpr int32_t ERR_DH_FWK_HARDWARE_MANAGER_INIT_FAILED = -10502;
/* ComponentLoader errno, range: [-10600, -10699] */
constexpr int32_t ERR_DH_FWK_LOADER_HANDLER_IS_NULL = -10600;
constexpr int32_t ERR_DH_FWK_LOADER_CONFIG_JSON_INVALID = -10601;
constexpr int32_t ERR_DH_FWK_LOADER_GET_LOCAL_VERSION_FAIL = -10602;
constexpr int32_t ERR_DH_FWK_LOADER_DLCLOSE_FAIL = -10603;
constexpr int32_t ERR_DH_FWK_LOADER_PROFILE_PATH_IS_NULL = -10604;
/* Task errno, range: [-10700, -10799] */
constexpr int32_t ERR_DH_FWK_TASK_TIMEOUT = -10700;
/* DistributedHardwareService errno, range: [-10800, -10899] */
constexpr int32_t ERR_DH_FWK_SERVICE_IPC_WRITE_PARA_FAIL = -10800;
constexpr int32_t ERR_DH_FWK_SERVICE_IPC_SEND_REQUEST_FAIL = -10801;
constexpr int32_t ERR_DH_FWK_SERVICE_IPC_READ_PARA_FAIL = -10802;
constexpr int32_t ERR_DH_FWK_SERVICE_STRING_IS_EMPTY = -10803;
constexpr int32_t ERR_DH_FWK_SERVICE_LOCAL_VERSION_NOT_EXIST = -10804;
constexpr int32_t ERR_DH_FWK_SERVICE_WRITE_TOKEN_FAIL = -10805;
constexpr int32_t ERR_DH_FWK_SERVICE_REMOTE_IS_NULL = -10806;
constexpr int32_t ERR_DH_FWK_SERVICE_WRITE_INFO_FAIL = -10807;
constexpr int32_t ERR_DH_FWK_PUBLISHER_LISTENER_IS_NULL = -10808;
constexpr int32_t ERR_DH_FWK_SERVICE_MSG_INVALID = -10809;
/* AccessManager errno, range: [-10900, -10999] */
constexpr int32_t ERR_DH_FWK_ACCESS_INIT_DM_FAILED = -10900;
constexpr int32_t ERR_DH_FWK_ACCESS_UNINIT_DM_FAILED = -10901;
constexpr int32_t ERR_DH_FWK_ACCESS_REGISTER_DM_FAILED = -10902;
constexpr int32_t ERR_DH_FWK_ACCESS_UNREGISTER_DM_FAILED = -10903;
/* Hidump errno, range: [-11000, -11099] */
constexpr int32_t ERR_DH_FWK_HIDUMP_ERROR = -11000;
constexpr int32_t ERR_DH_FWK_HIDUMP_INVALID_ARGS = -11001;
constexpr int32_t ERR_DH_FWK_HIDUMP_DPRINTF_ERROR = -11002;
/* DHFWK Publisher errno, range: [-11100, -11199] */
constexpr int32_t ERR_DH_FWK_PUBLISH_MSG_FAILED = -11100;
constexpr uint32_t ERR_DH_FWK_PUBLISH_LISTENER_OVER_SIZE = -11101;
/* DHFWK Check Permission errno, range: [-11200, -11299] */
constexpr int32_t ERR_DH_FWK_ACCESS_PERMISSION_CHECK_FAIL = -11200;
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_DISTRIBUTED_HARDWARE_ERRNO
@@ -1,43 +0,0 @@
/*
* Copyright (c) 2023 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 OHOS_I_AV_TRANSPORT_CONTROL_CENTER_CALLBACK_H
#define OHOS_I_AV_TRANSPORT_CONTROL_CENTER_CALLBACK_H
#include "iremote_broker.h"
#include "av_sync_utils.h"
#include "av_trans_errno.h"
#include "av_trans_types.h"
namespace OHOS {
namespace DistributedHardware {
class IAVTransControlCenterCallback : public IRemoteBroker {
public:
virtual int32_t SetParameter(AVTransTag tag, const std::string &value) = 0;
virtual int32_t SetSharedMemory(const AVTransSharedMemory &memory) = 0;
virtual int32_t Notify(const AVTransEvent &event) = 0;
enum class Message : uint32_t {
SET_PARAMETER = 1,
SET_SHARED_MEMORY = 2,
NOTIFY_AV_EVENT = 3
};
DECLARE_INTERFACE_DESCRIPTOR(u"ohos.distributedhardware.IAVTransControlCenterCallback");
};
}
}
#endif
@@ -1,55 +0,0 @@
/*
* Copyright (c) 2021-2023 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 OHOS_IDISTRIBUTED_HARDWARE_H
#define OHOS_IDISTRIBUTED_HARDWARE_H
#include <cstdint>
#include <string>
#include <unordered_map>
#include "iremote_broker.h"
#include "device_type.h"
#include "distributed_hardware_fwk_kit_paras.h"
#include "iav_trans_control_center_callback.h"
#include "ipublisher_listener.h"
namespace OHOS {
namespace DistributedHardware {
class IDistributedHardware : public OHOS::IRemoteBroker {
public:
DECLARE_INTERFACE_DESCRIPTOR(u"ohos.distributedhardware.accessToken");
IDistributedHardware() = default;
virtual ~IDistributedHardware() = default;
virtual int32_t RegisterPublisherListener(const DHTopic topic, const sptr<IPublisherListener> &listener) = 0;
virtual int32_t UnregisterPublisherListener(const DHTopic topic, const sptr<IPublisherListener> &listener) = 0;
virtual int32_t PublishMessage(const DHTopic topic, const std::string &msg) = 0;
virtual std::string QueryLocalSysSpec(QueryLocalSysSpecType spec) = 0;
virtual int32_t InitializeAVCenter(const TransRole &transRole, int32_t &engineId) = 0;
virtual int32_t ReleaseAVCenter(int32_t engineId) = 0;
virtual int32_t CreateControlChannel(int32_t engineId, const std::string &peerDevId) = 0;
virtual int32_t NotifyAVCenter(int32_t engineId, const AVTransEvent &event) = 0;
virtual int32_t RegisterCtlCenterCallback(int32_t engineId,
const sptr<IAVTransControlCenterCallback> &callback) = 0;
virtual int32_t NotifySourceRemoteSinkStarted(std::string &deviceId) = 0;
virtual int32_t PauseDistributedHardware(DHType dhType, const std::string &networkId) = 0;
virtual int32_t ResumeDistributedHardware(DHType dhType, const std::string &networkId) = 0;
virtual int32_t StopDistributedHardware(DHType dhType, const std::string &networkId) = 0;
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_IDISTRIBUTED_HARDWARE_H
@@ -1,41 +0,0 @@
/*
* Copyright (c) 2022 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 OHOS_DISTRIBUTED_HARDWARE_IDISTRIBUTED_HARDWARE_MANAGER_H
#define OHOS_DISTRIBUTED_HARDWARE_IDISTRIBUTED_HARDWARE_MANAGER_H
#include <string>
#include <unordered_map>
#include "device_type.h"
namespace OHOS {
namespace DistributedHardware {
class IDistributedHardwareManager {
public:
virtual ~IDistributedHardwareManager() {}
virtual int32_t Initialize() = 0;
virtual int32_t Release() = 0;
virtual int32_t SendOnLineEvent(const std::string &networkId, const std::string &uuid,
uint16_t deviceType) = 0;
virtual int32_t SendOffLineEvent(const std::string &networkId, const std::string &uuid,
uint16_t deviceType) = 0;
virtual size_t GetOnLineCount() = 0;
virtual int32_t GetComponentVersion(std::unordered_map<DHType, std::string> &versionMap) = 0;
virtual int32_t Dump(const std::vector<std::string> &argsStr, std::string &result) = 0;
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_DISTRIBUTED_HARDWARE_IDISTRIBUTED_HARDWARE_MANAGER_H
@@ -1,55 +0,0 @@
/*
* Copyright (c) 2021-2023 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 OHOS_DISTRIBUTED_HARDWARE_IDISTRIBUTED_HARDWARE_SINK_H
#define OHOS_DISTRIBUTED_HARDWARE_IDISTRIBUTED_HARDWARE_SINK_H
#include <string>
namespace OHOS {
namespace DistributedHardware {
const std::string COMPONENT_LOADER_GET_SINK_HANDLER = "GetSinkHardwareHandler";
enum class ResourceEventType : int32_t {
EVENT_TYPE_QUERY_RESOURCE = 0,
EVENT_TYPE_PULL_UP_PAGE = 1,
EVENT_TYPE_CLOSE_PAGE = 2
};
class SubscribeCallback {
public:
virtual int32_t OnSubscribeCallback(const std::string &dhId, int32_t status, const std::string &data) = 0;
};
class PrivacyResourcesListener {
public:
virtual int32_t OnPrivaceResourceMessage(const ResourceEventType &type, const std::string &subType,
const std::string &networkId, bool &isSensitive, bool &isSameAccout) = 0;
};
class IDistributedHardwareSink {
public:
virtual int32_t InitSink(const std::string &params) = 0;
virtual int32_t ReleaseSink() = 0;
virtual int32_t SubscribeLocalHardware(const std::string &dhId, const std::string &params) = 0;
virtual int32_t UnsubscribeLocalHardware(const std::string &dhId) = 0;
virtual int32_t RegisterPrivacyResources(std::shared_ptr<PrivacyResourcesListener> listener) = 0;
virtual int32_t PauseDistributedHardware(const std::string &networkId) = 0;
virtual int32_t ResumeDistributedHardware(const std::string &networkId) = 0;
virtual int32_t StopDistributedHardware(const std::string &networkId) = 0;
};
extern "C" __attribute__((visibility("default"))) IDistributedHardwareSink* GetSinkHardwareHandler();
} // namespace DistributedHardware
} // namespace OHOS
#endif
@@ -1,59 +0,0 @@
/*
* Copyright (c) 2021-2023 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 OHOS_DISTRIBUTED_HARDWARE_IDISTRIBUTED_HARDWARE_SOURCE_H
#define OHOS_DISTRIBUTED_HARDWARE_IDISTRIBUTED_HARDWARE_SOURCE_H
#include <memory>
#include <string>
namespace OHOS {
namespace DistributedHardware {
const std::string COMPONENT_LOADER_GET_SOURCE_HANDLER = "GetSourceHardwareHandler";
class RegisterCallback {
public:
virtual int32_t OnRegisterResult(const std::string &uuid, const std::string &dhId, int32_t status,
const std::string &data) = 0;
};
class UnregisterCallback {
public:
virtual int32_t OnUnregisterResult(const std::string &uuid, const std::string &dhId, int32_t status,
const std::string &data) = 0;
};
struct EnableParam {
std::string sourceVersion;
std::string sourceAttrs;
std::string sinkVersion;
std::string sinkAttrs;
std::string subtype;
};
class IDistributedHardwareSource {
public:
virtual int32_t InitSource(const std::string &params) = 0;
virtual int32_t ReleaseSource() = 0;
virtual int32_t RegisterDistributedHardware(const std::string &uuid, const std::string &dhId,
const EnableParam &param, std::shared_ptr<RegisterCallback> callback) = 0;
virtual int32_t UnregisterDistributedHardware(const std::string &uuid, const std::string &dhId,
std::shared_ptr<UnregisterCallback> callback) = 0;
virtual int32_t ConfigDistributedHardware(const std::string &uuid, const std::string &dhId, const std::string &key,
const std::string &value) = 0;
};
extern "C" __attribute__((visibility("default"))) IDistributedHardwareSource* GetSourceHardwareHandler();
} // namespace DistributedHardware
} // namespace OHOS
#endif
-51
View File
@@ -1,51 +0,0 @@
/*
* Copyright (c) 2021-2023 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 OHOS_DISTRIBUTED_HARDWARE_IHARDWARE_HANDLER_H
#define OHOS_DISTRIBUTED_HARDWARE_IHARDWARE_HANDLER_H
#include <map>
#include <memory>
#include <string>
#include <vector>
namespace OHOS {
namespace DistributedHardware {
const std::string COMPONENT_LOADER_GET_HARDWARE_HANDLER = "GetHardwareHandler";
struct DHItem {
std::string dhId;
std::string attrs;
std::string subtype;
};
class PluginListener {
public:
virtual void PluginHardware(const std::string &dhId, const std::string &attrs, const std::string &subtype) = 0;
virtual void UnPluginHardware(const std::string &dhId) = 0;
};
class IHardwareHandler {
public:
virtual int32_t Initialize() = 0;
virtual std::vector<DHItem> Query() = 0;
virtual std::map<std::string, std::string> QueryExtraInfo() = 0;
virtual bool IsSupportPlugin() = 0;
virtual void RegisterPluginListener(std::shared_ptr<PluginListener> listener) = 0;
virtual void UnRegisterPluginListener() = 0;
};
extern "C" __attribute__((visibility("default"))) IHardwareHandler* GetHardwareHandler();
} // namespace DistributedHardware
} // namespace OHOS
#endif
@@ -1,59 +0,0 @@
/*
* Copyright (c) 2022 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 OHOS_IPUBLISHER_LISTENER_H
#define OHOS_IPUBLISHER_LISTENER_H
#include <cstdint>
#include <string>
#include <iremote_broker.h>
namespace OHOS {
namespace DistributedHardware {
enum class DHTopic : uint32_t {
// Topic min border, not use for real topic
TOPIC_MIN = 0,
// Start project distributed screen
TOPIC_START_DSCREEN = 1,
// Publish Sink Project Window Info
TOPIC_SINK_PROJECT_WINDOW_INFO = 2,
// Stop distributed screen project
TOPIC_STOP_DSCREEN = 3,
// publish device offline message
TOPIC_DEV_OFFLINE = 4,
// publish low latency message
TOPIC_LOW_LATENCY = 5,
// Topic init DHMS is ready
TOPIC_INIT_DHMS_READY = 6,
// Topic for physical input devices plugin event
TOPIC_PHY_DEV_PLUGIN = 7,
// Topic max border, not use for real topic
TOPIC_MAX = 8
};
class IPublisherListener : public IRemoteBroker {
public:
virtual void OnMessage(const DHTopic topic, const std::string& message) = 0;
enum class Message : uint32_t {
ON_MESSAGE,
};
DECLARE_INTERFACE_DESCRIPTOR(u"ohos.DistributedHardware.DistributedHardwareFwk.IPublisherListener");
};
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_IPUBLISHER_LISTENER_H
-51
View File
@@ -1,51 +0,0 @@
/*
* Copyright (c) 2021-2022 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 OHOS_DISTRIBUTED_HARDWARE_SINGLE_INSTANCE_H
#define OHOS_DISTRIBUTED_HARDWARE_SINGLE_INSTANCE_H
namespace OHOS {
namespace DistributedHardware {
#define REMOVE_NO_USE_CONSTRUCTOR(className) \
private: \
className(const className&) = delete; \
className& operator= (const className&) = delete; \
className(className&&) = delete; \
className& operator= (className&&) = delete; \
#define DECLARE_SINGLE_INSTANCE_BASE(className) \
public: \
static className & GetInstance(); \
private: \
className(const className&) = delete; \
className& operator= (const className&) = delete; \
className(className&&) = delete; \
className& operator= (className&&) = delete; \
#define DECLARE_SINGLE_INSTANCE(className) \
DECLARE_SINGLE_INSTANCE_BASE(className) \
private: \
className() = default; \
virtual ~className() = default; \
#define IMPLEMENT_SINGLE_INSTANCE(className) \
className & className::GetInstance() \
{ \
static className instance; \
return instance; \
}
} // namespace DistributedHardware
} // namespace OHOS
#endif // OHOS_DISTRIBUTED_HARDWARE_SINGLE_INSTANCE_H
+1 -2
View File
@@ -28,8 +28,6 @@ ohos_shared_library("libdinput_dfx_utils") {
include_dirs = [
"include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${frameworks_path}/include",
"${dfx_utils_path}/include",
"${service_common}/include",
@@ -52,6 +50,7 @@ ohos_shared_library("libdinput_dfx_utils") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"hilog:libhilog",
"hisysevent:libhisysevent",
"ipc:ipc_core",
+1 -3
View File
@@ -30,9 +30,6 @@ ohos_unittest("distributed_input_dfx_test") {
include_dirs = [
"include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${frameworks_path}/include",
"${dfx_utils_path}/include",
"${service_common}/include",
@@ -64,6 +61,7 @@ ohos_unittest("distributed_input_dfx_test") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"hilog:libhilog",
"hisysevent:libhisysevent",
"ipc:ipc_core",
-2
View File
@@ -29,8 +29,6 @@ ohos_shared_library("libdinput_handler") {
"include",
"${common_path}/include",
"${services_state_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${service_common}/include",
"${frameworks_path}/include",
"${utils_path}/include",
@@ -30,8 +30,6 @@ ohos_unittest("distributed_input_handler_test") {
include_dirs = [
"${common_path}/include",
"${services_state_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${service_common}/include",
"${frameworks_path}/include",
"${utils_path}/include",
-2
View File
@@ -18,8 +18,6 @@ config("input_sdk_public_config") {
include_dirs = [
"${common_path}/include",
"${frameworks_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${innerkits_path}/include",
"${innerkits_path}/src",
"${ipc_path}/include",
@@ -35,8 +35,6 @@ ohos_unittest("distributed_input_inner_test") {
"${distributedinput_path}/services/include",
"${frameworks_path}/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${utils_path}/include",
"${frameworks_path}/include",
]
@@ -30,8 +30,6 @@ ohos_unittest("add_white_list_infos_callbackl_test") {
include_dirs = [
"${common_path}/include",
"${frameworks_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
"${innerkits_path}/include",
@@ -96,6 +94,7 @@ ohos_unittest("add_white_list_infos_callbackl_test") {
"access_token:libtoken_setproc",
"access_token:libtokenid_sdk",
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
@@ -30,8 +30,6 @@ ohos_unittest("distributed_input_client_test") {
include_dirs = [
"${common_path}/include",
"${frameworks_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${innerkits_path}/include",
"${innerkits_path}/src",
"${ipc_path}/include",
@@ -30,8 +30,6 @@ ohos_unittest("del_white_list_infos_callbackl_test") {
include_dirs = [
"${common_path}/include",
"${frameworks_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
"${innerkits_path}/include",
@@ -68,6 +66,7 @@ ohos_unittest("del_white_list_infos_callbackl_test") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
@@ -30,8 +30,6 @@ ohos_unittest("dinput_source_callback_test") {
include_dirs = [
"${common_path}/include",
"${frameworks_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
"${innerkits_path}/include",
@@ -96,6 +94,7 @@ ohos_unittest("dinput_source_callback_test") {
"access_token:libtoken_setproc",
"access_token:libtokenid_sdk",
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
-2
View File
@@ -30,8 +30,6 @@ ohos_unittest("distributed_input_ipc_test") {
include_dirs = [
"${common_path}/include",
"${frameworks_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${innerkits_path}/include",
"${innerkits_path}/src",
"${ipc_path}/include",
@@ -30,8 +30,6 @@ ohos_unittest("unprepare_d_input_call_back_test") {
include_dirs = [
"${common_path}/include",
"${frameworks_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
"${innerkits_path}/include",
@@ -68,6 +66,7 @@ ohos_unittest("unprepare_d_input_call_back_test") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
@@ -30,8 +30,6 @@ ohos_unittest("unregister_d_input_call_back_test") {
include_dirs = [
"${common_path}/include",
"${frameworks_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
"${innerkits_path}/include",
@@ -68,6 +66,7 @@ ohos_unittest("unregister_d_input_call_back_test") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
-2
View File
@@ -30,8 +30,6 @@ ohos_shared_library("libdinput_collector") {
"${common_path}/include",
"${services_state_path}/include",
"${frameworks_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${utils_path}/include",
]
@@ -32,8 +32,6 @@ ohos_unittest("distributed_input_inner_sinkcollector_test") {
"${common_path}/include",
"${services_state_path}/include",
"${frameworks_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${utils_path}/include",
]
-2
View File
@@ -33,8 +33,6 @@ ohos_shared_library("libdinput_sink") {
"${ipc_path}/include",
"${ipc_path}/src",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${service_common}/include",
"${services_sink_path}/transport/include",
"${services_sink_path}/inputcollector/include",
@@ -44,8 +44,6 @@ ohos_unittest("distributed_input_sinkmanager_test") {
"${frameworks_path}/include",
"${common_path}/include",
"${services_state_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${service_common}/include",
"${services_sink_path}/inputcollector/include",
"${dfx_utils_path}/include",
-2
View File
@@ -29,8 +29,6 @@ ohos_shared_library("libdinput_sink_trans") {
"include",
"${common_path}/include",
"${frameworks_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${service_common}/include",
"${dfx_utils_path}/include",
"${utils_path}/include",
@@ -31,8 +31,6 @@ ohos_unittest("distributed_input_sinktrans_test") {
"${services_sink_path}/transport/include",
"${distributedinput_path}/services/transportbase/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${frameworks_path}/include",
"${service_common}/include",
"${dfx_utils_path}/include",
-2
View File
@@ -30,8 +30,6 @@ ohos_shared_library("libdinput_inject") {
"${common_path}/include",
"${services_state_path}/include",
"${frameworks_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${service_common}/include",
"${dfx_utils_path}/include",
"${utils_path}/include",
@@ -36,8 +36,6 @@ ohos_unittest("distributed_input_inner_sourceinject_test") {
"${common_path}/include",
"${services_state_path}/include",
"${frameworks_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${service_common}/include",
"${dfx_utils_path}/include",
"${utils_path}/include",
@@ -81,6 +79,7 @@ ohos_unittest("distributed_input_inner_sourceinject_test") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
"ipc:ipc_core",
+1 -2
View File
@@ -34,8 +34,6 @@ ohos_shared_library("libdinput_source") {
"${ipc_path}/include",
"${ipc_path}/src",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${service_common}/include",
"${services_source_path}/inputinject/include",
"${services_source_path}/transport/include",
@@ -112,6 +110,7 @@ ohos_shared_library("libdinput_source") {
"access_token:libtokenid_sdk",
"c_utils:utils",
"config_policy:configpolicy_util",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
@@ -38,8 +38,6 @@ ohos_unittest("distributed_input_sourcemanager_test") {
"${distributedinput_path}/inputdevicehandler/include",
"${common_path}/include",
"${services_state_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${service_common}/include",
"${services_source_path}/inputinject/include",
"${services_source_path}/transport/include",
@@ -123,6 +121,7 @@ ohos_unittest("distributed_input_sourcemanager_test") {
"access_token:libtoken_setproc",
"access_token:libtokenid_sdk",
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"eventhandler:libeventhandler",
"hicollie:libhicollie",
+1 -2
View File
@@ -29,8 +29,6 @@ ohos_shared_library("libdinput_source_trans") {
"${av_transport_path}/common/include",
"include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${service_common}/include",
"${services_source_path}/inputinject/include",
@@ -59,6 +57,7 @@ ohos_shared_library("libdinput_source_trans") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"eventhandler:libeventhandler",
"hitrace:hitrace_meter",
@@ -33,8 +33,6 @@ ohos_unittest("distributed_input_sourcetrans_test") {
"${distributedinput_path}/services/transportbase/include",
"${common_path}/include",
"${frameworks_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
"${service_common}/include",
@@ -83,6 +81,7 @@ ohos_unittest("distributed_input_sourcetrans_test") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"eventhandler:libeventhandler",
"hitrace:hitrace_meter",
+1 -1
View File
@@ -35,7 +35,6 @@ ohos_shared_library("libdinput_sink_state") {
"${services_source_path}/inputinject/include",
"${services_sink_path}/transport/include",
"${frameworks_path}/include",
"${common_path}/utils/include",
]
sources = [
@@ -59,6 +58,7 @@ ohos_shared_library("libdinput_sink_state") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
@@ -28,7 +28,6 @@ ohos_unittest("dinput_sink_state_test") {
include_dirs = [
"${common_path}/include",
"${common_path}/utils/include",
"${services_state_path}/include",
]
@@ -52,6 +51,8 @@ ohos_unittest("dinput_sink_state_test") {
"//third_party/libevdev:libevdev",
]
external_deps = [ "distributed_hardware_fwk:distributedhardwareutils" ]
cflags_cc = [ "-DHILOG_ENABLE" ]
}
## UnitTest dinput_sink_state_test }}}
+1 -2
View File
@@ -30,8 +30,6 @@ ohos_shared_library("libdinput_trans_base") {
"include",
"${common_path}/include",
"${frameworks_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${service_common}/include",
"${dfx_utils_path}/include",
"${utils_path}/include",
@@ -57,6 +55,7 @@ ohos_shared_library("libdinput_trans_base") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
@@ -34,8 +34,6 @@ ohos_unittest("distributed_input_transbase_test") {
"${distributedinput_path}/services/transportbase/include",
"${common_path}/include",
"${fwk_interfaces_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${service_common}/include",
"${services_source_path}/inputinject/include",
"${dfx_utils_path}/include",
@@ -81,6 +79,7 @@ ohos_unittest("distributed_input_transbase_test") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"eventhandler:libeventhandler",
"hicollie:libhicollie",
+1 -2
View File
@@ -35,8 +35,6 @@ ohos_shared_library("libdinput_sink_handler") {
"${frameworks_path}/include",
"${service_common}/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${dfx_utils_path}/include",
"${utils_path}/include",
"${fwk_interfaces_path}/include",
@@ -62,6 +60,7 @@ ohos_shared_library("libdinput_sink_handler") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"eventhandler:libeventhandler",
"hisysevent:libhisysevent",
"ipc:ipc_core",
+1 -2
View File
@@ -37,8 +37,6 @@ ohos_unittest("distributed_input_sink_handler_test") {
"${frameworks_path}/include",
"${service_common}/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${dfx_utils_path}/include",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
@@ -75,6 +73,7 @@ ohos_unittest("distributed_input_sink_handler_test") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"eventhandler:libeventhandler",
"hisysevent:libhisysevent",
"ipc:ipc_core",
+1 -2
View File
@@ -35,8 +35,6 @@ ohos_shared_library("libdinput_source_handler") {
"${frameworks_path}/include",
"${service_common}/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${dfx_utils_path}/include",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
@@ -65,6 +63,7 @@ ohos_shared_library("libdinput_source_handler") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"eventhandler:libeventhandler",
"hisysevent:libhisysevent",
"ipc:ipc_core",
+1 -2
View File
@@ -37,8 +37,6 @@ ohos_unittest("distributed_input_source_handler_test") {
"${frameworks_path}/include",
"${service_common}/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${dfx_utils_path}/include",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
@@ -77,6 +75,7 @@ ohos_unittest("distributed_input_source_handler_test") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"eventhandler:libeventhandler",
"hisysevent:libhisysevent",
"ipc:ipc_core",
+1 -2
View File
@@ -36,8 +36,6 @@ ohos_fuzztest("DinputConfigDhFuzzTest") {
"${distributedinput_path}/services/state/include",
"${service_common}/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
"${services_source_path}/inputinject/include",
@@ -60,6 +58,7 @@ ohos_fuzztest("DinputConfigDhFuzzTest") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
"ipc:ipc_core",
+1 -2
View File
@@ -34,8 +34,6 @@ ohos_fuzztest("DinputInitSinkFuzzTest") {
"${distributedinput_path}/inputdevicehandler/include",
"${service_common}/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
"${services_source_path}/inputinject/include",
@@ -58,6 +56,7 @@ ohos_fuzztest("DinputInitSinkFuzzTest") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
"ipc:ipc_core",
@@ -36,8 +36,6 @@ ohos_fuzztest("DinputInitSourceFuzzTest") {
"${distributedinput_path}/inputdevicehandler/include",
"${service_common}/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
"${services_source_path}/inputinject/include",
@@ -60,6 +58,7 @@ ohos_fuzztest("DinputInitSourceFuzzTest") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
"ipc:ipc_core",
@@ -28,8 +28,6 @@ ohos_fuzztest("DinputOnSessionClosedFuzzTest") {
"${services_source_path}/transport/include",
"${distributedinput_path}/services/transportbase/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${service_common}/include",
"${services_source_path}/inputinject/include",
@@ -59,6 +57,7 @@ ohos_fuzztest("DinputOnSessionClosedFuzzTest") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
@@ -28,8 +28,6 @@ ohos_fuzztest("DinputOnSessionOpendFuzzTest") {
"${services_source_path}/transport/include",
"${distributedinput_path}/services/transportbase/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${service_common}/include",
"${services_source_path}/inputinject/include",
@@ -59,6 +57,7 @@ ohos_fuzztest("DinputOnSessionOpendFuzzTest") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
@@ -34,8 +34,6 @@ ohos_fuzztest("DinputReleaseSinkFuzzTest") {
"${distributedinput_path}/inputdevicehandler/include",
"${service_common}/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
"${services_source_path}/inputinject/include",
@@ -58,6 +56,7 @@ ohos_fuzztest("DinputReleaseSinkFuzzTest") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
"ipc:ipc_core",
@@ -36,8 +36,6 @@ ohos_fuzztest("DinputReleaseSourceFuzzTest") {
"${distributedinput_path}/services/state/include",
"${service_common}/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
"${services_source_path}/inputinject/include",
@@ -60,6 +58,7 @@ ohos_fuzztest("DinputReleaseSourceFuzzTest") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
"ipc:ipc_core",
@@ -34,8 +34,6 @@ ohos_fuzztest("DinputSubscribeLocalDhFuzzTest") {
"${distributedinput_path}/inputdevicehandler/include",
"${service_common}/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
"${services_source_path}/inputinject/include",
@@ -58,6 +56,7 @@ ohos_fuzztest("DinputSubscribeLocalDhFuzzTest") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
"ipc:ipc_core",
@@ -38,8 +38,6 @@ ohos_fuzztest("DistributedInputClientFuzzTest") {
"${distributedinput_path}/services/state/include",
"${service_common}/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
"${services_source_path}/inputinject/include",
@@ -62,6 +60,7 @@ ohos_fuzztest("DistributedInputClientFuzzTest") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
"ipc:ipc_core",
@@ -36,8 +36,6 @@ ohos_fuzztest("DistributedInputKitFuzzTest") {
"${distributedinput_path}/inputdevicehandler/include",
"${service_common}/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${utils_path}/include",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
@@ -61,6 +59,7 @@ ohos_fuzztest("DistributedInputKitFuzzTest") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"eventhandler:libeventhandler",
"ipc:ipc_core",
"json:nlohmann_json_static",
@@ -29,8 +29,6 @@ ohos_fuzztest("DistributedInputSinkTransportFuzzTest") {
"${distributedinput_path}/services/transportbase/include",
"${common_path}/include",
"${frameworks_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${service_common}/include",
"${dfx_utils_path}/include",
@@ -58,6 +56,7 @@ ohos_fuzztest("DistributedInputSinkTransportFuzzTest") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
@@ -28,8 +28,6 @@ ohos_fuzztest("DistributedInputSourceTransportFuzzTest") {
"${services_source_path}/transport/include",
"${distributedinput_path}/services/transportbase/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${service_common}/include",
"${services_source_path}/inputinject/include",
@@ -63,6 +61,7 @@ ohos_fuzztest("DistributedInputSourceTransportFuzzTest") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
@@ -28,8 +28,6 @@ ohos_fuzztest("DistributedInputTransportBaseFuzzTest") {
"${services_source_path}/transport/include",
"${distributedinput_path}/services/transportbase/include",
"${common_path}/include",
"${common_path}/log/include",
"${common_path}/utils/include",
"${fwk_interfaces_path}/include",
"${service_common}/include",
"${services_source_path}/inputinject/include",
@@ -62,6 +60,7 @@ ohos_fuzztest("DistributedInputTransportBaseFuzzTest") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"dsoftbus:softbus_client",
"eventhandler:libeventhandler",
+1 -2
View File
@@ -27,8 +27,6 @@ ohos_shared_library("libdinput_utils") {
branch_protector_ret = "pac_ret"
include_dirs = [
"${av_transport_path}/common/include",
"${common_path}/utils/include",
"${common_path}/log/include",
"${utils_path}/include",
"${common_path}/include",
"${service_common}/include",
@@ -52,6 +50,7 @@ ohos_shared_library("libdinput_utils") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"dsoftbus:softbus_client",
"hilog:libhilog",
+1 -2
View File
@@ -29,8 +29,6 @@ ohos_unittest("distributed_input_utils_test") {
include_dirs = [
"${av_transport_path}/common/include",
"${common_path}/utils/include",
"${common_path}/log/include",
"${utils_path}/include",
"${utils_path}/test/unittest",
"${common_path}/include",
@@ -68,6 +66,7 @@ ohos_unittest("distributed_input_utils_test") {
external_deps = [
"c_utils:utils",
"distributed_hardware_fwk:distributedhardwareutils",
"distributed_hardware_fwk:libdhfwk_sdk",
"hilog:libhilog",
"hisysevent:libhisysevent",