1# Copyright (c) 2022 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
14LOCATION_ROOT_DIR = "//base/location"
15SUBSYSTEM_DIR = "$LOCATION_ROOT_DIR/services"
16ARKUI_ROOT_DIR = "//foundation/arkui"
17IPC_ROOT_DIR = "//foundation/communication/ipc"
18LOCATION_GNSS_ROOT = "$SUBSYSTEM_DIR/location_gnss/gnss"
19LOCATION_LOCATOR_ROOT = "$SUBSYSTEM_DIR/location_locator/locator"
20LOCATION_LOCATOR_CALLBACK_ROOT =
21    "$SUBSYSTEM_DIR/location_locator/LOCATION_LOCATOR_CALLBACK_ROOT"
22LOCATION_GEOCONVERT_ROOT = "$SUBSYSTEM_DIR/location_geocode/geocode"
23LOCATION_NETWORK_ROOT = "$SUBSYSTEM_DIR/location_network/network"
24LOCATION_PASSIVE_ROOT = "$SUBSYSTEM_DIR/location_passive/passive"
25SAMGR_ROOT_DIR = "//foundation/systemabilitymgr"
26SECURITY_ROOT_DIR = "//base/security"
27START_UP_ROOT_DIR = "//base/startup"
28GOOGLE_TEST_DIR = "//third_party/googletest"
29DFX_HILOG_DIR = "//base/hiviewdfx/hilog"
30ABILITY_RUNTIME = "//foundation/ability/ability_runtime"
31LOCATION_NATIVE_DIR = "$LOCATION_ROOT_DIR/frameworks/native"
32LOCATION_NOTIFICATION_DIR = "$LOCATION_ROOT_DIR/frameworks/native/notification"
33LOCATION_COMMON_DIR = "$LOCATION_ROOT_DIR/frameworks/location_common/common"
34ability_runtime_path = "//foundation/ability/ability_runtime"
35ability_runtime_napi_path = "${ability_runtime_path}/frameworks/js/napi"
36WIFI_MANAGER_ROOT = "//foundation/communication/wifi/wifi"
37
38declare_args() {
39  location_feature_with_geocode = true
40  location_feature_with_gnss = true
41  location_feature_with_network = true
42  location_feature_with_passive = true
43  location_feature_with_jsstack = true
44  i18n_enable = true
45  telephony_core_service_enable = true
46  telephony_cellular_data_enable = true
47  hdf_drivers_interface_location_gnss_enable = true
48  hdf_drivers_interface_location_agnss_enable = true
49  communication_wifi_enable = true
50  communication_bluetooth_enable = true
51  resourceschedule_background_task_mgr_enable = true
52  resourceschedule_schedule_service_enable = true
53  ability_form_fwk_enable = true
54  call_manager_enable = true
55  sms_mms_enable = true
56  common_event_service_enable = true
57  hdf_drivers_interface_location_geofence_enable = true
58  multimedia_image_framework_enable = true
59  notification_distributed_notification_service_enable = true
60  movement_client_enable = true
61  location_device_standby_enable = true
62  time_service_enable = true
63  net_manager_enable = true
64
65  if (defined(global_parts_info) && !defined(global_parts_info.global_i18n)) {
66    i18n_enable = false
67  }
68
69  if (defined(global_parts_info) &&
70      !defined(global_parts_info.telephony_core_service)) {
71    telephony_core_service_enable = false
72  }
73
74  if (defined(global_parts_info) &&
75      !defined(global_parts_info.telephony_cellular_data)) {
76    telephony_cellular_data_enable = false
77  }
78
79  if (defined(global_parts_info) &&
80      !defined(global_parts_info.hdf_drivers_interface_location_gnss)) {
81    hdf_drivers_interface_location_gnss_enable = false
82  }
83
84  if (defined(global_parts_info) &&
85      !defined(global_parts_info.hdf_drivers_interface_location_agnss)) {
86    hdf_drivers_interface_location_agnss_enable = false
87  }
88
89  if (defined(global_parts_info) &&
90      !defined(global_parts_info.hdf_drivers_interface_location_geofence)) {
91    hdf_drivers_interface_location_geofence_enable = false
92  }
93
94  if (defined(global_parts_info) &&
95      !defined(global_parts_info.communication_wifi)) {
96    communication_wifi_enable = false
97  }
98
99  if (defined(global_parts_info) &&
100      !defined(global_parts_info.communication_bluetooth)) {
101    communication_bluetooth_enable = false
102  }
103
104  if (defined(global_parts_info) &&
105      !defined(global_parts_info.resourceschedule_background_task_mgr)) {
106    resourceschedule_background_task_mgr_enable = false
107  }
108
109  if (defined(global_parts_info) &&
110      !defined(global_parts_info.ability_form_fwk)) {
111    ability_form_fwk_enable = false
112  }
113
114  if (defined(global_parts_info) &&
115      !defined(global_parts_info.resourceschedule_resource_schedule_service)) {
116    resourceschedule_schedule_service_enable = false
117  }
118
119  if (defined(global_parts_info) &&
120      !defined(global_parts_info.telephony_call_manager)) {
121    call_manager_enable = false
122  }
123
124  if (defined(global_parts_info) &&
125      !defined(global_parts_info.notification_common_event_service)) {
126    common_event_service_enable = false
127  }
128
129  if (defined(global_parts_info) &&
130      !defined(global_parts_info.telephony_sms_mms)) {
131    sms_mms_enable = false
132  }
133
134  if (defined(global_parts_info) &&
135      !defined(global_parts_info.multimedia_image_framework)) {
136    multimedia_image_framework_enable = false
137  }
138
139  if (defined(global_parts_info) && !defined(
140          global_parts_info.notification_distributed_notification_service)) {
141    notification_distributed_notification_service_enable = false
142  }
143
144  if (defined(global_parts_info) && !defined(global_parts_info.msdp_movement)) {
145    movement_client_enable = false
146  }
147
148  if (defined(global_parts_info) &&
149      !defined(global_parts_info.resourceschedule_device_standby)) {
150    location_device_standby_enable = false
151  }
152
153  if (defined(global_parts_info) &&
154      !defined(global_parts_info.time_time_service)) {
155    time_service_enable = false
156  }
157
158  if (defined(global_parts_info) &&
159      !defined(global_parts_info.communication_netmanager_base)) {
160    net_manager_enable = false
161  }
162}
163