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_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" | 10 #include "../../../public/fpdf_dataavail.h" |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
292 | 292 |
293 FX_BOOL IsEncrypted() { return m_pCryptoHandler != NULL; } | 293 FX_BOOL IsEncrypted() { return m_pCryptoHandler != NULL; } |
294 | 294 |
295 FX_BOOL GetCharAt(FX_FILESIZE pos, uint8_t& ch); | 295 FX_BOOL GetCharAt(FX_FILESIZE pos, uint8_t& ch); |
296 | 296 |
297 FX_BOOL ReadBlock(uint8_t* pBuf, FX_DWORD size); | 297 FX_BOOL ReadBlock(uint8_t* pBuf, FX_DWORD size); |
298 | 298 |
299 CFX_ByteString GetNextWord(FX_BOOL& bIsNumber); | 299 CFX_ByteString GetNextWord(FX_BOOL& bIsNumber); |
300 | 300 |
301 protected: | 301 protected: |
302 friend class CPDF_Parser; | |
303 friend class CPDF_DataAvail; | |
304 | |
302 static const int kParserMaxRecursionDepth = 64; | 305 static const int kParserMaxRecursionDepth = 64; |
303 static int s_CurrentRecursionDepth; | 306 static int s_CurrentRecursionDepth; |
304 | 307 |
305 virtual FX_BOOL GetNextChar(uint8_t& ch); | 308 virtual FX_BOOL GetNextChar(uint8_t& ch); |
306 | 309 |
307 FX_BOOL GetCharAtBackward(FX_FILESIZE pos, uint8_t& ch); | 310 FX_BOOL GetCharAtBackward(FX_FILESIZE pos, uint8_t& ch); |
308 | 311 |
309 void GetNextWord(); | 312 void GetNextWord(); |
310 | 313 |
311 FX_BOOL IsWholeWord(FX_FILESIZE startpos, | 314 FX_BOOL IsWholeWord(FX_FILESIZE startpos, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
345 | 348 |
346 nonstd::unique_ptr<CPDF_CryptoHandler> m_pCryptoHandler; | 349 nonstd::unique_ptr<CPDF_CryptoHandler> m_pCryptoHandler; |
347 | 350 |
348 uint8_t m_WordBuffer[257]; | 351 uint8_t m_WordBuffer[257]; |
349 | 352 |
350 FX_DWORD m_WordSize; | 353 FX_DWORD m_WordSize; |
351 | 354 |
352 FX_BOOL m_bIsNumber; | 355 FX_BOOL m_bIsNumber; |
353 | 356 |
354 FX_FILESIZE m_dwWordPos; | 357 FX_FILESIZE m_dwWordPos; |
355 friend class CPDF_Parser; | 358 |
356 friend class CPDF_DataAvail; | 359 private: |
Tom Sepez
2015/11/03 17:41:08
Is there anything private in this class that the t
dsinclair
2015/11/03 18:29:49
Nope, left over from a different path I'd tried or
| |
360 friend class fpdf_parser_parser_ReadHexString_Test; | |
357 }; | 361 }; |
358 | 362 |
359 #define PDFPARSE_TYPEONLY 1 | 363 #define PDFPARSE_TYPEONLY 1 |
360 #define PDFPARSE_NOSTREAM 2 | 364 #define PDFPARSE_NOSTREAM 2 |
361 struct PARSE_CONTEXT { | 365 struct PARSE_CONTEXT { |
362 uint32_t m_Flags; | 366 uint32_t m_Flags; |
363 FX_FILESIZE m_DictStart; | 367 FX_FILESIZE m_DictStart; |
364 FX_FILESIZE m_DictEnd; | 368 FX_FILESIZE m_DictEnd; |
365 FX_FILESIZE m_DataStart; | 369 FX_FILESIZE m_DataStart; |
366 FX_FILESIZE m_DataEnd; | 370 FX_FILESIZE m_DataEnd; |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
966 FX_DWORD src_size, | 970 FX_DWORD src_size, |
967 const CPDF_Dictionary* pDict, | 971 const CPDF_Dictionary* pDict, |
968 uint8_t*& dest_buf, | 972 uint8_t*& dest_buf, |
969 FX_DWORD& dest_size, | 973 FX_DWORD& dest_size, |
970 CFX_ByteString& ImageEncoding, | 974 CFX_ByteString& ImageEncoding, |
971 CPDF_Dictionary*& pImageParms, | 975 CPDF_Dictionary*& pImageParms, |
972 FX_DWORD estimated_size, | 976 FX_DWORD estimated_size, |
973 FX_BOOL bImageAcc); | 977 FX_BOOL bImageAcc); |
974 | 978 |
975 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ | 979 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ |
OLD | NEW |