1.1 --- a/epoc32/include/ezfilebuffer.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/ezfilebuffer.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,65 @@
1.4 -ezfilebuffer.h
1.5 +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// 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
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +// EZLib: FILEBUFFER.H
1.19 +// Declaration for FileBufferManager class which facilitates the aynchronous compression and
1.20 +// decompression of data streams.
1.21 +//
1.22 +//
1.23 +
1.24 +#ifndef __EZFILEBUFFERMANAGER_H__
1.25 +#define __EZFILEBUFFERMANAGER_H__
1.26 +
1.27 +#include <e32base.h>
1.28 +#include <f32file.h>
1.29 +
1.30 +#include <ezbufman.h>
1.31 +
1.32 +/**
1.33 +Concrete class to manage the input and output buffers for compression and de-compression
1.34 +
1.35 +@publishedAll
1.36 +@released
1.37 +*/
1.38 +class CEZFileBufferManager : public CBase, public MEZBufferManager
1.39 + {
1.40 +public:
1.41 +
1.42 + enum { EBadInitialization = 1 };
1.43 +
1.44 +public:
1.45 + ~CEZFileBufferManager();
1.46 + IMPORT_C static CEZFileBufferManager* NewLC(RFile &aInput, RFile &aOutput, TInt aBufferSize = 0x8000);
1.47 + IMPORT_C static CEZFileBufferManager* NewL(RFile &aInput, RFile &aOutput, TInt aBufferSize = 0x8000);
1.48 +
1.49 + void InitializeL(CEZZStream &aZStream);
1.50 + void NeedInputL(CEZZStream &aZStream);
1.51 + void NeedOutputL(CEZZStream &aZStream);
1.52 + void FinalizeL(CEZZStream &aZStream);
1.53 +
1.54 +protected:
1.55 + void ConstructL(TInt aBufferSize);
1.56 + CEZFileBufferManager(RFile &aInput, RFile &aOutput);
1.57 +
1.58 +protected:
1.59 + RFile &iInputFile;
1.60 + RFile &iOutputFile;
1.61 + TInt iBufferSize;
1.62 + TUint8* iInputBuffer;
1.63 + TUint8* iOutputBuffer;
1.64 + TPtr8 iInputDescriptor; // always points to start of the input Buffer
1.65 + TPtr8 iOutputDescriptor; // always points to start of the output Buffer
1.66 + };
1.67 +
1.68 +
1.69 +#endif