|
1 /* |
|
2 * Copyright (c) 2002-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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // Plugin interface |
|
20 |
|
21 |
|
22 #ifndef __SISTRINGDICT00_H__ |
|
23 #define __SISTRINGDICT00_H__ |
|
24 |
|
25 #include <e32std.h> |
|
26 #include <stringpool.h> |
|
27 #include <Xml/Plugins/StringDictionary.h> |
|
28 |
|
29 |
|
30 class CDrmRel1_0StringDict00 : public CBase, public Xml::MStringDictionary |
|
31 /** |
|
32 The DrmRel1_0StringDict00 class is a derived class defining the API of a single string dictionary. |
|
33 |
|
34 Derived classes must add all elements, attributes names, and attribute values that belong |
|
35 to this string dictionary as static string tables to the StringPool. WBXML token mappings between |
|
36 strings and WBXML tokens should also be maintained. |
|
37 |
|
38 @internalTechnology |
|
39 @interim This is the first drop of this component. |
|
40 */ |
|
41 { |
|
42 public: |
|
43 static Xml::MStringDictionary* NewL(TAny* aStringPool); |
|
44 virtual ~CDrmRel1_0StringDict00(); |
|
45 void ConstructL(); |
|
46 |
|
47 void ElementL(TInt aToken, RString& aElement) const; |
|
48 void AttributeL(TInt aToken, RString& aAttribute) const; |
|
49 void AttributeValuePairL(TInt aToken, RString& aAttribute, RString& aValue) const; |
|
50 void AttributeValueL(TInt aToken, RString& aValue) const; |
|
51 |
|
52 TBool CompareThisDictionary(const RString& aDictionaryDescription) const; |
|
53 |
|
54 TInt SwitchCodePage(TInt aCodePage); |
|
55 void PublicIdentifier(RString& aPubId); |
|
56 void NamespaceUri(RString& aUri); |
|
57 |
|
58 void Release(); |
|
59 |
|
60 public: |
|
61 |
|
62 // CodePage tokens. |
|
63 // |
|
64 // Note: There will be correlation between these token values and their |
|
65 // strings via the CDictionaryCodePage using the RStringPool. |
|
66 |
|
67 enum TTagToken |
|
68 { |
|
69 // CodePage 00 |
|
70 // -//OMA//DTD DRMREL 1.0//EN |
|
71 ERights = 0x05, |
|
72 EContext = 0x06, |
|
73 EVersion = 0x07, |
|
74 EUid = 0x08, |
|
75 EAgreement = 0x09, |
|
76 EAsset = 0x0a, |
|
77 EKeyInfo = 0x0b, |
|
78 EKeyValue = 0x0c, |
|
79 EPermission = 0x0d, |
|
80 EPlay = 0x0e, |
|
81 EDisplay = 0x0f, |
|
82 EExecute = 0x10, |
|
83 EPrint = 0x11, |
|
84 EConstraint = 0x12, |
|
85 ECount = 0x13, |
|
86 EDateTime = 0x14, |
|
87 EStart = 0x15, |
|
88 EEnd = 0x16, |
|
89 EInterval = 0x17 |
|
90 }; |
|
91 |
|
92 |
|
93 enum TAttributeToken |
|
94 { |
|
95 // CodePage 00 |
|
96 // -//OMA//DTD DRMREL 1.0//EN |
|
97 EXmlnsOEx = 0x05, |
|
98 EXmlnsODd = 0x06, |
|
99 EXmlnsDs = 0x07 |
|
100 }; |
|
101 |
|
102 |
|
103 |
|
104 enum TAttributeValueToken |
|
105 { |
|
106 // CodePage 00 |
|
107 // -//OMA//DTD DRMREL 1.0//EN |
|
108 EValueXmlnsOEx = 0x05, |
|
109 EValueXmlnsODd = 0x06, |
|
110 EValueXmlnsDs = 0x07, |
|
111 EOdrlEx = 0x85, |
|
112 EOdrlDd = 0x86, |
|
113 EXmlDsig = 0x87 |
|
114 }; |
|
115 |
|
116 |
|
117 |
|
118 private: |
|
119 |
|
120 CDrmRel1_0StringDict00(RStringPool* aStringPool); |
|
121 |
|
122 private: |
|
123 |
|
124 /** |
|
125 The StringPool for this string dictionary. |
|
126 We don't own this. |
|
127 */ |
|
128 RStringPool iStringPool; |
|
129 |
|
130 Xml::CDictionaryCodePage* iCodepage00Table; |
|
131 |
|
132 TInt iCodePage; |
|
133 |
|
134 }; |
|
135 |
|
136 |
|
137 const TInt iTagCodePage00[] = |
|
138 { |
|
139 CDrmRel1_0StringDict00::ERights, |
|
140 CDrmRel1_0StringDict00::EContext, |
|
141 CDrmRel1_0StringDict00::EVersion, |
|
142 CDrmRel1_0StringDict00::EUid, |
|
143 CDrmRel1_0StringDict00::EAgreement, |
|
144 CDrmRel1_0StringDict00::EAsset, |
|
145 CDrmRel1_0StringDict00::EKeyInfo, |
|
146 CDrmRel1_0StringDict00::EKeyValue, |
|
147 CDrmRel1_0StringDict00::EPermission, |
|
148 CDrmRel1_0StringDict00::EPlay, |
|
149 CDrmRel1_0StringDict00::EDisplay, |
|
150 CDrmRel1_0StringDict00::EExecute, |
|
151 CDrmRel1_0StringDict00::EPrint, |
|
152 CDrmRel1_0StringDict00::EConstraint, |
|
153 CDrmRel1_0StringDict00::ECount, |
|
154 CDrmRel1_0StringDict00::EDateTime, |
|
155 CDrmRel1_0StringDict00::EStart, |
|
156 CDrmRel1_0StringDict00::EEnd, |
|
157 CDrmRel1_0StringDict00::EInterval, |
|
158 0 // ok to end with zero as this is used by a global token |
|
159 }; |
|
160 |
|
161 |
|
162 const TInt iAttributeCodePage00[] = |
|
163 { |
|
164 CDrmRel1_0StringDict00::EXmlnsOEx, |
|
165 CDrmRel1_0StringDict00::EXmlnsODd, |
|
166 CDrmRel1_0StringDict00::EXmlnsDs, |
|
167 0 // ok to end with zero as this is used by a global token |
|
168 }; |
|
169 |
|
170 |
|
171 |
|
172 const TInt iAttributeValueCodePage00[] = |
|
173 { |
|
174 CDrmRel1_0StringDict00::EXmlnsOEx, |
|
175 CDrmRel1_0StringDict00::EXmlnsODd, |
|
176 CDrmRel1_0StringDict00::EXmlnsDs, |
|
177 CDrmRel1_0StringDict00::EOdrlEx, |
|
178 CDrmRel1_0StringDict00::EOdrlDd, |
|
179 CDrmRel1_0StringDict00::EXmlDsig, |
|
180 0 // ok to end with zero as this is used by a global token |
|
181 }; |
|
182 |
|
183 |
|
184 #endif //__SISTRINGDICT00_H__ |