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_CameraEvent.h
20 * @brief This header file contains the declaration of _CameraEvent class.
24 #ifndef _FMEDIA_INTERNAL_CAMERA_EVENT_H_
25 #define _FMEDIA_INTERNAL_CAMERA_EVENT_H_
27 #include <FBaseByteBuffer.h>
28 #include <FBaseRt_Event.h>
29 #include "FMedia_CameraEventArg.h"
31 namespace Tizen { namespace Media
38 * @brief This class provides the Camera Event.
40 * This class is the Camera event, which can notify to the listeners which derives ICameraEventListener.
41 * This event is fired upon receipt of notification from subsystem.
42 * For instances, when the auto-focusing is completed, ICameraEventListener::OnCameraAutoFocused is invoked.
44 * @see Camera, _CameraEventArg, ICameraEventListener
47 : public Tizen::Base::Runtime::_Event
62 * Initializes a new instance of this class
64 * @param[in] cameraImpl The _CameraImpl object
66 result Construct(_CameraImpl& cameraImpl);
71 * @return The error code.
72 * @param[in] event The event type.
73 * @param[in] err The error reason
74 * @param[in] res The result of the event
75 * @param[in] pByteBuffer The data
76 * @exception E_SUCCESS - This method is successful.
77 * @exception E_OUT_OF_MEMORY - Failed to allocate the required/requested memory.
78 * @exception E_INVALID_STATE - This instance is in an invalid state for this method.
79 * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.
81 result SendEvent(_CameraEventType event, CameraErrorReason err, result res, Tizen::Base::ByteBuffer* pByteBuffer);
85 * Finds out and invokes the method of listener corresponding to the specified event argument.
87 * @param[in] listener An event listener to be invoked. This must be an instance of ICameraEventListener.
88 * @param[in] arg An argument to be fired.
89 * @exception E_SUCCESS - This method is successful.
90 * @exception E_OUT_OF_MEMORY - Failed to allocate the required/requested memory.
91 * @exception E_INVALID_STATE - This instance is in an invalid state for this method.
92 * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.
94 void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg);
97 _CameraEvent(const _CameraEvent& rhs);
98 _CameraEvent& operator =(const _CameraEvent& rhs);
100 _CameraImpl* __pCameraImpl;