• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2024 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/notification/distributed_notification_service/notification.gni")
15import("//build/ohos.gni")
16
17group("ans_client") {
18  deps = [ ":ans_innerkits" ]
19}
20
21config("ans_innerkits_public_config") {
22  visibility = [ "./../../*" ]
23
24  include_dirs = [
25    "${inner_api_path}",
26    "${interfaces_path}/kits/native",
27    "${core_path}/common/include",
28    "${core_path}/include",
29    "//third_party/json/single_include",
30  ]
31  configs = [ "${multimedia_path}/interfaces/innerkits:image_external_config" ]
32}
33
34ohos_shared_library("ans_innerkits") {
35  sanitize = {
36    integer_overflow = true
37    ubsan = true
38    boundary_sanitize = true
39    cfi = true
40    cfi_cross_dso = true
41    debug = false
42  }
43  branch_protector_ret = "pac_ret"
44
45  include_dirs = [ "${inner_api_path}" ]
46
47  sources = [
48    "${core_path}/common/src/ans_convert_enum.cpp",
49    "${core_path}/src/ans_image_util.cpp",
50    "${core_path}/src/ans_notification.cpp",
51    "${core_path}/src/listener/ans_dialog_callback_interface.cpp",
52    "${core_path}/src/listener/ans_dialog_callback_proxy.cpp",
53    "${core_path}/src/listener/ans_dialog_callback_stub.cpp",
54    "${core_path}/src/listener/ans_operation_callback_proxy.cpp",
55    "${core_path}/src/listener/ans_operation_callback_stub.cpp",
56    "${core_path}/src/listener/ans_subscriber_listener.cpp",
57    "${core_path}/src/listener/ans_subscriber_local_live_view_proxy.cpp",
58    "${core_path}/src/listener/ans_subscriber_local_live_view_stub.cpp",
59    "${core_path}/src/listener/ans_subscriber_proxy.cpp",
60    "${core_path}/src/listener/ans_subscriber_stub.cpp",
61    "${core_path}/src/listener/swing_callback_proxy.cpp",
62    "${core_path}/src/listener/swing_callback_stub.cpp",
63    "${core_path}/src/manager/ans_manager_death_recipient.cpp",
64    "${core_path}/src/manager/ans_manager_proxy.cpp",
65    "${core_path}/src/manager/ans_manager_proxy_bundle.cpp",
66    "${core_path}/src/manager/ans_manager_proxy_distributed.cpp",
67    "${core_path}/src/manager/ans_manager_proxy_disturb.cpp",
68    "${core_path}/src/manager/ans_manager_proxy_slot.cpp",
69    "${core_path}/src/manager/ans_manager_proxy_subscribe.cpp",
70    "${core_path}/src/manager/ans_manager_proxy_utils.cpp",
71    "${frameworks_module_ans_path}/src/ans_dialog_host_client.cpp",
72    "${frameworks_module_ans_path}/src/badge_number_callback_data.cpp",
73    "${frameworks_module_ans_path}/src/enabled_notification_callback_data.cpp",
74    "${frameworks_module_ans_path}/src/message_user.cpp",
75    "${frameworks_module_ans_path}/src/notification.cpp",
76    "${frameworks_module_ans_path}/src/notification_action_button.cpp",
77    "${frameworks_module_ans_path}/src/notification_basic_content.cpp",
78    "${frameworks_module_ans_path}/src/notification_bundle_option.cpp",
79    "${frameworks_module_ans_path}/src/notification_button_option.cpp",
80    "${frameworks_module_ans_path}/src/notification_capsule.cpp",
81    "${frameworks_module_ans_path}/src/notification_check_info.cpp",
82    "${frameworks_module_ans_path}/src/notification_check_request.cpp",
83    "${frameworks_module_ans_path}/src/notification_constant.cpp",
84    "${frameworks_module_ans_path}/src/notification_content.cpp",
85    "${frameworks_module_ans_path}/src/notification_conversational_content.cpp",
86    "${frameworks_module_ans_path}/src/notification_conversational_message.cpp",
87    "${frameworks_module_ans_path}/src/notification_disable.cpp",
88    "${frameworks_module_ans_path}/src/notification_distributed_options.cpp",
89    "${frameworks_module_ans_path}/src/notification_do_not_disturb_date.cpp",
90    "${frameworks_module_ans_path}/src/notification_do_not_disturb_profile.cpp",
91    "${frameworks_module_ans_path}/src/notification_flags.cpp",
92    "${frameworks_module_ans_path}/src/notification_helper.cpp",
93    "${frameworks_module_ans_path}/src/notification_icon_button.cpp",
94    "${frameworks_module_ans_path}/src/notification_live_view_content.cpp",
95    "${frameworks_module_ans_path}/src/notification_local_live_view_button.cpp",
96    "${frameworks_module_ans_path}/src/notification_local_live_view_content.cpp",
97    "${frameworks_module_ans_path}/src/notification_local_live_view_subscriber.cpp",
98    "${frameworks_module_ans_path}/src/notification_long_text_content.cpp",
99    "${frameworks_module_ans_path}/src/notification_media_content.cpp",
100    "${frameworks_module_ans_path}/src/notification_multiline_content.cpp",
101    "${frameworks_module_ans_path}/src/notification_normal_content.cpp",
102    "${frameworks_module_ans_path}/src/notification_operation_info.cpp",
103    "${frameworks_module_ans_path}/src/notification_picture_content.cpp",
104    "${frameworks_module_ans_path}/src/notification_progress.cpp",
105    "${frameworks_module_ans_path}/src/notification_request.cpp",
106    "${frameworks_module_ans_path}/src/notification_slot.cpp",
107    "${frameworks_module_ans_path}/src/notification_sorting.cpp",
108    "${frameworks_module_ans_path}/src/notification_sorting_map.cpp",
109    "${frameworks_module_ans_path}/src/notification_subscribe_info.cpp",
110    "${frameworks_module_ans_path}/src/notification_subscriber.cpp",
111    "${frameworks_module_ans_path}/src/notification_template.cpp",
112    "${frameworks_module_ans_path}/src/notification_time.cpp",
113    "${frameworks_module_ans_path}/src/notification_unified_group_info.cpp",
114    "${frameworks_module_ans_path}/src/notification_user_input.cpp",
115    "${frameworks_module_ans_path}/src/push_callback_stub.cpp",
116    "${frameworks_module_ans_path}/src/push_promise_callback.cpp",
117  ]
118
119  public_configs = [ ":ans_innerkits_public_config" ]
120
121  defines = []
122
123  external_deps = [
124    "ability_base:want",
125    "ability_base:zuri",
126    "ability_runtime:appkit_native",
127    "bundle_framework:appexecfwk_base",
128    "bundle_framework:appexecfwk_core",
129    "c_utils:utils",
130    "eventhandler:libeventhandler",
131    "hicollie:libhicollie",
132    "hilog:libhilog",
133    "i18n:intl_util",
134    "ipc:ipc_core",
135    "samgr:samgr_proxy",
136    "time_service:time_client",
137  ]
138
139  public_external_deps = [
140    "ability_runtime:wantagent_innerkits",
141    "image_framework:image_native",
142  ]
143
144  if (is_double_framework) {
145    cflags = [ "-DCONFIG_DUAL_FRAMEWORK" ]
146  }
147
148  if (ans_hitrace_usage) {
149    external_deps += [ "hitrace:hitrace_meter" ]
150    defines += [ "HITRACE_METER_ENABLE" ]
151  }
152
153  if (notification_smart_reminder_supported) {
154    defines += [ "NOTIFICATION_SMART_REMINDER_SUPPORTED" ]
155  }
156
157  if (distributed_notification_service_feature_privileged_message) {
158    defines += [ "ENABLE_ANS_PRIVILEGED_MESSAGE_EXT_WRAPPER" ]
159  }
160
161  subsystem_name = "${subsystem_name}"
162  part_name = "${component_name}"
163}
164