1 // Copyright (c) 1997-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #if !defined(__EXBUF_H__)
21 class CExportBufferBase : public CBase
28 // The purpose of this class is to provide a method of
29 // abstracting the destination of an output through a buffer
30 // The class is intended to be used for a single output then destroyed
32 IMPORT_C CExportBufferBase(TInt aMaxSize);
33 IMPORT_C ~CExportBufferBase();
34 IMPORT_C void ConstructL();
35 virtual void CommitExportBufferL()=0;
36 IMPORT_C void ResetExportBuffer();
37 IMPORT_C void ResetWritePtr();
38 IMPORT_C void FinalizeExport();
39 IMPORT_C void InsertL(TText aText); // !! TText should be TText8 - do I need an overload here for Unicode?
41 TInt iExportBufferLength;
51 class CExportDynamicBuffer : public CExportBufferBase
59 IMPORT_C static CExportDynamicBuffer* NewL(TInt aSize, CBufBase& aDynamicBuffer);
60 IMPORT_C void ConstructL();
61 public: // from CExportBufferBase
62 IMPORT_C void CommitExportBufferL();
64 CExportDynamicBuffer(TInt aSize, CBufBase& aDynamicBuffer);