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 FCntAudioMetadata.cpp
18 * @brief This is the implementation file for the %AudioMetadata class.
20 * This file contains implementation of the %AudioMetadata class.
23 #include <FBaseSysLog.h>
24 #include <FCntAudioMetadata.h>
25 #include <FCnt_AudioMetadataImpl.h>
27 using namespace Tizen::Base;
28 using namespace Tizen::Graphics;
30 namespace Tizen { namespace Content
33 AudioMetadata::AudioMetadata(void)
35 , __pImpl(new (std::nothrow) _AudioMetadataImpl())
40 AudioMetadata::~AudioMetadata(void)
49 AudioMetadata::AudioMetadata(const AudioMetadata& rhs)
50 : Tizen::Base::Object()
51 , __pImpl(new (std::nothrow) _AudioMetadataImpl(*rhs.__pImpl))
57 AudioMetadata::operator =(const AudioMetadata& rhs)
59 // check for self-assignment
65 *__pImpl = *rhs.__pImpl;
71 AudioMetadata::GetHashCode(void) const
73 return __pImpl->GetHashCode();
77 AudioMetadata::Equals(const Object& rhs) const
79 const AudioMetadata* pRhs = dynamic_cast <const AudioMetadata*>(&rhs);
85 return __pImpl->Equals(*pRhs->__pImpl);
89 AudioMetadata::GetTitle(void) const
95 return __pImpl->GetTitle();
99 AudioMetadata::GetBitrate(void) const
105 return __pImpl->GetBitrate();
109 AudioMetadata::GetFrequency(void) const
115 return __pImpl->GetFrequency();
119 AudioMetadata::GetArtist(void) const
125 return __pImpl->GetArtist();
129 AudioMetadata::GetAlbumName(void) const
135 return __pImpl->GetAlbumName();
139 AudioMetadata::GetComment(void) const
145 return __pImpl->GetComment();
149 AudioMetadata::GetDescription(void) const
155 return __pImpl->GetDescription();
159 AudioMetadata::GetTrack(void) const
165 return __pImpl->GetTrack();
169 AudioMetadata::GetGenre(void) const
175 return __pImpl->GetGenre();
179 AudioMetadata::GetComposer(void) const
185 return __pImpl->GetComposer();
189 AudioMetadata::GetCopyright(void) const
195 return __pImpl->GetCopyright();
199 AudioMetadata::GetDuration(void) const
205 return __pImpl->GetDuration();
209 AudioMetadata::GetYear(void) const
215 return __pImpl->GetYear();
219 AudioMetadata::GetTrackInfo(void) const
225 return __pImpl->GetTrackInfo();
229 AudioMetadata::GetRecordingDate(void) const
235 return __pImpl->GetRecordingDate();
239 AudioMetadata::GetChannelCount(void) const
245 return __pImpl->GetChannelCount();
254 AudioMetadata::GetThumbnailN(void) const
257 result r = E_SUCCESS;
259 Bitmap* pBitmap = null;
260 SysTryReturn(NID_CNT, __pImpl != null, null, E_DATA_NOT_FOUND, "[E_DATA_NOT_FOUND] GetThumbnailN failed.");
262 pBitmap = __pImpl->GetThumbnailN();
264 SysTryReturn(NID_CNT, pBitmap != null, null, r, "[%s] GetThumbnailN failed.", GetErrorMessage(r));
275 AudioMetadata::GetAlbumArtN(void) const
278 result r = E_SUCCESS;
280 Bitmap* pBitmap = null;
282 SysTryReturn(NID_CNT, __pImpl != null, null, E_DATA_NOT_FOUND, "[E_DATA_NOT_FOUND] GetAlbumArtN failed.");
284 pBitmap = __pImpl->GetAlbumArtN();
286 SysTryReturn(NID_CNT, pBitmap != null, null, r, "[%s] GetAlbumArtN failed.", GetErrorMessage(r));