XRef Class Reference

#include <XRef.h>


Public Member Functions

 XRef (BaseStream *strA, GString *ownerPassword, GString *userPassword)
 ~XRef ()
GBool isOk ()
int getErrorCode ()
GBool isEncrypted ()
GBool okToPrint (GBool ignoreOwnerPW=gFalse)
GBool okToChange (GBool ignoreOwnerPW=gFalse)
GBool okToCopy (GBool ignoreOwnerPW=gFalse)
GBool okToAddNotes (GBool ignoreOwnerPW=gFalse)
ObjectgetCatalog (Object *obj)
Objectfetch (int num, int gen, Object *obj)
ObjectgetDocInfo (Object *obj)
ObjectgetDocInfoNF (Object *obj)
int getNumObjects ()
Guint getLastXRefPos ()
int getRootNum ()
int getRootGen ()
GBool getStreamEnd (Guint streamStart, Guint *streamEnd)
int getSize ()
XRefEntrygetEntry (int i)
ObjectgetTrailerDict ()

Private Member Functions

Guint getStartXref ()
GBool readXRef (Guint *pos)
GBool readXRefTable (Parser *parser, Guint *pos)
GBool readXRefStreamSection (Stream *xrefStr, int *w, int first, int n)
GBool readXRefStream (Stream *xrefStr, Guint *pos)
GBool constructXRef ()
GBool checkEncrypted (GString *ownerPassword, GString *userPassword)
Guint strToUnsigned (char *s)

Private Attributes

BaseStreamstr
Guint start
XRefEntryentries
int size
int rootNum
int rootGen
GBool ok
int errCode
Object trailerDict
Guint lastXRefPos
GuintstreamEnds
int streamEndsLen
ObjectStream * objStr
GBool encrypted
int encVersion
int encRevision
int keyLength
int permFlags
Guchar fileKey [16]
GBool ownerPasswordOk


Detailed Description

Definition at line 42 of file XRef.h.


Constructor & Destructor Documentation

XRef::XRef ( BaseStream strA,
GString ownerPassword,
GString userPassword 
)

XRef::~XRef (  ) 


Member Function Documentation

GBool XRef::isOk (  )  [inline]

Definition at line 52 of file XRef.h.

References ok.

00052 { return ok; }

int XRef::getErrorCode (  )  [inline]

Definition at line 55 of file XRef.h.

References errCode.

00055 { return errCode; }

GBool XRef::isEncrypted (  )  [inline]

Definition at line 59 of file XRef.h.

References encrypted.

Referenced by PDFDoc::isEncrypted().

00059 { return encrypted; }

GBool XRef::okToPrint ( GBool  ignoreOwnerPW = gFalse  ) 

Referenced by PDFDoc::okToPrint().

GBool XRef::okToChange ( GBool  ignoreOwnerPW = gFalse  ) 

Referenced by PDFDoc::okToChange().

GBool XRef::okToCopy ( GBool  ignoreOwnerPW = gFalse  ) 

Referenced by PDFDoc::okToCopy().

GBool XRef::okToAddNotes ( GBool  ignoreOwnerPW = gFalse  ) 

Referenced by PDFDoc::okToAddNotes().

Object* XRef::getCatalog ( Object obj  )  [inline]

Definition at line 71 of file XRef.h.

References fetch(), rootGen, and rootNum.

00071 { return fetch(rootNum, rootGen, obj); }

Object* XRef::fetch ( int  num,
int  gen,
Object obj 
)

Referenced by getCatalog().

Object* XRef::getDocInfo ( Object obj  ) 

Referenced by PDFDoc::getDocInfo().

Object* XRef::getDocInfoNF ( Object obj  ) 

Referenced by PDFDoc::getDocInfoNF().

int XRef::getNumObjects (  )  [inline]

Definition at line 81 of file XRef.h.

References size.

00081 { return size; }

Guint XRef::getLastXRefPos (  )  [inline]

Definition at line 84 of file XRef.h.

References lastXRefPos.

00084 { return lastXRefPos; }

int XRef::getRootNum (  )  [inline]

Definition at line 87 of file XRef.h.

References rootNum.

00087 { return rootNum; }

int XRef::getRootGen (  )  [inline]

Definition at line 88 of file XRef.h.

References rootGen.

00088 { return rootGen; }

GBool XRef::getStreamEnd ( Guint  streamStart,
Guint streamEnd 
)

int XRef::getSize (  )  [inline]

Definition at line 95 of file XRef.h.

References size.

00095 { return size; }

XRefEntry* XRef::getEntry ( int  i  )  [inline]

Definition at line 96 of file XRef.h.

References entries.

00096 { return &entries[i]; }

Object* XRef::getTrailerDict (  )  [inline]

Definition at line 97 of file XRef.h.

References trailerDict.

00097 { return &trailerDict; }

Guint XRef::getStartXref (  )  [private]

GBool XRef::readXRef ( Guint pos  )  [private]

GBool XRef::readXRefTable ( Parser parser,
Guint pos 
) [private]

GBool XRef::readXRefStreamSection ( Stream xrefStr,
int *  w,
int  first,
int  n 
) [private]

GBool XRef::readXRefStream ( Stream xrefStr,
Guint pos 
) [private]

GBool XRef::constructXRef (  )  [private]

GBool XRef::checkEncrypted ( GString ownerPassword,
GString userPassword 
) [private]

Guint XRef::strToUnsigned ( char *  s  )  [private]


Field Documentation

BaseStream* XRef::str [private]

Definition at line 101 of file XRef.h.

Guint XRef::start [private]

Definition at line 102 of file XRef.h.

XRefEntry* XRef::entries [private]

Definition at line 104 of file XRef.h.

Referenced by getEntry().

int XRef::size [private]

Definition at line 105 of file XRef.h.

Referenced by getNumObjects(), and getSize().

int XRef::rootNum [private]

Definition at line 106 of file XRef.h.

Referenced by getCatalog(), and getRootNum().

int XRef::rootGen [private]

Definition at line 106 of file XRef.h.

Referenced by getCatalog(), and getRootGen().

GBool XRef::ok [private]

Definition at line 107 of file XRef.h.

Referenced by isOk().

int XRef::errCode [private]

Definition at line 108 of file XRef.h.

Referenced by getErrorCode().

Object XRef::trailerDict [private]

Definition at line 109 of file XRef.h.

Referenced by getTrailerDict().

Guint XRef::lastXRefPos [private]

Definition at line 110 of file XRef.h.

Referenced by getLastXRefPos().

Guint* XRef::streamEnds [private]

Definition at line 111 of file XRef.h.

int XRef::streamEndsLen [private]

Definition at line 113 of file XRef.h.

ObjectStream* XRef::objStr [private]

Definition at line 114 of file XRef.h.

GBool XRef::encrypted [private]

Definition at line 116 of file XRef.h.

Referenced by isEncrypted().

int XRef::encVersion [private]

Definition at line 117 of file XRef.h.

int XRef::encRevision [private]

Definition at line 118 of file XRef.h.

int XRef::keyLength [private]

Definition at line 119 of file XRef.h.

int XRef::permFlags [private]

Definition at line 120 of file XRef.h.

Guchar XRef::fileKey[16] [private]

Definition at line 121 of file XRef.h.

GBool XRef::ownerPasswordOk [private]

Definition at line 122 of file XRef.h.


The documentation for this class was generated from the following file:
Generated on Fri Jan 9 12:45:41 2009 for libextractor by  doxygen 1.5.1