• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14if (defined(ohos_lite)) {
15  import("//build/lite/config/component/lite_component.gni")
16} else {
17  import("//build/ohos.gni")
18}
19
20import("//foundation/distributedhardware/devicemanager/devicemanager.gni")
21
22if (defined(ohos_lite)) {
23  executable("devicemanagerservice") {
24    include_dirs = [
25      "include",
26      "include/ability",
27      "include/softbus",
28      "include/requestauth",
29      "include/auth",
30      "include/ipc",
31      "include/timer",
32      "include/message",
33      "include/ipc/lite",
34      "${utils_path}/include/cipher",
35      "${utils_path}/include/log",
36      "${utils_path}/include/ipc/lite",
37      "${utils_path}/include",
38      "${common_path}/include/ipc",
39      "${common_path}/include/ipc/model",
40      "${common_path}/include",
41      "${innerkits_path}/native_cpp/include",
42      "${innerkits_path}/native_cpp/include/ipc/lite",
43    ]
44
45    include_dirs += [
46      "//base/security/deviceauth/interfaces/innerkits",
47      "//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include",
48      "//utils/native/lite/include",
49      "//utils/system/safwk/native/include",
50      "//third_party/json/include",
51      "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits/hilog",
52      "//third_party/bounds_checking_function/include",
53      "//foundation/communication/ipc_lite/interfaces/kits",
54      "//foundation/communication/dsoftbus/interfaces/kits/bus_center",
55      "//foundation/communication/dsoftbus/interfaces/kits/common",
56      "//foundation/communication/dsoftbus/interfaces/kits/discovery",
57      "//foundation/communication/dsoftbus/interfaces/kits/transport",
58      "//foundation/communication/dsoftbus/interfaces/inner_kits/transport",
59      "//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr",
60    ]
61
62    sources = [
63      "src/ability/lite/dm_ability_manager.cpp",
64      "src/auth/hichain_connector.cpp",
65      "src/ipc/ipc_server_adapter.cpp",
66      "src/ipc/ipc_server_listener_adapter.cpp",
67      "src/ipc/lite/ipc_cmd_parser.cpp",
68      "src/ipc/lite/ipc_server_listener.cpp",
69      "src/ipc/lite/ipc_server_listenermgr.cpp",
70      "src/ipc/lite/ipc_server_main.cpp",
71      "src/ipc/lite/ipc_server_stub.cpp",
72      "src/message/msg_codec.cpp",
73      "src/message/msg_head.cpp",
74      "src/message/msg_request_auth.cpp",
75      "src/message/msg_response_auth.cpp",
76      "src/message/msg_sync_group.cpp",
77      "src/requestauth/auth_manager.cpp",
78      "src/requestauth/request_session.cpp",
79      "src/requestauth/response_session.cpp",
80      "src/softbus/softbus_adapter.cpp",
81      "src/softbus/softbus_session.cpp",
82      "src/timer/dm_timer.cpp",
83    ]
84
85    defines = [
86      "LITE_DEVICE",
87      "HI_LOG_ENABLE",
88      "DH_LOG_TAG=\"devicemanagerservice\"",
89      "LOG_DOMAIN=0xD004100",
90    ]
91
92    deps = [
93      "${innerkits_path}/native_cpp:devicemanagersdk",
94      "${utils_path}:devicemanagerutils",
95      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
96      "//base/security/deviceauth/services:deviceauth_sdk",
97      "//base/startup/syspara_lite/frameworks/parameter/src:sysparam",
98      "//foundation/communication/dsoftbus/sdk:softbus_client",
99      "//foundation/communication/ipc_lite:liteipc_adapter",
100      "//foundation/distributedschedule/samgr_lite/samgr:samgr",
101      "//third_party/bounds_checking_function:libsec_shared",
102      "//third_party/mbedtls:mbedtls_shared",
103      "//utils/native/lite:utils",
104    ]
105  }
106} else {
107  ohos_shared_library("devicemanagerservice") {
108    include_dirs = [
109      "//utils/native/base/include",
110      "//utils/system/safwk/native/include",
111      "include",
112      "include/ability",
113      "include/softbus",
114      "include/requestauth",
115      "include/auth",
116      "include/ipc",
117      "include/message",
118      "include/timer",
119      "include/ipc/standard",
120      "${utils_path}/include/cipher",
121      "${utils_path}/include/log",
122      "${utils_path}/include",
123      "${utils_path}/include/ipc/standard",
124      "${common_path}/include",
125      "${common_path}/include/ipc",
126      "${common_path}/include/ipc/model",
127      "${innerkits_path}/native_cpp/include",
128      "${innerkits_path}/native_cpp/include/ipc/standard",
129      "//base/security/deviceauth/interfaces/innerkits",
130      "//base/startup/syspara_lite/adapter/native/syspara/include",
131      "//third_party/json/include",
132    ]
133
134    sources = [
135      "src/ability/standard/dm_ability_manager.cpp",
136      "src/auth/hichain_connector.cpp",
137      "src/ipc/ipc_server_adapter.cpp",
138      "src/ipc/ipc_server_listener_adapter.cpp",
139      "src/ipc/standard/ipc_cmd_parser.cpp",
140      "src/ipc/standard/ipc_server_client_proxy.cpp",
141      "src/ipc/standard/ipc_server_listener.cpp",
142      "src/ipc/standard/ipc_server_stub.cpp",
143      "src/message/msg_codec.cpp",
144      "src/message/msg_head.cpp",
145      "src/message/msg_request_auth.cpp",
146      "src/message/msg_response_auth.cpp",
147      "src/message/msg_sync_group.cpp",
148      "src/requestauth/auth_manager.cpp",
149      "src/requestauth/request_session.cpp",
150      "src/requestauth/response_session.cpp",
151      "src/softbus/softbus_adapter.cpp",
152      "src/softbus/softbus_session.cpp",
153      "src/timer/dm_timer.cpp",
154    ]
155
156    deps = [
157      "${innerkits_path}/native_cpp:devicemanagersdk",
158      "${utils_path}:devicemanagerutils",
159      "//base/security/deviceauth/services:deviceauth_sdk",
160      "//foundation/aafwk/standard/interfaces/innerkits/ability_manager:ability_manager",
161      "//foundation/aafwk/standard/interfaces/innerkits/want:want",
162      "//foundation/aafwk/standard/services/abilitymgr:abilityms",
163      "//utils/native/base:utils",
164    ]
165
166    defines = [
167      "HI_LOG_ENABLE",
168      "DH_LOG_TAG=\"devicemanagerservice\"",
169      "LOG_DOMAIN=0xD004100",
170    ]
171
172    external_deps = [
173      "appexecfwk_standard:appexecfwk_base",
174      "appexecfwk_standard:appexecfwk_core",
175      "appexecfwk_standard:libeventhandler",
176      "dsoftbus_standard:softbus_client",
177      "hiviewdfx_hilog_native:libhilog",
178      "ipc:ipc_core",
179      "safwk:system_ability_fwk",
180      "samgr_L2:samgr_proxy",
181      "startup_l2:syspara",
182    ]
183
184    subsystem_name = "distributedhardware"
185
186    part_name = "device_manager_base"
187  }
188}
189