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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Declaration for FileBufferManager class which facilitates the aynchronous compression and
15 // decompression of data streams.
19 #ifndef __EZFILEBUFFERMANAGER_H__
20 #define __EZFILEBUFFERMANAGER_H__
28 Concrete class to manage the input and output buffers for compression and de-compression
33 class CEZFileBufferManager : public CBase, public MEZBufferManager
37 enum { EBadInitialization = 1 };
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);
44 void InitializeL(CEZZStream &aZStream);
45 void NeedInputL(CEZZStream &aZStream);
46 void NeedOutputL(CEZZStream &aZStream);
47 void FinalizeL(CEZZStream &aZStream);
50 void ConstructL(TInt aBufferSize);
51 CEZFileBufferManager(RFile &aInput, RFile &aOutput);
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