2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 * @file FMediaIAudioRecorderEventListener.h
20 * @brief This is the header file for the %IAudioRecorderEventListener interface.
22 * This header file contains the declarations of the %IAudioRecorderEventListener interface.
25 #ifndef _FMEDIA_IAUDIO_RECORDER_EVENT_LISTENER_H_
26 #define _FMEDIA_IAUDIO_RECORDER_EVENT_LISTENER_H_
29 #include <FMediaRecorderTypes.h>
31 namespace Tizen { namespace Media
35 * @interface IAudioRecorderEventListener
36 * @brief This interface represents a listener that receives events associated with the AudioRecorder class.
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.
45 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/media/recording_audio.htm">Recording Audio</a>.
47 class _OSP_EXPORT_ IAudioRecorderEventListener
48 : virtual public Tizen::Base::Runtime::IEventListener
53 * This is the destructor for this class.
57 virtual ~IAudioRecorderEventListener(void) {}
60 * Called when the AudioRecorder::Stop() method is completed.
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.
68 virtual void OnAudioRecorderStopped(result r) = 0;
71 * Called when the AudioRecorder::Cancel() method is completed.
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.
79 virtual void OnAudioRecorderCanceled(result r) = 0;
82 * Called when the AudioRecorder::Pause() method is completed.
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.
91 virtual void OnAudioRecorderPaused(result r) = 0;
94 * Called when the AudioRecorder::Record() method is completed.
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.
103 virtual void OnAudioRecorderStarted(result r) = 0;
106 * Called when AudioRecorder reaches the end of the pre-defined time.
110 * @param[in] endCondition The end condition of the recording
111 * @see AudioRecorder::SetMaxRecordingTime()
114 virtual void OnAudioRecorderEndReached(RecordingEndCondition endCondition) = 0;
117 * Called when the AudioRecorder::Close() method is completed.
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.
126 virtual void OnAudioRecorderClosed(result r) = 0;
129 * Called when an error has occurred in AudioRecorder.
133 * @param[in] r An audio recorder error reason of type ::RecorderErrorReason
134 * @remarks ::RECORDER_ERROR_OUT_OF_STORAGE occurs when the recording size exceeds the maximum available capacity. @n
135 * While recording especially to the external memory like MMC card, ::RECORDER_ERROR_STORAGE_FAILED can occur.
136 * @c RECORDER_ERROR_DEVICE_FAILED occurs when the recording device has a problem like damaged shape or hardware malfunction.
138 virtual void OnAudioRecorderErrorOccurred(RecorderErrorReason r) = 0;
142 // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
144 // This method is reserved and may change its name at any time without prior notice.
148 virtual void IAudioRecorderEventListener_Reserved1(void) {}
151 // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
153 // This method is reserved and may change its name at any time without prior notice.
157 virtual void IAudioRecorderEventListener_Reserved2(void) {}