remove link in brief tag
[platform/framework/native/media.git] / inc / FMediaIAudioRecorderEventListener.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                        FMediaIAudioRecorderEventListener.h
20  * @brief                       This is the header file for the %IAudioRecorderEventListener interface.
21  *
22  * This header file contains the declarations of the %IAudioRecorderEventListener interface.
23  */
24
25 #ifndef _FMEDIA_IAUDIO_RECORDER_EVENT_LISTENER_H_
26 #define _FMEDIA_IAUDIO_RECORDER_EVENT_LISTENER_H_
27
28 #include <FBase.h>
29 #include <FMediaRecorderTypes.h>
30
31 namespace Tizen { namespace Media
32 {
33
34 /**
35  * @interface   IAudioRecorderEventListener
36  * @brief               This interface represents a listener that receives events associated with the %AudioRecorder class.
37  *
38  * @since               2.0
39  *
40  * The %IAudioRecorderEventListener interface represents a listener that receives events associated with the AudioRecorder class.
41  * %IAudioRecorderEventListener specifies the methods used to notify the status of the audio recorder.
42  * The audio recorder engine works asynchronously. Therefore, it is important to implement this listener to ensure that the recorder flows correctly.
43  * When an operation of each method is completed, an event is generated and a method of this class is called.
44  *
45  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/media/recording_audio.htm">Recording Audio</a>.
46  */
47 class _OSP_EXPORT_ IAudioRecorderEventListener
48         : virtual public Tizen::Base::Runtime::IEventListener
49 {
50
51 public:
52         /**
53         * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
54         *
55         * @since                2.0
56         */
57         virtual ~IAudioRecorderEventListener(void) {}
58
59         /**
60         *       Called when the AudioRecorder::Stop() method is completed.
61         *
62         * @since                2.0
63         *
64         * @param[in]    r       The cause of the error
65         *       @exception        E_SUCCESS     The method is successful.
66         *       @exception        E_SYSTEM      A system error has occurred.
67         */
68         virtual void OnAudioRecorderStopped(result r) = 0;
69
70         /**
71         *       Called when the AudioRecorder::Cancel() method is completed.
72         *
73         * @since                2.0
74         *
75         * @param[in]     r      The cause of the error
76         *       @exception       E_SUCCESS      The method is successful.
77         *       @exception       E_SYSTEM       A system error has occurred.
78         */
79         virtual void OnAudioRecorderCanceled(result r) = 0;
80
81         /**
82         *       Called when the AudioRecorder::Pause() method is completed.
83         *
84         * @since                2.0
85         *
86         * @param[in]     r      The cause of the error
87         *       @exception       E_SUCCESS      The method is successful.
88         *       @exception       E_SYSTEM       A system error has occurred.
89         *
90         */
91         virtual void OnAudioRecorderPaused(result r) = 0;
92
93         /**
94         *       Called when the AudioRecorder::Record() method is completed.
95         *
96         * @since                2.0
97         *
98         * @param[in]     r      The cause of the error
99         *       @exception       E_SUCCESS      The method is successful.
100         *       @exception       E_SYSTEM       A system error has occurred.
101         *
102         */
103         virtual void OnAudioRecorderStarted(result r) = 0;
104
105         /**
106         *       Called when AudioRecorder reaches the end of the pre-defined time.
107         *
108         * @since                2.0
109         *
110         *       @param[in]      endCondition    The end condition of the recording
111         * @see                          AudioRecorder::SetMaxRecordingTime()
112         *
113         */
114         virtual void OnAudioRecorderEndReached(RecordingEndCondition endCondition) = 0;
115
116         /**
117         *       Called when the AudioRecorder::Close() method is completed.
118         *
119         * @since                2.0
120         *
121         * @param[in]     r      The cause of the error
122         *       @exception       E_SUCCESS      The method is successful.
123         *       @exception       E_SYSTEM       A system error has occurred.
124         *
125         */
126         virtual void OnAudioRecorderClosed(result r) = 0;
127
128         /**
129         *       Called when an error has occurred in AudioRecorder.
130         *
131         * @since                2.0
132         *
133         *       @param[in]      r               An audio recorder error reason of type ::RecorderErrorReason
134         *       @remarks                
135         *                               - ::RECORDER_ERROR_OUT_OF_STORAGE occurs when the recording size exceeds the maximum available capacity.
136         *                               - While recording especially to the external memory like MMC card, ::RECORDER_ERROR_STORAGE_FAILED can occur.
137         *                               ::RECORDER_ERROR_DEVICE_FAILED occurs when the recording device has a problem like damaged shape or hardware malfunction.
138         */
139         virtual void OnAudioRecorderErrorOccurred(RecorderErrorReason r) = 0;
140
141 protected:
142         //
143         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
144         //
145         // This method is reserved and may change its name at any time without prior notice.
146         //
147         // @since               2.0
148         //
149         virtual void IAudioRecorderEventListener_Reserved1(void) {}
150
151         //
152         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
153         //
154         // This method is reserved and may change its name at any time without prior notice.
155         //
156         // @since               2.0
157         //
158         virtual void IAudioRecorderEventListener_Reserved2(void) {}
159
160 };
161
162 }}// Tizen::Media
163
164 #endif