• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2025 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/config/components/idl_tool/idl.gni")
16import("//build/ohos.gni")
17
18config("sys_event_service_ohos_public_config") {
19  include_dirs = [
20    "include",
21    "${target_gen_dir}",
22  ]
23}
24
25idl_gen_interface("sys_event_service_interface") {
26  sources = [
27    "ISysEventCallback.idl",
28    "ISysEventService.idl",
29  ]
30
31  log_domainid = "0xD002D10"
32  log_tag = "HIVIEW"
33
34  part_name = "hiview"
35  subsystem_name = "hiviewdfx"
36}
37
38ohos_source_set("sys_event_service_ohos") {
39  branch_protector_ret = "pac_ret"
40  sanitize = {
41    cfi = true
42    cfi_cross_dso = true
43    cfi_vcall_icall_only = true
44    debug = false
45  }
46
47  include_dirs = [
48    "$hiview_plugin/eventservice/include",
49    "$hiview_base/event_store/include",
50    "$hiview_base/event_threshold/include",
51    "$hiview_base/running_status_logger/include",
52  ]
53
54  sources = [
55    "src/ash_mem_utils.cpp",
56    "src/compliant_event_checker.cpp",
57    "src/data_publisher.cpp",
58    "src/data_publisher_sys_event_callback.cpp",
59    "src/data_share_dao.cpp",
60    "src/data_share_store.cpp",
61    "src/data_share_util.cpp",
62    "src/event_query_wrapper_builder.cpp",
63    "src/query_argument.cpp",
64    "src/query_sys_event_callback_proxy.cpp",
65    "src/running_status_log_util.cpp",
66    "src/sys_event_query_rule.cpp",
67    "src/sys_event_rule.cpp",
68    "src/sys_event_service_ohos.cpp",
69  ]
70
71  public_configs = [ ":sys_event_service_ohos_public_config" ]
72
73  output_values = get_target_outputs(":sys_event_service_interface")
74  sources += filter_include(output_values,
75                            [
76                              "${target_gen_dir}/sys_event_callback_proxy.cpp",
77                              "${target_gen_dir}/sys_event_service_stub.cpp",
78                            ])
79
80  deps = [
81    ":sys_event_service_interface",
82    "$hiview_base:hiviewbase",
83  ]
84
85  external_deps = [
86    "ability_base:base",
87    "ability_base:want",
88    "access_token:libaccesstoken_sdk",
89    "access_token:libtokenid_sdk",
90    "bundle_framework:appexecfwk_base",
91    "bundle_framework:appexecfwk_core",
92    "c_utils:utils",
93    "ffrt:libffrt",
94    "hilog:libhilog",
95    "hisysevent:libhisysevent",
96    "ipc:ipc_single",
97    "jsoncpp:jsoncpp",
98    "relational_store:native_rdb",
99    "safwk:system_ability_fwk",
100    "samgr:samgr_proxy",
101  ]
102
103  part_name = "hiview"
104  subsystem_name = "hiviewdfx"
105}
106