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