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_param_adapter/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_controller/src/input_client_info.cpp", 59 "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_method_tools.cpp", 60 "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_method_utils.cpp", 61 "${inputmethod_path}/services/adapter/focus_monitor/src/focus_change_listener.cpp", 62 "${inputmethod_path}/services/adapter/focus_monitor/src/focus_monitor_manager.cpp", 63 "${inputmethod_path}/services/adapter/ime_connection_manager/src/ime_connection.cpp", 64 "${inputmethod_path}/services/adapter/system_param_adapter/src/system_param_adapter.cpp", 65 "${inputmethod_path}/services/adapter/window_adapter/src/window_adapter.cpp", 66 "${inputmethod_path}/services/adapter/window_adapter/src/window_display_changed_listener.cpp", 67 "${inputmethod_path}/services/adapter/wms_connection_monitor/src/wms_connection_monitor_manager.cpp", 68 "${inputmethod_path}/services/adapter/wms_connection_monitor/src/wms_connection_observer.cpp", 69 "${inputmethod_path}/services/identity_checker/src/identity_checker_impl.cpp", 70 "adapter/os_account_adapter/src/os_account_adapter.cpp", 71 "src/client_group.cpp", 72 "src/freeze_manager.cpp", 73 "src/full_ime_info_manager.cpp", 74 "src/im_common_event_manager.cpp", 75 "src/ime_cfg_manager.cpp", 76 "src/ime_info_inquirer.cpp", 77 "src/ime_lifecycle_manager.cpp", 78 "src/ime_state_manager.cpp", 79 "src/ime_state_manager_factory.cpp", 80 "src/input_control_channel_service_impl.cpp", 81 "src/input_method_system_ability.cpp", 82 "src/input_type_manager.cpp", 83 "src/notify_service_impl.cpp", 84 "src/peruser_session.cpp", 85 "src/sys_cfg_parser.cpp", 86 "src/user_session_manager.cpp", 87 ] 88 89 configs = [ ":inputmethod_services_native_config" ] 90 91 public_configs = [ ":inputmethod_services_native_config" ] 92 93 deps = [ 94 "${inputmethod_path}/common:inputmethod_common", 95 "${inputmethod_path}/common/imf_hisysevent:imf_hisysevent", 96 "${inputmethod_path}/interfaces/inner_api/inputmethod_ability:input_control_channel_stub", 97 "${inputmethod_path}/interfaces/inner_api/inputmethod_ability:input_method_client_types", 98 "${inputmethod_path}/interfaces/inner_api/inputmethod_ability:input_method_core_proxy", 99 "${inputmethod_path}/interfaces/inner_api/inputmethod_ability:input_method_system_ability_stub", 100 "${inputmethod_path}/interfaces/inner_api/inputmethod_controller:input_client_proxy", 101 "${inputmethod_path}/interfaces/inner_api/inputmethod_controller:oninputstop_notify_proxy", 102 "${inputmethod_path}/interfaces/inner_api/inputmethod_controller:oninputstop_notify_stub", 103 "${inputmethod_path}/services/adapter/keyboard:keboard_event_static", 104 "${inputmethod_path}/services/adapter/settings_data_provider:settings_data_static", 105 "${inputmethod_path}/services/file:imf_file_static", 106 "${inputmethod_path}/services/json:imf_json_static", 107 ] 108 109 external_deps = [ 110 "ability_base:want", 111 "ability_runtime:ability_connect_callback_stub", 112 "ability_runtime:ability_manager", 113 "ability_runtime:app_manager", 114 "access_token:libaccesstoken_sdk", 115 "access_token:libtokenid_sdk", 116 "bundle_framework:appexecfwk_base", 117 "bundle_framework:appexecfwk_core", 118 "cJSON:cjson", 119 "c_utils:utils", 120 "common_event_service:cesfwk_innerkits", 121 "config_policy:configpolicy_util", 122 "data_share:datashare_common", 123 "data_share:datashare_consumer", 124 "eventhandler:libeventhandler", 125 "hicollie:libhicollie", 126 "hilog:libhilog", 127 "i18n:intl_util", 128 "init:libbeget_proxy", 129 "init:libbegetutil", 130 "input:libmmi-client", 131 "ipc:ipc_single", 132 "memmgr:memmgrclient", 133 "os_account:os_account_innerkits", 134 "resource_management:global_resmgr", 135 "resource_schedule_service:ressched_client", 136 "safwk:system_ability_fwk", 137 "samgr:samgr_proxy", 138 "window_manager:libdm_lite", 139 "window_manager:libwsutils", 140 ] 141 142 defines = [] 143 if (imf_screenlock_mgr_enable) { 144 defines += [ "IMF_SCREENLOCK_MGR_ENABLE" ] 145 external_deps += [ "screenlock_mgr:screenlock_client" ] 146 } 147 if (window_manager_use_sceneboard) { 148 external_deps += [ "window_manager:libwm_lite" ] 149 defines += [ "SCENE_BOARD_ENABLE" ] 150 } else { 151 external_deps += [ "window_manager:libwm" ] 152 } 153 154 if (imf_on_demand_start_stop_sa_enable) { 155 defines += [ "IMF_ON_DEMAND_START_STOP_SA_ENABLE" ] 156 } 157 subsystem_name = "inputmethod" 158 part_name = "imf" 159} 160 161ohos_static_library("inputmethod_service_static") { 162 branch_protector_ret = "pac_ret" 163 sanitize = { 164 cfi = true 165 cfi_cross_dso = true 166 debug = false 167 } 168 cflags_cc = [ 169 "-fdata-sections", 170 "-ffunction-sections", 171 "-Oz", 172 ] 173 sources = [ 174 "adapter/focus_monitor/src/focus_change_listener.cpp", 175 "adapter/focus_monitor/src/focus_monitor_manager.cpp", 176 "adapter/ime_connection_manager/src/ime_connection.cpp", 177 "adapter/os_account_adapter/src/os_account_adapter.cpp", 178 "adapter/system_param_adapter/src/system_param_adapter.cpp", 179 "adapter/window_adapter/src/window_adapter.cpp", 180 "adapter/window_adapter/src/window_display_changed_listener.cpp", 181 "adapter/wms_connection_monitor/src/wms_connection_monitor_manager.cpp", 182 "adapter/wms_connection_monitor/src/wms_connection_observer.cpp", 183 "identity_checker/src/identity_checker_impl.cpp", 184 "src/client_group.cpp", 185 "src/freeze_manager.cpp", 186 "src/full_ime_info_manager.cpp", 187 "src/im_common_event_manager.cpp", 188 "src/ime_cfg_manager.cpp", 189 "src/ime_info_inquirer.cpp", 190 "src/ime_lifecycle_manager.cpp", 191 "src/ime_state_manager.cpp", 192 "src/ime_state_manager_factory.cpp", 193 "src/input_control_channel_service_impl.cpp", 194 "src/input_method_system_ability.cpp", 195 "src/input_type_manager.cpp", 196 "src/notify_service_impl.cpp", 197 "src/peruser_session.cpp", 198 "src/sys_cfg_parser.cpp", 199 "src/user_session_manager.cpp", 200 ] 201 202 public_configs = [ ":inputmethod_services_native_config" ] 203 204 deps = [ 205 "${inputmethod_path}/interfaces/inner_api/inputmethod_ability:input_control_channel_stub", 206 "${inputmethod_path}/interfaces/inner_api/inputmethod_ability:input_method_core_proxy", 207 "${inputmethod_path}/interfaces/inner_api/inputmethod_ability:input_method_system_ability_stub", 208 "${inputmethod_path}/interfaces/inner_api/inputmethod_controller:input_client_proxy", 209 "${inputmethod_path}/interfaces/inner_api/inputmethod_controller:oninputstop_notify_proxy", 210 "${inputmethod_path}/interfaces/inner_api/inputmethod_controller:oninputstop_notify_stub", 211 ] 212 213 public_deps = [ 214 "${inputmethod_path}/common:inputmethod_common", 215 "${inputmethod_path}/common/imf_hisysevent:imf_hisysevent", 216 "adapter/keyboard:keboard_event_static", 217 "adapter/settings_data_provider:settings_data_static", 218 "file:imf_file_static", 219 "json:imf_json_static", 220 ] 221 222 external_deps = [ 223 "ability_base:want", 224 "ability_runtime:ability_manager", 225 "ability_runtime:app_manager", 226 "access_token:libaccesstoken_sdk", 227 "access_token:libtokenid_sdk", 228 "bundle_framework:appexecfwk_base", 229 "bundle_framework:appexecfwk_core", 230 "cJSON:cjson", 231 "c_utils:utils", 232 "common_event_service:cesfwk_innerkits", 233 "config_policy:configpolicy_util", 234 "data_share:datashare_common", 235 "data_share:datashare_consumer", 236 "eventhandler:libeventhandler", 237 "hicollie:libhicollie", 238 "hilog:libhilog", 239 "i18n:intl_util", 240 "init:libbeget_proxy", 241 "init:libbegetutil", 242 "input:libmmi-client", 243 "ipc:ipc_single", 244 "memmgr:memmgrclient", 245 "os_account:os_account_innerkits", 246 "resource_management:global_resmgr", 247 "resource_schedule_service:ressched_client", 248 "safwk:system_ability_fwk", 249 "samgr:samgr_proxy", 250 "window_manager:libwsutils", 251 "window_manager:libdm_lite", 252 ] 253 254 defines = [] 255 if (imf_screenlock_mgr_enable) { 256 defines += [ "IMF_SCREENLOCK_MGR_ENABLE" ] 257 external_deps += [ "screenlock_mgr:screenlock_client" ] 258 } 259 if (window_manager_use_sceneboard) { 260 external_deps += [ "window_manager:libwm_lite" ] 261 defines += [ "SCENE_BOARD_ENABLE" ] 262 } else { 263 external_deps += [ "window_manager:libwm" ] 264 } 265 subsystem_name = "inputmethod" 266 part_name = "imf" 267} 268