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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #if !defined(__INBUF_H__)
19 #if !defined(__F32FILE_H__)
23 #if !defined(__S32STOR_H__)
27 const TInt KErrEndOfInput = -1000;
30 class CImportBufferBase : public CBase
32 The purpose of this class is to provide a method of
33 abstracting the source of an input through a buffer
34 The class is intended to be used for a single input then destroyed
40 IMPORT_C CImportBufferBase(TInt aMaxSize);
41 IMPORT_C ~CImportBufferBase();
42 IMPORT_C void ConstructL();
43 IMPORT_C TInt ReadL(TText8& aByte);
44 // !! Descriptor versions of ReadL useful?
45 IMPORT_C virtual TInt SeekL(TSeek aSeekMode, TInt anOffset);
46 IMPORT_C void ResetImportBuffer();
47 IMPORT_C void ResetReadPtr();
49 virtual TInt FillImportBuf()=0;
50 IMPORT_C TInt MaxSize();
51 IMPORT_C void SetLength(TInt aLength);
53 TInt iImportBufferLength;
54 HBufC8* iImportBuffer;
63 class CFileImportBuffer : public CImportBufferBase
65 Buffered import from a file
70 // Buffered import from a file
72 IMPORT_C CFileImportBuffer(RFile aSource, TInt aMaxSize);
73 IMPORT_C TInt SeekL(TSeek aSeekMode, TInt anOffset);
75 IMPORT_C TInt FillImportBuf();