diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-08-13 07:14:48 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-08-13 07:14:48 +0000 |
commit | 4b4995cda35627e06c43e25ecbe07c1bc1859bb5 (patch) | |
tree | 143ed02a389bab62f44043a54cbc70f69e312e2f /Build/source/libs/xpdf/xpdf-src/xpdf/XRef.h | |
parent | 00d00899c484b81967558f43c4fe4a896ffdf610 (diff) |
xpdf 4.00
git-svn-id: svn://tug.org/texlive/trunk@45031 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/xpdf/xpdf-src/xpdf/XRef.h')
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/xpdf/XRef.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/XRef.h b/Build/source/libs/xpdf/xpdf-src/xpdf/XRef.h index 0b74dcb8806..ed44eac6e2b 100644 --- a/Build/source/libs/xpdf/xpdf-src/xpdf/XRef.h +++ b/Build/source/libs/xpdf/xpdf-src/xpdf/XRef.h @@ -18,6 +18,9 @@ #include "gtypes.h" #include "gfile.h" #include "Object.h" +#if MULTITHREADED +#include "GMutex.h" +#endif class Dict; class Stream; @@ -73,6 +76,9 @@ public: // Is the file encrypted? GBool isEncrypted() { return encrypted; } + GBool getEncryption(int *permFlagsA, GBool *ownerPasswordOkA, + int *keyLengthA, int *encVersionA, + CryptAlgorithm *encAlgorithmA); // Check various permissions. GBool okToPrint(GBool ignoreOwnerPW = gFalse); @@ -97,10 +103,17 @@ public: // Return the offset of the last xref table. GFileOffset getLastXRefPos() { return lastXRefPos; } + // Return the offset of the 'startxref' at the end of the file. + GFileOffset getLastStartxrefPos() { return lastStartxrefPos; } + // Return the catalog object reference. int getRootNum() { return rootNum; } int getRootGen() { return rootGen; } + // Get the xref table positions. + int getNumXRefTables() { return xrefTablePosLen; } + GFileOffset getXRefTablePos(int idx) { return xrefTablePos[idx]; } + // Get end position for a stream in a damaged file. // Returns false if unknown or file is not damaged. GBool getStreamEnd(GFileOffset streamStart, GFileOffset *streamEnd); @@ -123,11 +136,17 @@ private: int errCode; // error code (if <ok> is false) Object trailerDict; // trailer dictionary GFileOffset lastXRefPos; // offset of last xref table + GFileOffset lastStartxrefPos; // offset of 'startxref' at end of file + GFileOffset *xrefTablePos; // positions of all xref tables + int xrefTablePosLen; // number of xref table positions GFileOffset *streamEnds; // 'endstream' positions - only used in // damaged files int streamEndsLen; // number of valid entries in streamEnds ObjectStream * // cached object streams objStrs[objStrCacheSize]; +#if MULTITHREADED + GMutex objStrsMutex; +#endif GBool encrypted; // true if file is encrypted int permFlags; // permission bits GBool ownerPasswordOk; // true if owner password is correct @@ -137,6 +156,9 @@ private: CryptAlgorithm encAlgorithm; // encryption algorithm XRefCacheEntry // cache of recently accessed objects cache[xrefCacheSize]; +#if MULTITHREADED + GMutex cacheMutex; +#endif GFileOffset getStartXref(); GBool readXRef(GFileOffset *pos, XRefPosSet *posSet); @@ -144,6 +166,8 @@ private: GBool readXRefStreamSection(Stream *xrefStr, int *w, int first, int n); GBool readXRefStream(Stream *xrefStr, GFileOffset *pos); GBool constructXRef(); + GBool getObjectStreamObject(int objStrNum, int objIdx, + int objNum, Object *obj); ObjectStream *getObjectStream(int objStrNum); GFileOffset strToFileOffset(char *s); }; |