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

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

Issue 1419373005: Make checkdeps --resolve-dotdot succeed. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years, 1 month 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
« no previous file with comments | « DEPS ('k') | core/include/fpdfapi/fpdf_render.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_dataavail.h"
11 #include "../../../third_party/base/nonstd_unique_ptr.h" 10 #include "../../../third_party/base/nonstd_unique_ptr.h"
12 #include "../fxcrt/fx_system.h" 11 #include "../fxcrt/fx_system.h"
13 #include "fpdf_objects.h" 12 #include "fpdf_objects.h"
14 13
15 class CFDF_Document; 14 class CFDF_Document;
16 class CFDF_Parser; 15 class CFDF_Parser;
17 class CFX_AffineMatrix; 16 class CFX_AffineMatrix;
18 class CFX_DIBSource; 17 class CFX_DIBSource;
19 class CFX_FloatRect; 18 class CFX_FloatRect;
20 class CFX_Font; 19 class CFX_Font;
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 virtual FX_BOOL IsDataAvail(FX_FILESIZE offset, FX_DWORD size) = 0; 863 virtual FX_BOOL IsDataAvail(FX_FILESIZE offset, FX_DWORD size) = 0;
865 }; 864 };
866 class IFX_DownloadHints { 865 class IFX_DownloadHints {
867 public: 866 public:
868 virtual ~IFX_DownloadHints() {} 867 virtual ~IFX_DownloadHints() {}
869 virtual void AddSegment(FX_FILESIZE offset, FX_DWORD size) = 0; 868 virtual void AddSegment(FX_FILESIZE offset, FX_DWORD size) = 0;
870 }; 869 };
871 870
872 class IPDF_DataAvail { 871 class IPDF_DataAvail {
873 public: 872 public:
873 // Must match PDF_DATA_* definitions in public/fpdf_dataavail.h, but cannot
874 // #include that header. fpdfsdk/src/fpdf_dataavail.cpp has static_asserts
875 // to make sure the two sets of values match.
876 enum DocAvailStatus {
877 DataError = -1, // PDF_DATA_ERROR
878 DataNotAvailable = 0, // PDF_DATA_NOTAVAIL
879 DataAvailable = 1, // PDF_DATA_AVAIL
880 };
881
882 // Must match PDF_*LINEAR* definitions in public/fpdf_dataavail.h, but cannot
883 // #include that header. fpdfsdk/src/fpdf_dataavail.cpp has static_asserts
884 // to make sure the two sets of values match.
885 enum DocLinearizationStatus {
886 LinearizationUnknown = -1, // PDF_LINEARIZATION_UNKNOWN
887 NotLinearized = 0, // PDF_NOT_LINEARIZED
888 Linearized = 1, // PDF_LINEARIZED
889 };
890
891 // Must match PDF_FORM_* definitions in public/fpdf_dataavail.h, but cannot
892 // #include that header. fpdfsdk/src/fpdf_dataavail.cpp has static_asserts
893 // to make sure the two sets of values match.
894 enum DocFormStatus {
895 FormError = -1, // PDF_FORM_ERROR
896 FormNotAvailable = 0, // PDF_FORM_NOTAVAIL
897 FormAvailable = 1, // PDF_FORM_AVAIL
898 FormNotExist = 2, // PDF_FORM_NOTEXIST
899 };
900
874 static IPDF_DataAvail* Create(IFX_FileAvail* pFileAvail, 901 static IPDF_DataAvail* Create(IFX_FileAvail* pFileAvail,
875 IFX_FileRead* pFileRead); 902 IFX_FileRead* pFileRead);
876 virtual ~IPDF_DataAvail() {} 903 virtual ~IPDF_DataAvail() {}
877 904
878 IFX_FileAvail* GetFileAvail() const { return m_pFileAvail; } 905 IFX_FileAvail* GetFileAvail() const { return m_pFileAvail; }
879 IFX_FileRead* GetFileRead() const { return m_pFileRead; } 906 IFX_FileRead* GetFileRead() const { return m_pFileRead; }
880 907
881 virtual int IsDocAvail(IFX_DownloadHints* pHints) = 0; 908 virtual DocAvailStatus IsDocAvail(IFX_DownloadHints* pHints) = 0;
882 virtual void SetDocument(CPDF_Document* pDoc) = 0; 909 virtual void SetDocument(CPDF_Document* pDoc) = 0;
883 virtual int IsPageAvail(int iPage, IFX_DownloadHints* pHints) = 0; 910 virtual int IsPageAvail(int iPage, IFX_DownloadHints* pHints) = 0;
884 virtual FX_BOOL IsLinearized() = 0; 911 virtual FX_BOOL IsLinearized() = 0;
885 virtual int IsFormAvail(IFX_DownloadHints* pHints) = 0; 912 virtual DocFormStatus IsFormAvail(IFX_DownloadHints* pHints) = 0;
886 virtual int IsLinearizedPDF() = 0; 913 virtual DocLinearizationStatus IsLinearizedPDF() = 0;
887 virtual void GetLinearizedMainXRefInfo(FX_FILESIZE* pPos, 914 virtual void GetLinearizedMainXRefInfo(FX_FILESIZE* pPos,
888 FX_DWORD* pSize) = 0; 915 FX_DWORD* pSize) = 0;
889 916
890 protected: 917 protected:
891 IPDF_DataAvail(IFX_FileAvail* pFileAvail, IFX_FileRead* pFileRead); 918 IPDF_DataAvail(IFX_FileAvail* pFileAvail, IFX_FileRead* pFileRead);
892 919
893 IFX_FileAvail* m_pFileAvail; 920 IFX_FileAvail* m_pFileAvail;
894 IFX_FileRead* m_pFileRead; 921 IFX_FileRead* m_pFileRead;
895 }; 922 };
896 class CPDF_SortObjNumArray { 923 class CPDF_SortObjNumArray {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 FX_DWORD src_size, 995 FX_DWORD src_size,
969 const CPDF_Dictionary* pDict, 996 const CPDF_Dictionary* pDict,
970 uint8_t*& dest_buf, 997 uint8_t*& dest_buf,
971 FX_DWORD& dest_size, 998 FX_DWORD& dest_size,
972 CFX_ByteString& ImageEncoding, 999 CFX_ByteString& ImageEncoding,
973 CPDF_Dictionary*& pImageParms, 1000 CPDF_Dictionary*& pImageParms,
974 FX_DWORD estimated_size, 1001 FX_DWORD estimated_size,
975 FX_BOOL bImageAcc); 1002 FX_BOOL bImageAcc);
976 1003
977 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ 1004 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_
OLDNEW
« no previous file with comments | « DEPS ('k') | core/include/fpdfapi/fpdf_render.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698