1# Copyright (c) 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("//build/ohos.gni")
15import("//foundation/multimedia/player_framework/config.gni")
16import("./../../../multimedia_player_framework_aafwk.gni")
17
18config("system_sound_client_public_config") {
19  visibility = [ ":*" ]
20  include_dirs =
21      [ "./../../../interfaces/inner_api/native/system_sound_manager/include" ]
22}
23
24ohos_shared_library("system_sound_client") {
25  branch_protector_ret = "pac_ret"
26  sanitize = {
27    integer_overflow = true
28    ubsan = true
29    boundary_sanitize = true
30    cfi = true
31    cfi_cross_dso = true
32    debug = false
33  }
34
35  install_enable = true
36  sources = [
37    "./ringtone_player/ringtone_player_impl.cpp",
38    "./system_sound_vibrator/system_sound_vibrator.cpp",
39    "./system_tone_player/system_tone_player_impl.cpp",
40    "system_sound_manager_impl.cpp",
41  ]
42
43  include_dirs = [
44    "./",
45    "./ringtone_player",
46    "./system_sound_vibrator",
47    "./system_tone_player",
48    "./../../../interfaces/inner_api/native/audio_haptic/include",
49    "./../../../interfaces/inner_api/native/soundpool/include",
50    "./../../../interfaces/inner_api/native/system_sound_manager/include",
51    "./../../../services/utils/include",
52  ]
53
54  deps = [
55    "./../../../interfaces/inner_api/native:media_client",
56    "./../audio_haptic:audio_haptic",
57    "./../soundpool:soundpool_client",
58  ]
59
60  external_deps = [
61    "ability_base:session_info",
62    "ability_base:want",
63    "ability_base:zuri",
64    "ability_runtime:ability_manager",
65    "ability_runtime:abilitykit_native",
66    "ability_runtime:appkit_native",
67    "ability_runtime:data_ability_helper",
68    "access_token:libaccesstoken_sdk",
69    "access_token:libnativetoken_shared",
70    "access_token:libtokensetproc_shared",
71    "audio_framework:audio_client",
72    "bundle_framework:appexecfwk_base",
73    "c_utils:utils",
74    "config_policy:configpolicy_util",
75    "data_share:datashare_consumer",
76    "graphic_surface:surface",
77    "hilog:libhilog",
78    "init:libbegetutil",
79    "ipc:ipc_core",
80    "qos_manager:qos",
81    "relational_store:native_dataability",
82    "relational_store:native_rdb",
83    "ringtone_library:ringtone_data_extension",
84    "ringtone_library:ringtone_data_helper",
85    "samgr:samgr_proxy",
86  ]
87
88  if (player_framework_support_vibrator) {
89    external_deps += [ "miscdevice:vibrator_interface_native" ]
90  }
91
92  cflags = [
93    "-Wall",
94    "-Werror",
95  ]
96
97  public_configs = [ ":system_sound_client_public_config" ]
98
99  defines = []
100  defines += player_framework_defines
101  innerapi_tags = [ "platformsdk" ]
102  subsystem_name = "multimedia"
103  part_name = "player_framework"
104}
105