|
1 /* |
|
2 * Copyright (c) 2002 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: COMAPushEMNStringDict00 |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __OMAPUSHEMNSTRINGDICT00_H__ |
|
22 #define __OMAPUSHEMNSTRINGDICT00_H__ |
|
23 |
|
24 #include <e32std.h> |
|
25 #include <stringpool.h> |
|
26 #include <xml/plugins/stringdictionary.h> |
|
27 |
|
28 |
|
29 class COMAPushEMNStringDict00 : public CBase, public Xml::MStringDictionary |
|
30 { |
|
31 public: |
|
32 static Xml::MStringDictionary* NewL( TAny* aStringPool ); |
|
33 virtual ~COMAPushEMNStringDict00(); |
|
34 void ConstructL(); |
|
35 |
|
36 void ElementL( TInt aToken, RString& aElement ) const; |
|
37 void AttributeL( TInt aToken, RString& aAttribute ) const; |
|
38 void AttributeValuePairL( |
|
39 TInt aToken, RString& aAttribute, RString& aValue ) const; |
|
40 void AttributeValueL( TInt aToken, RString& aValue ) const; |
|
41 |
|
42 TBool CompareThisDictionary( |
|
43 const RString& aDictionaryDescription ) const; |
|
44 |
|
45 TInt SwitchCodePage( TInt aCodePage ); |
|
46 void PublicIdentifier( RString& aPubId ); |
|
47 void NamespaceUri( RString& aUri ); |
|
48 |
|
49 void Release(); |
|
50 |
|
51 public: |
|
52 |
|
53 // CodePage tokens. |
|
54 // |
|
55 // Note: There will be correlation between these token values and their |
|
56 // strings via the CDictionaryCodePage using the RStringPool. |
|
57 |
|
58 enum TTagToken { |
|
59 // CodePage 00 |
|
60 // -//WAPFORUM//DTD EMN 1.0//EN |
|
61 ETagTokenEmn = 0x05, |
|
62 }; |
|
63 |
|
64 enum TAttributeToken { |
|
65 // CodePage 00 |
|
66 // -//WAPFORUM//DTD EMN 1.0//EN |
|
67 EAttributeTokenTimestamp = 0x05, |
|
68 EAttributeTokenMailbox = 0x06, |
|
69 EAttributeTokenMailboxMailat = 0x07, |
|
70 EAttributeTokenMailboxImap = 0x08, |
|
71 EAttributeTokenMailboxPop = 0x09, |
|
72 EAttributeTokenMailboxHttp = 0x0A, |
|
73 EAttributeTokenMailboxHttpWWW = 0x0B, |
|
74 EAttributeTokenMailboxHttps = 0x0C, |
|
75 EAttributeTokenMailboxHttpsWWW = 0x0D, |
|
76 }; |
|
77 |
|
78 enum TAttributeValueToken { |
|
79 // CodePage 00 |
|
80 // -//WAPFORUM//DTD EMN 1.0//EN |
|
81 EAttributeValueTokenTimestamp = 0x05, |
|
82 EAttributeValueTokenMailbox = 0x06, |
|
83 EAttributeValueTokenMailat = 0x07, |
|
84 EAttributeValueTokenPop = 0x08, |
|
85 EAttributeValueTokenImap = 0x09, |
|
86 EAttributeValueTokenHttp = 0x0A, |
|
87 EAttributeValueTokenHttpWWW = 0x0B, |
|
88 EAttributeValueTokenHttps = 0x0C, |
|
89 EAttributeValueTokenHttpsWWW = 0x0D, |
|
90 EAttributeValueTokenCom = 0x85, |
|
91 EAttributeValueTokenEdu = 0x86, |
|
92 EAttributeValueTokenNet = 0x87, |
|
93 EAttributeValueTokenOrg = 0x88, |
|
94 }; |
|
95 |
|
96 |
|
97 |
|
98 private: |
|
99 |
|
100 COMAPushEMNStringDict00( RStringPool* aStringPool ); |
|
101 |
|
102 private: |
|
103 |
|
104 /** |
|
105 The StringPool for this string dictionary. |
|
106 We don't own this. |
|
107 */ |
|
108 RStringPool iStringPool; |
|
109 |
|
110 Xml::CDictionaryCodePage* iCodepage00Table; |
|
111 |
|
112 TInt iCodePage; |
|
113 |
|
114 }; |
|
115 |
|
116 |
|
117 const TInt iTagCodePage00[] = |
|
118 { |
|
119 COMAPushEMNStringDict00::ETagTokenEmn, |
|
120 0 |
|
121 }; // ok to end with zero as this is used by a global token |
|
122 |
|
123 |
|
124 const TInt iAttributeCodePage00[] = |
|
125 { |
|
126 COMAPushEMNStringDict00::EAttributeTokenTimestamp, |
|
127 COMAPushEMNStringDict00::EAttributeTokenMailbox, |
|
128 COMAPushEMNStringDict00::EAttributeTokenMailboxMailat, |
|
129 COMAPushEMNStringDict00::EAttributeTokenMailboxImap, |
|
130 COMAPushEMNStringDict00::EAttributeTokenMailboxPop, |
|
131 COMAPushEMNStringDict00::EAttributeTokenMailboxHttp, |
|
132 COMAPushEMNStringDict00::EAttributeTokenMailboxHttpWWW, |
|
133 COMAPushEMNStringDict00::EAttributeTokenMailboxHttps, |
|
134 COMAPushEMNStringDict00::EAttributeTokenMailboxHttpsWWW, |
|
135 0 |
|
136 }; // ok to end with zero as this is used by a global token |
|
137 |
|
138 |
|
139 |
|
140 const TInt iAttributeValueCodePage00[] = |
|
141 { |
|
142 COMAPushEMNStringDict00::EAttributeValueTokenTimestamp, |
|
143 COMAPushEMNStringDict00::EAttributeValueTokenMailbox, |
|
144 COMAPushEMNStringDict00::EAttributeValueTokenMailat, |
|
145 COMAPushEMNStringDict00::EAttributeValueTokenPop, |
|
146 COMAPushEMNStringDict00::EAttributeValueTokenImap, |
|
147 COMAPushEMNStringDict00::EAttributeValueTokenHttp, |
|
148 COMAPushEMNStringDict00::EAttributeValueTokenHttpWWW, |
|
149 COMAPushEMNStringDict00::EAttributeValueTokenHttps, |
|
150 COMAPushEMNStringDict00::EAttributeValueTokenHttpsWWW, |
|
151 COMAPushEMNStringDict00::EAttributeValueTokenCom, |
|
152 COMAPushEMNStringDict00::EAttributeValueTokenEdu, |
|
153 COMAPushEMNStringDict00::EAttributeValueTokenNet, |
|
154 COMAPushEMNStringDict00::EAttributeValueTokenOrg, |
|
155 0 |
|
156 }; // ok to end with zero as this is used by a global token |
|
157 |
|
158 #endif //__OMAPUSHEMNSTRINGDICT00_H__ |