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 FMedia_VideoRecorderEvent.h
20 * @brief This is the header file for the %_VideoRecorderEvent class.
23 #ifndef _FMEDIA_INTERNAL_VIDEORECORDER_EVENT_H_
24 #define _FMEDIA_INTERNAL_VIDEORECORDER_EVENT_H_
26 #include <FBaseRt_Event.h>
27 #include <FMediaRecorderTypes.h>
28 #include "FMedia_RecorderTypes.h"
30 namespace Tizen { namespace Media
32 class _VideoRecorderImpl;
35 * This class provides the Recorder event.
37 * This class is the Recorder event, which can notify to the listeners which derives IVideoRecorderEventListener.
38 * This event is fired upon receipt of notification from subsystem.
39 * For instances, when the presentation of playback reaches the end of media file, IVideoRecorderEventListener::OnEndOfFileSize is invoked.
41 * @see VideoRecorder, __VideoRecorderEventArg, IVideoRecorderEventListener
43 class _VideoRecorderEvent
44 : public Tizen::Base::Runtime::_Event
50 _VideoRecorderEvent(void);
55 ~_VideoRecorderEvent(void);
58 * Initializes a new instance of this class
59 * @param[in] videoRecorderImpl The _VideoRecorderImpl object
62 result Construct(_VideoRecorderImpl& videoRecorderImpl);
65 * Sends event synchronously.
67 * @return The error code.
68 * @param[in] event The event type.
69 * @param[in] err The error reason
70 * @param[in] res The result of the event
71 * @exception E_SUCCESS - This method is successful.
72 * @exception E_OUT_OF_MEMORY - Failed to allocate the required/requested memory.
73 * @exception E_INVALID_STATE - The current state of the camera is inappropriate or invalid for this method.
74 * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.
76 result SendEvent(_RecorderEventType event, RecorderErrorReason err, result res);
80 * Finds out and invokes the method of listener corresponding to the specified event argument.
82 * @param[in] listener An event listener to be invoked. This must be an instance of ICameraEventListener.
83 * @param[in] arg An argument to be fired.
84 * @exception E_SUCCESS - This method is successful.
85 * @exception E_OUT_OF_MEMORY - Failed to allocate the required/requested memory.
86 * @exception E_INVALID_STATE - The current state of the camera is inappropriate or invalid for this method.
87 * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.
89 void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg);
92 _VideoRecorderEvent(const _VideoRecorderEvent& rhs);
93 _VideoRecorderEvent& operator =(const _VideoRecorderEvent& rhs);
95 _VideoRecorderImpl* __pVideoRecorderImpl;