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 FCntAudioMetadata.cpp
19 * @brief This is the implementation file for the %AudioMetadata class.
21 * This file contains implementation of the %AudioMetadata class.
24 #include <FBaseSysLog.h>
25 #include <FCntAudioMetadata.h>
26 #include <FCnt_AudioMetadataImpl.h>
28 using namespace Tizen::Base;
29 using namespace Tizen::Graphics;
31 namespace Tizen { namespace Content
34 AudioMetadata::AudioMetadata(void)
36 , __pImpl(new (std::nothrow) _AudioMetadataImpl())
41 AudioMetadata::~AudioMetadata(void)
50 AudioMetadata::AudioMetadata(const AudioMetadata& rhs)
51 : Tizen::Base::Object()
52 , __pImpl(new (std::nothrow) _AudioMetadataImpl(*rhs.__pImpl))
58 AudioMetadata::operator =(const AudioMetadata& rhs)
60 // check for self-assignment
66 *__pImpl = *rhs.__pImpl;
72 AudioMetadata::GetHashCode(void) const
74 return __pImpl->GetHashCode();
78 AudioMetadata::Equals(const Object& rhs) const
80 const AudioMetadata* pRhs = dynamic_cast <const AudioMetadata*>(&rhs);
86 return __pImpl->Equals(*pRhs->__pImpl);
90 AudioMetadata::GetTitle(void) const
96 return __pImpl->GetTitle();
100 AudioMetadata::GetBitrate(void) const
106 return __pImpl->GetBitrate();
110 AudioMetadata::GetFrequency(void) const
116 return __pImpl->GetFrequency();
120 AudioMetadata::GetArtist(void) const
126 return __pImpl->GetArtist();
130 AudioMetadata::GetAlbumName(void) const
136 return __pImpl->GetAlbumName();
140 AudioMetadata::GetComment(void) const
146 return __pImpl->GetComment();
150 AudioMetadata::GetDescription(void) const
156 return __pImpl->GetDescription();
160 AudioMetadata::GetTrack(void) const
166 return __pImpl->GetTrack();
170 AudioMetadata::GetGenre(void) const
176 return __pImpl->GetGenre();
180 AudioMetadata::GetComposer(void) const
186 return __pImpl->GetComposer();
190 AudioMetadata::GetCopyright(void) const
196 return __pImpl->GetCopyright();
200 AudioMetadata::GetDuration(void) const
206 return __pImpl->GetDuration();
210 AudioMetadata::GetYear(void) const
216 return __pImpl->GetYear();
220 AudioMetadata::GetTrackInfo(void) const
226 return __pImpl->GetTrackInfo();
230 AudioMetadata::GetRecordingDate(void) const
236 return __pImpl->GetRecordingDate();
240 AudioMetadata::GetChannelCount(void) const
246 return __pImpl->GetChannelCount();
255 AudioMetadata::GetThumbnailN(void) const
258 result r = E_SUCCESS;
260 Bitmap* pBitmap = null;
261 SysTryReturn(NID_CNT, __pImpl != null, null, E_DATA_NOT_FOUND, "[E_DATA_NOT_FOUND] GetThumbnailN failed.");
263 pBitmap = __pImpl->GetThumbnailN();
265 SysTryReturn(NID_CNT, pBitmap != null, null, r, "[%s] GetThumbnailN failed.", GetErrorMessage(r));
276 AudioMetadata::GetAlbumArtN(void) const
279 result r = E_SUCCESS;
281 Bitmap* pBitmap = null;
283 SysTryReturn(NID_CNT, __pImpl != null, null, E_DATA_NOT_FOUND, "[E_DATA_NOT_FOUND] GetAlbumArtN failed.");
285 pBitmap = __pImpl->GetAlbumArtN();
287 SysTryReturn(NID_CNT, pBitmap != null, null, r, "[%s] GetAlbumArtN failed.", GetErrorMessage(r));