• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 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/common_event_service/event.gni")
15import("//build/ohos.gni")
16
17cflags = []
18
19config("ces_services_config") {
20  visibility = [ ":*" ]
21
22  include_dirs = []
23
24  if (target_cpu == "arm") {
25    cflags += [ "-DBINDER_IPC_32BIT" ]
26  }
27}
28
29config("ces_services_public_config") {
30  visibility = [ ":*" ]
31
32  include_dirs = [
33    "${ces_services_path}/include",
34    "//utils/system/safwk/native/include",
35  ]
36}
37
38ohos_shared_library("cesfwk_services") {
39  cflags_cc = []
40  sources = [
41    "${ces_services_path}/src/ability_manager_death_recipient.cpp",
42    "${ces_services_path}/src/ability_manager_helper.cpp",
43    "${ces_services_path}/src/access_token_helper.cpp",
44    "${ces_services_path}/src/bms_death_recipient.cpp",
45    "${ces_services_path}/src/bundle_manager_helper.cpp",
46    "${ces_services_path}/src/common_event_control_manager.cpp",
47    "${ces_services_path}/src/common_event_manager_service.cpp",
48    "${ces_services_path}/src/common_event_manager_service_ability.cpp",
49    "${ces_services_path}/src/common_event_permission_manager.cpp",
50    "${ces_services_path}/src/common_event_sticky_manager.cpp",
51    "${ces_services_path}/src/common_event_subscriber_manager.cpp",
52    "${ces_services_path}/src/common_event_support_mapper.cpp",
53    "${ces_services_path}/src/event_report.cpp",
54    "${ces_services_path}/src/inner_common_event_manager.cpp",
55    "${ces_services_path}/src/ordered_event_handler.cpp",
56    "${ces_services_path}/src/os_account_manager_helper.cpp",
57    "${ces_services_path}/src/publish_manager.cpp",
58    "${ces_services_path}/src/static_subscriber_connection.cpp",
59    "${ces_services_path}/src/static_subscriber_manager.cpp",
60    "${ces_services_path}/src/subscriber_death_recipient.cpp",
61    "${ces_services_path}/src/system_time.cpp",
62  ]
63
64  configs = [ ":ces_services_config" ]
65
66  public_configs = [ ":ces_services_public_config" ]
67
68  deps = [
69    ":static_subscriber_config.json",
70    "${ability_runtime_path}/frameworks/native/ability/native:static_subscriber_ipc",
71    "${ces_common_path}:libevent_common",
72    "${ces_core_path}:cesfwk_core",
73    "${ces_native_path}:cesfwk_innerkits",
74  ]
75
76  external_deps = [
77    "ability_base:want",
78    "ability_runtime:ability_manager",
79    "access_token:libaccesstoken_sdk",
80    "access_token:libprivacy_sdk",
81    "bundle_framework:appexecfwk_base",
82    "bundle_framework:appexecfwk_core",
83    "c_utils:utils",
84    "eventhandler:libeventhandler",
85    "hicollie_native:libhicollie",
86    "hitrace_native:hitrace_meter",
87    "hiviewdfx_hilog_native:libhilog",
88    "ipc:ipc_core",
89    "safwk:system_ability_fwk",
90    "samgr:samgr_proxy",
91  ]
92
93  if (has_os_account_part) {
94    cflags_cc += [ "-DHAS_OS_ACCOUNT_PART" ]
95    external_deps += [ "os_account:os_account_innerkits" ]
96  }
97
98  if (has_hisysevent_part) {
99    cflags_cc += [ "-DHAS_HISYSEVENT_PART" ]
100    external_deps += [ "hisysevent_native:libhisysevent" ]
101  }
102
103  subsystem_name = "notification"
104  part_name = "common_event_service"
105}
106
107ohos_prebuilt_etc("static_subscriber_config.json") {
108  source = "//base/notification/common_event_service/services/resource/static_subscriber_config.json"
109  subsystem_name = "notification"
110  part_name = "common_event_service"
111}
112