| 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 XFA_FGAS_XML_FGAS_SAX_H_ | 7 #ifndef XFA_FGAS_XML_FGAS_SAX_H_ |
| 8 #define XFA_FGAS_XML_FGAS_SAX_H_ | 8 #define XFA_FGAS_XML_FGAS_SAX_H_ |
| 9 | 9 |
| 10 #include "core/fxcrt/include/fx_basic.h" | 10 #include "core/fxcrt/include/fx_basic.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 FX_SAXNODE_Tag, | 25 FX_SAXNODE_Tag, |
| 26 FX_SAXNODE_Text, | 26 FX_SAXNODE_Text, |
| 27 FX_SAXNODE_CharData, | 27 FX_SAXNODE_CharData, |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 class IFX_SAXReaderHandler { | 30 class IFX_SAXReaderHandler { |
| 31 public: | 31 public: |
| 32 virtual ~IFX_SAXReaderHandler() {} | 32 virtual ~IFX_SAXReaderHandler() {} |
| 33 virtual void* OnTagEnter(const CFX_ByteStringC& bsTagName, | 33 virtual void* OnTagEnter(const CFX_ByteStringC& bsTagName, |
| 34 FX_SAXNODE eType, | 34 FX_SAXNODE eType, |
| 35 FX_DWORD dwStartPos) = 0; | 35 uint32_t dwStartPos) = 0; |
| 36 virtual void OnTagAttribute(void* pTag, | 36 virtual void OnTagAttribute(void* pTag, |
| 37 const CFX_ByteStringC& bsAttri, | 37 const CFX_ByteStringC& bsAttri, |
| 38 const CFX_ByteStringC& bsValue) = 0; | 38 const CFX_ByteStringC& bsValue) = 0; |
| 39 virtual void OnTagBreak(void* pTag) = 0; | 39 virtual void OnTagBreak(void* pTag) = 0; |
| 40 virtual void OnTagData(void* pTag, | 40 virtual void OnTagData(void* pTag, |
| 41 FX_SAXNODE eType, | 41 FX_SAXNODE eType, |
| 42 const CFX_ByteStringC& bsData, | 42 const CFX_ByteStringC& bsData, |
| 43 FX_DWORD dwStartPos) = 0; | 43 uint32_t dwStartPos) = 0; |
| 44 virtual void OnTagClose(void* pTag, FX_DWORD dwEndPos) = 0; | 44 virtual void OnTagClose(void* pTag, uint32_t dwEndPos) = 0; |
| 45 virtual void OnTagEnd(void* pTag, | 45 virtual void OnTagEnd(void* pTag, |
| 46 const CFX_ByteStringC& bsTagName, | 46 const CFX_ByteStringC& bsTagName, |
| 47 FX_DWORD dwEndPos) = 0; | 47 uint32_t dwEndPos) = 0; |
| 48 virtual void OnTargetData(void* pTag, | 48 virtual void OnTargetData(void* pTag, |
| 49 FX_SAXNODE eType, | 49 FX_SAXNODE eType, |
| 50 const CFX_ByteStringC& bsData, | 50 const CFX_ByteStringC& bsData, |
| 51 FX_DWORD dwStartPos) = 0; | 51 uint32_t dwStartPos) = 0; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 class IFX_SAXReader { | 54 class IFX_SAXReader { |
| 55 public: | 55 public: |
| 56 virtual ~IFX_SAXReader() {} | 56 virtual ~IFX_SAXReader() {} |
| 57 virtual void Release() = 0; | 57 virtual void Release() = 0; |
| 58 virtual int32_t StartParse(IFX_FileRead* pFile, | 58 virtual int32_t StartParse(IFX_FileRead* pFile, |
| 59 FX_DWORD dwStart = 0, | 59 uint32_t dwStart = 0, |
| 60 FX_DWORD dwLen = -1, | 60 uint32_t dwLen = -1, |
| 61 FX_DWORD dwParseMode = 0) = 0; | 61 uint32_t dwParseMode = 0) = 0; |
| 62 virtual int32_t ContinueParse(IFX_Pause* pPause = NULL) = 0; | 62 virtual int32_t ContinueParse(IFX_Pause* pPause = NULL) = 0; |
| 63 virtual void SkipCurrentNode() = 0; | 63 virtual void SkipCurrentNode() = 0; |
| 64 virtual void SetHandler(IFX_SAXReaderHandler* pHandler) = 0; | 64 virtual void SetHandler(IFX_SAXReaderHandler* pHandler) = 0; |
| 65 }; | 65 }; |
| 66 IFX_SAXReader* FX_SAXReader_Create(); | 66 IFX_SAXReader* FX_SAXReader_Create(); |
| 67 | 67 |
| 68 #endif // XFA_FGAS_XML_FGAS_SAX_H_ | 68 #endif // XFA_FGAS_XML_FGAS_SAX_H_ |
| OLD | NEW |