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/hiviewdfx/hiview/hiview.gni")
15import("//build/ohos.gni")
16
17config("sys_event_service_ohos_private_config") {
18  include_dirs = [ "." ]
19}
20
21config("sys_event_service_ohos_public_config") {
22  include_dirs = [ "include" ]
23}
24
25ohos_source_set("sys_event_service_ohos") {
26  branch_protector_ret = "pac_ret"
27  sanitize = {
28    cfi = true
29    cfi_cross_dso = true
30    cfi_vcall_icall_only = true
31    debug = false
32  }
33  part_name = "hiview"
34  include_dirs = [
35    "$hiview_plugin/eventservice/include",
36    "$hiview_base/event_store/include",
37    "$hiview_base/event_threshold/include",
38    "$hiview_base/running_status_logger/include",
39  ]
40
41  sources = [
42    "src/ash_mem_utils.cpp",
43    "src/data_publisher.cpp",
44    "src/data_publisher_sys_event_callback.cpp",
45    "src/data_share_dao.cpp",
46    "src/data_share_store.cpp",
47    "src/data_share_util.cpp",
48    "src/event_query_wrapper_builder.cpp",
49    "src/query_argument.cpp",
50    "src/query_sys_event_callback_proxy.cpp",
51    "src/running_status_log_util.cpp",
52    "src/sys_event_callback_proxy.cpp",
53    "src/sys_event_query_rule.cpp",
54    "src/sys_event_rule.cpp",
55    "src/sys_event_service_ohos.cpp",
56    "src/sys_event_service_stub.cpp",
57  ]
58
59  configs = [ ":sys_event_service_ohos_private_config" ]
60
61  public_configs = [ ":sys_event_service_ohos_public_config" ]
62
63  deps = [ "$hiview_base:hiviewbase" ]
64
65  external_deps = [
66    "access_token:libaccesstoken_sdk",
67    "bundle_framework:appexecfwk_base",
68    "bundle_framework:appexecfwk_core",
69    "c_utils:utils",
70    "hilog:libhilog",
71    "hisysevent:libhisysevent",
72    "ipc:ipc_single",
73    "relational_store:native_rdb",
74    "safwk:system_ability_fwk",
75    "samgr:samgr_proxy",
76  ]
77}
78