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.
18 * @file FCntImageMetadata.cpp
19 * @brief This is the implementation file for the %ImageMetadata class.
21 * This file contains implementation of the %ImageMetadata class.
24 #include <FBaseSysLog.h>
25 #include <FCntImageMetadata.h>
26 #include <FCnt_ImageMetadataImpl.h>
28 using namespace Tizen::Base;
29 using namespace Tizen::Graphics;
31 namespace Tizen { namespace Content
34 ImageMetadata::ImageMetadata(void)
36 , __pImpl(new (std::nothrow) _ImageMetadataImpl())
41 ImageMetadata::~ImageMetadata(void)
50 ImageMetadata::ImageMetadata(const ImageMetadata& rhs)
51 : Tizen::Base::Object()
52 , __pImpl(new (std::nothrow) _ImageMetadataImpl(*rhs.__pImpl))
58 ImageMetadata::operator =(const ImageMetadata& rhs)
60 // check for self-assignment
66 *__pImpl = *rhs.__pImpl;
72 ImageMetadata::GetHashCode(void) const
74 return __pImpl->GetHashCode();
78 ImageMetadata::Equals(const Object& rhs) const
80 const ImageMetadata* pRhs = dynamic_cast <const ImageMetadata*>(&rhs);
86 return __pImpl->Equals(*pRhs->__pImpl);
90 ImageMetadata::GetWidth(void) const
96 return __pImpl->GetWidth();
100 ImageMetadata::GetHeight(void) const
106 return __pImpl->GetHeight();
110 ImageMetadata::GetCameraManufacturer(void) const
116 return __pImpl->GetCameraManufacturer();
120 ImageMetadata::GetCameraModel(void) const
126 return __pImpl->GetCameraModel();
130 ImageMetadata::GetSoftware(void) const
136 return __pImpl->GetSoftware();
140 ImageMetadata::GetDateTime(void) const
146 return __pImpl->GetDateTime();
150 ImageMetadata::GetLatitude(void) const
156 return __pImpl->GetLatitude();
160 ImageMetadata::GetLongitude(void) const
166 return __pImpl->GetLongitude();
170 ImageMetadata::GetOrientation(void) const
174 return IMAGE_ORIENTATION_TYPE_UNKNOWN;
176 return __pImpl->GetOrientation();
180 ImageMetadata::GetWhiteBalance(void) const
186 return __pImpl->GetWhiteBalance();
190 ImageMetadata::GetThumbnailN(void) const
193 result r = E_SUCCESS;
195 Bitmap* pBitmap = null;
197 SysTryReturn(NID_CNT, __pImpl != null, null, E_DATA_NOT_FOUND, "[E_DATA_NOT_FOUND] GetThumbnailN failed.");
199 pBitmap = __pImpl->GetThumbnailN();
201 SysTryReturn(NID_CNT, pBitmap != null, null, r, "[%s] GetThumbnailN failed.", GetErrorMessage(r));