# Copyright (c) 2021-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//base/notification/distributed_notification_service/notification.gni") import("//build/ohos.gni") group("ans_targets") { deps = [ ":libans" ] } config("public_ans_config") { include_dirs = [ "${services_path}/ans/include" ] } ohos_shared_library("libans") { include_dirs = [ "include" ] sources = [ "src/access_token_helper.cpp", "src/advanced_notification_service.cpp", "src/advanced_notification_service_ability.cpp", "src/bundle_manager_helper.cpp", "src/event_report.cpp", "src/notification_dialog.cpp", "src/notification_preferences.cpp", "src/notification_preferences_database.cpp", "src/notification_preferences_info.cpp", "src/notification_rdb_data_mgr.cpp", "src/notification_slot_filter.cpp", "src/notification_subscriber_manager.cpp", "src/permission_filter.cpp", "src/reminder_data_manager.cpp", "src/reminder_event_manager.cpp", "src/reminder_timer_info.cpp", "src/system_event_observer.cpp", ] configs = [ ":public_ans_config", "//commonlibrary/c_utils/base:utils_config", ] defines = [] cflags = [] deps = [ "${ability_runtime_services_path}/abilitymgr:abilityms", "${core_path}:ans_core", "//foundation/arkui/ace_engine/interfaces/inner_api/ui_service_manager:ui_service_mgr", ] if (is_double_framework) { cflags += [ "-DCONFIG_DUAL_FRAMEWORK" ] } if (distributed_notification_supported) { defines += [ "DISTRIBUTED_NOTIFICATION_SUPPORTED" ] deps += [ "${services_path}/distributed:libans_distributed" ] include_dirs += [ "${services_path}/distributed/include" ] } external_deps = [ "ability_runtime:ability_manager", "ability_runtime:wantagent_innerkits", "access_token:libaccesstoken_sdk", "c_utils:utils", "hitrace_native:hitrace_meter", "kv_store:distributeddata_inner", "multimedia_image_framework:image_native", "multimedia_player_framework:media_client", "os_account:os_account_innerkits", "relational_store:native_rdb", "time_service:time_client", "window_manager:libdm", ] external_deps += component_external_deps if (device_usage) { external_deps += [ "device_usage_statistics:usagestatsinner" ] defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ] } if (hisysevent_usage) { cflags += [ "-DHAS_HISYSEVENT_PART" ] external_deps += [ "hisysevent_native:libhisysevent" ] } subsystem_name = "${subsystem_name}" part_name = "${component_name}" }