|
1 /* |
|
2 * Copyright (c) 2005 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 the License "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 to provide program data to* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CIPTVEPGPROGRAM_H__ |
|
21 #define __CIPTVEPGPROGRAM_H__ |
|
22 |
|
23 #include <e32std.h> |
|
24 #include <e32base.h> |
|
25 |
|
26 #include "IptvLiveEpgConstants.h" |
|
27 |
|
28 /** |
|
29 * "Carrier" class to contain data for single program occurence in EPG xml |
|
30 * file. This class is used to communicate data from xml content handler |
|
31 * to EPG manager to be stored to the database. |
|
32 */ |
|
33 class CIptvEpgProgram : public CBase |
|
34 { |
|
35 public: |
|
36 /** |
|
37 * Symbian two phase constructor |
|
38 * @param None |
|
39 * @return Created instance of CLiveTvEpgProgram |
|
40 */ |
|
41 IMPORT_C static CIptvEpgProgram* NewL(); |
|
42 |
|
43 /** |
|
44 * Destructor |
|
45 */ |
|
46 virtual ~CIptvEpgProgram(); |
|
47 |
|
48 public: // new methods |
|
49 /** |
|
50 * method for sorting by programid |
|
51 */ |
|
52 static TInt LinearOrderOfProgramsById( const CIptvEpgProgram &p1, |
|
53 const CIptvEpgProgram &p2); |
|
54 |
|
55 /** |
|
56 * method for sorting by program name |
|
57 */ |
|
58 static TInt LinearOrderOfProgramsByName( const CIptvEpgProgram &p1, |
|
59 const CIptvEpgProgram &p2); |
|
60 |
|
61 protected: // Constructors |
|
62 /** |
|
63 * Default constructor |
|
64 */ |
|
65 CIptvEpgProgram(); |
|
66 |
|
67 /** |
|
68 * Symbian second phase constructor which might contain leaving code |
|
69 */ |
|
70 void ConstructL(); |
|
71 |
|
72 |
|
73 public: |
|
74 // Setters for instance variables |
|
75 // <!NOTE> |
|
76 // ALL THESE SETTER FUNCTIONS TAKES THE OWNERSHIP OF THE GIVEN HEAP |
|
77 // DESCRIPTOR, SO CALLER MUST NOT DELETE HBufC POINTERS PASSED TO |
|
78 // THIS CLASS |
|
79 // </!NOTE> |
|
80 // |
|
81 |
|
82 /** |
|
83 * Setter for the service id this program belongs to. |
|
84 * @param aServiceId Id of the service which this program belongs |
|
85 * @return None |
|
86 */ |
|
87 IMPORT_C void SetServiceId( TUint32 aServiceId ); |
|
88 |
|
89 /** |
|
90 * Setter for the channel id this program belongs |
|
91 * @param aChannelId Id of the channel which this program belongs |
|
92 * @return None |
|
93 */ |
|
94 IMPORT_C void SetChannelId( TInt64 aChannelId ); |
|
95 |
|
96 /** |
|
97 * Setter for the program id of this program object |
|
98 * @param aProgramId Id of this program |
|
99 * @return None |
|
100 */ |
|
101 IMPORT_C void SetProgramId( TInt64 aProgramId ); |
|
102 |
|
103 /** |
|
104 * Setter for the program rtsp uri |
|
105 * @param aURI Descriptor containing the rtsp address for |
|
106 * this program. Ownership of given descriptor |
|
107 * has been transferred to this class so it MUST NOT |
|
108 * be deleted where this method is called. |
|
109 * @return None |
|
110 */ |
|
111 IMPORT_C void SetProgramURI( HBufC* aURI ); |
|
112 |
|
113 /** |
|
114 * Setter for the program rtsp uri |
|
115 * @param aSDP Descriptor containing the SDP (Session Description |
|
116 * Protocol) for this program. |
|
117 * Ownership of given descriptor has been transferred |
|
118 * to this class so it MUST NOT be deleted where this |
|
119 * method is called. |
|
120 * @return None |
|
121 */ |
|
122 IMPORT_C void SetProgramSDP( HBufC* aSDP ); |
|
123 |
|
124 /** |
|
125 * Setter for the program genre |
|
126 * @param aGenre Descriptor containing the genre of this program |
|
127 * Ownership of given descriptor has been transferred |
|
128 * to this class so it MUST NOT be deleted where this |
|
129 * method is called. |
|
130 * @return None |
|
131 */ |
|
132 IMPORT_C void SetProgramGenre( HBufC* aGenre ); |
|
133 |
|
134 /** |
|
135 * Setter for the program name |
|
136 * @param aName Descriptor containing the name of this program |
|
137 * Ownership of given descriptor has been transferred |
|
138 * to this class so it MUST NOT be deleted where this |
|
139 * method is called. |
|
140 * @return None |
|
141 */ |
|
142 IMPORT_C void SetProgramName( HBufC* aName ); |
|
143 |
|
144 /** |
|
145 * Setter for the program description |
|
146 * @param aName Descriptor containing the description of this program |
|
147 * Ownership of given descriptor has been transferred |
|
148 * to this class so it MUST NOT be deleted where this |
|
149 * method is called. |
|
150 * @return None |
|
151 */ |
|
152 IMPORT_C void SetProgramDescription( HBufC* aDescription ); |
|
153 |
|
154 /** |
|
155 * Setter for the program language |
|
156 * @param aName Descriptor containing the language of this program |
|
157 * Ownership of given descriptor has been transferred |
|
158 * to this class so it MUST NOT be deleted where this |
|
159 * method is called. |
|
160 * @return None |
|
161 */ |
|
162 IMPORT_C void SetProgramLanguage( HBufC* aLanguage ); |
|
163 |
|
164 /** |
|
165 * Setter for the program parental rating |
|
166 * @param aName Descriptor containing the parental rating of this |
|
167 * program. |
|
168 * Ownership of given descriptor has been transferred |
|
169 * to this class so it MUST NOT be deleted where this |
|
170 * method is called. |
|
171 * @return None |
|
172 */ |
|
173 IMPORT_C void SetProgramParentalRating( HBufC* aParentalRating ); |
|
174 |
|
175 |
|
176 // Getters for the instance data |
|
177 |
|
178 /** |
|
179 * Getter for this program's service id |
|
180 * @param None |
|
181 * @return On return contains the id of the service which this program |
|
182 * belongs. |
|
183 */ |
|
184 IMPORT_C TUint32 ServiceId() const; |
|
185 |
|
186 /** |
|
187 * Getter for this program's channel id |
|
188 * @param None |
|
189 * @return On return contains the id of the channel which this program |
|
190 * belongs. |
|
191 */ |
|
192 IMPORT_C TInt64 ChannelId() const; |
|
193 |
|
194 /** |
|
195 * Getter for this program's id |
|
196 * @param None |
|
197 * @return On return contains the id of this program |
|
198 */ |
|
199 IMPORT_C TInt64 ProgramId() const; |
|
200 |
|
201 /** |
|
202 * Getter for this program's rtsp URI |
|
203 * @param None |
|
204 * @return Reference to the descriptor containing the rtsp URI of this |
|
205 * program. |
|
206 */ |
|
207 IMPORT_C TDesC& ProgramURI() const; |
|
208 |
|
209 /** |
|
210 * Getter for this program's SDP (Session Description Protocol) |
|
211 * @param None |
|
212 * @return Reference to the descriptor containing the SDP of this |
|
213 * program. |
|
214 */ |
|
215 IMPORT_C TDesC& ProgramSDP() const; |
|
216 |
|
217 /** |
|
218 * Getter for this program's genre |
|
219 * @param None |
|
220 * @return Reference to the descriptor containing the genre of this |
|
221 * program. |
|
222 */ |
|
223 IMPORT_C TDesC& ProgramGenre() const; |
|
224 |
|
225 /** |
|
226 * Getter for this program's name |
|
227 * @param None |
|
228 * @return Reference to the descriptor containing the name of this |
|
229 * program. |
|
230 */ |
|
231 IMPORT_C TDesC& ProgramName() const; |
|
232 |
|
233 /** |
|
234 * Getter for this program's description |
|
235 * @param None |
|
236 * @return Reference to the descriptor containing the description of this |
|
237 * program. |
|
238 */ |
|
239 IMPORT_C TDesC& ProgramDescription() const; |
|
240 |
|
241 /** |
|
242 * Getter for this program's language |
|
243 * @param None |
|
244 * @return Reference to the descriptor containing the language of this |
|
245 * program. |
|
246 */ |
|
247 IMPORT_C TDesC& ProgramLanguage() const; |
|
248 |
|
249 /** |
|
250 * Getter for this program's parental rating |
|
251 * @param None |
|
252 * @return Reference to the descriptor containing the parental rating of |
|
253 * this program. |
|
254 */ |
|
255 IMPORT_C TDesC& ProgramParentalRating() const; |
|
256 |
|
257 // Instance variables |
|
258 private: |
|
259 /** Id of the service where this program belongs */ |
|
260 TUint32 iServiceId; |
|
261 |
|
262 /** Id of the channel this program belong */ |
|
263 TInt64 iChannelId; |
|
264 |
|
265 /** Id of the program */ |
|
266 TInt64 iProgramId; |
|
267 |
|
268 /** Descriptor containing the URI of the program */ |
|
269 HBufC* iURI; |
|
270 |
|
271 /** Descriptor containing the SDP of the program |
|
272 Note, that this descriptor can be quite long */ |
|
273 HBufC* iSDP; |
|
274 |
|
275 /** Descriptor containing the genre of the program */ |
|
276 HBufC* iGenre; |
|
277 |
|
278 /** Descriptor containing the name of the program */ |
|
279 HBufC* iName; |
|
280 |
|
281 /** Descriptor containing the name of the program */ |
|
282 HBufC* iDescription; |
|
283 |
|
284 /** Descriptor containing the language of the program */ |
|
285 HBufC* iLanguage; |
|
286 |
|
287 /** Descriptor containing the parental rating of the program */ |
|
288 HBufC* iParentalRating; |
|
289 }; |
|
290 |
|
291 #endif //__CIPTVEPGPROGRAM_H__ |
|
292 |
|
293 // End of file |