• 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
14import("//build/ohos.gni")
15
16declare_args() {
17  telephony_state_registry_hicollie_able = true
18  if (defined(global_parts_info) &&
19      !defined(global_parts_info.hiviewdfx_hicollie)) {
20    telephony_state_registry_hicollie_able = false
21  }
22}
23
24telephony_extra_defines = []
25
26if (defined(global_parts_info) &&
27    defined(global_parts_info.telephony_telephony_enhanced)) {
28  telephony_extra_defines += [ "OHOS_BUILD_ENABLE_TELEPHONY_EXT" ]
29  telephony_extra_defines += [ "OHOS_BUILD_ENABLE_TELEPHONY_VSIM" ]
30}
31
32ohos_shared_library("tel_state_registry") {
33  sanitize = {
34    cfi = true
35    cfi_cross_dso = true
36    debug = false
37  }
38  branch_protector_ret = "pac_ret"
39  part_name = "state_registry"
40  subsystem_name = "telephony"
41
42  sources = [
43    "frameworks/native/observer/src/telephony_observer_proxy.cpp",
44    "services/src/telephony_state_registry_dump_helper.cpp",
45    "services/src/telephony_state_registry_record.cpp",
46    "services/src/telephony_state_registry_service.cpp",
47    "services/src/telephony_state_registry_stub.cpp",
48    "services/telephony_ext_wrapper/src/telephony_ext_wrapper.cpp",
49  ]
50
51  include_dirs = [
52    "frameworks/native/observer/include",
53    "frameworks/native/common/include",
54    "services/include",
55    "services/telephony_ext_wrapper/include",
56  ]
57
58  external_deps = [
59    "ability_base:want",
60    "access_token:libaccesstoken_sdk",
61    "c_utils:utils",
62    "common_event_service:cesfwk_innerkits",
63    "core_service:libtel_common",
64    "core_service:tel_core_service_api",
65    "hilog:libhilog",
66    "init:libbegetutil",
67    "ipc:ipc_core",
68    "safwk:system_ability_fwk",
69    "samgr:samgr_proxy",
70  ]
71
72  cflags_cc = [
73    "-O2",
74    "-D_FORTIFY_SOURCE=2",
75  ]
76
77  defines = [
78    "TELEPHONY_LOG_TAG = \"StateRegistry\"",
79    "LOG_DOMAIN = 0xD001F07",
80  ]
81
82  if (telephony_state_registry_hicollie_able) {
83    external_deps += [ "hicollie:libhicollie" ]
84    defines += [ "HICOLLIE_ENABLE" ]
85  }
86
87  defines += telephony_extra_defines
88}
89