15b8fca66Sopenharmony_ci# Copyright (C) 2021 Huawei Device Co., Ltd.
25b8fca66Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
35b8fca66Sopenharmony_ci# you may not use this file except in compliance with the License.
45b8fca66Sopenharmony_ci# You may obtain a copy of the License at
55b8fca66Sopenharmony_ci#
65b8fca66Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
75b8fca66Sopenharmony_ci#
85b8fca66Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
95b8fca66Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
105b8fca66Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
115b8fca66Sopenharmony_ci# See the License for the specific language governing permissions and
125b8fca66Sopenharmony_ci# limitations under the License.
135b8fca66Sopenharmony_ciimport("//build/ohos.gni")
145b8fca66Sopenharmony_ciSUBSYSTEM_DIR = "../../.."
155b8fca66Sopenharmony_ci
165b8fca66Sopenharmony_ciconfig("state_registry_observer_config") {
175b8fca66Sopenharmony_ci  include_dirs = [
185b8fca66Sopenharmony_ci    "$SUBSYSTEM_DIR/interfaces/innerkits/observer",
195b8fca66Sopenharmony_ci    "$SUBSYSTEM_DIR/frameworks/native/common/include",
205b8fca66Sopenharmony_ci    "$SUBSYSTEM_DIR/services/include",
215b8fca66Sopenharmony_ci  ]
225b8fca66Sopenharmony_ci}
235b8fca66Sopenharmony_ci
245b8fca66Sopenharmony_ciohos_shared_library("tel_state_registry_api") {
255b8fca66Sopenharmony_ci  sanitize = {
265b8fca66Sopenharmony_ci    cfi = true
275b8fca66Sopenharmony_ci    cfi_cross_dso = true
285b8fca66Sopenharmony_ci    debug = false
295b8fca66Sopenharmony_ci  }
305b8fca66Sopenharmony_ci  branch_protector_ret = "pac_ret"
315b8fca66Sopenharmony_ci  sources = [
325b8fca66Sopenharmony_ci    "$SUBSYSTEM_DIR/frameworks/native/observer/src/telephony_observer.cpp",
335b8fca66Sopenharmony_ci    "$SUBSYSTEM_DIR/frameworks/native/observer/src/telephony_observer_client.cpp",
345b8fca66Sopenharmony_ci    "$SUBSYSTEM_DIR/frameworks/native/observer/src/telephony_observer_proxy.cpp",
355b8fca66Sopenharmony_ci    "$SUBSYSTEM_DIR/frameworks/native/observer/src/telephony_state_manager.cpp",
365b8fca66Sopenharmony_ci  ]
375b8fca66Sopenharmony_ci
385b8fca66Sopenharmony_ci  include_dirs = [ "$SUBSYSTEM_DIR/frameworks/native/observer/include" ]
395b8fca66Sopenharmony_ci
405b8fca66Sopenharmony_ci  version_script = "$SUBSYSTEM_DIR/interfaces/innerkits/libtel_state_registry_api.versionscript"
415b8fca66Sopenharmony_ci
425b8fca66Sopenharmony_ci  public_configs = [ ":state_registry_observer_config" ]
435b8fca66Sopenharmony_ci
445b8fca66Sopenharmony_ci  external_deps = [
455b8fca66Sopenharmony_ci    "c_utils:utils",
465b8fca66Sopenharmony_ci    "core_service:libtel_common",
475b8fca66Sopenharmony_ci    "core_service:tel_core_service_api",
485b8fca66Sopenharmony_ci    "hilog:libhilog",
495b8fca66Sopenharmony_ci    "ipc:ipc_core",
505b8fca66Sopenharmony_ci    "samgr:samgr_proxy",
515b8fca66Sopenharmony_ci  ]
525b8fca66Sopenharmony_ci
535b8fca66Sopenharmony_ci  defines = [
545b8fca66Sopenharmony_ci    "TELEPHONY_LOG_TAG = \"StateRegistryApi\"",
555b8fca66Sopenharmony_ci    "LOG_DOMAIN = 0xD001F07",
565b8fca66Sopenharmony_ci  ]
575b8fca66Sopenharmony_ci
585b8fca66Sopenharmony_ci  cflags_cc = [
595b8fca66Sopenharmony_ci    "-O2",
605b8fca66Sopenharmony_ci    "-D_FORTIFY_SOURCE=2",
615b8fca66Sopenharmony_ci  ]
625b8fca66Sopenharmony_ci
635b8fca66Sopenharmony_ci  install_images = [ system_base_dir ]
645b8fca66Sopenharmony_ci  relative_install_dir = "platformsdk"
655b8fca66Sopenharmony_ci  innerapi_tags = [ "platformsdk" ]
665b8fca66Sopenharmony_ci  part_name = "state_registry"
675b8fca66Sopenharmony_ci  subsystem_name = "telephony"
685b8fca66Sopenharmony_ci}
69