• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023-2025 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_VOLUME_CONFIG_H
17 #define ST_AUDIO_VOLUME_CONFIG_H
18 
19 namespace OHOS {
20 namespace AudioStandard {
21 
22 struct VolumePoint {
23     uint32_t index;
24     int32_t dbValue;
25 };
26 
27 struct DeviceVolumeInfo {
28     DeviceVolumeType deviceType;
29     int32_t minLevel = -1;
30     int32_t maxLevel = -1;
31     int32_t defaultLevel = -1;
32     std::vector<VolumePoint> volumePoints;
33 };
34 
35 struct RingerModeAdjustInfo {
36     AudioRingerMode ringMode;
37     std::string callerName;
38     std::string invocationTime;
39 };
40 
41 struct AllDeviceVolumeInfo {
42     DeviceType deviceType;
43     AudioStreamType streamType;
44     int32_t volumeValue;
45 };
46 
47 typedef std::map<DeviceVolumeType, std::shared_ptr<DeviceVolumeInfo>> DeviceVolumeInfoMap;
48 
49 struct StreamVolumeInfo {
50     AudioVolumeType streamType;
51     int minLevel;
52     int maxLevel;
53     int defaultLevel;
54     DeviceVolumeInfoMap deviceVolumeInfos;
55 };
56 
57 typedef std::map<AudioVolumeType, std::shared_ptr<StreamVolumeInfo>> StreamVolumeInfoMap;
58 } // namespace AudioStandard
59 } // namespace OHOS
60 
61 #endif // ST_AUDIO_VOLUME_CONFIG_H
62