| 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 "../fxcrt/fx_system.h" | 10 #include "../fxcrt/fx_system.h" |
| 11 #include "fpdf_objects.h" | 11 #include "fpdf_objects.h" |
| 12 #include "public/fpdf_dataavail.h" |
| 12 #include "third_party/base/nonstd_unique_ptr.h" | 13 #include "third_party/base/nonstd_unique_ptr.h" |
| 13 | 14 |
| 15 class CFDF_Document; |
| 16 class CFDF_Parser; |
| 17 class CFX_AffineMatrix; |
| 18 class CFX_DIBSource; |
| 19 class CFX_FloatRect; |
| 20 class CFX_Font; |
| 21 class CFX_PrivateData; |
| 22 class CPDF_ColorSpace; |
| 23 class CPDF_CryptoHandler; |
| 24 class CPDF_DocPageData; |
| 25 class CPDF_DocRenderData; |
| 14 class CPDF_Document; | 26 class CPDF_Document; |
| 27 class CPDF_Font; |
| 28 class CPDF_FontEncoding; |
| 29 class CPDF_HintTables; |
| 30 class CPDF_IccProfile; |
| 31 class CPDF_Image; |
| 32 class CPDF_ModuleMgr; |
| 33 class CPDF_Object; |
| 15 class CPDF_Parser; | 34 class CPDF_Parser; |
| 35 class CPDF_Pattern; |
| 36 class CPDF_Point; |
| 16 class CPDF_SecurityHandler; | 37 class CPDF_SecurityHandler; |
| 17 class CPDF_StandardSecurityHandler; | 38 class CPDF_StandardSecurityHandler; |
| 18 class CPDF_CryptoHandler; | |
| 19 class CPDF_Object; | |
| 20 class IFX_FileRead; | 39 class IFX_FileRead; |
| 21 class CFDF_Document; | 40 |
| 22 class CFDF_Parser; | |
| 23 class CFX_Font; | |
| 24 class CFX_AffineMatrix; | |
| 25 class CFX_FloatRect; | |
| 26 class CPDF_Point; | |
| 27 class CPDF_DocPageData; | |
| 28 class CPDF_DocRenderData; | |
| 29 class CPDF_ModuleMgr; | |
| 30 class CFX_DIBSource; | |
| 31 class CPDF_Font; | |
| 32 class CPDF_Image; | |
| 33 class CPDF_ColorSpace; | |
| 34 class CPDF_Pattern; | |
| 35 class CPDF_FontEncoding; | |
| 36 class CPDF_IccProfile; | |
| 37 class CFX_PrivateData; | |
| 38 #define FPDFPERM_PRINT 0x0004 | 41 #define FPDFPERM_PRINT 0x0004 |
| 39 #define FPDFPERM_MODIFY 0x0008 | 42 #define FPDFPERM_MODIFY 0x0008 |
| 40 #define FPDFPERM_EXTRACT 0x0010 | 43 #define FPDFPERM_EXTRACT 0x0010 |
| 41 #define FPDFPERM_ANNOT_FORM 0x0020 | 44 #define FPDFPERM_ANNOT_FORM 0x0020 |
| 42 #define FPDFPERM_FILL_FORM 0x0100 | 45 #define FPDFPERM_FILL_FORM 0x0100 |
| 43 #define FPDFPERM_EXTRACT_ACCESS 0x0200 | 46 #define FPDFPERM_EXTRACT_ACCESS 0x0200 |
| 44 #define FPDFPERM_ASSEMBLE 0x0400 | 47 #define FPDFPERM_ASSEMBLE 0x0400 |
| 45 #define FPDFPERM_PRINT_HIGH 0x0800 | 48 #define FPDFPERM_PRINT_HIGH 0x0800 |
| 46 #define FPDF_PAGE_MAX_NUM 0xFFFFF | 49 #define FPDF_PAGE_MAX_NUM 0xFFFFF |
| 47 | 50 |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 class IFX_FileAvail { | 861 class IFX_FileAvail { |
| 859 public: | 862 public: |
| 860 virtual ~IFX_FileAvail() {} | 863 virtual ~IFX_FileAvail() {} |
| 861 virtual FX_BOOL IsDataAvail(FX_FILESIZE offset, FX_DWORD size) = 0; | 864 virtual FX_BOOL IsDataAvail(FX_FILESIZE offset, FX_DWORD size) = 0; |
| 862 }; | 865 }; |
| 863 class IFX_DownloadHints { | 866 class IFX_DownloadHints { |
| 864 public: | 867 public: |
| 865 virtual ~IFX_DownloadHints() {} | 868 virtual ~IFX_DownloadHints() {} |
| 866 virtual void AddSegment(FX_FILESIZE offset, FX_DWORD size) = 0; | 869 virtual void AddSegment(FX_FILESIZE offset, FX_DWORD size) = 0; |
| 867 }; | 870 }; |
| 868 #define PDF_IS_LINEARIZED 1 | 871 |
| 869 #define PDF_NOT_LINEARIZED 0 | |
| 870 #define PDF_UNKNOW_LINEARIZED -1 | |
| 871 #define PDFFORM_NOTAVAIL 0 | |
| 872 #define PDFFORM_AVAIL 1 | |
| 873 #define PDFFORM_NOTEXIST 2 | |
| 874 class IPDF_DataAvail { | 872 class IPDF_DataAvail { |
| 875 public: | 873 public: |
| 876 static IPDF_DataAvail* Create(IFX_FileAvail* pFileAvail, | 874 static IPDF_DataAvail* Create(IFX_FileAvail* pFileAvail, |
| 877 IFX_FileRead* pFileRead); | 875 IFX_FileRead* pFileRead); |
| 878 virtual ~IPDF_DataAvail() {} | 876 virtual ~IPDF_DataAvail() {} |
| 879 | 877 |
| 880 IFX_FileAvail* GetFileAvail() const { return m_pFileAvail; } | 878 IFX_FileAvail* GetFileAvail() const { return m_pFileAvail; } |
| 881 IFX_FileRead* GetFileRead() const { return m_pFileRead; } | 879 IFX_FileRead* GetFileRead() const { return m_pFileRead; } |
| 882 | 880 |
| 883 virtual FX_BOOL IsDocAvail(IFX_DownloadHints* pHints) = 0; | 881 virtual int IsDocAvail(IFX_DownloadHints* pHints) = 0; |
| 884 virtual void SetDocument(CPDF_Document* pDoc) = 0; | 882 virtual void SetDocument(CPDF_Document* pDoc) = 0; |
| 885 virtual FX_BOOL IsPageAvail(int iPage, IFX_DownloadHints* pHints) = 0; | 883 virtual int IsPageAvail(int iPage, IFX_DownloadHints* pHints) = 0; |
| 886 virtual FX_BOOL IsLinearized() = 0; | 884 virtual FX_BOOL IsLinearized() = 0; |
| 887 virtual int32_t IsFormAvail(IFX_DownloadHints* pHints) = 0; | 885 virtual int IsFormAvail(IFX_DownloadHints* pHints) = 0; |
| 888 virtual int32_t IsLinearizedPDF() = 0; | 886 virtual int IsLinearizedPDF() = 0; |
| 889 virtual void GetLinearizedMainXRefInfo(FX_FILESIZE* pPos, | 887 virtual void GetLinearizedMainXRefInfo(FX_FILESIZE* pPos, |
| 890 FX_DWORD* pSize) = 0; | 888 FX_DWORD* pSize) = 0; |
| 891 | 889 |
| 892 protected: | 890 protected: |
| 893 IPDF_DataAvail(IFX_FileAvail* pFileAvail, IFX_FileRead* pFileRead); | 891 IPDF_DataAvail(IFX_FileAvail* pFileAvail, IFX_FileRead* pFileRead); |
| 894 | 892 |
| 895 IFX_FileAvail* m_pFileAvail; | 893 IFX_FileAvail* m_pFileAvail; |
| 896 IFX_FileRead* m_pFileRead; | 894 IFX_FileRead* m_pFileRead; |
| 897 }; | 895 }; |
| 898 class CPDF_SortObjNumArray { | 896 class CPDF_SortObjNumArray { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 920 CPDF_PageNode() : m_type(PDF_PAGENODE_UNKOWN) {} | 918 CPDF_PageNode() : m_type(PDF_PAGENODE_UNKOWN) {} |
| 921 ~CPDF_PageNode(); | 919 ~CPDF_PageNode(); |
| 922 PDF_PAGENODE_TYPE m_type; | 920 PDF_PAGENODE_TYPE m_type; |
| 923 FX_DWORD m_dwPageNo; | 921 FX_DWORD m_dwPageNo; |
| 924 CFX_PtrArray m_childNode; | 922 CFX_PtrArray m_childNode; |
| 925 }; | 923 }; |
| 926 enum PDF_DATAAVAIL_STATUS { | 924 enum PDF_DATAAVAIL_STATUS { |
| 927 PDF_DATAAVAIL_HEADER = 0, | 925 PDF_DATAAVAIL_HEADER = 0, |
| 928 PDF_DATAAVAIL_FIRSTPAGE, | 926 PDF_DATAAVAIL_FIRSTPAGE, |
| 929 PDF_DATAAVAIL_FIRSTPAGE_PREPARE, | 927 PDF_DATAAVAIL_FIRSTPAGE_PREPARE, |
| 928 PDF_DATAAVAIL_HINTTABLE, |
| 930 PDF_DATAAVAIL_END, | 929 PDF_DATAAVAIL_END, |
| 931 PDF_DATAAVAIL_CROSSREF, | 930 PDF_DATAAVAIL_CROSSREF, |
| 932 PDF_DATAAVAIL_CROSSREF_ITEM, | 931 PDF_DATAAVAIL_CROSSREF_ITEM, |
| 933 PDF_DATAAVAIL_CROSSREF_STREAM, | 932 PDF_DATAAVAIL_CROSSREF_STREAM, |
| 934 PDF_DATAAVAIL_TRAILER, | 933 PDF_DATAAVAIL_TRAILER, |
| 935 PDF_DATAAVAIL_LOADALLCRSOSSREF, | 934 PDF_DATAAVAIL_LOADALLCRSOSSREF, |
| 936 PDF_DATAAVAIL_ROOT, | 935 PDF_DATAAVAIL_ROOT, |
| 937 PDF_DATAAVAIL_INFO, | 936 PDF_DATAAVAIL_INFO, |
| 938 PDF_DATAAVAIL_ACROFORM, | 937 PDF_DATAAVAIL_ACROFORM, |
| 939 PDF_DATAAVAIL_ACROFORM_SUBOBJECT, | 938 PDF_DATAAVAIL_ACROFORM_SUBOBJECT, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 969 FX_DWORD src_size, | 968 FX_DWORD src_size, |
| 970 const CPDF_Dictionary* pDict, | 969 const CPDF_Dictionary* pDict, |
| 971 uint8_t*& dest_buf, | 970 uint8_t*& dest_buf, |
| 972 FX_DWORD& dest_size, | 971 FX_DWORD& dest_size, |
| 973 CFX_ByteString& ImageEncoding, | 972 CFX_ByteString& ImageEncoding, |
| 974 CPDF_Dictionary*& pImageParms, | 973 CPDF_Dictionary*& pImageParms, |
| 975 FX_DWORD estimated_size, | 974 FX_DWORD estimated_size, |
| 976 FX_BOOL bImageAcc); | 975 FX_BOOL bImageAcc); |
| 977 | 976 |
| 978 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ | 977 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ |
| OLD | NEW |