2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
17 * @file FCntImageMetadata.cpp
18 * @brief This is the implementation file for the %ImageMetadata class.
20 * This file contains implementation of the %ImageMetadata class.
23 #include <FBaseSysLog.h>
24 #include <FCntImageMetadata.h>
25 #include <FCnt_ImageMetadataImpl.h>
27 using namespace Tizen::Base;
28 using namespace Tizen::Graphics;
30 namespace Tizen { namespace Content
33 ImageMetadata::ImageMetadata(void)
35 , __pImpl(new (std::nothrow) _ImageMetadataImpl())
40 ImageMetadata::~ImageMetadata(void)
49 ImageMetadata::ImageMetadata(const ImageMetadata& rhs)
50 : Tizen::Base::Object()
51 , __pImpl(new (std::nothrow) _ImageMetadataImpl(*rhs.__pImpl))
57 ImageMetadata::operator =(const ImageMetadata& rhs)
59 // check for self-assignment
65 *__pImpl = *rhs.__pImpl;
71 ImageMetadata::GetHashCode(void) const
73 return __pImpl->GetHashCode();
77 ImageMetadata::Equals(const Object& rhs) const
79 const ImageMetadata* pRhs = dynamic_cast <const ImageMetadata*>(&rhs);
85 return __pImpl->Equals(*pRhs->__pImpl);
89 ImageMetadata::GetWidth(void) const
95 return __pImpl->GetWidth();
99 ImageMetadata::GetHeight(void) const
105 return __pImpl->GetHeight();
109 ImageMetadata::GetCameraManufacturer(void) const
115 return __pImpl->GetCameraManufacturer();
119 ImageMetadata::GetCameraModel(void) const
125 return __pImpl->GetCameraModel();
129 ImageMetadata::GetSoftware(void) const
135 return __pImpl->GetSoftware();
139 ImageMetadata::GetDateTime(void) const
145 return __pImpl->GetDateTime();
149 ImageMetadata::GetLatitude(void) const
155 return __pImpl->GetLatitude();
159 ImageMetadata::GetLongitude(void) const
165 return __pImpl->GetLongitude();
169 ImageMetadata::GetOrientation(void) const
173 return IMAGE_ORIENTATION_TYPE_UNKNOWN;
175 return __pImpl->GetOrientation();
179 ImageMetadata::GetWhiteBalance(void) const
185 return __pImpl->GetWhiteBalance();
189 ImageMetadata::GetThumbnailN(void) const
192 result r = E_SUCCESS;
194 Bitmap* pBitmap = null;
196 SysTryReturn(NID_CNT, __pImpl != null, null, E_DATA_NOT_FOUND, "[E_DATA_NOT_FOUND] GetThumbnailN failed.");
198 pBitmap = __pImpl->GetThumbnailN();
200 SysTryReturn(NID_CNT, pBitmap != null, null, r, "[%s] GetThumbnailN failed.", GetErrorMessage(r));