Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: core/include/fpdfapi/fpdf_parser.h

Issue 1353093003: Support linearized loading (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "../../../public/fpdf_macro.h"
Tom Sepez 2015/10/14 16:57:45 this should just include public/fpdf_datavail.h, n
jun_fang 2015/10/15 10:22:28 Pdfium has two parts, sdk and core. sdk has the de
Tom Sepez 2015/10/15 16:20:04 Nah, it's much better to keep the declarations nea
jun_fang 2015/10/19 13:20:30 Acknowledged.
10 #include "../fxcrt/fx_system.h" 11 #include "../fxcrt/fx_system.h"
11 #include "fpdf_objects.h" 12 #include "fpdf_objects.h"
12 13
14 class CFDF_Document;
15 class CFDF_Parser;
16 class CFX_AffineMatrix;
17 class CFX_DIBSource;
18 class CFX_FloatRect;
19 class CFX_Font;
20 class CFX_PrivateData;
21 class CPDF_ColorSpace;
22 class CPDF_CryptoHandler;
23 class CPDF_DocPageData;
24 class CPDF_DocRenderData;
13 class CPDF_Document; 25 class CPDF_Document;
26 class CPDF_Font;
27 class CPDF_FontEncoding;
28 class CPDF_HintTables;
29 class CPDF_IccProfile;
30 class CPDF_Image;
31 class CPDF_ModuleMgr;
32 class CPDF_Object;
14 class CPDF_Parser; 33 class CPDF_Parser;
34 class CPDF_Pattern;
35 class CPDF_Point;
15 class CPDF_SecurityHandler; 36 class CPDF_SecurityHandler;
16 class CPDF_StandardSecurityHandler; 37 class CPDF_StandardSecurityHandler;
17 class CPDF_CryptoHandler;
18 class CPDF_Object;
19 class IFX_FileRead; 38 class IFX_FileRead;
20 class CFDF_Document; 39
21 class CFDF_Parser;
22 class CFX_Font;
23 class CFX_AffineMatrix;
24 class CFX_FloatRect;
25 class CPDF_Point;
26 class CPDF_DocPageData;
27 class CPDF_DocRenderData;
28 class CPDF_ModuleMgr;
29 class CFX_DIBSource;
30 class CPDF_Font;
31 class CPDF_Image;
32 class CPDF_ColorSpace;
33 class CPDF_Pattern;
34 class CPDF_FontEncoding;
35 class CPDF_IccProfile;
36 class CFX_PrivateData;
37 #define FPDFPERM_PRINT 0x0004 40 #define FPDFPERM_PRINT 0x0004
38 #define FPDFPERM_MODIFY 0x0008 41 #define FPDFPERM_MODIFY 0x0008
39 #define FPDFPERM_EXTRACT 0x0010 42 #define FPDFPERM_EXTRACT 0x0010
40 #define FPDFPERM_ANNOT_FORM 0x0020 43 #define FPDFPERM_ANNOT_FORM 0x0020
41 #define FPDFPERM_FILL_FORM 0x0100 44 #define FPDFPERM_FILL_FORM 0x0100
42 #define FPDFPERM_EXTRACT_ACCESS 0x0200 45 #define FPDFPERM_EXTRACT_ACCESS 0x0200
43 #define FPDFPERM_ASSEMBLE 0x0400 46 #define FPDFPERM_ASSEMBLE 0x0400
44 #define FPDFPERM_PRINT_HIGH 0x0800 47 #define FPDFPERM_PRINT_HIGH 0x0800
45 #define FPDF_PAGE_MAX_NUM 0xFFFFF 48 #define FPDF_PAGE_MAX_NUM 0xFFFFF
46 49
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 class IFX_FileAvail { 841 class IFX_FileAvail {
839 public: 842 public:
840 virtual ~IFX_FileAvail() {} 843 virtual ~IFX_FileAvail() {}
841 virtual FX_BOOL IsDataAvail(FX_FILESIZE offset, FX_DWORD size) = 0; 844 virtual FX_BOOL IsDataAvail(FX_FILESIZE offset, FX_DWORD size) = 0;
842 }; 845 };
843 class IFX_DownloadHints { 846 class IFX_DownloadHints {
844 public: 847 public:
845 virtual ~IFX_DownloadHints() {} 848 virtual ~IFX_DownloadHints() {}
846 virtual void AddSegment(FX_FILESIZE offset, FX_DWORD size) = 0; 849 virtual void AddSegment(FX_FILESIZE offset, FX_DWORD size) = 0;
847 }; 850 };
848 #define PDF_IS_LINEARIZED 1 851
849 #define PDF_NOT_LINEARIZED 0
850 #define PDF_UNKNOW_LINEARIZED -1
851 #define PDFFORM_NOTAVAIL 0
852 #define PDFFORM_AVAIL 1
853 #define PDFFORM_NOTEXIST 2
854 class IPDF_DataAvail { 852 class IPDF_DataAvail {
855 public: 853 public:
856 static IPDF_DataAvail* Create(IFX_FileAvail* pFileAvail, 854 static IPDF_DataAvail* Create(IFX_FileAvail* pFileAvail,
857 IFX_FileRead* pFileRead); 855 IFX_FileRead* pFileRead);
858 virtual ~IPDF_DataAvail() {} 856 virtual ~IPDF_DataAvail() {}
859 857
860 IFX_FileAvail* GetFileAvail() const { return m_pFileAvail; } 858 IFX_FileAvail* GetFileAvail() const { return m_pFileAvail; }
861 IFX_FileRead* GetFileRead() const { return m_pFileRead; } 859 IFX_FileRead* GetFileRead() const { return m_pFileRead; }
862 860
863 virtual FX_BOOL IsDocAvail(IFX_DownloadHints* pHints) = 0; 861 virtual FX_BOOL IsDocAvail(IFX_DownloadHints* pHints) = 0;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 CPDF_PageNode() : m_type(PDF_PAGENODE_UNKOWN) {} 898 CPDF_PageNode() : m_type(PDF_PAGENODE_UNKOWN) {}
901 ~CPDF_PageNode(); 899 ~CPDF_PageNode();
902 PDF_PAGENODE_TYPE m_type; 900 PDF_PAGENODE_TYPE m_type;
903 FX_DWORD m_dwPageNo; 901 FX_DWORD m_dwPageNo;
904 CFX_PtrArray m_childNode; 902 CFX_PtrArray m_childNode;
905 }; 903 };
906 enum PDF_DATAAVAIL_STATUS { 904 enum PDF_DATAAVAIL_STATUS {
907 PDF_DATAAVAIL_HEADER = 0, 905 PDF_DATAAVAIL_HEADER = 0,
908 PDF_DATAAVAIL_FIRSTPAGE, 906 PDF_DATAAVAIL_FIRSTPAGE,
909 PDF_DATAAVAIL_FIRSTPAGE_PREPARE, 907 PDF_DATAAVAIL_FIRSTPAGE_PREPARE,
908 PDF_DATAAVAIL_HINTTABLE,
910 PDF_DATAAVAIL_END, 909 PDF_DATAAVAIL_END,
911 PDF_DATAAVAIL_CROSSREF, 910 PDF_DATAAVAIL_CROSSREF,
912 PDF_DATAAVAIL_CROSSREF_ITEM, 911 PDF_DATAAVAIL_CROSSREF_ITEM,
913 PDF_DATAAVAIL_CROSSREF_STREAM, 912 PDF_DATAAVAIL_CROSSREF_STREAM,
914 PDF_DATAAVAIL_TRAILER, 913 PDF_DATAAVAIL_TRAILER,
915 PDF_DATAAVAIL_LOADALLCRSOSSREF, 914 PDF_DATAAVAIL_LOADALLCRSOSSREF,
916 PDF_DATAAVAIL_ROOT, 915 PDF_DATAAVAIL_ROOT,
917 PDF_DATAAVAIL_INFO, 916 PDF_DATAAVAIL_INFO,
918 PDF_DATAAVAIL_ACROFORM, 917 PDF_DATAAVAIL_ACROFORM,
919 PDF_DATAAVAIL_ACROFORM_SUBOBJECT, 918 PDF_DATAAVAIL_ACROFORM_SUBOBJECT,
(...skipping 11 matching lines...) Expand all
931 FX_DWORD src_size, 930 FX_DWORD src_size,
932 const CPDF_Dictionary* pDict, 931 const CPDF_Dictionary* pDict,
933 uint8_t*& dest_buf, 932 uint8_t*& dest_buf,
934 FX_DWORD& dest_size, 933 FX_DWORD& dest_size,
935 CFX_ByteString& ImageEncoding, 934 CFX_ByteString& ImageEncoding,
936 CPDF_Dictionary*& pImageParms, 935 CPDF_Dictionary*& pImageParms,
937 FX_DWORD estimated_size, 936 FX_DWORD estimated_size,
938 FX_BOOL bImageAcc); 937 FX_BOOL bImageAcc);
939 938
940 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ 939 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698