• 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("//base/inputmethod/imf/inputmethod.gni")
15import("//build/ohos.gni")
16
17config("inputmethod_services_native_config") {
18  visibility = [ ":*" ]
19  include_dirs = [
20    "include",
21    "${inputmethod_path}/common/include",
22    "${inputmethod_path}/frameworks/common",
23    "${inputmethod_path}/frameworks/native/inputmethod_ability/include",
24    "${inputmethod_path}/frameworks/native/inputmethod_controller/include",
25    "${inputmethod_path}/interfaces/inner_api/inputmethod_ability/include",
26    "${inputmethod_path}/interfaces/inner_api/inputmethod_controller/include",
27    "${inputmethod_path}/services/adapter/focus_monitor/include",
28    "${inputmethod_path}/services/adapter/ime_connection_manager/include",
29    "${inputmethod_path}/services/adapter/keyboard/include",
30    "${inputmethod_path}/services/adapter/os_account_adapter/include",
31    "${inputmethod_path}/services/adapter/system_language_observer/include",
32    "${inputmethod_path}/services/adapter/window_adapter/include",
33    "${inputmethod_path}/services/adapter/wms_connection_monitor/include",
34    "${inputmethod_path}/services/identity_checker/include",
35  ]
36}
37
38ohos_shared_library("inputmethod_service") {
39  branch_protector_ret = "pac_ret"
40  sanitize = {
41    boundary_sanitize = true
42    cfi = true
43    cfi_cross_dso = true
44    debug = false
45    integer_overflow = true
46    ubsan = true
47  }
48  cflags_cc = [
49    "-fexceptions",
50    "-fvisibility=hidden",
51    "-fvisibility-inlines-hidden",
52    "-fdata-sections",
53    "-ffunction-sections",
54    "-Oz",
55    "-Wno-c99-designator",
56  ]
57  sources = [
58    "${inputmethod_path}/frameworks/native/inputmethod_ability/src/input_method_core_proxy.cpp",
59    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_client_proxy.cpp",
60    "${inputmethod_path}/services/adapter/focus_monitor/src/focus_change_listener.cpp",
61    "${inputmethod_path}/services/adapter/focus_monitor/src/focus_monitor_manager.cpp",
62    "${inputmethod_path}/services/adapter/ime_connection_manager/src/ime_connection.cpp",
63    "${inputmethod_path}/services/adapter/system_language_observer/src/system_language_observer.cpp",
64    "${inputmethod_path}/services/adapter/window_adapter/src/window_adapter.cpp",
65    "${inputmethod_path}/services/adapter/window_adapter/src/window_display_changed_listener.cpp",
66    "${inputmethod_path}/services/adapter/wms_connection_monitor/src/wms_connection_monitor_manager.cpp",
67    "${inputmethod_path}/services/adapter/wms_connection_monitor/src/wms_connection_observer.cpp",
68    "${inputmethod_path}/services/identity_checker/src/identity_checker_impl.cpp",
69    "adapter/os_account_adapter/src/os_account_adapter.cpp",
70    "src/freeze_manager.cpp",
71    "src/full_ime_info_manager.cpp",
72    "src/im_common_event_manager.cpp",
73    "src/ime_cfg_manager.cpp",
74    "src/ime_info_inquirer.cpp",
75    "src/input_control_channel_stub.cpp",
76    "src/input_method_system_ability.cpp",
77    "src/input_method_system_ability_stub.cpp",
78    "src/input_type_manager.cpp",
79    "src/peruser_session.cpp",
80    "src/sys_cfg_parser.cpp",
81    "src/user_session_manager.cpp",
82  ]
83
84  configs = [ ":inputmethod_services_native_config" ]
85
86  public_configs = [ ":inputmethod_services_native_config" ]
87
88  deps = [
89    "${inputmethod_path}/common:inputmethod_common",
90    "${inputmethod_path}/common/imf_hisysevent:imf_hisysevent",
91    "${inputmethod_path}/services/adapter/keyboard:keboard_event_static",
92    "${inputmethod_path}/services/adapter/settings_data_provider:settings_data_static",
93    "${inputmethod_path}/services/file:imf_file_static",
94    "${inputmethod_path}/services/json:imf_json_static",
95  ]
96
97  external_deps = [
98    "ability_base:want",
99    "ability_runtime:ability_connect_callback_stub",
100    "ability_runtime:ability_manager",
101    "ability_runtime:app_manager",
102    "access_token:libaccesstoken_sdk",
103    "access_token:libtokenid_sdk",
104    "bundle_framework:appexecfwk_base",
105    "bundle_framework:appexecfwk_core",
106    "c_utils:utils",
107    "common_event_service:cesfwk_innerkits",
108    "config_policy:configpolicy_util",
109    "data_share:datashare_common",
110    "data_share:datashare_consumer",
111    "eventhandler:libeventhandler",
112    "hicollie:libhicollie",
113    "hilog:libhilog",
114    "i18n:intl_util",
115    "init:libbeget_proxy",
116    "init:libbegetutil",
117    "input:libmmi-client",
118    "ipc:ipc_single",
119    "memmgr:memmgrclient",
120    "os_account:os_account_innerkits",
121    "resource_management:global_resmgr",
122    "resource_schedule_service:ressched_client",
123    "safwk:system_ability_fwk",
124    "samgr:samgr_proxy",
125    "window_manager:libwsutils",
126  ]
127
128  defines = []
129  if (imf_screenlock_mgr_enable) {
130    defines += [ "IMF_SCREENLOCK_MGR_ENABLE" ]
131    external_deps += [ "screenlock_mgr:screenlock_client" ]
132  }
133  if (window_manager_use_sceneboard) {
134    external_deps += [ "window_manager:libwm_lite" ]
135    defines += [ "SCENE_BOARD_ENABLE" ]
136  } else {
137    external_deps += [ "window_manager:libwm" ]
138  }
139
140  if (imf_on_demand_start_stop_sa_enable) {
141    defines += [ "IMF_ON_DEMAND_START_STOP_SA_ENABLE" ]
142  }
143  subsystem_name = "inputmethod"
144  part_name = "imf"
145}
146
147ohos_static_library("inputmethod_service_static") {
148  branch_protector_ret = "pac_ret"
149  sanitize = {
150    cfi = true
151    cfi_cross_dso = true
152    debug = false
153  }
154  cflags_cc = [
155    "-fdata-sections",
156    "-ffunction-sections",
157    "-Oz",
158  ]
159  sources = [
160    "${inputmethod_path}/frameworks/native/inputmethod_ability/src/input_method_core_proxy.cpp",
161    "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_client_proxy.cpp",
162    "adapter/focus_monitor/src/focus_change_listener.cpp",
163    "adapter/focus_monitor/src/focus_monitor_manager.cpp",
164    "adapter/ime_connection_manager/src/ime_connection.cpp",
165    "adapter/os_account_adapter/src/os_account_adapter.cpp",
166    "adapter/system_language_observer/src/system_language_observer.cpp",
167    "adapter/window_adapter/src/window_adapter.cpp",
168    "adapter/window_adapter/src/window_display_changed_listener.cpp",
169    "adapter/wms_connection_monitor/src/wms_connection_monitor_manager.cpp",
170    "adapter/wms_connection_monitor/src/wms_connection_observer.cpp",
171    "identity_checker/src/identity_checker_impl.cpp",
172    "src/freeze_manager.cpp",
173    "src/full_ime_info_manager.cpp",
174    "src/im_common_event_manager.cpp",
175    "src/ime_cfg_manager.cpp",
176    "src/ime_info_inquirer.cpp",
177    "src/input_control_channel_stub.cpp",
178    "src/input_method_system_ability.cpp",
179    "src/input_method_system_ability_stub.cpp",
180    "src/input_type_manager.cpp",
181    "src/peruser_session.cpp",
182    "src/sys_cfg_parser.cpp",
183    "src/user_session_manager.cpp",
184  ]
185
186  public_configs = [ ":inputmethod_services_native_config" ]
187
188  public_deps = [
189    "${inputmethod_path}/common:inputmethod_common",
190    "${inputmethod_path}/common/imf_hisysevent:imf_hisysevent",
191    "adapter/keyboard:keboard_event_static",
192    "adapter/settings_data_provider:settings_data_static",
193    "file:imf_file_static",
194    "json:imf_json_static",
195  ]
196
197  external_deps = [
198    "ability_base:want",
199    "ability_runtime:ability_manager",
200    "ability_runtime:app_manager",
201    "access_token:libaccesstoken_sdk",
202    "access_token:libtokenid_sdk",
203    "bundle_framework:appexecfwk_base",
204    "bundle_framework:appexecfwk_core",
205    "c_utils:utils",
206    "common_event_service:cesfwk_innerkits",
207    "config_policy:configpolicy_util",
208    "data_share:datashare_common",
209    "data_share:datashare_consumer",
210    "eventhandler:libeventhandler",
211    "hicollie:libhicollie",
212    "hilog:libhilog",
213    "i18n:intl_util",
214    "init:libbeget_proxy",
215    "init:libbegetutil",
216    "input:libmmi-client",
217    "ipc:ipc_single",
218    "memmgr:memmgrclient",
219    "os_account:os_account_innerkits",
220    "resource_management:global_resmgr",
221    "resource_schedule_service:ressched_client",
222    "safwk:system_ability_fwk",
223    "samgr:samgr_proxy",
224    "window_manager:libwsutils",
225  ]
226
227  defines = []
228  if (imf_screenlock_mgr_enable) {
229    defines += [ "IMF_SCREENLOCK_MGR_ENABLE" ]
230    external_deps += [ "screenlock_mgr:screenlock_client" ]
231  }
232  if (window_manager_use_sceneboard) {
233    external_deps += [ "window_manager:libwm_lite" ]
234    defines += [ "SCENE_BOARD_ENABLE" ]
235  } else {
236    external_deps += [ "window_manager:libwm" ]
237  }
238  subsystem_name = "inputmethod"
239  part_name = "imf"
240}
241