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 FCnt_ImageMetadataImpl.h
19 * @brief This is the header file for the %_ImageMetadataImpl class.
21 * This header file contains the declarations of the %_ImageMetadataImpl class.
24 #ifndef _FCNT_INTERNAL_IMAGE_METADATA_IMPL_H_
25 #define _FCNT_INTERNAL_IMAGE_METADATA_IMPL_H_
27 #include <unique_ptr.h>
28 #include <FBaseString.h>
30 namespace Tizen { namespace Content
40 , orientation(IMAGE_ORIENTATION_TYPE_UNKNOWN)
48 , pWhiteBalance(null) {}
52 ImageOrientationType orientation;
55 Tizen::Base::String contentPath;
56 Tizen::Base::String* pManufacturer;
57 Tizen::Base::String* pModel;
58 Tizen::Base::String* pDateTime;
59 Tizen::Base::String* pSoftware;
60 Tizen::Base::String* pWhiteBalance;
63 struct ImageMetaDeleter
65 void operator()(ImageMeta* pImageMeta)
67 if (pImageMeta != null)
69 if (pImageMeta->pManufacturer != null)
71 delete pImageMeta->pManufacturer;
72 pImageMeta->pManufacturer = null;
74 if (pImageMeta->pModel != null)
76 delete pImageMeta->pModel;
77 pImageMeta->pModel = null;
79 if (pImageMeta->pDateTime != null)
81 delete pImageMeta->pDateTime;
82 pImageMeta->pDateTime = null;
84 if (pImageMeta->pSoftware != null)
86 delete pImageMeta->pSoftware;
87 pImageMeta->pSoftware = null;
89 if (pImageMeta->pWhiteBalance != null)
91 delete pImageMeta->pWhiteBalance;
92 pImageMeta->pWhiteBalance = null;
101 class _ImageMetadataImpl
102 : public Tizen::Base::Object
106 * This is the default constructor for this class.
110 _ImageMetadataImpl(void);
113 * This is the copy constructor for this class.
117 _ImageMetadataImpl(const _ImageMetadataImpl& rhs);
120 * This is the destructor for this class.
124 virtual ~_ImageMetadataImpl(void);
127 * @see @ref Tizen::Content::ImageMetadata::GetWidth()
129 int GetWidth(void) const;
132 * @see @ref Tizen::Content::ImageMetadata::GetHeight()
134 int GetHeight(void) const;
137 * @see @ref Tizen::Content::ImageMetadata::GetCameraManufacturer()
139 Tizen::Base::String GetCameraManufacturer(void) const;
142 * @see @ref Tizen::Content::ImageMetadata::GetCameraModel()
144 Tizen::Base::String GetCameraModel(void) const;
147 * @see @ref Tizen::Content::ImageMetadata::GetSoftware()
149 Tizen::Base::String GetSoftware(void) const;
152 * @see @ref Tizen::Content::ImageMetadata::GetDateTime()
154 Tizen::Base::String GetDateTime(void) const;
157 * @see @ref Tizen::Content::ImageMetadata::GetLatitude()
159 double GetLatitude(void) const;
162 * @see @ref Tizen::Content::ImageMetadata::GetLongitude()
164 double GetLongitude(void) const;
167 * @see @ref Tizen::Content::ImageMetadata::GetOrientation()
169 ImageOrientationType GetOrientation(void) const;
172 * @see @ref Tizen::Content::ImageMetadata::GetWhiteBalance()
174 Tizen::Base::String GetWhiteBalance(void) const;
177 * @see @ref Tizen::Content::ImageMetadata::GetThumbnailN()
179 Tizen::Graphics::Bitmap* GetThumbnailN(void) const;
182 * Gets the Impl instance.
185 * @return The pointer to _ImageMetadataImpl
186 * @param[in] imageMetadata An instance of ImageMetadata
188 static _ImageMetadataImpl* GetInstance(ImageMetadata& imageMetadata);
191 * Gets the Impl instance.
194 * @return The pointer to _ImageMetadataImpl
195 * @param[in] imageMetadata An instance of ImageMetadata
197 static const _ImageMetadataImpl* GetInstance(const ImageMetadata& imageMetadata);
200 * @see @ref Tizen::Content::ImageMetadata::Equals()
202 virtual bool Equals(const Tizen::Base::Object& rhs) const;
205 * @see @ref Tizen::Content::ImageMetadata::GetHashCode()
207 virtual int GetHashCode(void) const;
210 * @see @ref Tizen::Content::ImageMetadata::operator =()
212 _ImageMetadataImpl& operator =(const _ImageMetadataImpl& rhs);
215 result SetImageMetadata(const ImageMeta* pImageMeta);
216 ImageMeta* GetImageMetadata(void) const;
219 std::unique_ptr<ImageMeta, ImageMetaDeleter> __pImageMeta;
221 friend class _ContentManagerUtilImpl;
223 }; // class _ImageMetadataImpl
227 #endif // _FCNT_INTERNAL_IMAGE_METADATA_IMPL_H_