• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2023 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 = [ "${ffrt_path}/interfaces/kits" ]
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    "${ffrt_path}/interfaces/kits",
35  ]
36}
37
38cesfwk_services_sources = [
39  "${ces_services_path}/src/ability_manager_death_recipient.cpp",
40  "${ces_services_path}/src/ability_manager_helper.cpp",
41  "${ces_services_path}/src/access_token_helper.cpp",
42  "${ces_services_path}/src/bms_death_recipient.cpp",
43  "${ces_services_path}/src/bundle_manager_helper.cpp",
44  "${ces_services_path}/src/common_event_control_manager.cpp",
45  "${ces_services_path}/src/common_event_manager_service.cpp",
46  "${ces_services_path}/src/common_event_manager_service_ability.cpp",
47  "${ces_services_path}/src/common_event_permission_manager.cpp",
48  "${ces_services_path}/src/common_event_sticky_manager.cpp",
49  "${ces_services_path}/src/common_event_subscriber_manager.cpp",
50  "${ces_services_path}/src/common_event_support_mapper.cpp",
51  "${ces_services_path}/src/event_report.cpp",
52  "${ces_services_path}/src/inner_common_event_manager.cpp",
53  "${ces_services_path}/src/ordered_event_handler.cpp",
54  "${ces_services_path}/src/os_account_manager_helper.cpp",
55  "${ces_services_path}/src/publish_manager.cpp",
56  "${ces_services_path}/src/static_subscriber_connection.cpp",
57  "${ces_services_path}/src/static_subscriber_data_manager.cpp",
58  "${ces_services_path}/src/static_subscriber_manager.cpp",
59  "${ces_services_path}/src/subscriber_death_recipient.cpp",
60  "${ces_services_path}/src/system_time.cpp",
61]
62
63ohos_shared_library("cesfwk_services") {
64  shlib_type = "sa"
65  version_script = "libcesfwk_services.map"
66  cflags_cc = []
67  sources = cesfwk_services_sources
68
69  configs = [ ":ces_services_config" ]
70
71  public_configs = [ ":ces_services_public_config" ]
72
73  deps = [
74    "${ces_common_path}:libevent_common",
75    "${ces_core_path}:cesfwk_core",
76    "${ces_extension_path}:static_subscriber_ipc",
77    "${ces_native_path}:cesfwk_innerkits",
78  ]
79
80  external_deps = [
81    "ability_base:want",
82    "ability_runtime:ability_manager",
83    "access_token:libaccesstoken_sdk",
84    "access_token:libprivacy_sdk",
85    "access_token:libtokenid_sdk",
86    "bundle_framework:appexecfwk_base",
87    "bundle_framework:appexecfwk_core",
88    "c_utils:utils",
89    "eventhandler:libeventhandler",
90    "ffrt:libffrt",
91    "hicollie:libhicollie",
92    "hilog:libhilog",
93    "hitrace:hitrace_meter",
94    "ipc:ipc_core",
95    "kv_store:distributeddata_inner",
96    "safwk:system_ability_fwk",
97    "samgr:samgr_proxy",
98  ]
99
100  if (has_os_account_part) {
101    cflags_cc += [ "-DHAS_OS_ACCOUNT_PART" ]
102    external_deps += [ "os_account:os_account_innerkits" ]
103  }
104
105  if (has_hisysevent_part) {
106    cflags_cc += [ "-DHAS_HISYSEVENT_PART" ]
107    external_deps += [ "hisysevent:libhisysevent" ]
108  }
109
110  subsystem_name = "notification"
111  part_name = "common_event_service"
112}
113
114# Note: Just for test
115ohos_static_library("cesfwk_services_static") {
116  cflags_cc = []
117  sources = cesfwk_services_sources
118
119  configs = [ ":ces_services_config" ]
120
121  public_configs = [ ":ces_services_public_config" ]
122
123  deps = [
124    "${ces_common_path}:libevent_common",
125    "${ces_core_path}:cesfwk_core",
126    "${ces_extension_path}:static_subscriber_ipc",
127    "${ces_native_path}:cesfwk_innerkits",
128  ]
129
130  external_deps = [
131    "ability_base:want",
132    "ability_runtime:ability_manager",
133    "access_token:libaccesstoken_sdk",
134    "access_token:libprivacy_sdk",
135    "bundle_framework:appexecfwk_base",
136    "bundle_framework:appexecfwk_core",
137    "c_utils:utils",
138    "eventhandler:libeventhandler",
139    "ffrt:libffrt",
140    "hicollie:libhicollie",
141    "hilog:libhilog",
142    "hitrace:hitrace_meter",
143    "ipc:ipc_core",
144    "kv_store:distributeddata_inner",
145    "safwk:system_ability_fwk",
146    "samgr:samgr_proxy",
147  ]
148
149  if (has_os_account_part) {
150    cflags_cc += [ "-DHAS_OS_ACCOUNT_PART" ]
151    external_deps += [ "os_account:os_account_innerkits" ]
152  }
153
154  if (has_hisysevent_part) {
155    cflags_cc += [ "-DHAS_HISYSEVENT_PART" ]
156    external_deps += [ "hisysevent:libhisysevent" ]
157  }
158
159  subsystem_name = "notification"
160  part_name = "common_event_service"
161}
162