Throw invalid operation error when unprepare() is called at inside of pulse-thread
[platform/core/api/audio-io.git] / include / CPulseAudioVolume.h
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17
18 #if 0
19 #ifndef __TIZEN_MEDIA_AUDIO_IO_CPULSEAUDIO_VOLUME_H__
20 #define __TIZEN_MEDIA_AUDIO_IO_CPULSEAUDIO_VOLUME_H__
21
22
23 #ifdef __cplusplus
24
25
26 namespace tizen_media_audio {
27
28
29     /**
30      * Audio Volume
31      */
32     class CPulseAudioVolume {
33     public:
34         /* Enums */
35         enum class EVolume : unsigned int {
36             VOLUME_SYSTEM,                         /**< System volume type */
37             VOLUME_NOTIFICATION,                   /**< Notification volume type */
38             VOLUME_ALARM,                          /**< Alarm volume type */
39             VOLUME_RINGTONE,                       /**< Ringtone volume type */
40             VOLUME_MEDIA,                          /**< Media volume type */
41             VOLUME_CALL,                           /**< Call volume type */
42             VOLUME_VOIP,                           /**< VOIP volume type */
43             VOLUME_VOICE,                          /**< VOICE volume type */
44             VOLUME_FIXED,                          /**< Volume type for fixed acoustic level */
45             VOLUME_EXT_ANDROID = VOLUME_FIXED,     /**< External system volume for Android */
46             VOLUME_MAX                             /**< Volume type count */
47         };
48
49         enum class EVolumeGain : unsigned int {
50             VOLUME_GAIN_DEFAULT,
51             VOLUME_GAIN_DIALER,
52             VOLUME_GAIN_TOUCH,
53             VOLUME_GAIN_AF,
54             VOLUME_GAIN_SHUTTER1,
55             VOLUME_GAIN_SHUTTER2,
56             VOLUME_GAIN_CAMCORDING,
57             VOLUME_GAIN_MIDI,
58             VOLUME_GAIN_BOOTING,
59             VOLUME_GAIN_VIDEO,
60             VOLUME_GAIN_TTS,
61             VOLUME_GAIN_MAX
62         };
63
64         /* Constructor & Destructor */
65         CPulseAudioVolume();
66         CPulseAudioVolume(EVolume volume, EVolumeGain gain);
67         ~CPulseAudioVolume();
68
69         /* Methods */
70
71         /* Setter & Getter */
72         void setVolume(EVolume volume);
73         EVolume getVolume();
74
75         void setVolumeGain(EVolumeGain volumeGain);
76         EVolumeGain getVolumeGain();
77
78     private:
79         /* Members */
80         EVolume     __mVolume;
81         EVolumeGain __mVolumeGain;
82     };
83
84
85 } /* namespace tizen_media_audio */
86
87 #endif
88 #endif /* __TIZEN_MEDIA_AUDIO_IO_CPULSEAUDIO_VOLUME_H__ */
89 #endif