Tizen 2.0 Release
[framework/osp/media.git] / src / FMedia_AudioInEventArg.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 //
19 // @file                        FMedia_AudioInEventArg.h
20 // @brief                       This header file contains the declaration related to AudioIn class.
21 //
22 //
23
24
25 #ifndef _FMEDIA_INTERNAL_AUDIOIN_EVENTARG_H_
26 #define _FMEDIA_INTERNAL_AUDIOIN_EVENTARG_H_
27
28 #include <FBaseByteBuffer.h>
29 #include <FBaseRtIEventArg.h>
30 #include <FMediaAudioTypes.h>
31
32 namespace Tizen {namespace Media
33 {
34
35 class _AudioInImpl;
36
37 enum _AudioInEventType
38 {
39         _AUDIOIN_EVENT_NONE,                                                                    // Event_None
40         _AUDIOIN_EVENT_RECORDED_DATA,                                           // Recorded Event
41         _AUDIOIN_EVENT_INTERRUPTED,                                                     // event interrupted by the system
42         _AUDIOIN_EVENT_RELEASED,                                                                // event released by the system
43         _AUDIOIN_EVENT_STOP,                                                                    // event stop callback thread
44         _AUDIOIN_EVENT_AUDIO_FOCUS_CHANGED,                                     // Event to notify that Audio focus has changed
45         _AUDIOIN_EVENT_ERROR                                                                    // Error event
46 };
47
48 class _AudioInEventTypeArg
49         : public Tizen::Base::Runtime::IEventArg
50         , public Tizen::Base::Object
51 {
52 public:
53         _AudioInEventTypeArg(void);
54         virtual ~_AudioInEventTypeArg(void);
55         _AudioInEventType GetEventType(void) const;
56
57 private:
58         void SetEventType(_AudioInEventType eType);
59
60 private:
61         _AudioInEventTypeArg(const _AudioInEventTypeArg& rhs);
62         _AudioInEventTypeArg& operator =(const _AudioInEventTypeArg& rhs);
63
64         _AudioInEventType __audioInEventType;
65
66         friend class _AudioInImpl;
67
68 };
69
70 class _AudioInEventArg
71         : public _AudioInEventTypeArg
72 {
73 public:
74         _AudioInEventArg(void);
75         ~_AudioInEventArg(void);
76         Tizen::Base::ByteBuffer* GetData(void) const;
77         bool GetBoolFlag(void) const;
78
79 private:
80         void SetData(Tizen::Base::ByteBuffer* data);
81         void SetBoolFlag(bool boolFlag);
82
83 private:
84         Tizen::Base::ByteBuffer* __pAudioInData;
85         bool __boolFlag;
86         friend class _AudioInImpl;
87
88 };      //_AudioInEventArg
89
90 }}// Tizen::Media
91
92 #endif