CAF state bug fix
[platform/framework/native/media.git] / src / FMedia_MediaStreamInfoImpl.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18 /**
19  * @file                        FMedia_MediaStreamInfoImpl.h
20  * @brief                       This is the header file for the %_MediaStreamInfoImpl class.
21  *
22  * This header file contains the declarations of the %_MediaStreamInfoImpl class.
23  */
24
25 #ifndef _FMEDIA_INTERNAL_MEDIASTREAMINFO_IMPL_H_
26 #define _FMEDIA_INTERNAL_MEDIASTREAMINFO_IMPL_H_
27
28 #include <FMediaAudioStreamInfo.h>
29 #include <FMediaVideoStreamInfo.h>
30
31 namespace Tizen { namespace Media
32 {
33 class _MediaStreamInfoImpl
34         : public Tizen::Base::Object
35 {
36 public:
37         //
38         //      This is the destructor for this class.
39         //
40         //
41         virtual ~_MediaStreamInfoImpl(void);
42
43 public:
44         //
45         //      Gets the title.
46         //
47         //      @return           The value of the title, @n
48         //                    else an empty string if the content has no title
49         //
50         Tizen::Base::String GetTitle(void) const;
51
52         //
53         //      Gets the name of the artist from the content.
54         //
55         //      @return                     The artist, @n
56         //                               else an empty string if the content has no artist name
57         //
58         Tizen::Base::String GetArtist(void) const;
59
60         //
61         //      Gets the album title.
62         //
63         //      @return           The title of the album, @n
64         //                    else an empty string if the content has no album
65         //
66         Tizen::Base::String GetAlbumTitle(void) const;
67
68         //
69         //      Gets the genre.
70         //
71         //      @return           The genre, @n
72         //                    else an empty string if the content has no genre
73         //
74         Tizen::Base::String GetGenre(void) const;
75
76         //
77         //      Gets the year.
78         //
79         //      @return         The year, @n
80         //                  else @c 0 if the content has no year
81         //
82         int GetYear(void) const;
83
84         //
85         //      Gets the album art.
86         //
87         //      @return         The album art in the content, @n
88         //                  else @c null if the content has no album art
89         //
90         Tizen::Base::ByteBuffer* GetAlbumArtN(void) const;
91
92         //
93         //      Gets a list of the audio stream information.
94         //
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.
101         //
102         const Tizen::Base::Collection::IList* GetAudioStreamInfoList(void) const;
103
104         //
105         //      Gets a list of the video stream information.
106         //
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.
113         //
114         const Tizen::Base::Collection::IList* GetVideoStreamInfoList(void) const;
115
116         //
117         // @see @ref Tizen::Media::MediaStreamInfo::Equals()
118         //
119         virtual bool Equals(const Object& obj) const;
120
121         //
122         // @see @ref Tizen::Media::MediaStreamInfo::GetHashCode()
123         //
124         virtual int GetHashCode(void) const;
125
126 private:
127         //
128         //      Initializes this instance of _MediaStreamInfoImpl with the specified parameters. @n
129         //
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
141         //
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);
143
144         _MediaStreamInfoImpl(const _MediaStreamInfoImpl& rhs);
145
146         _MediaStreamInfoImpl& operator = (const _MediaStreamInfoImpl& rhs);
147
148         int __year;
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;
154
155         Tizen::Base::Collection::IList* __pAudioStreamList;
156         Tizen::Base::Collection::IList* __pVideoStreamList;
157
158         result __audioStreamListException;
159         result __videoStreamListException;
160
161         friend class MediaStreamInfo;
162 };
163
164 }}//Tizen::Media
165
166 #endif
167