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("//build/ohos/ace/ace.gni")
16import("//foundation/multimedia/player_framework/config.gni")
17import("./../../../multimedia_player_framework_aafwk.gni")
18
19ohos_shared_library("systemsoundmanager") {
20  stack_protector_ret = true
21  sanitize = {
22    integer_overflow = true
23    ubsan = true
24    boundary_sanitize = true
25    cfi = true
26    cfi_cross_dso = true
27    debug = false
28  }
29
30  include_dirs = [
31    "./include",
32    "./include/ringtone_player",
33    "./include/system_tone_player",
34    "./include/tone_attrs",
35    "./include/tone_haptics_attrs",
36    "./../avplayer/",
37    "./../common/",
38    "./../../native/system_sound_manager",
39    "./../../../interfaces/inner_api/native",
40    "./../../../interfaces/inner_api/native/system_sound_manager/include",
41    "./../../../services/utils/include",
42    "./../common",
43  ]
44
45  sources = [
46    "./../common/common_napi.cpp",
47    "./src/ringtone_player/audio_renderer_info_napi.cpp",
48    "./src/ringtone_player/ringtone_common_napi.cpp",
49    "./src/ringtone_player/ringtone_options_napi.cpp",
50    "./src/ringtone_player/ringtone_player_callback_napi.cpp",
51    "./src/ringtone_player/ringtone_player_napi.cpp",
52    "./src/system_sound_manager_napi.cpp",
53    "./src/system_sound_manager_napi_ext.cpp",
54    "./src/system_tone_player/system_tone_options_napi.cpp",
55    "./src/system_tone_player/system_tone_player_napi.cpp",
56    "./src/tone_attrs/tone_attrs_napi.cpp",
57    "./src/tone_haptics_attrs/tone_haptics_attrs_napi.cpp",
58    "./src/tone_haptics_attrs/tone_haptics_settings_napi.cpp",
59  ]
60
61  deps = [ "./../../native/system_sound_manager:system_sound_client" ]
62
63  external_deps = [
64    "ability_base:session_info",
65    "ability_base:want",
66    "ability_runtime:ability_manager",
67    "ability_runtime:abilitykit_native",
68    "ability_runtime:extensionkit_native",
69    "ability_runtime:napi_base_context",
70    "ability_runtime:wantagent_innerkits",
71    "access_token:libaccesstoken_sdk",
72    "access_token:libtokenid_sdk",
73    "audio_framework:audio_client",
74    "av_codec:av_codec_client",
75    "bundle_framework:appexecfwk_base",
76    "c_utils:utils",
77    "eventhandler:libeventhandler",
78    "graphic_surface:surface",
79    "hilog:libhilog",
80    "ipc:ipc_single",
81    "libuv:uv",
82    "media_foundation:media_foundation",
83    "napi:ace_napi",
84    "qos_manager:qos",
85    "resource_management:global_resmgr",
86  ]
87  relative_install_dir = "module/multimedia"
88  part_name = "player_framework"
89  subsystem_name = "multimedia"
90}
91