• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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/config/components/idl_tool/idl.gni")
16import("//build/ohos.gni")
17
18group("reminder_client") {
19  deps = [ ":reminder_innerkits" ]
20}
21
22idl_interface_sources = [
23  "${target_gen_dir}/reminder_agent_service_proxy.cpp",
24  "${target_gen_dir}/reminder_agent_service_stub.cpp",
25]
26
27idl_gen_interface("reminder_service_interface") {
28  src_idl = rebase_path("IReminderAgentService.idl")
29  dst_file = string_join(",", idl_interface_sources)
30  hitrace = "HITRACE_TAG_ABILITY_MANAGER"
31  log_domainid = "0xD003900"
32  log_tag = "ReminderAgentService"
33}
34
35config("reminder_innerkits_public_config") {
36  visibility = [ "./../../*" ]
37
38  include_dirs = [
39    "${inner_api_path}",
40    "${core_path}/common/include",
41    "${core_path}/include",
42    "${target_gen_dir}",
43  ]
44}
45
46ohos_shared_library("reminder_innerkits") {
47  sanitize = {
48    integer_overflow = true
49    ubsan = true
50    boundary_sanitize = true
51    cfi = true
52    cfi_cross_dso = true
53    debug = false
54  }
55  branch_protector_ret = "pac_ret"
56
57  include_dirs = [ "${inner_api_path}" ]
58  public_configs = [ ":reminder_innerkits_public_config" ]
59  output_values = get_target_outputs(":reminder_service_interface")
60  sources = [
61    "${frameworks_module_reminder_path}/src/reminder_helper.cpp",
62    "${frameworks_module_reminder_path}/src/reminder_request.cpp",
63    "${frameworks_module_reminder_path}/src/reminder_request_adaptation.cpp",
64    "${frameworks_module_reminder_path}/src/reminder_request_alarm.cpp",
65    "${frameworks_module_reminder_path}/src/reminder_request_calendar.cpp",
66    "${frameworks_module_reminder_path}/src/reminder_request_client.cpp",
67    "${frameworks_module_reminder_path}/src/reminder_request_factory.cpp",
68    "${frameworks_module_reminder_path}/src/reminder_request_timer.cpp",
69    "${frameworks_module_reminder_path}/src/reminder_service_load_callback.cpp",
70  ]
71  sources += filter_include(output_values, [ "*.cpp" ])
72  defines = []
73  deps = [
74    ":reminder_service_interface",
75    "${frameworks_path}/ans:ans_client",
76  ]
77
78  external_deps = [
79    "ability_base:want",
80    "ability_base:zuri",
81    "ability_runtime:appkit_native",
82    "bundle_framework:appexecfwk_base",
83    "bundle_framework:appexecfwk_core",
84    "c_utils:utils",
85    "eventhandler:libeventhandler",
86    "hicollie:libhicollie",
87    "hilog:libhilog",
88    "i18n:intl_util",
89    "ipc:ipc_core",
90    "samgr:samgr_proxy",
91    "time_service:time_client",
92  ]
93
94  public_external_deps = [
95    "ability_runtime:wantagent_innerkits",
96    "ffrt:libffrt",
97    "image_framework:image_native",
98  ]
99
100  if (is_double_framework) {
101    cflags = [ "-DCONFIG_DUAL_FRAMEWORK" ]
102  }
103
104  if (ans_hitrace_usage) {
105    external_deps += [ "hitrace:hitrace_meter" ]
106    defines += [ "HITRACE_METER_ENABLE" ]
107  }
108
109  if (notification_smart_reminder_supported) {
110    defines += [ "NOTIFICATION_SMART_REMINDER_SUPPORTED" ]
111  }
112
113  subsystem_name = "${subsystem_name}"
114  part_name = "${component_name}"
115}
116