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 FMediaIVideoRecorderEventListener.h
20 * @brief This is the header file for the %IVideoRecorderEventListener interface.
22 * This header file contains the declarations of the %IVideoRecorderEventListener interface.
25 #ifndef _FMEDIA_IVIDEO_RECORDER_EVENT_LISTENER_H_
26 #define _FMEDIA_IVIDEO_RECORDER_EVENT_LISTENER_H_
29 #include <FMediaRecorderTypes.h>
31 namespace Tizen { namespace Media
35 * @interface IVideoRecorderEventListener
36 * @brief This interface represents a listener that receives events associated with the VideoRecorder class.
39 * The %IVideoRecorderEventListener interface specifies the methods used to notify the status of the video recorder.
40 * The video recorder engine works asynchronously. Therefore, it is important to implement this listener to ensure that the recorder flows correctly.
41 * When an operation of each method is completed, an event is generated and a method of this interface is called.
43 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/media/recording_video.htm">Recording Video</a>.
45 class _OSP_EXPORT_ IVideoRecorderEventListener
46 : virtual public Tizen::Base::Runtime::IEventListener
51 * This is the destructor for this class.
55 virtual ~IVideoRecorderEventListener(void) {}
58 * Called when the VideoRecorder::Stop() method is completed.
62 * @param[in] r The cause of the error
63 * @exception E_SUCCESS The method is successful.
64 * @exception E_SYSTEM A system error has occurred.
67 virtual void OnVideoRecorderStopped(result r) = 0;
70 * Called when the VideoRecorder::Cancel() method is completed.
74 * @param[in] r The cause of the error
75 * @exception E_SUCCESS The method is successful.
76 * @exception E_SYSTEM A system error has occurred.
78 virtual void OnVideoRecorderCanceled(result r) = 0;
81 * Called when the VideoRecorder::Pause() method is completed.
85 * @param[in] r The cause of the error
86 * @exception E_SUCCESS The method is successful.
87 * @exception E_SYSTEM A system error has occurred.
90 virtual void OnVideoRecorderPaused(result r) = 0;
93 * Called when the VideoRecorder::Record() method is completed.
97 * @param[in] r The cause of the error
98 * @exception E_SUCCESS The method is successful.
99 * @exception E_SYSTEM A system error has occurred.
102 virtual void OnVideoRecorderStarted(result r) = 0;
105 * Called when VideoRecorder reaches the end of the pre-defined time.
109 * @param[in] endCondition The end condition of the recording
110 * @see VideoRecorder::SetMaxRecordingTime()
113 virtual void OnVideoRecorderEndReached(RecordingEndCondition endCondition) = 0;
116 * Called when the VideoRecorder::Close() method is completed.
120 * @param[in] r The cause of the error
121 * @exception E_SUCCESS The method is successful.
122 * @exception E_SYSTEM A system error has occurred.
125 virtual void OnVideoRecorderClosed(result r) = 0;
128 * Called when an error occurred in VideoRecorder.
132 * @param[in] r A video recorder error reason of type ::RecorderErrorReason
133 * @remarks ::RECORDER_ERROR_OUT_OF_STORAGE occurs when the recording size exceeds the maximum available capacity. @n
134 * While recording to an external memory like MMC card, ::RECORDER_ERROR_STORAGE_FAILED can occur. @n
135 * @c RECORDER_ERROR_DEVICE_FAILED occurs when the recording device has a problem like damaged shape or h/w failure.
137 virtual void OnVideoRecorderErrorOccurred(RecorderErrorReason r) = 0;
141 // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
143 // This method is reserved and may change its name at any time without prior notice.
147 virtual void IVideoRecorderEventListener_Reserved1(void) {}
150 // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
152 // This method is reserved and may change its name at any time without prior notice.
156 virtual void IVideoRecorderEventListener_Reserved2(void) {}