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 FMedia_MediaStreamInfoImpl.h
20 * @brief This is the header file for the %_MediaStreamInfoImpl class.
22 * This header file contains the declarations of the %_MediaStreamInfoImpl class.
25 #ifndef _FMEDIA_INTERNAL_MEDIASTREAMINFO_IMPL_H_
26 #define _FMEDIA_INTERNAL_MEDIASTREAMINFO_IMPL_H_
28 #include <FMediaAudioStreamInfo.h>
29 #include <FMediaVideoStreamInfo.h>
31 namespace Tizen { namespace Media
33 class _MediaStreamInfoImpl
34 : public Tizen::Base::Object
38 // This is the destructor for this class.
41 virtual ~_MediaStreamInfoImpl(void);
47 // @return The value of the title, @n
48 // else an empty string if the content has no title
50 Tizen::Base::String GetTitle(void) const;
53 // Gets the name of the artist from the content.
55 // @return The artist, @n
56 // else an empty string if the content has no artist name
58 Tizen::Base::String GetArtist(void) const;
61 // Gets the album title.
63 // @return The title of the album, @n
64 // else an empty string if the content has no album
66 Tizen::Base::String GetAlbumTitle(void) const;
71 // @return The genre, @n
72 // else an empty string if the content has no genre
74 Tizen::Base::String GetGenre(void) const;
79 // @return The year, @n
80 // else @c 0 if the content has no year
82 int GetYear(void) const;
85 // Gets the album art.
87 // @return The album art in the content, @n
88 // else @c null if the content has no album art
90 Tizen::Base::ByteBuffer* GetAlbumArtN(void) const;
93 // Gets a list of the audio stream information.
95 // @return A pointer to the list containing the audio stream information @n
96 // The value belongs to the %AudioStreamInfo class.
97 // @exception E_SUCCESS The method is successful.
98 // @exception E_INVALID_DATA The stream cannot be parsed successfully.
99 // @exception E_SYSTEM A system error has occurred.
100 // @remarks The specific error code can be accessed using the GetLastResult() method.
102 const Tizen::Base::Collection::IList* GetAudioStreamInfoList(void) const;
105 // Gets a list of the video stream information.
107 // @return A pointer to a list containing the video stream information @n
108 // The value belongs to the %VideoStreamInfo class.
109 // @exception E_SUCCESS The method is successful.
110 // @exception E_INVALID_DATA The stream cannot be parsed successfully.
111 // @exception E_SYSTEM A system error has occurred.
112 // @remarks The specific error code can be accessed using the GetLastResult() method.
114 const Tizen::Base::Collection::IList* GetVideoStreamInfoList(void) const;
117 // @see @ref Tizen::Media::MediaStreamInfo::Equals()
119 virtual bool Equals(const Object& obj) const;
122 // @see @ref Tizen::Media::MediaStreamInfo::GetHashCode()
124 virtual int GetHashCode(void) const;
128 // Initializes this instance of _MediaStreamInfoImpl with the specified parameters. @n
130 // @param[in] title The value of the title @n
131 // @param[in] artist The value of the artist @n
132 // @param[in] albumTitle The value of the title of the album @n
133 // @param[in] genre The value of the genre @n
134 // @param[in] year The value of the year @n
135 // @param[in] albumArt The value of the album art @n
136 // @param[in] pAudioStream A pointer to an audio stream list @n
137 // @param[in] pVideoStream A pointer to a video stream list @n
138 // @param[in] titleException An exception generated due to the title of audio or video @n
139 // @param[in] audioStreamException The exception generated during audio streaming @n
140 // @param[in] videoStreamException The exception generated during video streaming @n
142 _MediaStreamInfoImpl(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);
144 _MediaStreamInfoImpl(const _MediaStreamInfoImpl& rhs);
146 _MediaStreamInfoImpl& operator = (const _MediaStreamInfoImpl& rhs);
149 Tizen::Base::String __title;
150 Tizen::Base::String __artist;
151 Tizen::Base::String __albumTitle;
152 Tizen::Base::String __genre;
153 Tizen::Base::ByteBuffer* __pAlbumArt;
155 Tizen::Base::Collection::IList* __pAudioStreamList;
156 Tizen::Base::Collection::IList* __pVideoStreamList;
158 result __audioStreamListException;
159 result __videoStreamListException;
161 friend class MediaStreamInfo;