Tizen 2.0 Release
[framework/osp/media.git] / src / FMedia_RecorderEventArg.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_RecorderEventArg.h
20  * @brief                       This file contains the declaration of event processing argument for the Recorder
21  */
22
23 #ifndef _FMEDIA_INTERNAL_EVENTARG_H_
24 #define _FMEDIA_INTERNAL_EVENTARG_H_
25
26
27 #include <FBaseObject.h>
28 #include <FBaseRtIEventArg.h>
29 #include <FBaseByteBuffer.h>
30 #include <FMediaAudioRecorderTypes.h>
31 #include "FMedia_RecorderTypes.h"
32
33 namespace Tizen {namespace Media
34 {
35
36 /**
37  *      @class          _RecorderEventArg
38  *      @brief          This class contains the declaration of Recorder's event argument.
39  */
40 class _RecorderEventArg
41         : public Tizen::Base::Runtime::IEventArg
42         , public Tizen::Base::Object
43 {
44 public:
45         /**
46         *       Constructor
47         */
48         _RecorderEventArg(void);
49
50         /**
51         *       Destructor
52         */
53         ~_RecorderEventArg(void);
54
55
56         /**
57          *      Get the event type.
58          *
59          *      @return AudioRecorder Event type of this argument.
60          */
61         _RecorderEventType GetEventType(void) const;
62
63         /**
64          *      Set the event type.
65          */
66         void SetEventType(_RecorderEventType eType);
67
68         /**
69         *       Get the data provided by the AudioRecorder
70         *
71         *       @return data defined in AudioRecorder subsystem.
72         */
73         Tizen::Base::ByteBuffer* GetData(void) const;
74
75         /**
76         *       Set the data provided by the AudioRecorder
77         */
78         void SetData(Tizen::Base::ByteBuffer* data);
79
80         /**
81         *       Get the result.
82         *
83         *       @return AudioRecorder result of this argument.
84         */
85         result GetResult(void) const;
86
87         /**
88         *       Set the result.
89         */
90         void SetResult(result r);
91
92         /**
93         *       Get the error.
94         *
95         *       @return AudioRecorder error of this argument.
96         */
97         RecorderErrorReason GetError(void) const;
98
99         /**
100         *       Set the error.
101         */
102         void SetError(RecorderErrorReason r);
103
104 private:
105         _RecorderEventArg(const _RecorderEventArg& value);
106         _RecorderEventArg& operator =(const _RecorderEventArg& value);
107
108         _RecorderEventType __recorderEventType;
109         Tizen::Base::ByteBuffer* __pRecordedData;
110         result __result;
111         RecorderErrorReason __error;
112 };
113
114 }}// Tizen::Media
115
116 #endif