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 FCnt_AudioMetadataImpl.cpp
18 * @brief This is the implementation file for the %_AudioMetadataImpl class.
20 * This file contains implementation of the %_AudioMetadataImpl class.
23 #include <FBaseSysLog.h>
24 #include <FCntAudioMetadata.h>
25 #include <FCnt_AudioMetadataImpl.h>
26 #include <FGrp_BitmapImpl.h>
29 using namespace Tizen::Base;
30 using namespace Tizen::Graphics;
32 namespace Tizen { namespace Content
35 _AudioMetadataImpl::_AudioMetadataImpl(void)
38 unique_ptr<AudioMeta, AudioMetaDeleter> pNewAudioMeta(new (nothrow) AudioMeta());
39 if (pNewAudioMeta != null)
41 __pAudioMeta = move(pNewAudioMeta);
46 SysLog(NID_CNT, "The memory is insufficient.");
50 _AudioMetadataImpl::~_AudioMetadataImpl(void)
56 _AudioMetadataImpl::GetInstance(AudioMetadata& audioMetadata)
58 return audioMetadata.__pImpl;
61 const _AudioMetadataImpl*
62 _AudioMetadataImpl::GetInstance(const AudioMetadata& audioMetadata)
64 return audioMetadata.__pImpl;
68 _AudioMetadataImpl::SetAudioMetadata(const AudioMeta* pAudioMeta)
72 SysTryReturnResult(NID_CNT, pAudioMeta != null, E_INVALID_ARG, "pAudioMeta is null.");
74 __pAudioMeta->bitrate = pAudioMeta->bitrate;
75 __pAudioMeta->channelCount = pAudioMeta->channelCount;
76 __pAudioMeta->duration = pAudioMeta->duration;
77 __pAudioMeta->frequency = pAudioMeta->frequency;
78 __pAudioMeta->trackNum = pAudioMeta->trackNum;
79 __pAudioMeta->year = pAudioMeta->year;
80 __pAudioMeta->contentPath = pAudioMeta->contentPath;
82 if (pAudioMeta->pAlbumName != null)
84 __pAudioMeta->pAlbumName = new (nothrow) String(*(pAudioMeta->pAlbumName));
85 SysTryReturnResult(NID_CNT, __pAudioMeta->pAlbumName != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
87 if (pAudioMeta->pArtist != null)
89 __pAudioMeta->pArtist = new (nothrow) String(*(pAudioMeta->pArtist));
90 SysTryReturnResult(NID_CNT, __pAudioMeta->pArtist != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
92 if (pAudioMeta->pComment != null)
94 __pAudioMeta->pComment = new (nothrow) String(*(pAudioMeta->pComment));
95 SysTryReturnResult(NID_CNT, __pAudioMeta->pComment != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
97 if (pAudioMeta->pDescription != null)
99 __pAudioMeta->pDescription = new (nothrow) String(*(pAudioMeta->pDescription));
100 SysTryReturnResult(NID_CNT, __pAudioMeta->pDescription != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
102 if (pAudioMeta->pComposer != null)
104 __pAudioMeta->pComposer = new (nothrow) String(*(pAudioMeta->pComposer));
105 SysTryReturnResult(NID_CNT, __pAudioMeta->pComposer != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
107 if (pAudioMeta->pCopyright != null)
109 __pAudioMeta->pCopyright = new (nothrow) String(*(pAudioMeta->pCopyright));
110 SysTryReturnResult(NID_CNT, __pAudioMeta->pCopyright != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
112 if (pAudioMeta->pGenre != null)
114 __pAudioMeta->pGenre = new (nothrow) String(*(pAudioMeta->pGenre));
115 SysTryReturnResult(NID_CNT, __pAudioMeta->pGenre != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
117 if (pAudioMeta->pRecordingDate != null)
119 __pAudioMeta->pRecordingDate = new (nothrow) String(*(pAudioMeta->pRecordingDate));
120 SysTryReturnResult(NID_CNT, __pAudioMeta->pRecordingDate != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
122 if (pAudioMeta->pTitle != null)
124 __pAudioMeta->pTitle = new (nothrow) String(*(pAudioMeta->pTitle));
125 SysTryReturnResult(NID_CNT, __pAudioMeta->pTitle != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
127 if (pAudioMeta->pTrackInfo != null)
129 __pAudioMeta->pTrackInfo = new (nothrow) String(*(pAudioMeta->pTrackInfo));
130 SysTryReturnResult(NID_CNT, __pAudioMeta->pTrackInfo != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
132 if (pAudioMeta->pThumbnail != null)
134 __pAudioMeta->pThumbnail = _BitmapImpl::CloneN(*(pAudioMeta->pThumbnail));
135 if (__pAudioMeta->pThumbnail == null)
137 SysLog(NID_CNT, "_BitmapImpl::CloneN failed.");
138 // Because thumbnail is one of the metadata, it is not exception in this function but is exception in _AudioMetadataImpl::GetThumbnailN().
141 if (pAudioMeta->pAlbumArt != null)
143 __pAudioMeta->pAlbumArt = _BitmapImpl::CloneN(*(pAudioMeta->pAlbumArt));
144 if (__pAudioMeta->pAlbumArt == null)
146 SysLog(NID_CNT, "_BitmapImpl::CloneN failed.");
147 // Because album art is one of the metadata, it is not exception in this function but is exception in _AudioMetadataImpl::GetAlbumArtN().
155 _AudioMetadataImpl::GetAudioMetadata(void) const
157 return __pAudioMeta.get();
160 _AudioMetadataImpl::_AudioMetadataImpl(const _AudioMetadataImpl& rhs)
163 unique_ptr<AudioMeta, AudioMetaDeleter> pNewAudioMeta(new (nothrow) AudioMeta());
164 if (pNewAudioMeta != null)
166 pNewAudioMeta->bitrate = (rhs.__pAudioMeta)->bitrate;
167 pNewAudioMeta->channelCount = (rhs.__pAudioMeta)->channelCount;
168 pNewAudioMeta->duration = (rhs.__pAudioMeta)->duration;
169 pNewAudioMeta->frequency = (rhs.__pAudioMeta)->frequency;
170 pNewAudioMeta->trackNum = (rhs.__pAudioMeta)->trackNum;
171 pNewAudioMeta->year = (rhs.__pAudioMeta)->year;
172 pNewAudioMeta->contentPath = (rhs.__pAudioMeta)->contentPath;
175 if ((rhs.__pAudioMeta)->pAlbumName != null)
177 pNewAudioMeta->pAlbumName = new (nothrow) String(*((rhs.__pAudioMeta)->pAlbumName));
178 if (pNewAudioMeta->pAlbumName == null)
180 SysLog(NID_CNT, "The memory is insufficient.");
185 if ((rhs.__pAudioMeta)->pArtist != null)
187 pNewAudioMeta->pArtist = new (nothrow) String(*((rhs.__pAudioMeta)->pArtist));
188 if (pNewAudioMeta->pArtist == null)
190 SysLog(NID_CNT, "The memory is insufficient.");
195 if ((rhs.__pAudioMeta)->pComment != null)
197 pNewAudioMeta->pComment = new (nothrow) String(*((rhs.__pAudioMeta)->pComment));
198 if (pNewAudioMeta->pComment == null)
200 SysLog(NID_CNT, "The memory is insufficient.");
205 if ((rhs.__pAudioMeta)->pDescription != null)
207 pNewAudioMeta->pDescription = new (nothrow) String(*((rhs.__pAudioMeta)->pDescription));
208 if (pNewAudioMeta->pDescription == null)
210 SysLog(NID_CNT, "The memory is insufficient.");
215 if ((rhs.__pAudioMeta)->pComposer != null)
217 pNewAudioMeta->pComposer = new (nothrow) String(*((rhs.__pAudioMeta)->pComposer));
218 if (pNewAudioMeta->pComposer == null)
220 SysLog(NID_CNT, "The memory is insufficient.");
225 if ((rhs.__pAudioMeta)->pCopyright != null)
227 pNewAudioMeta->pCopyright = new (nothrow) String(*((rhs.__pAudioMeta)->pCopyright));
228 if (pNewAudioMeta->pCopyright == null)
230 SysLog(NID_CNT, "The memory is insufficient.");
235 if ((rhs.__pAudioMeta)->pGenre != null)
237 pNewAudioMeta->pGenre = new (nothrow) String(*((rhs.__pAudioMeta)->pGenre));
238 if (pNewAudioMeta->pGenre == null)
240 SysLog(NID_CNT, "The memory is insufficient.");
245 if ((rhs.__pAudioMeta)->pRecordingDate != null)
247 pNewAudioMeta->pRecordingDate = new (nothrow) String(*((rhs.__pAudioMeta)->pRecordingDate));
248 if (pNewAudioMeta->pRecordingDate == null)
250 SysLog(NID_CNT, "The memory is insufficient.");
255 if ((rhs.__pAudioMeta)->pTitle != null)
257 pNewAudioMeta->pTitle = new (nothrow) String(*((rhs.__pAudioMeta)->pTitle));
258 if (pNewAudioMeta->pTitle == null)
260 SysLog(NID_CNT, "The memory is insufficient.");
265 if ((rhs.__pAudioMeta)->pTrackInfo != null)
267 pNewAudioMeta->pTrackInfo = new (nothrow) String(*((rhs.__pAudioMeta)->pTrackInfo));
268 if (pNewAudioMeta->pTrackInfo == null)
270 SysLog(NID_CNT, "The memory is insufficient.");
275 if ((rhs.__pAudioMeta)->pThumbnail != null)
277 pNewAudioMeta->pThumbnail = _BitmapImpl::CloneN(*((rhs.__pAudioMeta)->pThumbnail));
278 if (pNewAudioMeta->pThumbnail == null)
280 SysLog(NID_CNT, "The memory is insufficient.");
285 if ((rhs.__pAudioMeta)->pAlbumArt != null)
287 pNewAudioMeta->pAlbumArt = _BitmapImpl::CloneN(*((rhs.__pAudioMeta)->pAlbumArt));
288 if (pNewAudioMeta->pAlbumArt == null)
290 SysLog(NID_CNT, "The memory is insufficient.");
295 __pAudioMeta = move(pNewAudioMeta);
300 SysLog(NID_CNT, "The memory is insufficient.");
305 _AudioMetadataImpl::operator =(const _AudioMetadataImpl& rhs)
307 // check for self-assignment
314 if (__pAudioMeta != null && (rhs.__pAudioMeta) != null)
316 // DeleteMetadata(__pAudioMeta);
317 // __pAudioMeta = new (nothrow) AudioMeta;
319 __pAudioMeta.reset(new (nothrow) AudioMeta);
321 else if (__pAudioMeta != null)
323 //DeleteMetadata(__pAudioMeta);
325 __pAudioMeta.reset(null);
328 else if ((rhs.__pAudioMeta) != null)
330 //__pAudioMeta = new (nothrow) AudioMeta;
332 __pAudioMeta.reset(new (nothrow) AudioMeta);
336 // __pAudioMeta and rhs.__pAudioMeta are null.
340 __pAudioMeta->bitrate = (rhs.__pAudioMeta)->bitrate;
341 __pAudioMeta->channelCount = (rhs.__pAudioMeta)->channelCount;
342 __pAudioMeta->duration = (rhs.__pAudioMeta)->duration;
343 __pAudioMeta->frequency = (rhs.__pAudioMeta)->frequency;
344 __pAudioMeta->trackNum = (rhs.__pAudioMeta)->trackNum;
345 __pAudioMeta->year = (rhs.__pAudioMeta)->year;
346 __pAudioMeta->contentPath = (rhs.__pAudioMeta)->contentPath;
349 if (__pAudioMeta->pAlbumName != null && (rhs.__pAudioMeta)->pAlbumName != null)
351 // delete previous data
352 delete __pAudioMeta->pAlbumName;
353 __pAudioMeta->pAlbumName = null;
355 __pAudioMeta->pAlbumName = new (nothrow) String(*((rhs.__pAudioMeta)->pAlbumName));
357 else if (__pAudioMeta->pAlbumName != null)
359 delete __pAudioMeta->pAlbumName;
360 __pAudioMeta->pAlbumName = null;
362 else if ((rhs.__pAudioMeta)->pAlbumName != null)
364 __pAudioMeta->pAlbumName = new (nothrow) String(*((rhs.__pAudioMeta)->pAlbumName));
368 if (__pAudioMeta->pArtist != null && (rhs.__pAudioMeta)->pArtist != null)
370 // delete previous data
371 delete __pAudioMeta->pArtist;
372 __pAudioMeta->pArtist = null;
374 __pAudioMeta->pArtist = new (nothrow) String(*((rhs.__pAudioMeta)->pArtist));
376 else if (__pAudioMeta->pArtist != null)
378 delete __pAudioMeta->pArtist;
379 __pAudioMeta->pArtist = null;
381 else if ((rhs.__pAudioMeta)->pArtist != null)
383 __pAudioMeta->pArtist = new (nothrow) String(*((rhs.__pAudioMeta)->pArtist));
387 if (__pAudioMeta->pComment != null && (rhs.__pAudioMeta)->pComment != null)
389 // delete previous data
390 delete __pAudioMeta->pComment;
391 __pAudioMeta->pComment = null;
393 __pAudioMeta->pComment = new (nothrow) String(*((rhs.__pAudioMeta)->pComment));
395 else if (__pAudioMeta->pComment != null)
397 delete __pAudioMeta->pComment;
398 __pAudioMeta->pComment = null;
400 else if ((rhs.__pAudioMeta)->pComment != null)
402 __pAudioMeta->pComment = new (nothrow) String(*((rhs.__pAudioMeta)->pComment));
406 if (__pAudioMeta->pDescription != null && (rhs.__pAudioMeta)->pDescription != null)
408 // delete previous data
409 delete __pAudioMeta->pDescription;
410 __pAudioMeta->pDescription = null;
412 __pAudioMeta->pDescription = new (nothrow) String(*((rhs.__pAudioMeta)->pDescription));
414 else if (__pAudioMeta->pDescription != null)
416 delete __pAudioMeta->pDescription;
417 __pAudioMeta->pDescription = null;
419 else if ((rhs.__pAudioMeta)->pDescription != null)
421 __pAudioMeta->pDescription = new (nothrow) String(*((rhs.__pAudioMeta)->pDescription));
425 if (__pAudioMeta->pComposer != null && (rhs.__pAudioMeta)->pComposer != null)
427 // delete previous data
428 delete __pAudioMeta->pComposer;
429 __pAudioMeta->pComposer = null;
431 __pAudioMeta->pComposer = new (nothrow) String(*((rhs.__pAudioMeta)->pComposer));
433 else if (__pAudioMeta->pComposer != null)
435 delete __pAudioMeta->pComposer;
436 __pAudioMeta->pComposer = null;
438 else if ((rhs.__pAudioMeta)->pComposer != null)
440 __pAudioMeta->pComposer = new (nothrow) String(*((rhs.__pAudioMeta)->pComposer));
444 if (__pAudioMeta->pCopyright != null && (rhs.__pAudioMeta)->pCopyright != null)
446 // delete previous data
447 delete __pAudioMeta->pCopyright;
448 __pAudioMeta->pCopyright = null;
450 __pAudioMeta->pCopyright = new (nothrow) String(*((rhs.__pAudioMeta)->pCopyright));
452 else if (__pAudioMeta->pCopyright != null)
454 delete __pAudioMeta->pCopyright;
455 __pAudioMeta->pCopyright = null;
457 else if ((rhs.__pAudioMeta)->pCopyright != null)
459 __pAudioMeta->pCopyright = new (nothrow) String(*((rhs.__pAudioMeta)->pCopyright));
463 if (__pAudioMeta->pGenre != null && (rhs.__pAudioMeta)->pGenre != null)
465 // delete previous data
466 delete __pAudioMeta->pGenre;
467 __pAudioMeta->pGenre = null;
469 __pAudioMeta->pGenre = new (nothrow) String(*((rhs.__pAudioMeta)->pGenre));
471 else if (__pAudioMeta->pGenre != null)
473 delete __pAudioMeta->pGenre;
474 __pAudioMeta->pGenre = null;
476 else if ((rhs.__pAudioMeta)->pGenre != null)
478 __pAudioMeta->pGenre = new (nothrow) String(*((rhs.__pAudioMeta)->pGenre));
482 if (__pAudioMeta->pRecordingDate != null && (rhs.__pAudioMeta)->pRecordingDate != null)
484 // delete previous data
485 delete __pAudioMeta->pRecordingDate;
486 __pAudioMeta->pRecordingDate = null;
488 __pAudioMeta->pRecordingDate = new (nothrow) String(*((rhs.__pAudioMeta)->pRecordingDate));
490 else if (__pAudioMeta->pRecordingDate != null)
492 delete __pAudioMeta->pRecordingDate;
493 __pAudioMeta->pRecordingDate = null;
495 else if ((rhs.__pAudioMeta)->pRecordingDate != null)
497 __pAudioMeta->pRecordingDate = new (nothrow) String(*((rhs.__pAudioMeta)->pRecordingDate));
501 if (__pAudioMeta->pTitle != null && (rhs.__pAudioMeta)->pTitle != null)
503 // delete previous data
504 delete __pAudioMeta->pTitle;
505 __pAudioMeta->pTitle = null;
507 __pAudioMeta->pTitle = new (nothrow) String(*((rhs.__pAudioMeta)->pTitle));
509 else if (__pAudioMeta->pTitle != null)
511 delete __pAudioMeta->pTitle;
512 __pAudioMeta->pTitle = null;
514 else if ((rhs.__pAudioMeta)->pTitle != null)
516 __pAudioMeta->pTitle = new (nothrow) String(*((rhs.__pAudioMeta)->pTitle));
520 if (__pAudioMeta->pTrackInfo != null && (rhs.__pAudioMeta)->pTrackInfo != null)
522 // delete previous data
523 delete __pAudioMeta->pTrackInfo;
524 __pAudioMeta->pTrackInfo = null;
526 __pAudioMeta->pTrackInfo = new (nothrow) String(*((rhs.__pAudioMeta)->pTrackInfo));
528 else if (__pAudioMeta->pTrackInfo != null)
530 delete __pAudioMeta->pTrackInfo;
531 __pAudioMeta->pTrackInfo = null;
533 else if ((rhs.__pAudioMeta)->pTrackInfo != null)
535 __pAudioMeta->pTrackInfo = new (nothrow) String(*((rhs.__pAudioMeta)->pTrackInfo));
539 if (__pAudioMeta->pThumbnail != null && (rhs.__pAudioMeta)->pThumbnail != null)
541 // delete previous data
542 delete __pAudioMeta->pThumbnail;
543 __pAudioMeta->pThumbnail = null;
545 __pAudioMeta->pThumbnail = _BitmapImpl::CloneN(*((rhs.__pAudioMeta)->pThumbnail));
547 else if (__pAudioMeta->pThumbnail != null)
549 delete __pAudioMeta->pThumbnail;
550 __pAudioMeta->pThumbnail = null;
552 else if ((rhs.__pAudioMeta)->pThumbnail != null)
554 __pAudioMeta->pThumbnail = _BitmapImpl::CloneN(*((rhs.__pAudioMeta)->pThumbnail));
558 if (__pAudioMeta->pAlbumArt != null && (rhs.__pAudioMeta)->pAlbumArt != null)
560 // delete previous data
561 delete __pAudioMeta->pAlbumArt;
562 __pAudioMeta->pAlbumArt = null;
564 __pAudioMeta->pAlbumArt = _BitmapImpl::CloneN(*((rhs.__pAudioMeta)->pAlbumArt));
566 else if (__pAudioMeta->pAlbumArt != null)
568 delete __pAudioMeta->pAlbumArt;
569 __pAudioMeta->pAlbumArt = null;
571 else if ((rhs.__pAudioMeta)->pAlbumArt != null)
573 __pAudioMeta->pAlbumArt = _BitmapImpl::CloneN(*((rhs.__pAudioMeta)->pAlbumArt));
576 SysLog(NID_CNT, "_AudioMetadataImpl::operator =(const _AudioMetadataImpl& rhs) is called.");
581 _AudioMetadataImpl::Equals(const Tizen::Base::Object& rhs) const
583 const _AudioMetadataImpl* pRhs = dynamic_cast <const _AudioMetadataImpl*>(&rhs);
589 if (!((this->GetAlbumName()).Equals(pRhs->GetAlbumName())))
593 if (!((this->GetArtist()).Equals(pRhs->GetArtist())))
597 if (this->GetBitrate() != pRhs->GetBitrate())
601 if (this->GetChannelCount() != pRhs->GetChannelCount())
605 if (!((this->GetComment()).Equals(pRhs->GetComment())))
609 if (!((this->GetDescription()).Equals(pRhs->GetDescription())))
613 if (!((this->GetComposer()).Equals(pRhs->GetComposer())))
617 if (!((this->GetCopyright()).Equals(pRhs->GetCopyright())))
621 if (this->GetDuration() != pRhs->GetDuration())
625 if (this->GetFrequency() != pRhs->GetFrequency())
629 if (!((this->GetGenre()).Equals(pRhs->GetGenre())))
633 if (!((this->GetRecordingDate()).Equals(pRhs->GetRecordingDate())))
637 if (!((this->GetTitle()).Equals(pRhs->GetTitle())))
641 if (this->GetTrack() != pRhs->GetTrack())
645 if (!((this->GetTrackInfo()).Equals(pRhs->GetTrackInfo())))
649 if (this->GetYear() != pRhs->GetYear())
658 _AudioMetadataImpl::GetHashCode(void) const
660 return (this->GetAlbumName()).GetHashCode()
661 ^ (this->GetArtist()).GetHashCode()
662 ^ Integer::GetHashCode(this->GetBitrate())
663 ^ Integer::GetHashCode(this->GetChannelCount())
664 ^ (this->GetComment()).GetHashCode()
665 ^ (this->GetDescription()).GetHashCode()
666 ^ (this->GetComposer()).GetHashCode()
667 ^ (this->GetCopyright()).GetHashCode()
668 ^ Long::GetHashCode(this->GetDuration())
669 ^ Integer::GetHashCode(this->GetFrequency())
670 ^ (this->GetGenre()).GetHashCode()
671 ^ (this->GetRecordingDate()).GetHashCode()
672 ^ (this->GetTitle()).GetHashCode()
673 ^ Integer::GetHashCode(this->GetTrack())
674 ^ (this->GetTrackInfo()).GetHashCode()
675 ^ Integer::GetHashCode(this->GetYear());
679 _AudioMetadataImpl::GetTitle(void) const
681 if (__pAudioMeta == null || __pAudioMeta->pTitle == null)
683 SysLog(NID_CNT, "__pAudioMeta or __pAudioMeta->pTitle is null.");
686 return *(__pAudioMeta->pTitle);
690 _AudioMetadataImpl::GetBitrate(void) const
692 if (__pAudioMeta == null)
694 SysLog(NID_CNT, "__pAudioMeta is null.");
697 return __pAudioMeta->bitrate;
701 _AudioMetadataImpl::GetFrequency(void) const
703 if (__pAudioMeta == null)
705 SysLog(NID_CNT, "__pAudioMeta is null.");
708 return __pAudioMeta->frequency;
712 _AudioMetadataImpl::GetArtist(void) const
714 if (__pAudioMeta == null || __pAudioMeta->pArtist == null)
716 SysLog(NID_CNT, "__pAudioMeta or __pAudioMeta->pArtist is null.");
719 return *(__pAudioMeta->pArtist);
723 _AudioMetadataImpl::GetAlbumName(void) const
725 if (__pAudioMeta == null || __pAudioMeta->pAlbumName == null)
727 SysLog(NID_CNT, "__pAudioMeta or __pAudioMeta->pAlbumName is null.");
730 return *(__pAudioMeta->pAlbumName);
734 _AudioMetadataImpl::GetComment(void) const
736 if (__pAudioMeta == null || __pAudioMeta->pComment == null)
738 SysLog(NID_CNT, "__pAudioMeta or __pAudioMeta->pComment is null.");
741 return *(__pAudioMeta->pComment);
745 _AudioMetadataImpl::GetDescription(void) const
747 if (__pAudioMeta == null || __pAudioMeta->pDescription == null)
749 SysLog(NID_CNT, "__pAudioMeta or __pAudioMeta->pDescription is null.");
752 return *(__pAudioMeta->pDescription);
756 _AudioMetadataImpl::GetTrack(void) const
758 if (__pAudioMeta == null)
760 SysLog(NID_CNT, "__pAudioMeta is null.");
763 return __pAudioMeta->trackNum;
767 _AudioMetadataImpl::GetGenre(void) const
769 if (__pAudioMeta == null || __pAudioMeta->pGenre == null)
771 SysLog(NID_CNT, "__pAudioMeta or __pAudioMeta->pGenre is null.");
774 return *(__pAudioMeta->pGenre);
778 _AudioMetadataImpl::GetComposer(void) const
780 if (__pAudioMeta == null || __pAudioMeta->pComposer == null)
782 SysLog(NID_CNT, "__pAudioMeta or __pAudioMeta->pComposer is null.");
785 return *(__pAudioMeta->pComposer);
789 _AudioMetadataImpl::GetCopyright(void) const
791 if (__pAudioMeta == null || __pAudioMeta->pCopyright == null)
793 SysLog(NID_CNT, "__pAudioMeta or __pAudioMeta->pCopyright is null.");
796 return *(__pAudioMeta->pCopyright);
800 _AudioMetadataImpl::GetDuration(void) const
802 if (__pAudioMeta == null)
804 SysLog(NID_CNT, "__pAudioMeta is null.");
807 return __pAudioMeta->duration;
811 _AudioMetadataImpl::GetYear(void) const
813 if (__pAudioMeta == null)
815 SysLog(NID_CNT, "__pAudioMeta is null.");
818 return __pAudioMeta->year;
822 _AudioMetadataImpl::GetTrackInfo(void) const
824 if (__pAudioMeta == null || __pAudioMeta->pTrackInfo == null)
826 SysLog(NID_CNT, "__pAudioMeta or __pAudioMeta->pTrackInfo is null.");
829 return *(__pAudioMeta->pTrackInfo);
833 _AudioMetadataImpl::GetRecordingDate(void) const
835 if (__pAudioMeta == null || __pAudioMeta->pRecordingDate == null)
837 SysLog(NID_CNT, "__pAudioMeta or __pAudioMeta->pRecordingDate is null.");
840 return *(__pAudioMeta->pRecordingDate);
844 _AudioMetadataImpl::GetChannelCount(void) const
846 if (__pAudioMeta == null)
848 SysLog(NID_CNT, "__pAudioMeta is null.");
851 return __pAudioMeta->channelCount;
860 _AudioMetadataImpl::GetThumbnailN(void) const
864 if (__pAudioMeta == null || __pAudioMeta->pThumbnail == null)
866 SysLogException(NID_CNT, E_DATA_NOT_FOUND, "[E_DATA_NOT_FOUND] __pAudioMeta or __pAudioMeta->pThumbnail is null.");
870 Bitmap* pBitmap = _BitmapImpl::CloneN(*(__pAudioMeta->pThumbnail));
871 SysTryReturn(NID_CNT, pBitmap != null, null, E_DATA_NOT_FOUND, "[E_DATA_NOT_FOUND] _BitmapImpl::CloneN failed.");
882 _AudioMetadataImpl::GetAlbumArtN(void) const
886 if (__pAudioMeta == null || __pAudioMeta->pAlbumArt == null)
888 SysLogException(NID_CNT, E_DATA_NOT_FOUND, "[E_DATA_NOT_FOUND] __pAudioMeta or __pAudioMeta->pAlbumArt is null.");
892 Bitmap* pBitmap = _BitmapImpl::CloneN(*(__pAudioMeta->pAlbumArt));
893 SysTryReturn(NID_CNT, pBitmap != null, null, E_DATA_NOT_FOUND, "[E_DATA_NOT_FOUND] _BitmapImpl::CloneN failed.");