|
1 /* |
|
2 * Copyright (c) 2009 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: The implementation for presentation elements. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef IRXMLELEMENTS_H |
|
20 #define IRXMLELEMENTS_H |
|
21 |
|
22 #include <e32cmn.h> |
|
23 #include <stringtablesupport.h> |
|
24 |
|
25 //Literals to instantiate the class |
|
26 _STLIT8( KGetOp, "getOperation" ); |
|
27 _LIT8( KCatGenre, "genres" ); |
|
28 _STLIT8( KCatLang, "languages" ); |
|
29 _STLIT8( KCatCountry, "countries" ); |
|
30 _STLIT8( KChannels, "channels" ); |
|
31 _STLIT8( KPresets, "presets" ); |
|
32 _STLIT8( KIRID, "irid" ); |
|
33 _STLIT8( KTimeStamp, "timestamp" ); |
|
34 _STLIT8( KIRVersion, "iRAPPVersion" ); |
|
35 _STLIT8( KAdv,"advertisement" ); |
|
36 _STLIT8( KPreset, "preset" ); |
|
37 _STLIT8( KServers, "servers" ); |
|
38 _STLIT8( KGenre, "genre" ); |
|
39 _STLIT8( KLanguage, "language" ); |
|
40 _STLIT8( KCountry, "country" ); |
|
41 _STLIT8( KChannel, "channel" ); |
|
42 _STLIT8( KAd, "ad" ); |
|
43 _STLIT8( KAdvertisements, "advertisements" ); |
|
44 _STLIT8( KBanner, "banner" ); |
|
45 _STLIT8( KClickthroughUrl, "clickthrough-url" ); |
|
46 |
|
47 |
|
48 //! Enum for the attributes |
|
49 enum TIRXMLElement |
|
50 { |
|
51 EGetOperation, |
|
52 |
|
53 // List of Genres/Language/Contry |
|
54 EName, |
|
55 EID, |
|
56 ESize, |
|
57 |
|
58 //! Channels |
|
59 EShortDesC, |
|
60 EBitrateValue, |
|
61 |
|
62 // Preset |
|
63 ESdsID, |
|
64 ELangCode, |
|
65 ELang, |
|
66 ECountryCode, |
|
67 ECountry, |
|
68 ELastUpdated, |
|
69 EDesc, |
|
70 EImgURL, |
|
71 EAdvImgURL, |
|
72 EAdvInUse, |
|
73 EGenreID, |
|
74 EURL, |
|
75 EMusicStoreEnabled, |
|
76 EBitrate, |
|
77 |
|
78 // Log Usage |
|
79 EIRID, |
|
80 |
|
81 // OTA Update |
|
82 EVersion, |
|
83 EUpdateInterval, |
|
84 EUpdateMethod, |
|
85 |
|
86 //Advertisement |
|
87 EInUse, |
|
88 EUsageVisibleTimes, |
|
89 EVisibleTime, |
|
90 /** |
|
91 Unknown Element |
|
92 */ |
|
93 EElementIDUnknown, |
|
94 }; |
|
95 |
|
96 class RStringPool; |
|
97 |
|
98 /** |
|
99 * This class handles the XML string pool |
|
100 * not accessible outside the dll |
|
101 */ |
|
102 class TIRXMLElementFormat |
|
103 { |
|
104 public : |
|
105 /** |
|
106 * Creates an initialised string pool with no pre-loaded string tables. |
|
107 * @param aStringPool Stringpool |
|
108 */ |
|
109 static void OpenStringPoolL( RStringPool& aStringPool ); |
|
110 /** |
|
111 * The ElementId of the element from the StringPool |
|
112 * @param aElement the element name to be searched in the pool |
|
113 * @param aStringPool stringpool reference |
|
114 * @return the enum for the element |
|
115 */ |
|
116 static TIRXMLElement GetElementIdL( const TDesC8& aElement, |
|
117 const RStringPool& aStringPool ); |
|
118 /** |
|
119 * Closes the StringPool |
|
120 * @param aStringPool Stringpool |
|
121 */ |
|
122 static void CloseStringPoolL( RStringPool& aStringPool ); |
|
123 }; |
|
124 |
|
125 |
|
126 #endif //IRXMLELEMENTS_H |