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_CameraEventArg.cpp
20 * @brief This file contains the event arguments from subsystem to FMedia's event listener.
23 #include <FBaseSysLog.h>
24 #include "FMedia_CameraEventArg.h"
26 using namespace Tizen::Base;
28 namespace Tizen { namespace Media
31 _CameraEventArg::_CameraEventArg(void)
32 : __cameraEventType(_CAMERA_EVENT_NONE)
35 , __error(CAMERA_ERROR_NONE)
40 _CameraEventArg::~_CameraEventArg(void)
42 if (__pCameraData != null)
49 _CameraEventArg::SetEventType(_CameraEventType eType)
51 __cameraEventType = eType;
55 _CameraEventArg::GetEventType(void) const
57 return __cameraEventType;
61 _CameraEventArg::SetData(const Tizen::Base::ByteBuffer* pData)
65 __pCameraData = new (std::nothrow) ByteBuffer();
66 SysTryReturn(NID_MEDIA, __pCameraData !=null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed. The object is not created.");
67 __pCameraData->Construct(*pData); //shallow copy
71 Tizen::Base::ByteBuffer*
72 _CameraEventArg::GetData(void) const
78 _CameraEventArg::GetResult(void) const
84 _CameraEventArg::SetResult(result r)
90 _CameraEventArg::SetError(CameraErrorReason r)
96 _CameraEventArg::GetError(void) const