Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / src / fxfa / src / parser / xfa_document_serialize.h
1 // Copyright 2014 PDFium Authors. All rights reserved.\r
2 // Use of this source code is governed by a BSD-style license that can be\r
3 // found in the LICENSE file.\r
4 \r
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
6 \r
7 #ifndef _XFA_DOCUMENT_SERIALIZE_H_\r
8 #define _XFA_DOCUMENT_SERIALIZE_H_\r
9 class CXFA_DataImporter : public IXFA_PacketImport, public CFX_Object\r
10 {\r
11 public:\r
12     CXFA_DataImporter(CXFA_Document *pDocument);\r
13     virtual void Release()\r
14     {\r
15         delete this;\r
16     }\r
17     virtual FX_BOOL                             ImportData(IFX_FileRead* pDataDocument);\r
18 protected:\r
19     CXFA_Document                               *m_pDocument;\r
20 };\r
21 class CXFA_DataExporter : public IXFA_PacketExport, public CFX_Object\r
22 {\r
23 public:\r
24     CXFA_DataExporter(CXFA_Document *pDocument);\r
25     virtual void Release()\r
26     {\r
27         delete this;\r
28     }\r
29     virtual FX_BOOL                             Export(IFX_FileWrite *pWrite);\r
30     virtual FX_BOOL                             Export(IFX_FileWrite *pWrite, CXFA_Node *pNode, FX_DWORD dwFlag = 0, FX_LPCSTR pChecksum = NULL);\r
31 protected:\r
32     FX_BOOL                                             Export(IFX_Stream *pStream, CXFA_Node *pNode, FX_DWORD dwFlag, FX_LPCSTR pChecksum);\r
33     CXFA_Document                               *m_pDocument;\r
34 };\r
35 #endif\r