| 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_PARSER_CPDF_DATA_AVAIL_H_ | 7 #ifndef CORE_FPDFAPI_PARSER_CPDF_DATA_AVAIL_H_ |
| 8 #define CORE_FPDFAPI_PARSER_CPDF_DATA_AVAIL_H_ | 8 #define CORE_FPDFAPI_PARSER_CPDF_DATA_AVAIL_H_ |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "core/fpdfapi/parser/cpdf_parser.h" | 12 #include "core/fpdfapi/parser/cpdf_parser.h" |
| 13 #include "core/fpdfapi/parser/cpdf_syntax_parser.h" | 13 #include "core/fpdfapi/parser/cpdf_syntax_parser.h" |
| 14 #include "core/fxcrt/fx_basic.h" | 14 #include "core/fxcrt/fx_basic.h" |
| 15 | 15 |
| 16 class CPDF_Dictionary; | 16 class CPDF_Dictionary; |
| 17 class CPDF_HintTables; | 17 class CPDF_HintTables; |
| 18 class CPDF_IndirectObjectHolder; | 18 class CPDF_IndirectObjectHolder; |
| 19 class CPDF_Linearized; |
| 19 class CPDF_Parser; | 20 class CPDF_Parser; |
| 20 | 21 |
| 21 enum PDF_DATAAVAIL_STATUS { | 22 enum PDF_DATAAVAIL_STATUS { |
| 22 PDF_DATAAVAIL_HEADER = 0, | 23 PDF_DATAAVAIL_HEADER = 0, |
| 23 PDF_DATAAVAIL_FIRSTPAGE, | 24 PDF_DATAAVAIL_FIRSTPAGE, |
| 24 PDF_DATAAVAIL_FIRSTPAGE_PREPARE, | 25 PDF_DATAAVAIL_FIRSTPAGE_PREPARE, |
| 25 PDF_DATAAVAIL_HINTTABLE, | 26 PDF_DATAAVAIL_HINTTABLE, |
| 26 PDF_DATAAVAIL_END, | 27 PDF_DATAAVAIL_END, |
| 27 PDF_DATAAVAIL_CROSSREF, | 28 PDF_DATAAVAIL_CROSSREF, |
| 28 PDF_DATAAVAIL_CROSSREF_ITEM, | 29 PDF_DATAAVAIL_CROSSREF_ITEM, |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 void ResetFirstCheck(uint32_t dwPage); | 193 void ResetFirstCheck(uint32_t dwPage); |
| 193 bool IsDataAvail(FX_FILESIZE offset, uint32_t size, DownloadHints* pHints); | 194 bool IsDataAvail(FX_FILESIZE offset, uint32_t size, DownloadHints* pHints); |
| 194 | 195 |
| 195 FileAvail* const m_pFileAvail; | 196 FileAvail* const m_pFileAvail; |
| 196 IFX_SeekableReadStream* const m_pFileRead; | 197 IFX_SeekableReadStream* const m_pFileRead; |
| 197 CPDF_Parser m_parser; | 198 CPDF_Parser m_parser; |
| 198 CPDF_SyntaxParser m_syntaxParser; | 199 CPDF_SyntaxParser m_syntaxParser; |
| 199 CPDF_Object* m_pRoot; | 200 CPDF_Object* m_pRoot; |
| 200 uint32_t m_dwRootObjNum; | 201 uint32_t m_dwRootObjNum; |
| 201 uint32_t m_dwInfoObjNum; | 202 uint32_t m_dwInfoObjNum; |
| 202 CPDF_Object* m_pLinearized; | 203 std::unique_ptr<CPDF_Linearized> m_pLinearized; |
| 203 CPDF_Object* m_pTrailer; | 204 CPDF_Object* m_pTrailer; |
| 204 bool m_bDocAvail; | 205 bool m_bDocAvail; |
| 205 FX_FILESIZE m_dwHeaderOffset; | 206 FX_FILESIZE m_dwHeaderOffset; |
| 206 FX_FILESIZE m_dwLastXRefOffset; | 207 FX_FILESIZE m_dwLastXRefOffset; |
| 207 FX_FILESIZE m_dwXRefOffset; | 208 FX_FILESIZE m_dwXRefOffset; |
| 208 FX_FILESIZE m_dwTrailerOffset; | 209 FX_FILESIZE m_dwTrailerOffset; |
| 209 FX_FILESIZE m_dwCurrentOffset; | 210 FX_FILESIZE m_dwCurrentOffset; |
| 210 PDF_DATAAVAIL_STATUS m_docStatus; | 211 PDF_DATAAVAIL_STATUS m_docStatus; |
| 211 FX_FILESIZE m_dwFileLen; | 212 FX_FILESIZE m_dwFileLen; |
| 212 CPDF_Document* m_pDocument; | 213 CPDF_Document* m_pDocument; |
| 213 std::set<uint32_t> m_ObjectSet; | 214 std::set<uint32_t> m_ObjectSet; |
| 214 std::vector<CPDF_Object*> m_objs_array; | 215 std::vector<CPDF_Object*> m_objs_array; |
| 215 FX_FILESIZE m_Pos; | 216 FX_FILESIZE m_Pos; |
| 216 FX_FILESIZE m_bufferOffset; | 217 FX_FILESIZE m_bufferOffset; |
| 217 uint32_t m_bufferSize; | 218 uint32_t m_bufferSize; |
| 218 CFX_ByteString m_WordBuf; | 219 CFX_ByteString m_WordBuf; |
| 219 uint8_t m_bufferData[512]; | 220 uint8_t m_bufferData[512]; |
| 220 CFX_ArrayTemplate<uint32_t> m_XRefStreamList; | 221 CFX_ArrayTemplate<uint32_t> m_XRefStreamList; |
| 221 CFX_ArrayTemplate<uint32_t> m_PageObjList; | 222 CFX_ArrayTemplate<uint32_t> m_PageObjList; |
| 222 uint32_t m_PagesObjNum; | 223 uint32_t m_PagesObjNum; |
| 223 bool m_bLinearized; | |
| 224 uint32_t m_dwFirstPageNo; | |
| 225 bool m_bLinearedDataOK; | 224 bool m_bLinearedDataOK; |
| 226 bool m_bMainXRefLoadTried; | 225 bool m_bMainXRefLoadTried; |
| 227 bool m_bMainXRefLoadedOK; | 226 bool m_bMainXRefLoadedOK; |
| 228 bool m_bPagesTreeLoad; | 227 bool m_bPagesTreeLoad; |
| 229 bool m_bPagesLoad; | 228 bool m_bPagesLoad; |
| 230 CPDF_Parser* m_pCurrentParser; | 229 CPDF_Parser* m_pCurrentParser; |
| 231 FX_FILESIZE m_dwCurrentXRefSteam; | 230 FX_FILESIZE m_dwCurrentXRefSteam; |
| 232 bool m_bAnnotsLoad; | 231 bool m_bAnnotsLoad; |
| 233 bool m_bHaveAcroForm; | 232 bool m_bHaveAcroForm; |
| 234 uint32_t m_dwAcroFormObjNum; | 233 uint32_t m_dwAcroFormObjNum; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 246 bool m_bTotalLoadPageTree; | 245 bool m_bTotalLoadPageTree; |
| 247 bool m_bCurPageDictLoadOK; | 246 bool m_bCurPageDictLoadOK; |
| 248 PageNode m_pageNodes; | 247 PageNode m_pageNodes; |
| 249 std::set<uint32_t> m_pageMapCheckState; | 248 std::set<uint32_t> m_pageMapCheckState; |
| 250 std::set<uint32_t> m_pagesLoadState; | 249 std::set<uint32_t> m_pagesLoadState; |
| 251 std::unique_ptr<CPDF_HintTables> m_pHintTables; | 250 std::unique_ptr<CPDF_HintTables> m_pHintTables; |
| 252 bool m_bSupportHintTable; | 251 bool m_bSupportHintTable; |
| 253 }; | 252 }; |
| 254 | 253 |
| 255 #endif // CORE_FPDFAPI_PARSER_CPDF_DATA_AVAIL_H_ | 254 #endif // CORE_FPDFAPI_PARSER_CPDF_DATA_AVAIL_H_ |
| OLD | NEW |