Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ | 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ |
| 8 #define CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ | 8 #define CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ |
| 9 | 9 |
| 10 #include "core/include/fxcrt/fx_system.h" | 10 #include "core/include/fxcrt/fx_system.h" |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 864 virtual FX_BOOL IsDataAvail(FX_FILESIZE offset, FX_DWORD size) = 0; | 864 virtual FX_BOOL IsDataAvail(FX_FILESIZE offset, FX_DWORD size) = 0; |
| 865 }; | 865 }; |
| 866 class IFX_DownloadHints { | 866 class IFX_DownloadHints { |
| 867 public: | 867 public: |
| 868 virtual ~IFX_DownloadHints() {} | 868 virtual ~IFX_DownloadHints() {} |
| 869 virtual void AddSegment(FX_FILESIZE offset, FX_DWORD size) = 0; | 869 virtual void AddSegment(FX_FILESIZE offset, FX_DWORD size) = 0; |
| 870 }; | 870 }; |
| 871 | 871 |
| 872 class IPDF_DataAvail { | 872 class IPDF_DataAvail { |
| 873 public: | 873 public: |
| 874 static IPDF_DataAvail* Create(IFX_FileAvail* pFileAvail, | 874 // Must match PDF_DATA_* definitions in public/fpdf_dataavail.h, but cannot |
|
Lei Zhang
2015/11/20 01:54:57
This is because Jun didn't merge the linearization
| |
| 875 // #include that header. fpdfsdk/src/fpdf_dataavail.cpp has static_asserts | |
| 876 // to make sure the two sets of values match. | |
| 877 enum DocAvailStatus { | |
| 878 DataError = -1, // PDF_DATA_ERROR | |
| 879 DataNotAvailable = 0, // PDF_DATA_NOTAVAIL | |
| 880 DataAvailable = 1, // PDF_DATA_AVAIL | |
| 881 }; | |
| 882 | |
| 883 // Must match PDF_*LINEAR* definitions in public/fpdf_dataavail.h, but cannot | |
| 884 // #include that header. fpdfsdk/src/fpdf_dataavail.cpp has static_asserts | |
| 885 // to make sure the two sets of values match. | |
| 886 enum DocLinearizationStatus { | |
| 887 LinearizationUnknown = -1, // PDF_LINEARIZATION_UNKNOWN | |
| 888 NotLinearized = 0, // PDF_NOT_LINEARIZED | |
| 889 Linearized = 1, // PDF_LINEARIZED | |
| 890 }; | |
| 891 | |
| 892 // Must match PDF_FORM_* definitions in public/fpdf_dataavail.h, but cannot | |
| 893 // #include that header. fpdfsdk/src/fpdf_dataavail.cpp has static_asserts | |
| 894 // to make sure the two sets of values match. | |
| 895 enum DocFormStatus { | |
| 896 FormError = -1, // PDF_FORM_ERROR | |
| 897 FormNotAvailable = 0, // PDF_FORM_NOTAVAIL | |
| 898 FormAvailable = 1, // PDF_FORM_AVAIL | |
| 899 FormNotExist = 2, // PDF_FORM_NOTEXIST | |
| 900 }; | |
| 901 | |
| 902 static IPDF_DataAvail* Create(IFX_FileAvail* pFileAvail, | |
| 875 IFX_FileRead* pFileRead); | 903 IFX_FileRead* pFileRead); |
| 876 virtual ~IPDF_DataAvail() {} | 904 virtual ~IPDF_DataAvail() {} |
| 877 | 905 |
| 878 IFX_FileAvail* GetFileAvail() const { return m_pFileAvail; } | 906 IFX_FileAvail* GetFileAvail() const { return m_pFileAvail; } |
| 879 IFX_FileRead* GetFileRead() const { return m_pFileRead; } | 907 IFX_FileRead* GetFileRead() const { return m_pFileRead; } |
| 880 | 908 |
| 881 virtual int IsDocAvail(IFX_DownloadHints* pHints) = 0; | 909 virtual int IsDocAvail(IFX_DownloadHints* pHints) = 0; |
| 882 virtual void SetDocument(CPDF_Document* pDoc) = 0; | 910 virtual void SetDocument(CPDF_Document* pDoc) = 0; |
| 883 virtual int IsPageAvail(int iPage, IFX_DownloadHints* pHints) = 0; | 911 virtual int IsPageAvail(int iPage, IFX_DownloadHints* pHints) = 0; |
| 884 virtual FX_BOOL IsLinearized() = 0; | 912 virtual FX_BOOL IsLinearized() = 0; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 968 FX_DWORD src_size, | 996 FX_DWORD src_size, |
| 969 const CPDF_Dictionary* pDict, | 997 const CPDF_Dictionary* pDict, |
| 970 uint8_t*& dest_buf, | 998 uint8_t*& dest_buf, |
| 971 FX_DWORD& dest_size, | 999 FX_DWORD& dest_size, |
| 972 CFX_ByteString& ImageEncoding, | 1000 CFX_ByteString& ImageEncoding, |
| 973 CPDF_Dictionary*& pImageParms, | 1001 CPDF_Dictionary*& pImageParms, |
| 974 FX_DWORD estimated_size, | 1002 FX_DWORD estimated_size, |
| 975 FX_BOOL bImageAcc); | 1003 FX_BOOL bImageAcc); |
| 976 | 1004 |
| 977 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ | 1005 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ |
| OLD | NEW |