• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (c) 2025-2025 Huawei Device Co., Ltd.
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15import("//build/config/components/ets_frontend/ets2abc_config.gni")
16import("//build/ohos.gni")
17import("//build/ohos/taihe_idl/taihe.gni")
18
19copy_taihe_idl("copy_telephonycall") {
20  sources = [ "idl/ohos.telephony.call.taihe" ]
21}
22
23subsystem_name = "telephony"
24part_name = "call_manager"
25taihe_generated_file_path = "$taihe_file_path/out/$subsystem_name/$part_name"
26
27ohos_taihe("run_taihe") {
28  taihe_generated_file_path = "$taihe_generated_file_path"
29  deps = [ ":copy_telephonycall" ]
30  outputs = [
31    "$taihe_generated_file_path/src/ohos.telephony.call.ani.cpp",
32    "$taihe_generated_file_path/src/ohos.telephony.call.abi.c",
33  ]
34}
35
36taihe_shared_library("telephony_call_taihe_native") {
37  taihe_generated_file_path = "$taihe_generated_file_path"
38  part_name = "$part_name"
39  subsystem_name = "$subsystem_name"
40  sources = get_target_outputs(":run_taihe")
41  include_dirs = [ "../../js/napi/include" ]
42  sources += [
43    "src/ani_constructor.cpp",
44    "src/ohos.telephony.call.impl.cpp",
45  ]
46  deps = [
47    ":run_taihe",
48    "//base/telephony/call_manager/frameworks/native:tel_call_manager_api"
49  ]
50  external_deps = [
51    "ability_base:base",
52    "ability_base:want",
53    "ability_runtime:ability_manager",
54    "ability_runtime:napi_common",
55    "c_utils:utils",
56    "core_service:libtel_common",
57    "core_service:tel_core_service_api",
58    "hilog:libhilog",
59    "image_framework:image",
60    "image_framework:image_native",
61    "init:libbegetutil",
62    "libuv:uv",
63    "napi:ace_napi",
64  ]
65
66  sanitize = {
67    cfi = false
68    cfi_cross_dso = false
69    debug = false
70  }
71  branch_protector_ret = "pac_ret"
72}
73
74generate_static_abc("telephony_call_abc") {
75  base_url = "$taihe_generated_file_path"
76  files = [ "$taihe_generated_file_path/@ohos.telephony.call.ets" ]
77  is_boot_abc = "True"
78  device_dst_file = "/system/framework/telephony_call_abc.abc"
79  dependencies = [ ":run_taihe" ]
80}
81
82ohos_prebuilt_etc("telephony_call_etc") {
83  source = "$target_out_dir/telephony_call_abc.abc"
84  module_install_dir = "framework"
85  part_name = "$part_name"
86  subsystem_name = "$subsystem_name"
87  deps = [ ":telephony_call_abc" ]
88}
89group("telephony_call_taihe") {
90  deps = [
91    ":telephony_call_etc",
92    ":telephony_call_taihe_native",
93  ]
94}