epoc32/include/xml/plugins/stringdictionary.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
     1.1 --- a/epoc32/include/xml/plugins/stringdictionary.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,138 +0,0 @@
     1.4 -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 -// All rights reserved.
     1.6 -// This component and the accompanying materials are made available
     1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.8 -// which accompanies this distribution, and is available
     1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 -//
    1.11 -// Initial Contributors:
    1.12 -// Nokia Corporation - initial contribution.
    1.13 -//
    1.14 -// Contributors:
    1.15 -//
    1.16 -// Description:
    1.17 -// Plugin interface
    1.18 -// 
    1.19 -//
    1.20 -
    1.21 -
    1.22 -#ifndef __STRINGDICTIONARY_H__
    1.23 -#define __STRINGDICTIONARY_H__
    1.24 -
    1.25 -#include <e32base.h>
    1.26 -
    1.27 -
    1.28 -class RString;
    1.29 -
    1.30 -namespace Xml
    1.31 -{
    1.32 -
    1.33 -class MStringDictionary
    1.34 -/**
    1.35 -This interface defines the API of a single string dictionary. 
    1.36 -This class is not used directly, but via a derived class the user provides.
    1.37 -Derived classes must add all elements, attributes names, and attribute values that belong
    1.38 -to this string dictionary as static string tables to the StringPool. WBXML token mappings between 
    1.39 -strings and WBXML tokens should also be maintained.
    1.40 -@see RStringPool
    1.41 -
    1.42 -@publishedPartner
    1.43 -@released
    1.44 -*/
    1.45 -	{
    1.46 -public:
    1.47 -
    1.48 -/**
    1.49 -This method allows for the correct destrution of the string dictionary plugin.
    1.50 -
    1.51 -@post				the objects memory is cleaned up.
    1.52 -
    1.53 -*/
    1.54 -	virtual void Release() = 0;
    1.55 -
    1.56 -/**
    1.57 -This method returns the element string associated with the given token.
    1.58 -
    1.59 -@param				aToken the element token.
    1.60 -@param				aElement On return reflects the string corresponding to the token.
    1.61 -@leave				KErrXmlUnsupportedElement, if the token doesn't correspond to an element.
    1.62 -*/
    1.63 -	virtual void ElementL(TInt aToken, RString& aElement) const = 0;
    1.64 -
    1.65 -/**
    1.66 -This method returns the attribute string associated with the given token.
    1.67 -
    1.68 -@param				aToken the attribute token.
    1.69 -@param				aAttribute On return reflects the string corresponding to the token.
    1.70 -@leave				KErrXmlUnsupportedAttribute, if the token doesn't correspond to an attribute.
    1.71 -*/
    1.72 -	virtual void AttributeL(TInt aToken, RString& aAttribute) const = 0;
    1.73 -
    1.74 -/**
    1.75 -This method returns the attribute and value string associated with the given token.
    1.76 -
    1.77 -@param				aToken the attribute token.
    1.78 -@param				aAttribute On return reflects the string corresponding to the token.
    1.79 -@param				aValue On return reflects the string corresponding to the value
    1.80 -					for this attibute.
    1.81 -@leave				KErrXmlUnsupportedAttribute, if the token doesn't correspond to an attribute 
    1.82 -@leave				KErrXmlUnsupportedAttributeValue, if the token doesn't correspond to a value 
    1.83 -*/
    1.84 -	virtual void AttributeValuePairL(TInt aToken, RString& aAttribute, RString& aValue) const = 0;
    1.85 -
    1.86 -/**
    1.87 -This method returns the value string associated with the given token.
    1.88 -
    1.89 -@param				aToken the attribute token.
    1.90 -@param				aValue On return reflects the string corresponding to the value
    1.91 -					for this attibute.
    1.92 -@leave				KErrXmlUnsupportedAttributeValue, if the token doesn't correspond to value.
    1.93 -*/
    1.94 -	virtual void AttributeValueL(TInt aToken, RString& aValue) const = 0;
    1.95 -
    1.96 -
    1.97 -/**
    1.98 -This method compares the Dictionary description with that provided.
    1.99 -
   1.100 -@return				ETrue if this is the same Dictionary (i.e. a match), EFalse otherwise.
   1.101 -
   1.102 -@param				aDictionaryDescription The description we want to compare.
   1.103 -*/
   1.104 -	virtual TBool CompareThisDictionary(const RString& aDictionaryDescription) const = 0;
   1.105 -
   1.106 -/**
   1.107 -This method switches the dictionary to use the specified codepage.
   1.108 -
   1.109 -@return				The codepage switched to, or KErrXmlMissingStringDictionary if it is not supported.
   1.110 -
   1.111 -@param				aCodePage The code page to switch to.
   1.112 -*/
   1.113 -	virtual TInt SwitchCodePage(TInt aCodePage) = 0;
   1.114 -		
   1.115 -/**
   1.116 -This method obtains the public identifier from the StringTable.
   1.117 -Either the formal or non formal public id will do.
   1.118 -The stringDictionary .rss files must list both these as wbxml
   1.119 -documents have one or the other.
   1.120 -					
   1.121 -@param				aPubId The public identifier for this string 
   1.122 -					dictionary.
   1.123 -*/
   1.124 -
   1.125 -	virtual void PublicIdentifier(RString& aPubId) = 0;
   1.126 -	
   1.127 -/**
   1.128 -The element types in the Device Information DTD are defined within
   1.129 -a namespace associated with the Uri/Urn available from the StringTable.
   1.130 -The RString need not be closed, but closing is harmless. 
   1.131 -
   1.132 -@param				aUri The associated namespace for this string 
   1.133 -					dictionary.
   1.134 -*/
   1.135 -
   1.136 -	virtual void NamespaceUri(RString& aUri) = 0;
   1.137 -	};
   1.138 -
   1.139 -}
   1.140 -
   1.141 -#endif //__STRINGDICTIONARY_H__