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_CameraCapabilitySession.cpp
20 * @brief This file contains the implementation of the %_CameraCapabilitySession class.
24 #include <FBaseSysLog.h>
25 #include "FMedia_CameraTypes.h"
26 #include "FMedia_CameraCapability.h"
27 #include "FMedia_CameraCapabilitySession.h"
29 using namespace Tizen::Base;
31 namespace Tizen { namespace Media
34 _CameraCapabilitySession::_CameraCapabilitySession(void)
35 : __cameraDevice(_CAMERA_DEVICE_NONE)
36 , __pCameraCapability(null)
40 _CameraCapabilitySession::~_CameraCapabilitySession(void)
42 _CameraCapability::Release(__cameraDevice);
43 SysLog(NID_MEDIA, "Capability handle released");
47 _CameraCapabilitySession::Construct(_CameraDeviceType cameraDevice)
50 SysLog(NID_MEDIA, "Enter. camera device:%d", cameraDevice);
52 __pCameraCapability = _CameraCapability::AddInstance(cameraDevice);
53 SysTryCatch(NID_MEDIA, __pCameraCapability != null, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. __pCameraCapability instance must not be null.");
55 __cameraDevice = cameraDevice;
62 _CameraCapabilitySession::GetCameraCapability(void)
64 return __pCameraCapability;