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_VideoMetadataImpl.h
19 * @brief This is the header file for the %_VideoMetadataImpl class.
21 * This header file contains the declarations of the %_VideoMetadataImpl class.
24 #ifndef _FCNT_INTERNAL_VIDEO_METADATA_IMPL_H_
25 #define _FCNT_INTERNAL_VIDEO_METADATA_IMPL_H_
27 #include <unique_ptr.h>
28 #include <FBaseString.h>
29 #include <FGrpBitmap.h>
31 namespace Tizen { namespace Content
57 Tizen::Base::String contentPath;
58 Tizen::Base::String* pGenre;
59 Tizen::Base::String* pComment;
60 Tizen::Base::String* pDescription;
61 Tizen::Graphics::Bitmap* pAlbumArt;
64 struct VideoMetaDeleter
66 void operator()(VideoMeta* pVideoMeta)
68 if (pVideoMeta != null)
70 if (pVideoMeta->pGenre != null)
72 delete pVideoMeta->pGenre;
73 pVideoMeta->pGenre = null;
75 if (pVideoMeta->pComment)
77 delete pVideoMeta->pComment;
78 pVideoMeta->pComment = null;
80 if (pVideoMeta->pDescription)
82 delete pVideoMeta->pDescription;
83 pVideoMeta->pDescription = null;
85 if (pVideoMeta->pAlbumArt != null)
87 delete pVideoMeta->pAlbumArt;
88 pVideoMeta->pAlbumArt = null;
97 class _VideoMetadataImpl
98 : public Tizen::Base::Object
102 * This is the default constructor for this class.
106 _VideoMetadataImpl(void);
109 * This is the copy constructor for this class.
113 _VideoMetadataImpl(const _VideoMetadataImpl& rhs);
116 * This is the destructor for this class.
120 virtual ~_VideoMetadataImpl(void);
123 * @see @ref Tizen::Content::VideoMetadata::GetWidth()
125 int GetWidth(void) const;
128 * @see @ref Tizen::Content::VideoMetadata::GetHeight()
130 int GetHeight(void) const;
133 * @see @ref Tizen::Content::VideoMetadata::GetDuration()
135 long GetDuration(void) const;
138 * @see @ref Tizen::Content::VideoMetadata::GetFramerate()
140 int GetFramerate(void) const;
143 * @see @ref Tizen::Content::VideoMetadata::GetAudioBitrate()
145 int GetAudioBitrate(void) const;
148 * @see @ref Tizen::Content::VideoMetadata::GetVideoBitrate()
150 int GetVideoBitrate(void) const;
153 * @see @ref Tizen::Content::VideoMetadata::GetGenre()
155 Tizen::Base::String GetGenre(void) const;
158 * @see @ref Tizen::Content::VideoMetadata::GetComment()
160 Tizen::Base::String GetComment(void) const;
163 * @see @ref Tizen::Content::VideoMetadata::GetDescription()
165 Tizen::Base::String GetDescription(void) const;
168 * @see @ref Tizen::Content::VideoMetadata::GetAlbumArtN()
170 Tizen::Graphics::Bitmap* GetAlbumArtN(void) const;
173 * Gets the Impl instance.
176 * @return The pointer to _VideoMetadataImpl
177 * @param[in] videoMetadata An instance of VideoMetadata
179 static _VideoMetadataImpl* GetInstance(VideoMetadata& videoMetadata);
182 * Gets the Impl instance.
185 * @return The pointer to _VideoMetadataImpl
186 * @param[in] videoMetadata An instance of VideoMetadata
188 static const _VideoMetadataImpl* GetInstance(const VideoMetadata& videoMetadata);
191 * @see @ref Tizen::Content::VideoMetadata::Equals()
193 virtual bool Equals(const Tizen::Base::Object& rhs) const;
196 * @see @ref Tizen::Content::VideoMetadata::GetHashCode()
198 virtual int GetHashCode(void) const;
201 * @see @ref Tizen::Content::VideoMetadata::operator =()
203 _VideoMetadataImpl& operator =(const _VideoMetadataImpl& rhs);
206 result SetVideoMetadata(const VideoMeta* pVideoMeta);
207 VideoMeta* GetVideoMetadata(void) const;
210 std::unique_ptr<VideoMeta, VideoMetaDeleter> __pVideoMeta;
212 friend class _ContentManagerUtilImpl;
214 }; // class _VideoMetadataImpl
218 #endif // _FCNT_INTERNAL_VIDEO_METADATA_IMPL_H_