xml/wbxmlparser/src/sd_syncml/syncml1_1opaquestringdictionary00.h
changeset 0 e35f40988205
equal deleted inserted replaced
-1:000000000000 0:e35f40988205
       
     1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Plugin interface
       
    15 // 
       
    16 //
       
    17 
       
    18 
       
    19 #ifndef __SYNCML1_1OPAQUESTRINGDICTIONARY00_H__
       
    20 #define __SYNCML1_1OPAQUESTRINGDICTIONARY00_H__
       
    21 
       
    22 #include <e32std.h>
       
    23 #include <stringpool.h>
       
    24 
       
    25 #include <xml/plugins/stringdictionary.h>
       
    26 
       
    27 class CSyncml1_1OpaqueStringDictionary00 : public CBase, public Xml::MStringDictionary
       
    28 /**
       
    29 The Syncml1_1OpaqueStringDictionary00 class is a derived class defining the API of a single string dictionary. 
       
    30 
       
    31 Derived classes must add all elements, attributes names, and attribute values that belong
       
    32 to this string dictionary as static string tables to the StringPool. WBXML token mappings between 
       
    33 strings and WBXML tokens should also be maintained.
       
    34 
       
    35 @internalTechnology
       
    36 */
       
    37 	{
       
    38 public:
       
    39 
       
    40 	static Xml::MStringDictionary* NewL(TAny* aStringPool);
       
    41 	virtual ~CSyncml1_1OpaqueStringDictionary00();
       
    42 	void ConstructL();
       
    43 
       
    44 	void ElementL(TInt aToken, RString& aElement) const;
       
    45 	void AttributeL(TInt aToken, RString& aAttribute) const;
       
    46 	void AttributeValuePairL(TInt aToken, RString& aAttribute, RString& aValue) const;
       
    47 	void AttributeValueL(TInt aToken, RString& aValue) const;
       
    48 
       
    49 	TBool CompareThisDictionary(const RString& aDictionaryDescription) const;
       
    50 
       
    51 	TInt SwitchCodePage(TInt aCodePage);
       
    52 	void PublicIdentifier(RString& aPubId);
       
    53 	void NamespaceUri(RString& aUri);
       
    54 
       
    55 	void Release();
       
    56 
       
    57 public:
       
    58 
       
    59 	// CodePage tokens.
       
    60 	//
       
    61 	// Note: There will be correlation between these token values and their
       
    62 	// strings via the CDictionaryCodePage using the RStringPool.
       
    63 
       
    64 	enum TTokenValue {
       
    65 		// CodePage 00
       
    66 		// -//SYNCML//DTD DevInf 1.1//EN
       
    67 		ECTCap						= 0x05,
       
    68 		ECTType						= 0x06,	
       
    69 		EDataStore					= 0x07,	
       
    70 		EDataType					= 0x08,	
       
    71 		EDevID						= 0x09,	
       
    72 		EDevInf						= 0x0A,	
       
    73 		EDevTyp						= 0x0B,	
       
    74 		EDisplayName				= 0x0C,	
       
    75 		EDSMem						= 0x0D,	
       
    76 		EExt						= 0x0E,	
       
    77 		EFwV						= 0x0F,	
       
    78 		EHwV						= 0x10,	
       
    79 		EMan						= 0x11,	
       
    80 		EMaxGUIDSize				= 0x12,	
       
    81 		EMaxID						= 0x13,	
       
    82 		EMaxMem						= 0x14,	
       
    83 		EMod						= 0x15,	
       
    84 		EOEM						= 0x16,	
       
    85 		EParamName					= 0x17,	
       
    86 		EPropName					= 0x18,	
       
    87 		ERx							= 0x19,	
       
    88 		ERxPref						= 0x1A,	
       
    89 		ESharedMem 				 	= 0x1B,	
       
    90 		ESize						= 0x1C,	
       
    91 		ESourceRef					= 0x1D,	
       
    92 		ESwV						= 0x1E,	
       
    93 		ESyncCap					= 0x1F,	
       
    94 		ESyncType					= 0x20,	
       
    95 		ETx							= 0x21,	
       
    96 		ETxPref						= 0x22,	
       
    97 		EValEnum					= 0x23,	
       
    98 		EVerCT						= 0x24,	
       
    99 		EVerDTD						= 0x25,	
       
   100 		EXnam						= 0x26,	
       
   101 		EXval						= 0x27,	
       
   102 		EUTC						= 0x28,	
       
   103 		ESupportNumberOfChanges		= 0x29,	
       
   104 		ESupportLargeObjs			= 0x2A,
       
   105 		};
       
   106 
       
   107 
       
   108 private:
       
   109 
       
   110 	CSyncml1_1OpaqueStringDictionary00(RStringPool* aStringPool);
       
   111 
       
   112 private:
       
   113 
       
   114 /**
       
   115 The StringPool for this string dictionary.
       
   116 We don't own this.
       
   117 */
       
   118 	RStringPool				iStringPool;
       
   119 
       
   120 	Xml::CDictionaryCodePage*	iCodepage00Table;
       
   121 
       
   122 	TInt					iCodePage;
       
   123 
       
   124 	};
       
   125 
       
   126 
       
   127 const TInt iCodePage00[] = 
       
   128 	{
       
   129 	CSyncml1_1OpaqueStringDictionary00::ECTCap,
       
   130 	CSyncml1_1OpaqueStringDictionary00::ECTType,	
       
   131 	CSyncml1_1OpaqueStringDictionary00::EDataStore,	
       
   132 	CSyncml1_1OpaqueStringDictionary00::EDataType,	
       
   133 	CSyncml1_1OpaqueStringDictionary00::EDevID,	
       
   134 	CSyncml1_1OpaqueStringDictionary00::EDevInf,	
       
   135 	CSyncml1_1OpaqueStringDictionary00::EDevTyp,	
       
   136 	CSyncml1_1OpaqueStringDictionary00::EDisplayName,	
       
   137 	CSyncml1_1OpaqueStringDictionary00::EDSMem,	
       
   138 	CSyncml1_1OpaqueStringDictionary00::EExt,	
       
   139 	CSyncml1_1OpaqueStringDictionary00::EFwV,	
       
   140 	CSyncml1_1OpaqueStringDictionary00::EHwV,	
       
   141 	CSyncml1_1OpaqueStringDictionary00::EMan,	
       
   142 	CSyncml1_1OpaqueStringDictionary00::EMaxGUIDSize,	
       
   143 	CSyncml1_1OpaqueStringDictionary00::EMaxID,	
       
   144 	CSyncml1_1OpaqueStringDictionary00::EMaxMem,	
       
   145 	CSyncml1_1OpaqueStringDictionary00::EMod,	
       
   146 	CSyncml1_1OpaqueStringDictionary00::EOEM,	
       
   147 	CSyncml1_1OpaqueStringDictionary00::EParamName,	
       
   148 	CSyncml1_1OpaqueStringDictionary00::EPropName,	
       
   149 	CSyncml1_1OpaqueStringDictionary00::ERx,	
       
   150 	CSyncml1_1OpaqueStringDictionary00::ERxPref,	
       
   151 	CSyncml1_1OpaqueStringDictionary00::ESharedMem,	
       
   152 	CSyncml1_1OpaqueStringDictionary00::ESize,	
       
   153 	CSyncml1_1OpaqueStringDictionary00::ESourceRef,	
       
   154 	CSyncml1_1OpaqueStringDictionary00::ESwV,	
       
   155 	CSyncml1_1OpaqueStringDictionary00::ESyncCap,	
       
   156 	CSyncml1_1OpaqueStringDictionary00::ESyncType,	
       
   157 	CSyncml1_1OpaqueStringDictionary00::ETx,	
       
   158 	CSyncml1_1OpaqueStringDictionary00::ETxPref,	
       
   159 	CSyncml1_1OpaqueStringDictionary00::EValEnum,	
       
   160 	CSyncml1_1OpaqueStringDictionary00::EVerCT,	
       
   161 	CSyncml1_1OpaqueStringDictionary00::EVerDTD,	
       
   162 	CSyncml1_1OpaqueStringDictionary00::EXnam,	
       
   163 	CSyncml1_1OpaqueStringDictionary00::EXval,	
       
   164 	CSyncml1_1OpaqueStringDictionary00::EUTC,	
       
   165 	CSyncml1_1OpaqueStringDictionary00::ESupportNumberOfChanges,	
       
   166 	CSyncml1_1OpaqueStringDictionary00::ESupportLargeObjs,
       
   167 	 0}; // ok to end with zero as this is used by a global token
       
   168 
       
   169 #endif //__SYNCML1_1OPAQUESTRINGDICTIONARY00_H__