| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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_IPDF_DATA_AVAIL_H_ | 7 #ifndef CORE_INCLUDE_FPDFAPI_IPDF_DATA_AVAIL_H_ |
| 8 #define CORE_INCLUDE_FPDFAPI_IPDF_DATA_AVAIL_H_ | 8 #define CORE_INCLUDE_FPDFAPI_IPDF_DATA_AVAIL_H_ |
| 9 | 9 |
| 10 #include "core/include/fxcrt/fx_stream.h" | 10 #include "core/include/fxcrt/fx_stream.h" |
| 11 #include "core/include/fxcrt/fx_system.h" | 11 #include "core/include/fxcrt/fx_system.h" |
| 12 | 12 |
| 13 class CPDF_Document; | 13 class CPDF_Document; |
| 14 class CPDF_Object; | 14 class CPDF_Object; |
| 15 | 15 |
| 16 class IPDF_DataAvail { | 16 class IPDF_DataAvail { |
| 17 public: | 17 public: |
| 18 // Must match PDF_DATA_* definitions in public/fpdf_dataavail.h, but cannot | 18 // Must match PDF_DATA_* definitions in public/fpdf_dataavail.h, but cannot |
| 19 // #include that header. fpdfsdk/src/fpdf_dataavail.cpp has static_asserts | 19 // #include that header. fpdfsdk/fpdf_dataavail.cpp has static_asserts |
| 20 // to make sure the two sets of values match. | 20 // to make sure the two sets of values match. |
| 21 enum DocAvailStatus { | 21 enum DocAvailStatus { |
| 22 DataError = -1, // PDF_DATA_ERROR | 22 DataError = -1, // PDF_DATA_ERROR |
| 23 DataNotAvailable = 0, // PDF_DATA_NOTAVAIL | 23 DataNotAvailable = 0, // PDF_DATA_NOTAVAIL |
| 24 DataAvailable = 1, // PDF_DATA_AVAIL | 24 DataAvailable = 1, // PDF_DATA_AVAIL |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 // Must match PDF_*LINEAR* definitions in public/fpdf_dataavail.h, but cannot | 27 // Must match PDF_*LINEAR* definitions in public/fpdf_dataavail.h, but cannot |
| 28 // #include that header. fpdfsdk/src/fpdf_dataavail.cpp has static_asserts | 28 // #include that header. fpdfsdk/fpdf_dataavail.cpp has static_asserts |
| 29 // to make sure the two sets of values match. | 29 // to make sure the two sets of values match. |
| 30 enum DocLinearizationStatus { | 30 enum DocLinearizationStatus { |
| 31 LinearizationUnknown = -1, // PDF_LINEARIZATION_UNKNOWN | 31 LinearizationUnknown = -1, // PDF_LINEARIZATION_UNKNOWN |
| 32 NotLinearized = 0, // PDF_NOT_LINEARIZED | 32 NotLinearized = 0, // PDF_NOT_LINEARIZED |
| 33 Linearized = 1, // PDF_LINEARIZED | 33 Linearized = 1, // PDF_LINEARIZED |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 // Must match PDF_FORM_* definitions in public/fpdf_dataavail.h, but cannot | 36 // Must match PDF_FORM_* definitions in public/fpdf_dataavail.h, but cannot |
| 37 // #include that header. fpdfsdk/src/fpdf_dataavail.cpp has static_asserts | 37 // #include that header. fpdfsdk/fpdf_dataavail.cpp has static_asserts |
| 38 // to make sure the two sets of values match. | 38 // to make sure the two sets of values match. |
| 39 enum DocFormStatus { | 39 enum DocFormStatus { |
| 40 FormError = -1, // PDF_FORM_ERROR | 40 FormError = -1, // PDF_FORM_ERROR |
| 41 FormNotAvailable = 0, // PDF_FORM_NOTAVAIL | 41 FormNotAvailable = 0, // PDF_FORM_NOTAVAIL |
| 42 FormAvailable = 1, // PDF_FORM_AVAIL | 42 FormAvailable = 1, // PDF_FORM_AVAIL |
| 43 FormNotExist = 2, // PDF_FORM_NOTEXIST | 43 FormNotExist = 2, // PDF_FORM_NOTEXIST |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 class FileAvail { | 46 class FileAvail { |
| 47 public: | 47 public: |
| (...skipping 23 matching lines...) Expand all Loading... |
| 71 FX_DWORD* pSize) = 0; | 71 FX_DWORD* pSize) = 0; |
| 72 | 72 |
| 73 protected: | 73 protected: |
| 74 IPDF_DataAvail(FileAvail* pFileAvail, IFX_FileRead* pFileRead); | 74 IPDF_DataAvail(FileAvail* pFileAvail, IFX_FileRead* pFileRead); |
| 75 | 75 |
| 76 FileAvail* m_pFileAvail; | 76 FileAvail* m_pFileAvail; |
| 77 IFX_FileRead* m_pFileRead; | 77 IFX_FileRead* m_pFileRead; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 #endif // CORE_INCLUDE_FPDFAPI_IPDF_DATA_AVAIL_H_ | 80 #endif // CORE_INCLUDE_FPDFAPI_IPDF_DATA_AVAIL_H_ |
| OLD | NEW |