upgrade to xpdf 3.00.
[swftools.git] / pdf2swf / xpdf / FoFiBase.h
blobb78840b2a007e04d22b2fdb6f1e3894e99fc48c1
1 //========================================================================
2 //
3 // FoFiBase.h
4 //
5 // Copyright 1999-2003 Glyph & Cog, LLC
6 //
7 //========================================================================
9 #ifndef FOFIBASE_H
10 #define FOFIBASE_H
12 #include <aconf.h>
14 #ifdef USE_GCC_PRAGMAS
15 #pragma interface
16 #endif
18 #include "gtypes.h"
20 //------------------------------------------------------------------------
22 typedef void (*FoFiOutputFunc)(void *stream, char *data, int len);
24 //------------------------------------------------------------------------
25 // FoFiBase
26 //------------------------------------------------------------------------
28 class FoFiBase {
29 public:
31 virtual ~FoFiBase();
33 protected:
35 FoFiBase(char *fileA, int lenA, GBool freeFileDataA);
36 static char *readFile(char *fileName, int *fileLen);
38 // S = signed / U = unsigned
39 // 8/16/32/Var = word length, in bytes
40 // BE = big endian
41 int getS8(int pos, GBool *ok);
42 int getU8(int pos, GBool *ok);
43 int getS16BE(int pos, GBool *ok);
44 int getU16BE(int pos, GBool *ok);
45 int getS32BE(int pos, GBool *ok);
46 Guint getU32BE(int pos, GBool *ok);
47 Guint getUVarBE(int pos, int size, GBool *ok);
49 GBool checkRegion(int pos, int size);
51 Guchar *fileData;
52 Guchar *file;
53 int len;
54 GBool freeFileData;
57 #endif