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_SRC_FXFA_PARSER_XFA_PARSER_H_ | 7 #ifndef XFA_FXFA_PARSER_XFA_PARSER_H_ |
8 #define XFA_SRC_FXFA_PARSER_XFA_PARSER_H_ | 8 #define XFA_FXFA_PARSER_XFA_PARSER_H_ |
9 | 9 |
10 #include "xfa/src/fxfa/parser/xfa_document.h" | 10 #include "xfa/fxfa/parser/xfa_document.h" |
11 | 11 |
12 class IXFA_Parser { | 12 class IXFA_Parser { |
13 public: | 13 public: |
14 static IXFA_Parser* Create(IXFA_ObjFactory* pFactory, | 14 static IXFA_Parser* Create(IXFA_ObjFactory* pFactory, |
15 FX_BOOL bDocumentParser = FALSE); | 15 FX_BOOL bDocumentParser = FALSE); |
16 virtual ~IXFA_Parser() {} | 16 virtual ~IXFA_Parser() {} |
17 virtual void Release() = 0; | 17 virtual void Release() = 0; |
18 virtual int32_t StartParse(IFX_FileRead* pStream, | 18 virtual int32_t StartParse(IFX_FileRead* pStream, |
19 XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) = 0; | 19 XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) = 0; |
20 virtual int32_t DoParse(IFX_Pause* pPause = NULL) = 0; | 20 virtual int32_t DoParse(IFX_Pause* pPause = NULL) = 0; |
21 virtual int32_t ParseXMLData(const CFX_WideString& wsXML, | 21 virtual int32_t ParseXMLData(const CFX_WideString& wsXML, |
22 IFDE_XMLNode*& pXMLNode, | 22 IFDE_XMLNode*& pXMLNode, |
23 IFX_Pause* pPause = NULL) = 0; | 23 IFX_Pause* pPause = NULL) = 0; |
24 virtual void ConstructXFANode(CXFA_Node* pXFANode, | 24 virtual void ConstructXFANode(CXFA_Node* pXFANode, |
25 IFDE_XMLNode* pXMLNode) = 0; | 25 IFDE_XMLNode* pXMLNode) = 0; |
26 virtual IXFA_ObjFactory* GetFactory() const = 0; | 26 virtual IXFA_ObjFactory* GetFactory() const = 0; |
27 virtual CXFA_Node* GetRootNode() const = 0; | 27 virtual CXFA_Node* GetRootNode() const = 0; |
28 virtual IFDE_XMLDoc* GetXMLDoc() const = 0; | 28 virtual IFDE_XMLDoc* GetXMLDoc() const = 0; |
29 virtual void CloseParser() = 0; | 29 virtual void CloseParser() = 0; |
30 }; | 30 }; |
31 class IXFA_DocParser : public IXFA_Parser { | 31 class IXFA_DocParser : public IXFA_Parser { |
32 public: | 32 public: |
33 static IXFA_DocParser* Create(IXFA_Notify* pNotify); | 33 static IXFA_DocParser* Create(IXFA_Notify* pNotify); |
34 virtual CXFA_Document* GetDocument() const = 0; | 34 virtual CXFA_Document* GetDocument() const = 0; |
35 virtual IXFA_Notify* GetNotify() const = 0; | 35 virtual IXFA_Notify* GetNotify() const = 0; |
36 }; | 36 }; |
37 | 37 |
38 #endif // XFA_SRC_FXFA_PARSER_XFA_PARSER_H_ | 38 #endif // XFA_FXFA_PARSER_XFA_PARSER_H_ |
OLD | NEW |