| 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_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_DATA_AVAIL_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_DATA_AVAIL_H_ |
| 8 #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_DATA_AVAIL_H_ | 8 #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_DATA_AVAIL_H_ |
| 9 | 9 |
| 10 #include "core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h" | 10 #include "core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 virtual void AddSegment(FX_FILESIZE offset, uint32_t size) = 0; | 90 virtual void AddSegment(FX_FILESIZE offset, uint32_t size) = 0; |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 CPDF_DataAvail(FileAvail* pFileAvail, | 93 CPDF_DataAvail(FileAvail* pFileAvail, |
| 94 IFX_FileRead* pFileRead, | 94 IFX_FileRead* pFileRead, |
| 95 FX_BOOL bSupportHintTable); | 95 FX_BOOL bSupportHintTable); |
| 96 ~CPDF_DataAvail(); | 96 ~CPDF_DataAvail(); |
| 97 | 97 |
| 98 DocAvailStatus IsDocAvail(DownloadHints* pHints); | 98 DocAvailStatus IsDocAvail(DownloadHints* pHints); |
| 99 void SetDocument(CPDF_Document* pDoc); | 99 void SetDocument(CPDF_Document* pDoc); |
| 100 DocAvailStatus IsPageAvail(int iPage, DownloadHints* pHints); | 100 DocAvailStatus IsPageAvail(uint32_t dwPage, DownloadHints* pHints); |
| 101 DocFormStatus IsFormAvail(DownloadHints* pHints); | 101 DocFormStatus IsFormAvail(DownloadHints* pHints); |
| 102 DocLinearizationStatus IsLinearizedPDF(); | 102 DocLinearizationStatus IsLinearizedPDF(); |
| 103 FX_BOOL IsLinearized(); | 103 FX_BOOL IsLinearized(); |
| 104 void GetLinearizedMainXRefInfo(FX_FILESIZE* pPos, uint32_t* pSize); | 104 void GetLinearizedMainXRefInfo(FX_FILESIZE* pPos, uint32_t* pSize); |
| 105 IFX_FileRead* GetFileRead() const { return m_pFileRead; } | 105 IFX_FileRead* GetFileRead() const { return m_pFileRead; } |
| 106 int GetPageCount() const; | 106 int GetPageCount() const; |
| 107 CPDF_Dictionary* GetPage(int index); | 107 CPDF_Dictionary* GetPage(int index); |
| 108 | 108 |
| 109 friend class CPDF_HintTables; | 109 friend class CPDF_HintTables; |
| 110 | 110 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 CPDF_IndirectObjectHolder* pObjList = nullptr); | 159 CPDF_IndirectObjectHolder* pObjList = nullptr); |
| 160 CPDF_Object* GetObject(uint32_t objnum, | 160 CPDF_Object* GetObject(uint32_t objnum, |
| 161 DownloadHints* pHints, | 161 DownloadHints* pHints, |
| 162 FX_BOOL* pExistInFile); | 162 FX_BOOL* pExistInFile); |
| 163 FX_BOOL GetPageKids(CPDF_Parser* pParser, CPDF_Object* pPages); | 163 FX_BOOL GetPageKids(CPDF_Parser* pParser, CPDF_Object* pPages); |
| 164 FX_BOOL PreparePageItem(); | 164 FX_BOOL PreparePageItem(); |
| 165 FX_BOOL LoadPages(DownloadHints* pHints); | 165 FX_BOOL LoadPages(DownloadHints* pHints); |
| 166 FX_BOOL LoadAllXref(DownloadHints* pHints); | 166 FX_BOOL LoadAllXref(DownloadHints* pHints); |
| 167 FX_BOOL LoadAllFile(DownloadHints* pHints); | 167 FX_BOOL LoadAllFile(DownloadHints* pHints); |
| 168 DocAvailStatus CheckLinearizedData(DownloadHints* pHints); | 168 DocAvailStatus CheckLinearizedData(DownloadHints* pHints); |
| 169 FX_BOOL CheckPageAnnots(int iPage, DownloadHints* pHints); | 169 FX_BOOL CheckPageAnnots(uint32_t dwPage, DownloadHints* pHints); |
| 170 | 170 |
| 171 DocAvailStatus CheckLinearizedFirstPage(int iPage, DownloadHints* pHints); | 171 DocAvailStatus CheckLinearizedFirstPage(uint32_t dwPage, |
| 172 DownloadHints* pHints); |
| 172 FX_BOOL HaveResourceAncestor(CPDF_Dictionary* pDict); | 173 FX_BOOL HaveResourceAncestor(CPDF_Dictionary* pDict); |
| 173 FX_BOOL CheckPage(int32_t iPage, DownloadHints* pHints); | 174 FX_BOOL CheckPage(uint32_t dwPage, DownloadHints* pHints); |
| 174 FX_BOOL LoadDocPages(DownloadHints* pHints); | 175 FX_BOOL LoadDocPages(DownloadHints* pHints); |
| 175 FX_BOOL LoadDocPage(int32_t iPage, DownloadHints* pHints); | 176 FX_BOOL LoadDocPage(uint32_t dwPage, DownloadHints* pHints); |
| 176 FX_BOOL CheckPageNode(PageNode& pageNodes, | 177 FX_BOOL CheckPageNode(PageNode& pageNodes, |
| 177 int32_t iPage, | 178 int32_t iPage, |
| 178 int32_t& iCount, | 179 int32_t& iCount, |
| 179 DownloadHints* pHints, | 180 DownloadHints* pHints, |
| 180 int level); | 181 int level); |
| 181 FX_BOOL CheckUnkownPageNode(uint32_t dwPageNo, | 182 FX_BOOL CheckUnkownPageNode(uint32_t dwPageNo, |
| 182 PageNode* pPageNode, | 183 PageNode* pPageNode, |
| 183 DownloadHints* pHints); | 184 DownloadHints* pHints); |
| 184 FX_BOOL CheckArrayPageNode(uint32_t dwPageNo, | 185 FX_BOOL CheckArrayPageNode(uint32_t dwPageNo, |
| 185 PageNode* pPageNode, | 186 PageNode* pPageNode, |
| 186 DownloadHints* pHints); | 187 DownloadHints* pHints); |
| 187 FX_BOOL CheckPageCount(DownloadHints* pHints); | 188 FX_BOOL CheckPageCount(DownloadHints* pHints); |
| 188 bool IsFirstCheck(int iPage); | 189 bool IsFirstCheck(uint32_t dwPage); |
| 189 void ResetFirstCheck(int iPage); | 190 void ResetFirstCheck(uint32_t dwPage); |
| 190 FX_BOOL IsDataAvail(FX_FILESIZE offset, uint32_t size, DownloadHints* pHints); | 191 FX_BOOL IsDataAvail(FX_FILESIZE offset, uint32_t size, DownloadHints* pHints); |
| 191 | 192 |
| 192 FileAvail* const m_pFileAvail; | 193 FileAvail* const m_pFileAvail; |
| 193 IFX_FileRead* const m_pFileRead; | 194 IFX_FileRead* const m_pFileRead; |
| 194 CPDF_Parser m_parser; | 195 CPDF_Parser m_parser; |
| 195 CPDF_SyntaxParser m_syntaxParser; | 196 CPDF_SyntaxParser m_syntaxParser; |
| 196 CPDF_Object* m_pRoot; | 197 CPDF_Object* m_pRoot; |
| 197 uint32_t m_dwRootObjNum; | 198 uint32_t m_dwRootObjNum; |
| 198 uint32_t m_dwInfoObjNum; | 199 uint32_t m_dwInfoObjNum; |
| 199 CPDF_Object* m_pLinearized; | 200 CPDF_Object* m_pLinearized; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 FX_BOOL m_bTotalLoadPageTree; | 244 FX_BOOL m_bTotalLoadPageTree; |
| 244 FX_BOOL m_bCurPageDictLoadOK; | 245 FX_BOOL m_bCurPageDictLoadOK; |
| 245 PageNode m_pageNodes; | 246 PageNode m_pageNodes; |
| 246 std::set<uint32_t> m_pageMapCheckState; | 247 std::set<uint32_t> m_pageMapCheckState; |
| 247 std::set<uint32_t> m_pagesLoadState; | 248 std::set<uint32_t> m_pagesLoadState; |
| 248 std::unique_ptr<CPDF_HintTables> m_pHintTables; | 249 std::unique_ptr<CPDF_HintTables> m_pHintTables; |
| 249 FX_BOOL m_bSupportHintTable; | 250 FX_BOOL m_bSupportHintTable; |
| 250 }; | 251 }; |
| 251 | 252 |
| 252 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_DATA_AVAIL_H_ | 253 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_DATA_AVAIL_H_ |
| OLD | NEW |