epoc32/include/versit.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/versit.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/versit.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,485 @@
     1.4 -versit.h
     1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// 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.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +//
    1.19 +
    1.20 +#ifndef __VERSIT_H__
    1.21 +#define __VERSIT_H__
    1.22 +
    1.23 +// System includes
    1.24 +#include <e32base.h>
    1.25 +#include <badesca.h>
    1.26 +#include <s32file.h>
    1.27 +
    1.28 +// User includes
    1.29 +#include <vuid.h>
    1.30 +#include <vtoken.h>
    1.31 +#include <vprop.h>
    1.32 +#include <versittls.h>
    1.33 +
    1.34 +// Classes referenced
    1.35 +class RFile;
    1.36 +class TVersitDateTime;
    1.37 +class MVersitObserver;
    1.38 +class MVersitPlugIn;
    1.39 +
    1.40 +// Panic enumeration
    1.41 +/** Versit panic numbers. The Versit panic numbers have a category of "Versit-Parser". 
    1.42 +@internalComponent
    1.43 +@released
    1.44 +*/
    1.45 +enum TVersitParserPanic
    1.46 +	{
    1.47 +	ECurrentTokenNotFound,		//Unused
    1.48 +	EUnicodeUtilsNotFound,		//Unused
    1.49 +	ENoPropertyValue,		//Unused
    1.50 +	/** A CWeekDayArray contains an invalid value (not between EMonday 
    1.51 +	and ESunday inclusive). */
    1.52 +	ENoWeekdayFound,
    1.53 +	/** The number of a week within a month is invalid. */
    1.54 +	EWeekNoOverTen,
    1.55 +	/** The repeat type for a recurrence rule property value is not one of the values 
    1.56 +	specified in CVersitRecurrence::TType. */
    1.57 +	ENoRecognizedRepeatType,
    1.58 +	EVersitPanicEscapedTextAlreadyExists,		//Unused
    1.59 +	/** 8-bit encoding is proposed as the default for a parser but may not be appropriate. */
    1.60 +	EVersitPanicCannotSetEightBitEncoding,
    1.61 +	/** 8-bit encoding is encountered or proposed where it is not expected. */
    1.62 +	EVersitPanicUnexpectedEightBitEncoding,
    1.63 +	/** A parser was not specified when externalising a property. */
    1.64 +	EVersitPanicNeedToSpecifyParser,
    1.65 +	/** The additional storage slot for the given property has already been used */
    1.66 +	EVersitPanicAdditionalStorageSlotAlreadyInUse,
    1.67 +	/** Attempting to assign a NULL value to an additional storage slot  */
    1.68 +	EVersitPanicNullValueAssignedToAdditionalStorageSlot,
    1.69 +	//
    1.70 +	EVersitPanicLast
    1.71 +	};
    1.72 +
    1.73 +/**
    1.74 +Used as key into additional storage within tls object, for CVersitTLSContainer
    1.75 +Value should not conflict with genuine compiler generated pointer values
    1.76 +*/
    1.77 +const static TInt* const KTLSVars = reinterpret_cast<TInt*>(1);
    1.78 +
    1.79 +GLREF_C void DestroyHBufC(TAny* aHBufC);
    1.80 +IMPORT_C void Panic(TVersitParserPanic aPanic);
    1.81 +
    1.82 +
    1.83 +/** Extension mechanism for CLineReader
    1.84 +This is an internal class and is only for use by CLineReader
    1.85 +@internalComponent
    1.86 +@released
    1.87 +*/
    1.88 +class CLineReaderExtension : public CBase
    1.89 +	{
    1.90 +	friend class CLineReader;
    1.91 +private:
    1.92 +	CLineReaderExtension();
    1.93 +	static CLineReaderExtension* NewL();
    1.94 +private:
    1.95 +	TUint8 iBuf[1024];
    1.96 +	TInt iOffset;
    1.97 +	TInt iSize;
    1.98 +	};
    1.99 +
   1.100 +class CLineReader : public CBase
   1.101 +/** Line reader for a vCalendar or vCard parser.
   1.102 +
   1.103 +Reads in a line at a time for the parser. 
   1.104 +
   1.105 +Also allows the first character of the next line to be checked to see if it 
   1.106 +is a space, which can indicate that the line is wrapped. This enables the 
   1.107 +reading of multi-line property values.
   1.108 +
   1.109 +Used by CVersitParser to internalise streams. 
   1.110 +@publishedAll
   1.111 +@released
   1.112 +*/
   1.113 +	{
   1.114 +public:
   1.115 +	/** Defines the initial line size of, and the size of expansions to, the buffer 
   1.116 +	which stores the line being read. */
   1.117 +	enum
   1.118 +		{
   1.119 +		/** The initial size of the buffer (pointed to by iBuf). */
   1.120 +		EInitialLineSize=96,
   1.121 +		/** The size by which the buffer (pointed to by iBuf) 
   1.122 +		is expanded when it has run out of room. */
   1.123 +		EExpandSize=16,
   1.124 +		};
   1.125 +	/** Defines values which describe the content of a line that has been read.
   1.126 +
   1.127 +	This is the return value from the function ReadLine(). */
   1.128 +	enum
   1.129 +		{
   1.130 +		/** The line has content (not white space). */
   1.131 +		ELineHasContent=0,
   1.132 +		/** The line has white space only. */
   1.133 +		ELineIsWhiteSpace=1,		//Doesn't include next case
   1.134 +		/** The line has no content, and so is just a carriage return and line 
   1.135 +		feed ("/r/n"). */
   1.136 +		ELineIsCRLFOnly=2,
   1.137 +		};
   1.138 +public:
   1.139 +	IMPORT_C static CLineReader* NewL(RReadStream& aStream);
   1.140 +	IMPORT_C ~CLineReader();
   1.141 +	IMPORT_C virtual TBool ReadLineL(TInt aPos,TInt& aErr);
   1.142 +	IMPORT_C TBool AppendLineIfSpaceNextL();
   1.143 +	IMPORT_C TBool IsSpaceNextL();
   1.144 +	IMPORT_C TInt AppendSpaceL();
   1.145 +	inline void SetPlugIn(MVersitPlugIn* aPlugIn);
   1.146 +	inline void SetSkipWhiteSpaceAtStart(TBool aDoSkip);
   1.147 +protected:
   1.148 +	inline CLineReader(RReadStream& aStream) :iReadStream(&aStream), iBufPtr(NULL,0), iFirstCharNextLine(-1) {}
   1.149 +	IMPORT_C void ConstructL();
   1.150 +	IMPORT_C void ExpandBufferL(TInt aCurrentSize);
   1.151 +	IMPORT_C TUint8 ReadChar(TInt& aErr);
   1.152 +private:
   1.153 +	IMPORT_C virtual void Reserved();
   1.154 +public:
   1.155 +	/** A pointer to an RReadStream object, the ReadUint8L() function of which is used 
   1.156 +	to read single characters from the stream.
   1.157 +	
   1.158 +	This is passed into the NewL() function upon construction. */
   1.159 +	RReadStream* iReadStream;
   1.160 +	/** A pointer to a buffer which stores data read from the stream.
   1.161 +	
   1.162 +	Its size on construction is EInitialLineSize, and it is expanded by EExpandSize 
   1.163 +	when necessary.
   1.164 +	
   1.165 +	A copy of this value should not be stored, since the buffer location may change 
   1.166 +	if the buffer is expanded.
   1.167 +	
   1.168 +	Data in the buffer is not lost when the buffer is expanded, but is copied 
   1.169 +	to the new location. */
   1.170 +	TPtr8 iBufPtr;
   1.171 +protected:
   1.172 +	HBufC8* iLineBuf;
   1.173 +	TInt iFirstCharNextLine;
   1.174 +private:
   1.175 +	MVersitPlugIn* iPlugIn;
   1.176 +	TBool iSkipWhiteSpaceAtStart;
   1.177 +	CLineReaderExtension* iExtension;
   1.178 +	};
   1.179 +
   1.180 +class CVersitParser : public CBase
   1.181 +/** A generic Versit parser. 
   1.182 +
   1.183 +Provides generic functions which implement behaviour common to both vCalendar 
   1.184 +and vCard parsers. For instance:
   1.185 +
   1.186 +- InternalizeL() and ExternalizeL() functions, for writing and reading 
   1.187 +data from a stream or file.
   1.188 +
   1.189 +- adding/retrieving properties and sub-entities to/from an existing entity. 
   1.190 +
   1.191 +- encoding and character set conversion capabilities.
   1.192 +
   1.193 +Although this is not an abstract class, in practice you would create and use 
   1.194 +objects of a derived class instead (CParserVCal or CParserVCard), as these 
   1.195 +provide additional functionality needed for parsing vCalendars and vCards.
   1.196 +
   1.197 +Note: a flag used in the class constructor indicates whether the entity needs 
   1.198 +a version property. The version property will be inserted at the start of 
   1.199 +the array of properties for the entity, and specifies the version of the vCard/vCalendar 
   1.200 +specification used by the data of this particular vCard/vCalendar. The versions 
   1.201 +that are currently supported are vCard v2.1 and vCalendar v1.0.
   1.202 +
   1.203 +A typical vCard looks like this:
   1.204 +
   1.205 +BEGIN VCARD
   1.206 +
   1.207 +VERSION 2.1 ...
   1.208 +
   1.209 +END VCARD
   1.210 +
   1.211 +Note: if you are sequentially creating and destroying multiple 
   1.212 +parsers, a major performance improvement may be achieved 
   1.213 +by using thread local storage to store an instance of CVersitUnicodeUtils 
   1.214 +which persists and can be used by all of the parsers.
   1.215 +
   1.216 +See CVersitTlsData for more details. 
   1.217 +@publishedAll
   1.218 +@released
   1.219 +*/
   1.220 +	{
   1.221 +	friend class CParserProperty;
   1.222 +public:
   1.223 +	IMPORT_C CVersitParser(TUint aFlags);
   1.224 +	IMPORT_C void ConstructL();
   1.225 +	IMPORT_C ~CVersitParser();
   1.226 +	IMPORT_C void								InternalizeL(RFile& aInputFile,TInt& aBytesThroughFile);
   1.227 +	IMPORT_C virtual void						InternalizeL(RReadStream& aStream);
   1.228 +	IMPORT_C virtual void						InternalizeL(HBufC* aEntityName,CLineReader* aLineReader);
   1.229 +	IMPORT_C void								ExternalizeL(RFile& aOutputFile);
   1.230 +	IMPORT_C virtual void						ExternalizeL(RWriteStream& aStream);
   1.231 +	IMPORT_C void								AddEntityL(CVersitParser* aEntity);
   1.232 +	IMPORT_C void								AddPropertyL(CParserProperty* aProperty,TBool aInternalizing=EFalse);
   1.233 +	IMPORT_C CArrayPtr<CVersitParser>*			EntityL(const TDesC& aEntityName,TBool aTakeOwnership=ETrue);
   1.234 +	IMPORT_C CArrayPtr<CVersitParser>*			ArrayOfEntities(TBool aTakeOwnership=ETrue);
   1.235 +	IMPORT_C CArrayPtr<CParserProperty>*		PropertyL(const TDesC8& aPropertyName,const TUid& aPropertyUid,TBool aTakeOwnership=ETrue) const;
   1.236 +	IMPORT_C CArrayPtr<CParserProperty>*		ArrayOfProperties(TBool aTakeOwnership=ETrue);
   1.237 +	IMPORT_C virtual void						ConvertAllPropertyDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight);
   1.238 +	IMPORT_C void								AdjustAllPropertyDateTimesToMachineLocalL();
   1.239 +	IMPORT_C static TBool						IsValidParameterValue(TInt& aPos,const TDesC& aParamValue);
   1.240 +	IMPORT_C void								SetEntityNameL(const TDesC& aEntityName);
   1.241 +	IMPORT_C TPtrC								EntityName() const;
   1.242 +	IMPORT_C static TBool						IsValidLabel(const TDesC& aLabel, TInt& aPos);
   1.243 +	IMPORT_C static TInt						Val(const TDesC& aString, TInt& aNumber);
   1.244 +	IMPORT_C void								SetCharacterConverter(Versit::TEncodingAndCharset& encodingAndCharset);
   1.245 +
   1.246 +	//
   1.247 +	// Set/Get the default settings for the [en|de]coding process
   1.248 +	//
   1.249 +	IMPORT_C Versit::TVersitEncoding			DefaultEncoding() const;
   1.250 +	IMPORT_C void								SetDefaultEncoding(const Versit::TVersitEncoding aEncoding);
   1.251 +	IMPORT_C Versit::TVersitCharSet				DefaultCharSet() const;
   1.252 +	IMPORT_C TUint								DefaultCharSetId() const;
   1.253 +	IMPORT_C void								SetDefaultCharSet(const Versit::TVersitCharSet aCharSet);
   1.254 +	IMPORT_C void								SetDefaultCharSetId(TUint aCharSetId);
   1.255 +	IMPORT_C void								SetAutoDetect(TBool aOn,const CArrayFix<CCnvCharacterSetConverter::SCharacterSet>* aAutoDetectCharSets=NULL);
   1.256 +
   1.257 +	//
   1.258 +	// Set/Get Observers and PlugIn's
   1.259 +	//
   1.260 +	inline void									SetObserver(MVersitObserver* aObserver);
   1.261 +	inline MVersitObserver*						Observer();
   1.262 +	inline void									SetPlugIn(MVersitPlugIn* aPlugIn);
   1.263 +	inline MVersitPlugIn*						PlugIn();
   1.264 +
   1.265 +public:
   1.266 +
   1.267 +	IMPORT_C TInt LoadBinaryValuesFromFilesL();
   1.268 +	IMPORT_C TInt LoadBinaryValuesFromFilesL(RFs& aFileSession);
   1.269 +	IMPORT_C TInt SaveBinaryValuesToFilesL(TInt aSizeThreshold,const TDesC& aPath);
   1.270 +	IMPORT_C TInt SaveBinaryValuesToFilesL(TInt aSizeThreshold,const TDesC& aPath,RFs& aFileSession);
   1.271 +public:
   1.272 +	/** White space character codes: used while analysing the syntax of the received 
   1.273 +	data and while externalising data. 
   1.274 +	@publishedAll
   1.275 +	@released 
   1.276 +	*/
   1.277 +	enum TCharCodes
   1.278 +		{
   1.279 +		/** ' ' */
   1.280 +		ESpace				= ' ',
   1.281 +		/** 9 */
   1.282 +		EHTab				= 9,
   1.283 +		/** 10 */
   1.284 +		ELineFeed			= 10,
   1.285 +		/** 13 */
   1.286 +		ECarriageReturn		= 13
   1.287 +		};
   1.288 +	/** Flags that can be specified on construction. 
   1.289 +	@publishedAll
   1.290 +	@released 
   1.291 +	*/
   1.292 +	enum TVersitParserFlags
   1.293 +		{
   1.294 +		/** This entity does not need a version property. */
   1.295 +		ENoVersionProperty	= 0,
   1.296 +		/** This entity should have a version property. */
   1.297 +		ESupportsVersion	= 0x01,
   1.298 +		//Gaps since other flags have been used in past
   1.299 +		EImportSyncML		= 0x1000,	//Importing from a SyncML server
   1.300 +		/** Indicates whether the parser should use auto-detection of character sets when 
   1.301 +		one has not been explicitly specified. */
   1.302 +		EUseAutoDetection	= 0x4000,
   1.303 +		//versit Internal use only
   1.304 +		/** The current property has specified a character set. */
   1.305 +		ECharSetIdentified	= 0x8000,
   1.306 +		/** If the charset is not explicitly specified, the default charset will be used instead of US-ASCII as required
   1.307 +		by the Versit specification . */
   1.308 +		EUseDefaultCharSetForAllProperties = 0x2000		
   1.309 +		};
   1.310 +
   1.311 +	//
   1.312 +	// Unicode support conversion functions
   1.313 +	//
   1.314 +	IMPORT_C static TInt						ConvertFromUnicodeToISOL(TDes8& aIso, const TDesC16& aUnicode, CCnvCharacterSetConverter* aConverter);
   1.315 +	IMPORT_C TVersitDateTime*					DecodeDateTimeL(TDes& aToken) const;
   1.316 +
   1.317 +protected:
   1.318 +	IMPORT_C TInt								ConvertToUnicodeFromISOL(TDes16& aUnicode, const TDesC8& aIso, TUint aCharacterSet);
   1.319 +
   1.320 +	//
   1.321 +	// Parsing high level functions
   1.322 +	//
   1.323 +	IMPORT_C void								ParsePropertiesL();
   1.324 +	IMPORT_C void								ParseBeginL();
   1.325 +	IMPORT_C void								ParseEndL();
   1.326 +	void										ParseEndL(HBufC16& aEntityName);
   1.327 +	IMPORT_C TBool								ParseEntityL();
   1.328 +	IMPORT_C virtual void						ParsePropertyL();
   1.329 +	IMPORT_C CArrayPtr<CParserParam>*			ReadLineAndDecodeParamsLC(TInt& aValueStart,TInt& aNameLen);
   1.330 +	IMPORT_C void								MakePropertyL(TPtr8& aPropName,TInt aValueStart);
   1.331 +	IMPORT_C CArrayPtr<CParserParam>*			GetPropertyParamsLC(TPtr8 aParams);
   1.332 +	IMPORT_C void								ParseParamL(CArrayPtr<CParserParam>* aArray,TPtr8 aParam);
   1.333 +	IMPORT_C void								AnalysesEncodingCharset(CArrayPtr<CParserParam>* aArrayOfParams);
   1.334 +	IMPORT_C void								ReadMultiLineValueL(TPtr8& aValue,TInt aValueStart,TBool aBinaryData);
   1.335 +	inline TPtr8&								BufPtr();
   1.336 +
   1.337 +	//
   1.338 +	// Append standard versit tokens to streams
   1.339 +	//
   1.340 +	IMPORT_C void								AppendBeginL();
   1.341 +	IMPORT_C void								AppendEndL();
   1.342 +	void										AppendEntityNameL();
   1.343 +	IMPORT_C void								DoAddPropertyL(CParserProperty* aProperty);
   1.344 +
   1.345 +	//
   1.346 +	// Dispatcher functions to create entities/properties based upon a Versit identifying Uid
   1.347 +	//
   1.348 +	IMPORT_C virtual CVersitParser*				MakeEntityL(TInt aEntityUid,HBufC* aEntityName);
   1.349 +	CParserPropertyValueHBufC*					MakeDefaultPropertyValueL(HBufC16*& aValue);
   1.350 +	IMPORT_C virtual CParserPropertyValue*		MakePropertyValueL(const TUid& aPropertyUid,HBufC16*& aValue);
   1.351 +	IMPORT_C HBufC*								DecodePropertyValueL(const TDesC8& aValue);
   1.352 +	IMPORT_C void								DecodePropertyValueL(const TDesC8& aValue,const TUid& aEncodingUid);
   1.353 +	HBufC*										ConvertToUnicodeL(const TDesC8& aValue);
   1.354 +	IMPORT_C CDesCArray*						MakePropertyValueCDesCArrayL(TPtr16 aStringValue);
   1.355 +	IMPORT_C CArrayPtr<TVersitDateTime>*		MakePropertyValueMultiDateTimeL(TPtr16 aDateTimeGroup);
   1.356 +	IMPORT_C CVersitDaylight*					MakePropertyValueDaylightL(TPtr16 aDaylightValue);
   1.357 +	IMPORT_C TBool								FindFirstField(TPtr16& aField,TPtr16& aRemaining, TBool aTrimSpace=ETrue);
   1.358 +	IMPORT_C void								FindRemainingField(TPtr16& aField,TPtr16& aRemaining);
   1.359 +
   1.360 +	//
   1.361 +	// Helper methods to decode versit dates, times, and time periods
   1.362 +	//
   1.363 +	IMPORT_C TTimeIntervalSeconds				DecodeTimeZoneL(const TDesC& aToken) const;
   1.364 +	IMPORT_C TTime*								DecodeTimePeriodL(const TDesC& aToken) const;
   1.365 +	IMPORT_C TInt								GetNumberL(const TDesC& aToken,TInt& aNumChars) const;
   1.366 +
   1.367 +public:
   1.368 +	IMPORT_C virtual TUid						RecognizeToken(const TDesC8& aToken) const;
   1.369 +	IMPORT_C virtual TInt						RecognizeEntityName() const;
   1.370 +	//
   1.371 +	// Cleanup support methods
   1.372 +	//
   1.373 +	IMPORT_C static void						ResetAndDestroyArrayOfParams(TAny* aObject);
   1.374 +	IMPORT_C static void						ResetAndDestroyArrayOfProperties(TAny* aObject);
   1.375 +	IMPORT_C static void						ResetAndDestroyArrayOfEntities(TAny* aObject);
   1.376 +	IMPORT_C static void						ResetAndDestroyArrayOfDateTimes(TAny* aObject);
   1.377 +
   1.378 +	inline void									SetFlags(TUint aFlags);
   1.379 +
   1.380 +	
   1.381 +
   1.382 +protected:
   1.383 +	//
   1.384 +	// Enquiry functions
   1.385 +	//
   1.386 +	static TBool								IsPunctuationToken(TUint aChar);
   1.387 +	inline TBool								SupportsVersion() const;
   1.388 +	inline void									SetSupportsVersion();
   1.389 +	inline void									ClearSupportsVersion();
   1.390 +
   1.391 +	//
   1.392 +	// Set the settings for the [en|de]coding of the current property
   1.393 +	//
   1.394 +	IMPORT_C void								RestoreLineCodingDetailsToDefault();
   1.395 +	IMPORT_C void								SetLineEncoding(Versit::TVersitEncoding aLineEncoding);
   1.396 +	IMPORT_C void								SetLineEncoding(TUint aVersitEncodingUid);
   1.397 +	IMPORT_C void								SetLineCharacterSet(Versit::TVersitCharSet aLineCharSet);
   1.398 +	IMPORT_C void								SetLineCharacterSetId(TUint aLineCharSetId);
   1.399 +	IMPORT_C void								SetLineCoding(Versit::TVersitCharSet aLineCharSet, Versit::TVersitEncoding aLineEncoding);
   1.400 +
   1.401 +	//
   1.402 +	// Return the settings for the current property
   1.403 +	//
   1.404 +	IMPORT_C Versit::TVersitEncoding			LineEncoding() const;
   1.405 +	IMPORT_C Versit::TVersitCharSet				LineCharSet() const;
   1.406 +	IMPORT_C TUint								LineEncodingId() const;
   1.407 +	IMPORT_C TUint								LineCharSetId() const;
   1.408 +
   1.409 +	inline CVersitUnicodeUtils&					UnicodeUtils();
   1.410 +
   1.411 +public:
   1.412 +	//
   1.413 +	// Static utility functions to aid with the Unicode conversion process
   1.414 +	//
   1.415 +	static TUint								MapVersitCharsetToCharConvCharset(Versit::TVersitCharSet aVersitSet);
   1.416 +	static TUint								MapVersitEncodingToConArcUid(Versit::TVersitEncoding aVersitEncoding);
   1.417 +
   1.418 +private:
   1.419 +	void										SetLineCharsetDetailsToDefault();
   1.420 +	void										SetLineEncodingDetailsToDefault();
   1.421 +
   1.422 +private:	//To fix TimeZone SyncML bug
   1.423 +	void										ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight);
   1.424 +	void										ConvertUTCDateTimeToMachineLocal(TVersitDateTime* aDateTime,const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight);
   1.425 +	//void										AddTimeZonePropertyL();
   1.426 +
   1.427 +protected:
   1.428 +	struct TParserCodingDetails
   1.429 +		{
   1.430 +		Versit::TVersitEncoding		iEncoding;
   1.431 +		TUint						iEncodingUid;
   1.432 +		Versit::TVersitCharSet		iCharSet;
   1.433 +		TUint						iCharSetUid;
   1.434 +		};
   1.435 +
   1.436 +protected:
   1.437 +	// Default settings & internal flags
   1.438 +	TInt							iFlags;
   1.439 +	TParserCodingDetails			iDefaultCodingDetails;
   1.440 +	TParserCodingDetails			iCurrentPropertyCodingDetails;
   1.441 +	TBuf<KVersitMaxVersionLength>	iDefaultVersion;
   1.442 +	const CArrayFix<CCnvCharacterSetConverter::SCharacterSet>* iAutoDetectCharSets;
   1.443 +
   1.444 +	// Member data relating to the current item being parsed
   1.445 +	HBufC*							iEntityName;
   1.446 +	CArrayPtr<CVersitParser>*		iArrayOfEntities;
   1.447 +	CArrayPtr<CParserProperty>*		iArrayOfProperties;
   1.448 +	CParserProperty*				iCurrentProperty;
   1.449 +	CLineReader*					iOwnedLineReader;
   1.450 +	CLineReader*					iLineReader;
   1.451 +	HBufC8*							iDecodedValue;
   1.452 +	CBufSeg*						iLargeDataBuf;
   1.453 +
   1.454 +	// In memory buffers
   1.455 +	RWriteStream*					iWriteStream;
   1.456 +
   1.457 +	// General utility class
   1.458 +	CVersitTlsData*					iStaticUtils;
   1.459 +
   1.460 +	// Plug-in classes
   1.461 +	MVersitObserver*				iObserver;
   1.462 +	MVersitPlugIn*					iPlugIn;
   1.463 +
   1.464 +private:
   1.465 +	void DoInternalizeL();
   1.466 +	IMPORT_C virtual void Reserved1();
   1.467 +	IMPORT_C virtual void Reserved2();
   1.468 +private:
   1.469 +	TInt iParseBegin;
   1.470 +	TInt iReserved2;
   1.471 +	};
   1.472 +
   1.473 +NONSHARABLE_CLASS( CVersitTLSContainer ): public CBase	
   1.474 +/**
   1.475 +Wrapper class for static variables to be stored in TLS
   1.476 +@internalComponent
   1.477 +@released
   1.478 +*/
   1.479 +	{
   1.480 +public:
   1.481 +	static CVersitTLSContainer *NewLC(const TInt aSize);
   1.482 +	~CVersitTLSContainer();
   1.483 +public:
   1.484 +	HBufC * iShiftJisEscape;//Store shift-jis escape charcter, as generated by relevant charconv plugin	
   1.485 +	};
   1.486 +
   1.487 +#include <versit.inl>
   1.488 +
   1.489 +#endif