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_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_ | 7 #ifndef CORE_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_ |
8 #define CORE_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_ | 8 #define CORE_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_ |
9 | 9 |
| 10 #include "core/include/fxcrt/fx_basic.h" |
| 11 #include "core/include/fxcrt/fx_stream.h" |
| 12 |
| 13 class CFX_BitStream; |
10 class CPDF_DataAvail; | 14 class CPDF_DataAvail; |
| 15 class CPDF_Dictionary; |
| 16 class CPDF_Stream; |
| 17 class IFX_DownloadHints; |
11 | 18 |
12 class CPDF_HintTables { | 19 class CPDF_HintTables { |
13 public: | 20 public: |
14 CPDF_HintTables(CPDF_DataAvail* pDataAvail, CPDF_Dictionary* pLinearized) | 21 CPDF_HintTables(CPDF_DataAvail* pDataAvail, CPDF_Dictionary* pLinearized) |
15 : m_pLinearizedDict(pLinearized), | 22 : m_pLinearizedDict(pLinearized), |
16 m_pDataAvail(pDataAvail), | 23 m_pDataAvail(pDataAvail), |
17 m_nFirstPageSharedObjs(0), | 24 m_nFirstPageSharedObjs(0), |
18 m_szFirstPageObjOffset(0) {} | 25 m_szFirstPageObjOffset(0) {} |
19 ~CPDF_HintTables(); | 26 ~CPDF_HintTables(); |
| 27 |
20 FX_BOOL GetPagePos(int index, | 28 FX_BOOL GetPagePos(int index, |
21 FX_FILESIZE& szPageStartPos, | 29 FX_FILESIZE& szPageStartPos, |
22 FX_FILESIZE& szPageLength, | 30 FX_FILESIZE& szPageLength, |
23 FX_DWORD& dwObjNum); | 31 FX_DWORD& dwObjNum); |
24 FX_BOOL CheckPage(int index, IFX_DownloadHints* pHints); | 32 FX_BOOL CheckPage(int index, IFX_DownloadHints* pHints); |
25 FX_BOOL LoadHintStream(CPDF_Stream* pHintStream); | 33 FX_BOOL LoadHintStream(CPDF_Stream* pHintStream); |
26 | 34 |
27 protected: | 35 protected: |
28 FX_BOOL ReadPageHintTable(CFX_BitStream* hStream); | 36 FX_BOOL ReadPageHintTable(CFX_BitStream* hStream); |
29 FX_BOOL ReadSharedObjHintTable(CFX_BitStream* hStream); | 37 FX_BOOL ReadSharedObjHintTable(CFX_BitStream* hStream); |
30 FX_DWORD GetItemLength(int index, const CFX_FileSizeArray& szArray); | 38 FX_DWORD GetItemLength(int index, const CFX_FileSizeArray& szArray); |
31 | 39 |
32 private: | 40 private: |
33 int ReadPrimaryHintStreamOffset() const; | 41 int ReadPrimaryHintStreamOffset() const; |
34 int ReadPrimaryHintStreamLength() const; | 42 int ReadPrimaryHintStreamLength() const; |
35 | 43 |
36 CPDF_Dictionary* m_pLinearizedDict; | 44 CPDF_Dictionary* m_pLinearizedDict; |
37 CPDF_DataAvail* m_pDataAvail; | 45 CPDF_DataAvail* m_pDataAvail; |
38 FX_DWORD m_nFirstPageSharedObjs; | 46 FX_DWORD m_nFirstPageSharedObjs; |
39 FX_FILESIZE m_szFirstPageObjOffset; | 47 FX_FILESIZE m_szFirstPageObjOffset; |
40 CFX_DWordArray m_dwDeltaNObjsArray; | 48 CFX_DWordArray m_dwDeltaNObjsArray; |
41 CFX_DWordArray m_dwNSharedObjsArray; | 49 CFX_DWordArray m_dwNSharedObjsArray; |
42 CFX_DWordArray m_dwSharedObjNumArray; | 50 CFX_DWordArray m_dwSharedObjNumArray; |
43 CFX_DWordArray m_dwIdentifierArray; | 51 CFX_DWordArray m_dwIdentifierArray; |
44 CFX_FileSizeArray m_szPageOffsetArray; | 52 CFX_FileSizeArray m_szPageOffsetArray; |
45 CFX_FileSizeArray m_szSharedObjOffsetArray; | 53 CFX_FileSizeArray m_szSharedObjOffsetArray; |
46 }; | 54 }; |
| 55 |
47 #endif // CORE_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_ | 56 #endif // CORE_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_ |
OLD | NEW |