Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

XRef Class Reference

#include </home/clem/local/src/opie/noncore/unsupported/qpdf/xpdf/XRef.h>

Collaboration diagram for XRef:

Collaboration graph
[legend]
List of all members.

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)

Private Member Functions

Guint readTrailer ()
GBool readXRef (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
GBool encrypted
int encVersion
int encRevision
int keyLength
int permFlags
Guchar fileKey [16]
GBool ownerPasswordOk

Constructor & Destructor Documentation

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

Definition at line 52 of file XRef.cc.

References checkEncrypted(), constructXRef(), encrypted, entries, errCode, errDamaged, errEncrypted, errNone, Object::getDict(), BaseStream::getStart(), gFalse, gfree(), gmalloc(), gTrue, i, NULL, XRefEntry::offset, ok, pos, readTrailer(), readXRef(), size, start, str, streamEnds, streamEndsLen, trailerDict, and XRefEntry::used.

XRef::~XRef  ) 
 

Definition at line 113 of file XRef.cc.

References entries, Object::free(), gfree(), streamEnds, and trailerDict.


Member Function Documentation

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

Definition at line 448 of file XRef.cc.

References Object::arrayGet(), defPermFlags, Object::dictLookup(), encRevision, encrypted, encVersion, error(), fileKey, Object::free(), Object::getInt(), Object::getName(), Object::getString(), gFalse, gTrue, Object::isArray(), Object::isDict(), Object::isInt(), Object::isName(), Object::isString(), keyLength, Decrypt::makeFileKey(), ownerPasswordOk, permFlags, and trailerDict.

Referenced by XRef().

GBool XRef::constructXRef  )  [private]
 

Definition at line 344 of file XRef.cc.

References buf, Object::dictLookupNF(), entries, error(), Object::free(), XRefEntry::gen, Stream::getLine(), Parser::getObj(), Stream::getPos(), Object::getRefGen(), Object::getRefNum(), gFalse, grealloc(), gTrue, i, Object::initNull(), Object::isDict(), Object::isNone(), Object::isRef(), BaseStream::makeSubStream(), NULL, XRefEntry::offset, p, parser, pos, Stream::reset(), rootGen, rootNum, size, start, str, streamEnds, streamEndsLen, trailerDict, and XRefEntry::used.

Referenced by XRef().

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

Definition at line 581 of file XRef.cc.

References entries, fileKey, XRefEntry::gen, Parser::getObj(), gFalse, Object::initNull(), keyLength, BaseStream::makeSubStream(), NULL, XRefEntry::offset, parser, size, start, and str.

Referenced by Object::fetch(), and getCatalog().

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

Definition at line 61 of file XRef.h.

References fetch(), rootGen, and rootNum.

Referenced by Catalog::Catalog().

Object * XRef::getDocInfo Object obj  ) 
 

Definition at line 623 of file XRef.cc.

References Object::dictLookup(), and trailerDict.

Referenced by PDFDoc::getDocInfo().

Object * XRef::getDocInfoNF Object obj  ) 
 

Definition at line 628 of file XRef.cc.

References Object::dictLookupNF(), and trailerDict.

int XRef::getErrorCode  )  [inline]
 

Definition at line 45 of file XRef.h.

References errCode.

Referenced by PDFDoc::setup().

Guint XRef::getLastXRefPos  )  [inline]
 

Definition at line 74 of file XRef.h.

References lastXRefPos.

int XRef::getNumObjects  )  [inline]
 

Definition at line 71 of file XRef.h.

References size.

int XRef::getRootGen  )  [inline]
 

Definition at line 78 of file XRef.h.

References rootGen.

int XRef::getRootNum  )  [inline]
 

Definition at line 77 of file XRef.h.

References rootNum.

GBool XRef::getStreamEnd Guint  streamStart,
Guint streamEnd
 

Definition at line 632 of file XRef.cc.

References gFalse, gTrue, streamEnds, and streamEndsLen.

Referenced by Parser::makeStream().

GBool XRef::isEncrypted  )  [inline]
 

Definition at line 49 of file XRef.h.

References encrypted.

Referenced by PDFDoc::isEncrypted().

GBool XRef::isOk  )  [inline]
 

Definition at line 42 of file XRef.h.

References ok.

Referenced by PDFDoc::setup().

GBool XRef::okToAddNotes GBool  ignoreOwnerPW = gFalse  ) 
 

Definition at line 572 of file XRef.cc.

References gFalse, gTrue, ownerPasswordOk, permFlags, and permNotes.

Referenced by PDFDoc::okToAddNotes().

GBool XRef::okToChange GBool  ignoreOwnerPW = gFalse  ) 
 

Definition at line 554 of file XRef.cc.

References gFalse, gTrue, ownerPasswordOk, permChange, and permFlags.

Referenced by PDFDoc::okToChange().

GBool XRef::okToCopy GBool  ignoreOwnerPW = gFalse  ) 
 

Definition at line 563 of file XRef.cc.

References gFalse, gTrue, ownerPasswordOk, permCopy, and permFlags.

Referenced by PDFDoc::okToCopy().

GBool XRef::okToPrint GBool  ignoreOwnerPW = gFalse  ) 
 

Definition at line 545 of file XRef.cc.

References gFalse, gTrue, ownerPasswordOk, permFlags, and permPrint.

Referenced by PDFDoc::okToPrint().

Guint XRef::readTrailer  )  [private]
 

Definition at line 123 of file XRef.cc.

References buf, Object::free(), Stream::getChar(), Object::getInt(), Parser::getObj(), Object::getRefGen(), Object::getRefNum(), gFalse, i, Object::initNull(), Object::isInt(), Object::isRef(), lastXRefPos, BaseStream::makeSubStream(), NULL, p, parser, pos, rootGen, rootNum, BaseStream::setPos(), size, start, str, strToUnsigned(), trailerDict, and xrefSearchSize.

Referenced by XRef().

GBool XRef::readXRef Guint pos  )  [private]
 

Definition at line 214 of file XRef.cc.

References entries, Object::free(), XRefEntry::gen, Stream::getChar(), Object::getDict(), Object::getInt(), Parser::getObj(), Stream::getPos(), gFalse, grealloc(), gTrue, i, Object::initNull(), Object::isCmd(), Object::isDict(), Object::isInt(), Stream::lookChar(), BaseStream::makeSubStream(), NULL, XRefEntry::offset, ok, parser, s, BaseStream::setPos(), size, start, str, strToUnsigned(), and XRefEntry::used.

Referenced by XRef().

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

Definition at line 655 of file XRef.cc.

References i, p, and Opie::MM::x.

Referenced by readTrailer(), and readXRef().


Member Data Documentation

int XRef::encRevision [private]
 

Definition at line 102 of file XRef.h.

Referenced by checkEncrypted().

GBool XRef::encrypted [private]
 

Definition at line 100 of file XRef.h.

Referenced by checkEncrypted(), isEncrypted(), and XRef().

int XRef::encVersion [private]
 

Definition at line 101 of file XRef.h.

Referenced by checkEncrypted().

XRefEntry* XRef::entries [private]
 

Definition at line 89 of file XRef.h.

Referenced by constructXRef(), fetch(), readXRef(), XRef(), and ~XRef().

int XRef::errCode [private]
 

Definition at line 93 of file XRef.h.

Referenced by getErrorCode(), and XRef().

Guchar XRef::fileKey[16] [private]
 

Definition at line 105 of file XRef.h.

Referenced by checkEncrypted(), and fetch().

int XRef::keyLength [private]
 

Definition at line 103 of file XRef.h.

Referenced by checkEncrypted(), and fetch().

Guint XRef::lastXRefPos [private]
 

Definition at line 95 of file XRef.h.

Referenced by getLastXRefPos(), and readTrailer().

GBool XRef::ok [private]
 

Definition at line 92 of file XRef.h.

Referenced by isOk(), readXRef(), and XRef().

GBool XRef::ownerPasswordOk [private]
 

Definition at line 106 of file XRef.h.

Referenced by checkEncrypted(), okToAddNotes(), okToChange(), okToCopy(), and okToPrint().

int XRef::permFlags [private]
 

Definition at line 104 of file XRef.h.

Referenced by checkEncrypted(), okToAddNotes(), okToChange(), okToCopy(), and okToPrint().

int XRef::rootGen [private]
 

Definition at line 91 of file XRef.h.

Referenced by constructXRef(), getCatalog(), getRootGen(), and readTrailer().

int XRef::rootNum [private]
 

Definition at line 91 of file XRef.h.

Referenced by constructXRef(), getCatalog(), getRootNum(), and readTrailer().

int XRef::size [private]
 

Definition at line 90 of file XRef.h.

Referenced by constructXRef(), fetch(), getNumObjects(), readTrailer(), readXRef(), and XRef().

Guint XRef::start [private]
 

Definition at line 87 of file XRef.h.

Referenced by constructXRef(), fetch(), readTrailer(), readXRef(), and XRef().

BaseStream* XRef::str [private]
 

Definition at line 86 of file XRef.h.

Referenced by constructXRef(), fetch(), readTrailer(), readXRef(), and XRef().

Guint* XRef::streamEnds [private]
 

Definition at line 96 of file XRef.h.

Referenced by constructXRef(), getStreamEnd(), XRef(), and ~XRef().

int XRef::streamEndsLen [private]
 

Definition at line 98 of file XRef.h.

Referenced by constructXRef(), getStreamEnd(), and XRef().

Object XRef::trailerDict [private]
 

Definition at line 94 of file XRef.h.

Referenced by checkEncrypted(), constructXRef(), getDocInfo(), getDocInfoNF(), readTrailer(), XRef(), and ~XRef().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:56:02 2005 for OPIE by  doxygen 1.4.2