| 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_FDE_XML_FDE_XML_H_ | 7 #ifndef XFA_FDE_XML_FDE_XML_H_ |
| 8 #define XFA_FDE_XML_FDE_XML_H_ | 8 #define XFA_FDE_XML_FDE_XML_H_ |
| 9 | 9 |
| 10 #include "xfa/fgas/crt/fgas_stream.h" | 10 #include "core/fxcrt/include/fx_system.h" |
| 11 #include "xfa/fgas/crt/fgas_utils.h" | |
| 12 | 11 |
| 13 enum class FDE_XmlSyntaxResult { | 12 enum class FDE_XmlSyntaxResult { |
| 14 None, | 13 None, |
| 15 InstructionOpen, | 14 InstructionOpen, |
| 16 InstructionClose, | 15 InstructionClose, |
| 17 ElementOpen, | 16 ElementOpen, |
| 18 ElementBreak, | 17 ElementBreak, |
| 19 ElementClose, | 18 ElementClose, |
| 20 TargetName, | 19 TargetName, |
| 21 TagName, | 20 TagName, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 33 FDE_XMLNODE_Instruction, | 32 FDE_XMLNODE_Instruction, |
| 34 FDE_XMLNODE_Element, | 33 FDE_XMLNODE_Element, |
| 35 FDE_XMLNODE_Text, | 34 FDE_XMLNODE_Text, |
| 36 FDE_XMLNODE_CharData, | 35 FDE_XMLNODE_CharData, |
| 37 }; | 36 }; |
| 38 | 37 |
| 39 struct FDE_XMLNODE { | 38 struct FDE_XMLNODE { |
| 40 int32_t iNodeNum; | 39 int32_t iNodeNum; |
| 41 FDE_XMLNODETYPE eNodeType; | 40 FDE_XMLNODETYPE eNodeType; |
| 42 }; | 41 }; |
| 43 typedef CFX_StackTemplate<FDE_XMLNODE> CFDE_XMLNodeStack; | |
| 44 | 42 |
| 45 FX_BOOL FDE_IsXMLValidChar(FX_WCHAR ch); | 43 FX_BOOL FDE_IsXMLValidChar(FX_WCHAR ch); |
| 46 | 44 |
| 47 struct FDE_XMLREADERHANDLER { | |
| 48 void* pData; | |
| 49 void (*OnTagEnter)(FDE_XMLREADERHANDLER* pThis, | |
| 50 FDE_XMLNODETYPE eType, | |
| 51 const CFX_WideString& wsTagName); | |
| 52 void (*OnTagBreak)(FDE_XMLREADERHANDLER* pThis, | |
| 53 const CFX_WideString& wsTagName); | |
| 54 void (*OnTagClose)(FDE_XMLREADERHANDLER* pThis, | |
| 55 const CFX_WideString& wsTagName); | |
| 56 void (*OnAttribute)(FDE_XMLREADERHANDLER* pThis, | |
| 57 const CFX_WideString& wsName, | |
| 58 const CFX_WideString& wsValue); | |
| 59 void (*OnData)(FDE_XMLREADERHANDLER* pThis, | |
| 60 FDE_XMLNODETYPE eType, | |
| 61 const CFX_WideString& wsValue); | |
| 62 }; | |
| 63 | |
| 64 #endif // XFA_FDE_XML_FDE_XML_H_ | 45 #endif // XFA_FDE_XML_FDE_XML_H_ |
| OLD | NEW |