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