• 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("../time.gni")
15
16config("time_service_config") {
17  visibility = [ ":*" ]
18  include_dirs = [
19    "${api_path}/include",
20    "../utils/native/include",
21    "time/include",
22    "timer/include",
23    "dfx/include",
24    "ipc/base",
25    "ipc/proxy",
26    "ipc/stub",
27    "${time_service_path}",
28  ]
29}
30
31ohos_shared_library("time_system_ability") {
32  configs = [ "${time_utils_path}:utils_config" ]
33  configs += [ ":time_service_config" ]
34  configs += [ "//build/config/gcc:symbol_visibility_hidden" ]
35  sources = [
36    "./time_system_ability.cpp",
37    "dfx/src/time_cmd_dispatcher.cpp",
38    "dfx/src/time_cmd_parse.cpp",
39    "dfx/src/time_sysevent.cpp",
40    "ipc/proxy/timer_call_back_proxy.cpp",
41    "ipc/stub/time_service_stub.cpp",
42    "time/src/itimer_info.cpp",
43    "time/src/net_conn_callback_observer.cpp",
44    "time/src/nitz_subscriber.cpp",
45    "time/src/ntp_trusted_time.cpp",
46    "time/src/ntp_update_time.cpp",
47    "time/src/power_subscriber.cpp",
48    "time/src/simple_timer_info.cpp",
49    "time/src/sntp_client.cpp",
50    "time/src/time_service_notify.cpp",
51    "time/src/time_tick_notify.cpp",
52    "time/src/time_zone_info.cpp",
53    "timer/src/batch.cpp",
54    "timer/src/timer_handler.cpp",
55    "timer/src/timer_info.cpp",
56    "timer/src/timer_manager.cpp",
57  ]
58
59  deps = [
60    "${time_utils_path}:time_utils",
61    "//third_party/jsoncpp:jsoncpp",
62  ]
63  external_deps = [
64    "ability_base:want",
65    "ability_runtime:abilitykit_native",
66    "ability_runtime:wantagent_innerkits",
67    "access_token:libaccesstoken_sdk",
68    "access_token:libtokenid_sdk",
69    "c_utils:utils",
70    "common_event_service:cesfwk_innerkits",
71    "eventhandler:libeventhandler",
72    "hilog:libhilog",
73    "hisysevent:libhisysevent",
74    "init:libbeget_proxy",
75    "init:libbegetutil",
76    "ipc:ipc_single",
77    "netmanager_base:net_conn_manager_if",
78    "safwk:system_ability_fwk",
79    "samgr:samgr_proxy",
80  ]
81  defines = []
82  if (device_standby) {
83    external_deps += [ "device_standby:standby_innerkits" ]
84    defines += [ "DEVICE_STANDBY_ENABLE" ]
85  }
86  part_name = "time_service"
87  subsystem_name = "time"
88}
89
90ohos_static_library("time_system_ability_static") {
91  configs = [ "${time_utils_path}:utils_config" ]
92  configs += [ ":time_service_config" ]
93  configs += [ "//build/config/gcc:symbol_visibility_hidden" ]
94  sources = [
95    "./time_system_ability.cpp",
96    "dfx/src/time_cmd_dispatcher.cpp",
97    "dfx/src/time_cmd_parse.cpp",
98    "dfx/src/time_sysevent.cpp",
99    "ipc/proxy/timer_call_back_proxy.cpp",
100    "ipc/stub/time_service_stub.cpp",
101    "time/src/itimer_info.cpp",
102    "time/src/net_conn_callback_observer.cpp",
103    "time/src/nitz_subscriber.cpp",
104    "time/src/ntp_trusted_time.cpp",
105    "time/src/ntp_update_time.cpp",
106    "time/src/power_subscriber.cpp",
107    "time/src/simple_timer_info.cpp",
108    "time/src/sntp_client.cpp",
109    "time/src/time_service_notify.cpp",
110    "time/src/time_tick_notify.cpp",
111    "time/src/time_zone_info.cpp",
112    "timer/src/batch.cpp",
113    "timer/src/timer_handler.cpp",
114    "timer/src/timer_info.cpp",
115    "timer/src/timer_manager.cpp",
116  ]
117
118  deps = [
119    "${time_utils_path}:time_utils",
120    "//third_party/jsoncpp:jsoncpp",
121  ]
122  external_deps = [
123    "ability_base:want",
124    "ability_runtime:abilitykit_native",
125    "ability_runtime:wantagent_innerkits",
126    "access_token:libaccesstoken_sdk",
127    "access_token:libtokenid_sdk",
128    "c_utils:utils",
129    "common_event_service:cesfwk_innerkits",
130    "eventhandler:libeventhandler",
131    "hilog:libhilog",
132    "hisysevent:libhisysevent",
133    "init:libbeget_proxy",
134    "ipc:ipc_single",
135    "netmanager_base:net_conn_manager_if",
136    "safwk:system_ability_fwk",
137    "samgr:samgr_proxy",
138  ]
139  defines = []
140  if (device_standby) {
141    external_deps += [ "device_standby:standby_innerkits" ]
142    defines += [ "DEVICE_STANDBY_ENABLE" ]
143  }
144  part_name = "time_service"
145  subsystem_name = "time"
146}
147