1 /*
2  * Copyright (c) 2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include "audio_system_manager_adapter_impl.h"
17 
18 namespace OHOS::NWeb {
GetInstance()19 AudioSystemManagerAdapterImpl& AudioSystemManagerAdapterImpl::GetInstance()
20 {
21     static AudioSystemManagerAdapterImpl instance;
22     return instance;
23 }
24 
HasAudioOutputDevices()25 bool AudioSystemManagerAdapterImpl::HasAudioOutputDevices()
26 {
27     return false;
28 }
29 
HasAudioInputDevices()30 bool AudioSystemManagerAdapterImpl::HasAudioInputDevices()
31 {
32     return false;
33 }
34 
RequestAudioFocus(const std::shared_ptr<AudioInterruptAdapter> audioInterrupt)35 int32_t AudioSystemManagerAdapterImpl::RequestAudioFocus(const std::shared_ptr<AudioInterruptAdapter> audioInterrupt)
36 {
37     return -1;
38 }
39 
AbandonAudioFocus(const std::shared_ptr<AudioInterruptAdapter> audioInterrupt)40 int32_t AudioSystemManagerAdapterImpl::AbandonAudioFocus(const std::shared_ptr<AudioInterruptAdapter> audioInterrupt)
41 {
42     return -1;
43 }
44 
SetAudioManagerInterruptCallback(std::shared_ptr<AudioManagerCallbackAdapter> callback)45 int32_t AudioSystemManagerAdapterImpl::SetAudioManagerInterruptCallback(
46     std::shared_ptr<AudioManagerCallbackAdapter> callback)
47 {
48     return -1;
49 }
50 
UnsetAudioManagerInterruptCallback()51 int32_t AudioSystemManagerAdapterImpl::UnsetAudioManagerInterruptCallback()
52 {
53     return -1;
54 }
55 
GetDevices(AdapterDeviceFlag flag)56 std::vector<std::shared_ptr<AudioDeviceDescAdapter>> AudioSystemManagerAdapterImpl::GetDevices(AdapterDeviceFlag flag)
57 {
58     return std::vector<std::shared_ptr<AudioDeviceDescAdapter>>();
59 }
60 
SelectAudioDeviceById(int32_t deviceId,bool isInput)61 int32_t AudioSystemManagerAdapterImpl::SelectAudioDeviceById(int32_t deviceId, bool isInput)
62 {
63     return -1;
64 }
65 
GetDefaultOutputDevice()66 std::shared_ptr<AudioDeviceDescAdapter> AudioSystemManagerAdapterImpl::GetDefaultOutputDevice()
67 {
68     return nullptr;
69 }
70 
SetDeviceChangeCallback(std::shared_ptr<AudioManagerDeviceChangeCallbackAdapter> callback)71 int32_t AudioSystemManagerAdapterImpl::SetDeviceChangeCallback(
72     std::shared_ptr<AudioManagerDeviceChangeCallbackAdapter> callback)
73 {
74     return -1;
75 }
76 
UnsetDeviceChangeCallback()77 int32_t AudioSystemManagerAdapterImpl::UnsetDeviceChangeCallback()
78 {
79     return -1;
80 }
81 
GetDefaultInputDevice()82 std::shared_ptr<AudioDeviceDescAdapter> AudioSystemManagerAdapterImpl::GetDefaultInputDevice()
83 {
84     return nullptr;
85 }
86 } // namespace OHOS::NWeb
87