move __IsReady function into the critical section
[platform/core/api/audio-io.git] / include / IPulseStreamListener.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 #ifndef __TIZEN_MEDIA_AUDIO_IO_IPULSESTREAM_LISTENER_H__
18 #define __TIZEN_MEDIA_AUDIO_IO_IPULSESTREAM_LISTENER_H__
19
20
21 #ifdef __cplusplus
22
23
24 #include <stddef.h>
25
26
27 namespace tizen_media_audio {
28
29
30     /**
31      * Called by PulseAudio Thread
32      */
33     class CPulseAudioClient;
34     class IPulseStreamListener {
35     public:
36         virtual void onStream(CPulseAudioClient* pClient, size_t length) = 0;
37         virtual void onStateChanged(CAudioInfo::EAudioIOState state) = 0;
38         virtual void onStateChanged(CAudioInfo::EAudioIOState state, bool policy) = 0;
39         virtual void setState(CAudioInfo::EAudioIOState state) = 0;
40     };
41
42
43 } /* namespace tizen_media_audio */
44
45 #endif
46 #endif /* __TIZEN_MEDIA_AUDIO_IO_IPULSESTREAM_LISTENER_H__ */