epoc32/include/ezfilebuffer.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 // Copyright (c) 1999-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 "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // Declaration for FileBufferManager class which facilitates the aynchronous compression and 
    15 // decompression of data streams.
    16 // 
    17 //
    18 
    19 #ifndef __EZFILEBUFFERMANAGER_H__
    20 #define __EZFILEBUFFERMANAGER_H__
    21 
    22 #include <e32base.h>
    23 #include <f32file.h>
    24 
    25 #include <ezbufman.h>
    26 
    27 /**
    28 Concrete class to manage the input and output buffers for compression and de-compression
    29 
    30 @publishedAll
    31 @released
    32 */
    33 class CEZFileBufferManager : public CBase, public MEZBufferManager
    34 	{
    35 public:
    36 
    37 	enum { EBadInitialization = 1 };
    38 
    39 public:
    40 	~CEZFileBufferManager();
    41 	IMPORT_C static CEZFileBufferManager* NewLC(RFile &aInput, RFile &aOutput, TInt aBufferSize = 0x8000);
    42 	IMPORT_C static CEZFileBufferManager* NewL(RFile &aInput, RFile &aOutput, TInt aBufferSize = 0x8000);
    43 
    44 	void InitializeL(CEZZStream &aZStream);
    45 	void NeedInputL(CEZZStream &aZStream);
    46 	void NeedOutputL(CEZZStream &aZStream);
    47 	void FinalizeL(CEZZStream &aZStream);
    48 
    49 protected:
    50 	void ConstructL(TInt aBufferSize);
    51 	CEZFileBufferManager(RFile &aInput, RFile &aOutput);
    52 
    53 protected:
    54 	RFile &iInputFile;
    55 	RFile &iOutputFile;
    56 	TInt iBufferSize;
    57 	TUint8* iInputBuffer;
    58 	TUint8* iOutputBuffer;
    59 	TPtr8 iInputDescriptor;  // always points to start of the input Buffer
    60 	TPtr8 iOutputDescriptor; // always points to start of the output Buffer
    61 	};
    62 
    63 
    64 #endif