1 //========================================================================
5 // Copyright 1996-2002 Glyph & Cog, LLC
6 // Copyright 2003 Martin Kretzschmar
8 //========================================================================
10 #ifndef GNOME_VFS_STREAM_H
11 #define GNOME_VFS_STREAM_H
13 #include "gpdf-g-switch.h"
14 # include <libgnomevfs/gnome-vfs-handle.h>
15 #include "gpdf-g-switch.h"
19 #define gnomeVFSStreamBufSize fileStreamBufSize
21 class GnomeVFSStream: public BaseStream {
24 GnomeVFSStream(GnomeVFSHandle *handleA, Guint startA, GBool limitedA,
25 Guint lengthA, Object *dictA);
26 virtual ~GnomeVFSStream();
27 virtual Stream *makeSubStream(Guint startA, GBool limitedA,
28 Guint lengthA, Object *dictA);
29 virtual StreamKind getKind() { return strFile; }
33 { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
34 virtual int lookChar()
35 { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
36 virtual int getPos() { return bufPos + (bufPtr - buf); }
37 virtual void setPos(Guint pos, int dir = 0);
38 virtual GBool isBinary(GBool last = gTrue) { return last; }
39 virtual Guint getStart() { return start; }
40 virtual void moveStart(int delta);
46 GnomeVFSHandle *handle;
50 char buf[gnomeVFSStreamBufSize];
58 #endif /* GNOME_VFS_STREAM_H */