diff options
author | Lei Zhang <thestig@chromium.org> | 2015-11-04 14:16:22 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-11-04 14:16:22 -0800 |
commit | 79f5a32175293620abe456554e10efb7c3f4e7c6 (patch) | |
tree | a6d9de63ae975548dacf1620a91f92ee9a6fb0a0 /core/include/fpdfapi/fpdf_parser.h | |
parent | 14e83759abec5eca9c4da0b4e8cd5969375a00f4 (diff) | |
download | pdfium-79f5a32175293620abe456554e10efb7c3f4e7c6.tar.xz |
Make checkdeps --resolve-dotdot succeed.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1419373005 .
Diffstat (limited to 'core/include/fpdfapi/fpdf_parser.h')
-rw-r--r-- | core/include/fpdfapi/fpdf_parser.h | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h index b7684e530a..d1f50038a7 100644 --- a/core/include/fpdfapi/fpdf_parser.h +++ b/core/include/fpdfapi/fpdf_parser.h @@ -7,7 +7,6 @@ #ifndef CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ #define CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ -#include "../../../public/fpdf_dataavail.h" #include "../../../third_party/base/nonstd_unique_ptr.h" #include "../fxcrt/fx_system.h" #include "fpdf_objects.h" @@ -871,6 +870,34 @@ class IFX_DownloadHints { class IPDF_DataAvail { public: + // Must match PDF_DATA_* definitions in public/fpdf_dataavail.h, but cannot + // #include that header. fpdfsdk/src/fpdf_dataavail.cpp has static_asserts + // to make sure the two sets of values match. + enum DocAvailStatus { + DataError = -1, // PDF_DATA_ERROR + DataNotAvailable = 0, // PDF_DATA_NOTAVAIL + DataAvailable = 1, // PDF_DATA_AVAIL + }; + + // Must match PDF_*LINEAR* definitions in public/fpdf_dataavail.h, but cannot + // #include that header. fpdfsdk/src/fpdf_dataavail.cpp has static_asserts + // to make sure the two sets of values match. + enum DocLinearizationStatus { + LinearizationUnknown = -1, // PDF_LINEARIZATION_UNKNOWN + NotLinearized = 0, // PDF_NOT_LINEARIZED + Linearized = 1, // PDF_LINEARIZED + }; + + // Must match PDF_FORM_* definitions in public/fpdf_dataavail.h, but cannot + // #include that header. fpdfsdk/src/fpdf_dataavail.cpp has static_asserts + // to make sure the two sets of values match. + enum DocFormStatus { + FormError = -1, // PDF_FORM_ERROR + FormNotAvailable = 0, // PDF_FORM_NOTAVAIL + FormAvailable = 1, // PDF_FORM_AVAIL + FormNotExist = 2, // PDF_FORM_NOTEXIST + }; + static IPDF_DataAvail* Create(IFX_FileAvail* pFileAvail, IFX_FileRead* pFileRead); virtual ~IPDF_DataAvail() {} @@ -878,12 +905,12 @@ class IPDF_DataAvail { IFX_FileAvail* GetFileAvail() const { return m_pFileAvail; } IFX_FileRead* GetFileRead() const { return m_pFileRead; } - virtual int IsDocAvail(IFX_DownloadHints* pHints) = 0; + virtual DocAvailStatus IsDocAvail(IFX_DownloadHints* pHints) = 0; virtual void SetDocument(CPDF_Document* pDoc) = 0; virtual int IsPageAvail(int iPage, IFX_DownloadHints* pHints) = 0; virtual FX_BOOL IsLinearized() = 0; - virtual int IsFormAvail(IFX_DownloadHints* pHints) = 0; - virtual int IsLinearizedPDF() = 0; + virtual DocFormStatus IsFormAvail(IFX_DownloadHints* pHints) = 0; + virtual DocLinearizationStatus IsLinearizedPDF() = 0; virtual void GetLinearizedMainXRefInfo(FX_FILESIZE* pPos, FX_DWORD* pSize) = 0; |