• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2024 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
14import("//build/ohos.gni")
15import("../../common/config/common.gni")
16
17config("edmservice_kits_config") {
18  include_dirs = [
19    "../../common/native/include",
20    "account_manager/include",
21    "application_manager/include",
22    "bluetooth_manager/include",
23    "browser/include",
24    "bundle_manager/include",
25    "common/include",
26    "datetime_manager/include",
27    "device_control/include",
28    "device_info/include",
29    "device_settings/include",
30    "location_manager/include",
31    "network_manager/include",
32    "restrictions/include",
33    "security_manager/include",
34    "system_manager/include",
35    "usb_manager/include",
36    "wifi_manager/include",
37    "telephony_manager/include",
38  ]
39}
40
41ohos_shared_library("edmservice_kits") {
42  public_configs = [
43    ":edmservice_kits_config",
44    "../../services/idl:enterprise_device_mgr_idl_gen_config",
45  ]
46
47  sources = [
48    "./account_manager/src/account_manager_proxy.cpp",
49    "./application_manager/src/application_manager_proxy.cpp",
50    "./bluetooth_manager/src/bluetooth_manager_proxy.cpp",
51    "./browser/src/browser_proxy.cpp",
52    "./bundle_manager/src/bundle_manager_proxy.cpp",
53    "./bundle_manager/src/edm_application_info.cpp",
54    "./bundle_manager/src/edm_bundle_info.cpp",
55    "./bundle_manager/src/install_param_serializer.cpp",
56    "./common/src/domain_account_policy.cpp",
57    "./common/src/edm_load_callback.cpp",
58    "./common/src/edm_load_manager.cpp",
59    "./common/src/ent_info.cpp",
60    "./common/src/enterprise_device_mgr_proxy.cpp",
61    "./datetime_manager/src/datetime_manager_proxy.cpp",
62    "./device_control/src/device_control_proxy.cpp",
63    "./device_info/src/device_info_proxy.cpp",
64    "./device_settings/src/device_settings_proxy.cpp",
65    "./device_settings/src/power_policy.cpp",
66    "./device_settings/src/wall_paper_param_serializer.cpp",
67    "./location_manager/src/location_manager_proxy.cpp",
68    "./network_manager/src/network_manager_proxy.cpp",
69    "./restrictions/src/fingerprint_policy_serializer.cpp",
70    "./restrictions/src/restrictions_proxy.cpp",
71    "./security_manager/src/security_manager_proxy.cpp",
72    "./system_manager/src/system_manager_proxy.cpp",
73    "./system_manager/src/update_policy_utils.cpp",
74    "./usb_manager/src/array_usb_device_id_serializer.cpp",
75    "./usb_manager/src/usb_manager_proxy.cpp",
76    "./wifi_manager/src/array_wifi_id_serializer.cpp",
77    "./wifi_manager/src/wifi_manager_proxy.cpp",
78    "./telephony_manager/src/telephony_manager_proxy.cpp",
79    "./telephony_manager/src/telephony_call_policy_serializer.cpp",
80  ]
81
82  innerapi_tags = [ "platformsdk" ]
83
84  configs = [ "../../common/config:coverage_flags" ]
85
86  version_script = "libedmservice_kits.map"
87
88  deps = [
89    "../../common/native:edm_commom",
90    "../../services/idl:enterprise_device_mgr_idl_proxy",
91    "./plugin_kits:plugin_kits",
92  ]
93
94  external_deps = [
95    "bundle_framework:appexecfwk_base",
96    "cJSON:cjson",
97    "c_utils:utils",
98    "hilog:libhilog",
99    "init:libbegetutil",
100    "ipc:ipc_core",
101    "samgr:samgr_proxy",
102    "ability_base:want"
103  ]
104
105  defines = []
106
107  if (os_account_edm_enable) {
108    external_deps += [ "os_account:os_account_innerkits" ]
109    defines += [ "OS_ACCOUNT_EDM_ENABLE" ]
110    sources += [ "./security_manager/src/watermark_image_serializer.cpp" ]
111  }
112
113  if (useriam_edm_enable) {
114    sources += [ "./security_manager/src/password_policy_serializer.cpp" ]
115  }
116
117  if (netmanager_base_edm_enable) {
118    external_deps += [ "netmanager_base:net_conn_manager_if" ]
119    defines += [ "NETMANAGER_BASE_EDM_ENABLE" ]
120  }
121
122  if (wifi_edm_enable) {
123    external_deps += [ "wifi:wifi_sdk" ]
124    defines += [ "WIFI_EDM_ENABLE" ]
125  }
126
127  if (drivers_interface_usb_edm_enable && usb_manager_edm_enable) {
128    external_deps += [ "usb_manager:usbsrv_client" ]
129    defines += [ "USB_EDM_ENABLE" ]
130  }
131
132  if (pasteboard_edm_enable) {
133    sources += [ "./security_manager/src/clipboard_policy_serializer.cpp" ]
134  }
135
136  if (enterprise_device_management_feature_pc_only) {
137    defines += [ "FEATURE_PC_ONLY" ]
138  }
139
140  sanitize = {
141    boundary_sanitize = true
142    cfi = true
143    cfi_cross_dso = true
144    debug = false
145    integer_overflow = true
146    ubsan = true
147  }
148  branch_protector_ret = "pac_ret"
149  subsystem_name = "customization"
150  part_name = "enterprise_device_management"
151}
152