• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2022 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 #ifndef ST_AUDIO_MANAGER_PROXY_H
17 #define ST_AUDIO_MANAGER_PROXY_H
18 
19 #include "iremote_proxy.h"
20 #include "audio_system_manager.h"
21 #include "audio_manager_base.h"
22 
23 namespace OHOS {
24 namespace AudioStandard {
25 class AudioManagerProxy : public IRemoteProxy<IStandardAudioService> {
26 public:
27     explicit AudioManagerProxy(const sptr<IRemoteObject> &impl);
28     virtual ~AudioManagerProxy() = default;
29     int32_t GetMaxVolume(AudioSystemManager::AudioVolumeType volumeType) override;
30     int32_t GetMinVolume(AudioSystemManager::AudioVolumeType volumeType) override;
31     int32_t SetMicrophoneMute(bool isMute) override;
32     bool IsMicrophoneMute() override;
33     int32_t SetAudioScene(AudioScene audioScene) override;
34     std::vector<sptr<AudioDeviceDescriptor>> GetDevices(DeviceFlag deviceFlag) override;
35     const std::string GetAudioParameter(const std::string &key) override;
36     void SetAudioParameter(const std::string &key, const std::string &value) override;
37     int32_t UpdateActiveDeviceRoute(DeviceType type, DeviceFlag flag) override;
38     const char *RetrieveCookie(int32_t &size) override;
39 private:
40     static inline BrokerDelegator<AudioManagerProxy> delegator_;
41 };
42 } // namespace AudioStandard
43 } // namespace OHOS
44 #endif // ST_AUDIO_MANAGER_PROXY_H
45