|
1 /* |
|
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: class for the songhistory information. |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "irsonghistoryinfo.h" |
|
19 |
|
20 // --------------------------------------------------------------------------- |
|
21 // Function : NewL |
|
22 // Function returns an instance of CIRSongHistoryInfo |
|
23 // Two phase constructor |
|
24 // --------------------------------------------------------------------------- |
|
25 // |
|
26 EXPORT_C CIRSongHistoryInfo * CIRSongHistoryInfo::NewL() |
|
27 { |
|
28 CIRSongHistoryInfo* self = CIRSongHistoryInfo :: NewLC(); |
|
29 CleanupStack::Pop( self ); |
|
30 return self; |
|
31 } |
|
32 |
|
33 // --------------------------------------------------------------------------- |
|
34 //CIRLastPlayedSongs::NewLC() |
|
35 //Static function |
|
36 //standard two phased constructor |
|
37 // --------------------------------------------------------------------------- |
|
38 // |
|
39 EXPORT_C CIRSongHistoryInfo * CIRSongHistoryInfo::NewLC() |
|
40 { |
|
41 CIRSongHistoryInfo* self = new( ELeave ) CIRSongHistoryInfo(); |
|
42 CleanupStack::PushL( self ); |
|
43 return self; |
|
44 } |
|
45 // --------------------------------------------------------------------------- |
|
46 //CIRSongHistoryInfo::~CIRSongHistoryInfo() |
|
47 //standard C++ destructor |
|
48 // --------------------------------------------------------------------------- |
|
49 // |
|
50 EXPORT_C CIRSongHistoryInfo::~CIRSongHistoryInfo() |
|
51 { |
|
52 iArtistInfo.Close(); |
|
53 |
|
54 iSongInfo.Close(); |
|
55 |
|
56 iStreamUrlInfo.Close(); |
|
57 |
|
58 iChannelInfo.Close(); |
|
59 |
|
60 iChannelDescription.Close(); |
|
61 |
|
62 iImageUrl.Close(); |
|
63 |
|
64 iMusicStoreStatus.Close(); |
|
65 |
|
66 } |
|
67 |
|
68 // --------------------------------------------------------------------------- |
|
69 //CIRSongHistoryInfo::~CIRSongHistoryInfo() |
|
70 //standard C++ constructor |
|
71 // --------------------------------------------------------------------------- |
|
72 // |
|
73 CIRSongHistoryInfo::CIRSongHistoryInfo() |
|
74 { |
|
75 |
|
76 } |
|
77 |
|
78 |
|
79 // --------------------------------------------------------------------------- |
|
80 // CIRSongHistoryInfo::SetArtist |
|
81 // Sets Artist name |
|
82 // --------------------------------------------------------------------------- |
|
83 // |
|
84 void CIRSongHistoryInfo::SetArtist(RBuf& aArtist) |
|
85 { |
|
86 iArtistInfo.Create(aArtist); |
|
87 } |
|
88 |
|
89 // --------------------------------------------------------------------------- |
|
90 // CIRSongHistoryInfo::SetSongName |
|
91 // Sets Song name |
|
92 // --------------------------------------------------------------------------- |
|
93 // |
|
94 void CIRSongHistoryInfo::SetSongName (RBuf& aSongName) |
|
95 { |
|
96 iSongInfo.Create(aSongName); |
|
97 } |
|
98 |
|
99 // --------------------------------------------------------------------------- |
|
100 // CIRSongHistoryInfo::SetStreamUrl |
|
101 // Sets Stream url name |
|
102 // --------------------------------------------------------------------------- |
|
103 // |
|
104 void CIRSongHistoryInfo::SetStreamUrl(RBuf& aStreamUrl) |
|
105 { |
|
106 iStreamUrlInfo.Create(aStreamUrl); |
|
107 } |
|
108 |
|
109 // --------------------------------------------------------------------------- |
|
110 // CIRSongHistoryInfo::SetChannelName |
|
111 // Sets Channel name |
|
112 // --------------------------------------------------------------------------- |
|
113 // |
|
114 void CIRSongHistoryInfo::SetChannelName(RBuf& aChannelName) |
|
115 { |
|
116 iChannelInfo.Create(aChannelName); |
|
117 } |
|
118 // --------------------------------------------------------------------------- |
|
119 // CIRSongHistoryInfo::SetChannelDesc |
|
120 // Sets Channel name |
|
121 // --------------------------------------------------------------------------- |
|
122 // |
|
123 void CIRSongHistoryInfo::SetChannelDesc(RBuf& aChannelDesc) |
|
124 { |
|
125 iChannelDescription.Create(aChannelDesc); |
|
126 } |
|
127 // --------------------------------------------------------------------------- |
|
128 // CIRSongHistoryInfo::SetImageUrl |
|
129 // Sets Channel image Url |
|
130 // --------------------------------------------------------------------------- |
|
131 // |
|
132 void CIRSongHistoryInfo::SetImageUrl(RBuf& aImageUrl) |
|
133 { |
|
134 iImageUrl.Create(aImageUrl); |
|
135 } |
|
136 // --------------------------------------------------------------------------- |
|
137 // CIRSongHistoryInfo::SetChannelMusicStatus |
|
138 // Sets Channel's MusicStoreStatus |
|
139 // --------------------------------------------------------------------------- |
|
140 // |
|
141 void CIRSongHistoryInfo::SetChannelMusicStatus(RBuf& aChannelMusicStatus) |
|
142 { |
|
143 iMusicStoreStatus.Create(aChannelMusicStatus); |
|
144 } |
|
145 // --------------------------------------------------------------------------- |
|
146 // CIRSongHistoryInfo::SetChannelType |
|
147 // Sets Channel TYpe |
|
148 // --------------------------------------------------------------------------- |
|
149 // |
|
150 void CIRSongHistoryInfo::SetChannelType(TInt aChannelType) |
|
151 { |
|
152 iChannelType=aChannelType; |
|
153 } |
|
154 // --------------------------------------------------------------------------- |
|
155 // CIRSongHistoryInfo::SetChannelId |
|
156 // Sets Channel Id |
|
157 // --------------------------------------------------------------------------- |
|
158 // |
|
159 void CIRSongHistoryInfo::SetChannelId(TInt aChannelId) |
|
160 { |
|
161 iChannelId=aChannelId; |
|
162 } |
|
163 |
|
164 // --------------------------------------------------------------------------- |
|
165 // CIRSongHistoryInfo::SetBitrate |
|
166 // Sets bitrate |
|
167 // --------------------------------------------------------------------------- |
|
168 // |
|
169 void CIRSongHistoryInfo::SetBitrate(TInt aBitrate) |
|
170 { |
|
171 iBitrate=aBitrate; |
|
172 } |
|
173 // --------------------------------------------------------------------------- |
|
174 // CIRSongHistoryInfo::SetHistoryInfo |
|
175 // Sets Song History Information. |
|
176 // --------------------------------------------------------------------------- |
|
177 // |
|
178 EXPORT_C void CIRSongHistoryInfo::SetHistoryInfo(RBuf& aSongName, |
|
179 RBuf& aArtist, |
|
180 RBuf& aStreamUrl, |
|
181 RBuf& aChannelName , |
|
182 TInt aChannelType, |
|
183 TInt aChannelId, |
|
184 TInt aBitrate, |
|
185 RBuf& aChannelDesc, |
|
186 RBuf& aImageUrl, |
|
187 RBuf& aMusicStoreStatus |
|
188 ) |
|
189 { |
|
190 SetSongName(aSongName); |
|
191 SetArtist(aArtist); |
|
192 SetStreamUrl(aStreamUrl); |
|
193 SetChannelName(aChannelName); |
|
194 SetChannelType(aChannelType); |
|
195 SetChannelId(aChannelId); |
|
196 SetBitrate(aBitrate); |
|
197 SetChannelDesc(aChannelDesc); |
|
198 SetImageUrl(aImageUrl); |
|
199 SetChannelMusicStatus(aMusicStoreStatus); |
|
200 |
|
201 } |
|
202 |
|
203 // --------------------------------------------------------------------------- |
|
204 // CIRSongHistoryInfo::GetSongInfo |
|
205 // Gets the song information |
|
206 // --------------------------------------------------------------------------- |
|
207 // |
|
208 EXPORT_C const RBuf& CIRSongHistoryInfo::GetSongInfo() const |
|
209 { |
|
210 return iSongInfo; |
|
211 } |
|
212 |
|
213 // --------------------------------------------------------------------------- |
|
214 // CIRSongHistoryInfo::GetArtistInfo |
|
215 // Gets Artist name |
|
216 // --------------------------------------------------------------------------- |
|
217 // |
|
218 EXPORT_C const RBuf& CIRSongHistoryInfo::GetArtistInfo() const |
|
219 { |
|
220 return iArtistInfo; |
|
221 } |
|
222 |
|
223 // --------------------------------------------------------------------------- |
|
224 // CIRSongHistoryInfo::GetStreamUrl |
|
225 // Gets StreamUrl name |
|
226 // --------------------------------------------------------------------------- |
|
227 // |
|
228 EXPORT_C const RBuf& CIRSongHistoryInfo::GetStreamUrl() const |
|
229 { |
|
230 return iStreamUrlInfo; |
|
231 } |
|
232 |
|
233 // --------------------------------------------------------------------------- |
|
234 // CIRSongHistoryInfo::GetChannelName |
|
235 // Gets Channel name |
|
236 // --------------------------------------------------------------------------- |
|
237 // |
|
238 EXPORT_C const RBuf& CIRSongHistoryInfo::GetChannelName() const |
|
239 { |
|
240 return iChannelInfo; |
|
241 } |
|
242 // --------------------------------------------------------------------------- |
|
243 // CIRSongHistoryInfo::GetChannelDesc |
|
244 // Gets Channel name |
|
245 // --------------------------------------------------------------------------- |
|
246 // |
|
247 EXPORT_C const RBuf& CIRSongHistoryInfo::GetChannelDesc() const |
|
248 { |
|
249 return iChannelDescription; |
|
250 } |
|
251 |
|
252 // --------------------------------------------------------------------------- |
|
253 // CIRSongHistoryInfo::GetImageUrl |
|
254 // Gets Channel image Url |
|
255 // --------------------------------------------------------------------------- |
|
256 // |
|
257 EXPORT_C const RBuf& CIRSongHistoryInfo::GetImageUrl() const |
|
258 { |
|
259 return iImageUrl; |
|
260 } |
|
261 |
|
262 // --------------------------------------------------------------------------- |
|
263 // CIRSongHistoryInfo::GetChannelType |
|
264 // Gets Channel Type |
|
265 // --------------------------------------------------------------------------- |
|
266 // |
|
267 EXPORT_C TInt CIRSongHistoryInfo::GetChannelType() const |
|
268 { |
|
269 return iChannelType; |
|
270 } |
|
271 // --------------------------------------------------------------------------- |
|
272 // CIRSongHistoryInfo::GetChannelId |
|
273 // Gets Channel Id |
|
274 // --------------------------------------------------------------------------- |
|
275 // |
|
276 EXPORT_C TInt CIRSongHistoryInfo::GetChannelId() const |
|
277 { |
|
278 return iChannelId; |
|
279 } |
|
280 // --------------------------------------------------------------------------- |
|
281 // CIRSongHistoryInfo::GetBitrate |
|
282 // Gets bitrate |
|
283 // --------------------------------------------------------------------------- |
|
284 // |
|
285 EXPORT_C TInt CIRSongHistoryInfo::GetBitrate() const |
|
286 { |
|
287 return iBitrate; |
|
288 } |
|
289 // --------------------------------------------------------------------------- |
|
290 // CIRSongHistoryInfo::GetChannelMusicStatus |
|
291 // Gets Channel MusicStoreStatus |
|
292 // --------------------------------------------------------------------------- |
|
293 // |
|
294 EXPORT_C const RBuf& CIRSongHistoryInfo::GetChannelMusicStatus() const |
|
295 { |
|
296 return iMusicStoreStatus; |
|
297 } |