1885b47fbSopenharmony_ci# Copyright (C) 2022 Huawei Device Co., Ltd.
2885b47fbSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3885b47fbSopenharmony_ci# you may not use this file except in compliance with the License.
4885b47fbSopenharmony_ci# You may obtain a copy of the License at
5885b47fbSopenharmony_ci#
6885b47fbSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7885b47fbSopenharmony_ci#
8885b47fbSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9885b47fbSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10885b47fbSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11885b47fbSopenharmony_ci# See the License for the specific language governing permissions and
12885b47fbSopenharmony_ci# limitations under the License.
13885b47fbSopenharmony_ci
14885b47fbSopenharmony_ciimport("//build/ohos.gni")
15885b47fbSopenharmony_ci
16885b47fbSopenharmony_ciconfig("accessibility_interface_private_config") {
17885b47fbSopenharmony_ci  visibility = [ ":*" ]
18885b47fbSopenharmony_ci
19885b47fbSopenharmony_ci  include_dirs = [
20885b47fbSopenharmony_ci    "include/parcel",
21885b47fbSopenharmony_ci    "../log/include",
22885b47fbSopenharmony_ci  ]
23885b47fbSopenharmony_ci
24885b47fbSopenharmony_ci  defines = [
25885b47fbSopenharmony_ci    "AAMS_LOG_TAG = \"accessibility_interface\"",
26885b47fbSopenharmony_ci    "AAMS_LOG_DOMAIN = 0xD001D05",
27885b47fbSopenharmony_ci  ]
28885b47fbSopenharmony_ci
29885b47fbSopenharmony_ci  if (target_cpu == "arm") {
30885b47fbSopenharmony_ci    cflags = [ "-DBINDER_IPC_32BIT" ]
31885b47fbSopenharmony_ci  }
32885b47fbSopenharmony_ci
33885b47fbSopenharmony_ci  if (build_variant == "user") {
34885b47fbSopenharmony_ci    defines += [ "RELEASE_VERSION" ]
35885b47fbSopenharmony_ci  }
36885b47fbSopenharmony_ci}
37885b47fbSopenharmony_ci
38885b47fbSopenharmony_ciconfig("accessibility_interface_public_config") {
39885b47fbSopenharmony_ci  include_dirs = [ "include" ]
40885b47fbSopenharmony_ci}
41885b47fbSopenharmony_ci
42885b47fbSopenharmony_ciaccessibility_interface_src = [
43885b47fbSopenharmony_ci  "src/accessibility_element_operator_callback_proxy.cpp",
44885b47fbSopenharmony_ci  "src/accessibility_element_operator_callback_stub.cpp",
45885b47fbSopenharmony_ci  "src/accessibility_element_operator_proxy.cpp",
46885b47fbSopenharmony_ci  "src/accessibility_element_operator_stub.cpp",
47885b47fbSopenharmony_ci  "src/accessibility_enable_ability_lists_observer_proxy.cpp",
48885b47fbSopenharmony_ci  "src/accessibility_enable_ability_lists_observer_stub.cpp",
49885b47fbSopenharmony_ci  "src/accessible_ability_channel_proxy.cpp",
50885b47fbSopenharmony_ci  "src/accessible_ability_channel_stub.cpp",
51885b47fbSopenharmony_ci  "src/accessible_ability_client_proxy.cpp",
52885b47fbSopenharmony_ci  "src/accessible_ability_client_stub.cpp",
53885b47fbSopenharmony_ci  "src/accessible_ability_manager_caption_observer_proxy.cpp",
54885b47fbSopenharmony_ci  "src/accessible_ability_manager_caption_observer_stub.cpp",
55885b47fbSopenharmony_ci  "src/accessible_ability_manager_service_proxy.cpp",
56885b47fbSopenharmony_ci  "src/accessible_ability_manager_service_stub.cpp",
57885b47fbSopenharmony_ci  "src/accessible_ability_manager_state_observer_proxy.cpp",
58885b47fbSopenharmony_ci  "src/accessible_ability_manager_state_observer_stub.cpp",
59885b47fbSopenharmony_ci  "src/accessible_ability_manager_config_observer_proxy.cpp",
60885b47fbSopenharmony_ci  "src/accessible_ability_manager_config_observer_stub.cpp",
61885b47fbSopenharmony_ci]
62885b47fbSopenharmony_ci
63885b47fbSopenharmony_ciaccessibility_data_parcel_src = [
64885b47fbSopenharmony_ci  "src/parcel/accessibility_ability_info_parcel.cpp",
65885b47fbSopenharmony_ci  "src/parcel/accessibility_caption_parcel.cpp",
66885b47fbSopenharmony_ci  "src/parcel/accessibility_element_info_parcel.cpp",
67885b47fbSopenharmony_ci  "src/parcel/accessibility_event_info_parcel.cpp",
68885b47fbSopenharmony_ci  "src/parcel/accessibility_window_info_parcel.cpp",
69885b47fbSopenharmony_ci  "src/parcel/accessibility_gesture_inject_path_parcel.cpp",
70885b47fbSopenharmony_ci]
71885b47fbSopenharmony_ci
72885b47fbSopenharmony_ciohos_shared_library("accessibility_interface") {
73885b47fbSopenharmony_ci  branch_protector_ret = "pac_ret"
74885b47fbSopenharmony_ci  sanitize = {
75885b47fbSopenharmony_ci    integer_overflow = true
76885b47fbSopenharmony_ci    ubsan = true
77885b47fbSopenharmony_ci    boundary_sanitize = true
78885b47fbSopenharmony_ci    cfi = true
79885b47fbSopenharmony_ci    cfi_cross_dso = true
80885b47fbSopenharmony_ci    debug = false
81885b47fbSopenharmony_ci  }
82885b47fbSopenharmony_ci
83885b47fbSopenharmony_ci  sources = accessibility_interface_src
84885b47fbSopenharmony_ci  sources += accessibility_data_parcel_src
85885b47fbSopenharmony_ci  configs = [
86885b47fbSopenharmony_ci    ":accessibility_interface_private_config",
87885b47fbSopenharmony_ci    "../../resources/config/build:coverage_flags",
88885b47fbSopenharmony_ci  ]
89885b47fbSopenharmony_ci
90885b47fbSopenharmony_ci  public_configs = [ ":accessibility_interface_public_config" ]
91885b47fbSopenharmony_ci
92885b47fbSopenharmony_ci  deps = [ "../../interfaces/innerkits/common:accessibility_common" ]
93885b47fbSopenharmony_ci
94885b47fbSopenharmony_ci  external_deps = [
95885b47fbSopenharmony_ci    "access_token:libaccesstoken_sdk",
96885b47fbSopenharmony_ci    "access_token:libtokenid_sdk",
97885b47fbSopenharmony_ci    "c_utils:utils",
98885b47fbSopenharmony_ci    "ffrt:libffrt",
99885b47fbSopenharmony_ci    "hilog:libhilog",
100885b47fbSopenharmony_ci    "input:libmmi-client",
101885b47fbSopenharmony_ci    "ipc:ipc_single",
102885b47fbSopenharmony_ci  ]
103885b47fbSopenharmony_ci
104885b47fbSopenharmony_ci  install_enable = true
105885b47fbSopenharmony_ci
106885b47fbSopenharmony_ci  subsystem_name = "barrierfree"
107885b47fbSopenharmony_ci  innerapi_tags = [ "platformsdk_indirect" ]
108885b47fbSopenharmony_ci  part_name = "accessibility"
109885b47fbSopenharmony_ci}
110