xml/wbxmlparser/test/rtest/tsrc/wml1_1stringdictionary255.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 __WML1_1STRINGDICTIONARY255_H__
       
    20 #define __WML1_1STRINGDICTIONARY255_H__
       
    21 
       
    22 #include <e32std.h>
       
    23 #include <stringpool.h>
       
    24 
       
    25 #include <xml/plugins/stringdictionary.h>
       
    26 
       
    27 class CWml1_1StringDictionary255 : public CBase, public Xml::MStringDictionary
       
    28 /**
       
    29 The CWml1_1StringDictionary255 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 	static Xml::MStringDictionary* NewL(TAny* aStringPool);
       
    40 	virtual ~CWml1_1StringDictionary255();
       
    41 	void ConstructL();
       
    42 
       
    43 	void ElementL(TInt aToken, RString& aElement) const;
       
    44 	void AttributeL(TInt aToken, RString& aAttribute) const;
       
    45 	void AttributeValuePairL(TInt aToken, RString& aAttribute, RString& aValue) const;
       
    46 	void AttributeValueL(TInt aToken, RString& aValue) const;
       
    47 
       
    48 	TBool CompareThisDictionary(const RString& aDictionaryDescription) const;
       
    49 
       
    50 	TInt SwitchCodePage(TInt aCodePage);
       
    51 	void PublicIdentifier(RString& aPubId);
       
    52 	void NamespaceUri(RString& aUri);
       
    53 
       
    54 	void Release();
       
    55 
       
    56 public:
       
    57 
       
    58 	// CodePage tokens.
       
    59 	//
       
    60 	// Note: There will be correlation between these token values and their
       
    61 	// strings via the CDictionaryCodePage using the RStringPool.
       
    62 
       
    63 	enum TAttributeToken {
       
    64 		// CodePage 255
       
    65 		// -//WAPFORUM//DTD WML 1.1//EN
       
    66 		// 0x05 not a global token
       
    67 		EAttributeTokenTestAttribute 		= 0x05,
       
    68 	};
       
    69 
       
    70 	enum TAttributeValueToken {
       
    71 		// CodePage 255
       
    72 		// -//WAPFORUM//DTD WML 1.1//EN
       
    73 		EAttributeValueTokenTestAttribute	= 0x05,
       
    74 	};
       
    75 
       
    76 private:
       
    77 
       
    78 	CWml1_1StringDictionary255(RStringPool* aStringPool);
       
    79 
       
    80 private:
       
    81 
       
    82 /**
       
    83 The StringPool for this string dictionary.
       
    84 We don't own this.
       
    85 */
       
    86 	RStringPool				iStringPool;
       
    87 
       
    88 	Xml::CDictionaryCodePage*	iCodePage255Table;
       
    89 
       
    90 	TInt					iCodePage;
       
    91 
       
    92 	};
       
    93 
       
    94 
       
    95 const TInt iAttributeCodePage255[] = 
       
    96 	{CWml1_1StringDictionary255::EAttributeTokenTestAttribute,
       
    97 	 0}; // ok to end with zero as this is used by a global token
       
    98 
       
    99 const TInt iAttributeValueCodePage255[] = 
       
   100 	{CWml1_1StringDictionary255::EAttributeValueTokenTestAttribute,
       
   101 	 0}; // ok to end with zero as this is used by a global token
       
   102 
       
   103 #endif //__WML1_1STRINGDICTIONARY255_H__