epoc32/include/exbuf.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #if !defined(__EXBUF_H__)
    17 #define __EXBUF_H__
    18 
    19 
    20 
    21 class CExportBufferBase : public CBase
    22 /**
    23 CExportBufferBase
    24 @publishedPartner
    25 @deprecated
    26 */
    27 	{
    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
    31 public:
    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?
    40 protected:
    41 	TInt iExportBufferLength; 
    42 	HBufC* iExportBuffer;
    43 private:
    44 	TText* iWritePtr;
    45 	TText* iTBase;
    46 	TInt iMaxSize;
    47 	};
    48 
    49 
    50 
    51 class CExportDynamicBuffer : public CExportBufferBase
    52 /**
    53 CExportDynamicBuffer
    54 @publishedPartner
    55 @deprecated
    56 */
    57 	{
    58 public:
    59 	IMPORT_C static CExportDynamicBuffer* NewL(TInt aSize, CBufBase& aDynamicBuffer);
    60 	IMPORT_C void ConstructL();
    61 public:  // from CExportBufferBase
    62 	IMPORT_C void CommitExportBufferL();
    63 private:
    64 	CExportDynamicBuffer(TInt aSize, CBufBase& aDynamicBuffer);
    65 private:
    66 	CBufBase& iOutput;
    67 	};
    68 
    69 #endif // __EXBUF_H__