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.
19 // @file FMediaMediaStreamInfo.cpp
20 // @brief This file contains the implementation of media stream information
24 #include <FMediaMediaStreamInfo.h>
25 #include <FBaseSysLog.h>
26 #include "FMedia_MediaStreamInfoImpl.h"
29 using namespace Tizen::Base;
30 using namespace Tizen::Base::Collection;
32 namespace Tizen { namespace Media
35 MediaStreamInfo::MediaStreamInfo(const Tizen::Base::String& title, const Tizen::Base::String& artist, const Tizen::Base::String& albumTitle, const Tizen::Base::String& genre, int year, Tizen::Base::ByteBuffer* pAlbumArt, Tizen::Base::Collection::IList* pAudioStream, Tizen::Base::Collection::IList* pVideoStream, result audioStreamException, result videoStreamException)
37 __pMediaStreamInfoImpl = new (std::nothrow) _MediaStreamInfoImpl(title, artist, albumTitle, genre, year, pAlbumArt, pAudioStream, pVideoStream, audioStreamException, videoStreamException);
40 MediaStreamInfo::~MediaStreamInfo()
42 if (__pMediaStreamInfoImpl)
44 delete __pMediaStreamInfoImpl;
46 __pMediaStreamInfoImpl = null;
50 MediaStreamInfo::MediaStreamInfo(const MediaStreamInfo& rhs)
51 : Tizen::Base::Object()
53 __pMediaStreamInfoImpl = new (std::nothrow) _MediaStreamInfoImpl(*rhs.__pMediaStreamInfoImpl);
58 MediaStreamInfo::operator =(const MediaStreamInfo & rhs)
64 if (__pMediaStreamInfoImpl )
66 delete __pMediaStreamInfoImpl;
67 __pMediaStreamInfoImpl = null;
69 __pMediaStreamInfoImpl = new (std::nothrow) _MediaStreamInfoImpl(*rhs.__pMediaStreamInfoImpl);
76 MediaStreamInfo::Equals(const Tizen::Base::Object& rhs) const
78 const MediaStreamInfo* pRhs = dynamic_cast <const MediaStreamInfo*>(&rhs);
84 return __pMediaStreamInfoImpl->Equals(*pRhs->__pMediaStreamInfoImpl);
89 MediaStreamInfo::GetHashCode(void) const
91 return __pMediaStreamInfoImpl->GetHashCode();
96 MediaStreamInfo::GetTitle() const
98 if (__pMediaStreamInfoImpl)
100 return __pMediaStreamInfoImpl->GetTitle();
109 MediaStreamInfo::GetArtist(void) const
111 if (__pMediaStreamInfoImpl)
113 return __pMediaStreamInfoImpl->GetArtist();
122 MediaStreamInfo::GetAlbumTitle(void) const
124 if (__pMediaStreamInfoImpl)
126 return __pMediaStreamInfoImpl->GetAlbumTitle();
135 MediaStreamInfo::GetYear(void) const
137 if (__pMediaStreamInfoImpl)
139 return __pMediaStreamInfoImpl->GetYear();
148 MediaStreamInfo::GetGenre(void) const
150 if (__pMediaStreamInfoImpl)
152 return __pMediaStreamInfoImpl->GetGenre();
161 MediaStreamInfo::GetAlbumArtN(void) const
163 if (__pMediaStreamInfoImpl)
165 return __pMediaStreamInfoImpl->GetAlbumArtN();
174 MediaStreamInfo::GetAudioStreamInfoList() const
176 if (__pMediaStreamInfoImpl)
178 return __pMediaStreamInfoImpl->GetAudioStreamInfoList();
187 MediaStreamInfo::GetVideoStreamInfoList() const
189 if (__pMediaStreamInfoImpl)
191 return __pMediaStreamInfoImpl->GetVideoStreamInfoList();