epoc32/include/app/versit.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
--- a/epoc32/include/app/versit.h	Wed Mar 31 12:27:01 2010 +0100
+++ b/epoc32/include/app/versit.h	Wed Mar 31 12:33:34 2010 +0100
@@ -1,9 +1,9 @@
 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
-// 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
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
-// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
 // Initial Contributors:
 // Nokia Corporation - initial contribution.
@@ -33,6 +33,7 @@
 class MVersitObserver;
 class MVersitPlugIn;
 
+#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
 // Panic enumeration
 /** Versit panic numbers. The Versit panic numbers have a category of "Versit-Parser". 
 @internalComponent
@@ -69,29 +70,57 @@
 /**
 Used as key into additional storage within tls object, for CVersitTLSContainer
 Value should not conflict with genuine compiler generated pointer values
+@internalComponent
+@released
 */
 const static TInt* const KTLSVars = reinterpret_cast<TInt*>(1);
-
+/**
+@internalComponent
+@released
+*/
 GLREF_C void DestroyHBufC(TAny* aHBufC);
+/** Versit parser panic
+@internalComponent
+@released
+*/
 IMPORT_C void Panic(TVersitParserPanic aPanic);
+#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
 
 
+
+#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
 /** Extension mechanism for CLineReader
 This is an internal class and is only for use by CLineReader
 @internalComponent
 @released
 */
-class CLineReaderExtension : public CBase
+NONSHARABLE_CLASS(CLineReaderExtension) : public CBase
 	{
 	friend class CLineReader;
 private:
 	CLineReaderExtension();
+	~CLineReaderExtension();
+
 	static CLineReaderExtension* NewL();
+	
+	void DeleteBase64ValueBuffer();
+	HBufC8* CreateBase64ValueBufferL();
+	HBufC8* Base64ValueBuffer();
 private:
 	TUint8 iBuf[1024];
 	TInt iOffset;
 	TInt iSize;
+
+// Hold the line buffer temporarily. 
+// It is only used when the client wants
+// the base64 extended behaviour defined
+// in MVersitPlugInExtensionBase64Ending
+	HBufC8* iLineBase64Value;
 	};
+#else
+//Forward declare class
+class CLineReaderExtension;	
+#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
 
 class CLineReader : public CBase
 /** Line reader for a vCalendar or vCard parser.
@@ -130,23 +159,37 @@
 		/** The line has no content, and so is just a carriage return and line 
 		feed ("/r/n"). */
 		ELineIsCRLFOnly=2,
+		/** The line has a colon
+		This is only used internally. When the line has a colon, ReadLineL will
+		return  ELineHasContent for the sake of backwards compatibility. 
+		*/
+		ELineHasColon
 		};
 public:
 	IMPORT_C static CLineReader* NewL(RReadStream& aStream);
 	IMPORT_C ~CLineReader();
-	IMPORT_C virtual TBool ReadLineL(TInt aPos,TInt& aErr);
+	IMPORT_C virtual TInt ReadLineL(TInt aPos,TInt& aErr);
 	IMPORT_C TBool AppendLineIfSpaceNextL();
 	IMPORT_C TBool IsSpaceNextL();
 	IMPORT_C TInt AppendSpaceL();
 	inline void SetPlugIn(MVersitPlugIn* aPlugIn);
 	inline void SetSkipWhiteSpaceAtStart(TBool aDoSkip);
+
+public:
+	void ReadBase64ValueL(TInt aPopValueStart);
+
 protected:
 	inline CLineReader(RReadStream& aStream) :iReadStream(&aStream), iBufPtr(NULL,0), iFirstCharNextLine(-1) {}
 	IMPORT_C void ConstructL();
 	IMPORT_C void ExpandBufferL(TInt aCurrentSize);
 	IMPORT_C TUint8 ReadChar(TInt& aErr);
+
 private:
 	IMPORT_C virtual void Reserved();
+	
+private:
+	TInt ReadLineL(HBufC8*& aHBuf, TInt aPos,TInt& aErr);
+
 public:
 	/** A pointer to an RReadStream object, the ReadUint8L() function of which is used 
 	to read single characters from the stream.
@@ -279,7 +322,9 @@
 		/** 10 */
 		ELineFeed			= 10,
 		/** 13 */
-		ECarriageReturn		= 13
+		ECarriageReturn		= 13,
+		/** ':' */
+		EColon				=':'
 		};
 	/** Flags that can be specified on construction. 
 	@publishedAll
@@ -465,7 +510,8 @@
 	TInt iParseBegin;
 	TInt iReserved2;
 	};
-
+	
+#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
 NONSHARABLE_CLASS( CVersitTLSContainer ): public CBase	
 /**
 Wrapper class for static variables to be stored in TLS
@@ -479,7 +525,7 @@
 public:
 	HBufC * iShiftJisEscape;//Store shift-jis escape charcter, as generated by relevant charconv plugin	
 	};
-
+#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
 #include <versit.inl>
 
 #endif