| 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_SRC_FPDFAPI_FPDF_PARSER_CPDF_SYNTAX_PARSER_H_ | 7 #ifndef CORE_SRC_FPDFAPI_FPDF_PARSER_CPDF_SYNTAX_PARSER_H_ |
| 8 #define CORE_SRC_FPDFAPI_FPDF_PARSER_CPDF_SYNTAX_PARSER_H_ | 8 #define CORE_SRC_FPDFAPI_FPDF_PARSER_CPDF_SYNTAX_PARSER_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "core/include/fxcrt/fx_basic.h" | 12 #include "core/include/fxcrt/fx_basic.h" |
| 13 | 13 |
| 14 class CPDF_CryptoHandler; | 14 class IPDF_CryptoHandler; |
| 15 class CPDF_IndirectObjectHolder; | 15 class CPDF_IndirectObjectHolder; |
| 16 class CPDF_Object; | 16 class CPDF_Object; |
| 17 class CPDF_Dictionary; | 17 class CPDF_Dictionary; |
| 18 class CPDF_Stream; | 18 class CPDF_Stream; |
| 19 class IFX_FileRead; | 19 class IFX_FileRead; |
| 20 | 20 |
| 21 class CPDF_SyntaxParser { | 21 class CPDF_SyntaxParser { |
| 22 public: | 22 public: |
| 23 CPDF_SyntaxParser(); | 23 CPDF_SyntaxParser(); |
| 24 ~CPDF_SyntaxParser(); | 24 ~CPDF_SyntaxParser(); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 42 | 42 |
| 43 FX_BOOL SearchWord(const CFX_ByteStringC& word, | 43 FX_BOOL SearchWord(const CFX_ByteStringC& word, |
| 44 FX_BOOL bWholeWord, | 44 FX_BOOL bWholeWord, |
| 45 FX_BOOL bForward, | 45 FX_BOOL bForward, |
| 46 FX_FILESIZE limit); | 46 FX_FILESIZE limit); |
| 47 int SearchMultiWord(const CFX_ByteStringC& words, | 47 int SearchMultiWord(const CFX_ByteStringC& words, |
| 48 FX_BOOL bWholeWord, | 48 FX_BOOL bWholeWord, |
| 49 FX_FILESIZE limit); | 49 FX_FILESIZE limit); |
| 50 FX_FILESIZE FindTag(const CFX_ByteStringC& tag, FX_FILESIZE limit); | 50 FX_FILESIZE FindTag(const CFX_ByteStringC& tag, FX_FILESIZE limit); |
| 51 | 51 |
| 52 void SetEncrypt(std::unique_ptr<CPDF_CryptoHandler> pCryptoHandler); | 52 void SetEncrypt(std::unique_ptr<IPDF_CryptoHandler> pCryptoHandler); |
| 53 | 53 |
| 54 FX_BOOL ReadBlock(uint8_t* pBuf, FX_DWORD size); | 54 FX_BOOL ReadBlock(uint8_t* pBuf, FX_DWORD size); |
| 55 FX_BOOL GetCharAt(FX_FILESIZE pos, uint8_t& ch); | 55 FX_BOOL GetCharAt(FX_FILESIZE pos, uint8_t& ch); |
| 56 CFX_ByteString GetNextWord(bool* bIsNumber); | 56 CFX_ByteString GetNextWord(bool* bIsNumber); |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 friend class CPDF_Parser; | 59 friend class CPDF_Parser; |
| 60 friend class CPDF_DataAvail; | 60 friend class CPDF_DataAvail; |
| 61 friend class fpdf_parser_parser_ReadHexString_Test; | 61 friend class fpdf_parser_parser_ReadHexString_Test; |
| 62 | 62 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 81 FX_DWORD gennum); | 81 FX_DWORD gennum); |
| 82 | 82 |
| 83 FX_FILESIZE m_Pos; | 83 FX_FILESIZE m_Pos; |
| 84 int m_MetadataObjnum; | 84 int m_MetadataObjnum; |
| 85 IFX_FileRead* m_pFileAccess; | 85 IFX_FileRead* m_pFileAccess; |
| 86 FX_DWORD m_HeaderOffset; | 86 FX_DWORD m_HeaderOffset; |
| 87 FX_FILESIZE m_FileLen; | 87 FX_FILESIZE m_FileLen; |
| 88 uint8_t* m_pFileBuf; | 88 uint8_t* m_pFileBuf; |
| 89 FX_DWORD m_BufSize; | 89 FX_DWORD m_BufSize; |
| 90 FX_FILESIZE m_BufOffset; | 90 FX_FILESIZE m_BufOffset; |
| 91 std::unique_ptr<CPDF_CryptoHandler> m_pCryptoHandler; | 91 std::unique_ptr<IPDF_CryptoHandler> m_pCryptoHandler; |
| 92 uint8_t m_WordBuffer[257]; | 92 uint8_t m_WordBuffer[257]; |
| 93 FX_DWORD m_WordSize; | 93 FX_DWORD m_WordSize; |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 #endif // CORE_SRC_FPDFAPI_FPDF_PARSER_CPDF_SYNTAX_PARSER_H_ | 96 #endif // CORE_SRC_FPDFAPI_FPDF_PARSER_CPDF_SYNTAX_PARSER_H_ |
| OLD | NEW |