1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/compressionlibs/ziplib/inc/ezfilebuffer.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,64 @@
1.4 +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// Declaration for FileBufferManager class which facilitates the aynchronous compression and
1.18 +// decompression of data streams.
1.19 +//
1.20 +//
1.21 +
1.22 +#ifndef __EZFILEBUFFERMANAGER_H__
1.23 +#define __EZFILEBUFFERMANAGER_H__
1.24 +
1.25 +#include <e32base.h>
1.26 +#include <f32file.h>
1.27 +
1.28 +#include <ezbufman.h>
1.29 +
1.30 +/**
1.31 +Concrete class to manage the input and output buffers for compression and de-compression
1.32 +
1.33 +@publishedAll
1.34 +@released
1.35 +*/
1.36 +class CEZFileBufferManager : public CBase, public MEZBufferManager
1.37 + {
1.38 +public:
1.39 +
1.40 + enum { EBadInitialization = 1 };
1.41 +
1.42 +public:
1.43 + ~CEZFileBufferManager();
1.44 + IMPORT_C static CEZFileBufferManager* NewLC(RFile &aInput, RFile &aOutput, TInt aBufferSize = 0x8000);
1.45 + IMPORT_C static CEZFileBufferManager* NewL(RFile &aInput, RFile &aOutput, TInt aBufferSize = 0x8000);
1.46 +
1.47 + void InitializeL(CEZZStream &aZStream);
1.48 + void NeedInputL(CEZZStream &aZStream);
1.49 + void NeedOutputL(CEZZStream &aZStream);
1.50 + void FinalizeL(CEZZStream &aZStream);
1.51 +
1.52 +protected:
1.53 + void ConstructL(TInt aBufferSize);
1.54 + CEZFileBufferManager(RFile &aInput, RFile &aOutput);
1.55 +
1.56 +protected:
1.57 + RFile &iInputFile;
1.58 + RFile &iOutputFile;
1.59 + TInt iBufferSize;
1.60 + TUint8* iInputBuffer;
1.61 + TUint8* iOutputBuffer;
1.62 + TPtr8 iInputDescriptor; // always points to start of the input Buffer
1.63 + TPtr8 iOutputDescriptor; // always points to start of the output Buffer
1.64 + };
1.65 +
1.66 +
1.67 +#endif