Fix drain called in thread and wait for drain completion
[platform/core/api/audio-io.git] / include / CPulseAudioPolicy.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_POLICY_H__
20 #define __TIZEN_MEDIA_AUDIO_IO_CPULSEAUDIO_POLICY_H__
21
22
23 #ifdef __cplusplus
24
25
26 namespace tizen_media_audio {
27
28
29     /**
30      * class CPulseAudioPolicy
31      */
32     class CPulseAudioPolicy {
33     public:
34         /* Enums */
35         enum class EPolicy : unsigned int {
36             POLICY_DEFAULT,
37             POLICY_OUT_AUTO,
38             POLICY_OUT_PHONE,
39             POLICY_OUT_VOIP,
40             POLICY_OUT_ALL,
41             POLICY_IN_VOIP,
42             POLICY_IN_LOOPBACK,
43             POLICY_IN_MIRRORING,
44             POLICY_HIGH_LATENCY,
45             POLICY_MAX
46         };
47
48         /* Constructors */
49         CPulseAudioPolicy();
50         CPulseAudioPolicy(EPolicy policy);
51         ~CPulseAudioPolicy();
52
53         /* getter & setter */
54         void setPolicy(EPolicy policy) throw(CAudioError);
55         EPolicy getPolicy();
56
57         /* Override */
58         bool operator != (const EPolicy policy);
59         bool operator == (const EPolicy policy);
60
61     private:
62         /* Members */
63         EPolicy __mPolicy;
64     };
65
66
67 } /* namespace tizen_media_audio */
68
69 #endif
70 #endif /* __TIZEN_MEDIA_AUDIO_IO_CPULSEAUDIO_POLICY_H__ */
71 #endif