1 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE
2 ============================XARAHEADERSTART================================
3 Xara X/Xtreme, a vector drawing and manipulation program.
4 Copyright (C) 2005 Xara Group Ltd.
6 This program is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free Software
8 Foundation; either version 2 of the License, or (at your option) any later
11 This program is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License along with
16 this program; if not, write to the Free Software Foundation, Inc., 51
17 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 Users wishing to use this library in proprietary products which are not
20 themselves to be released under the GNU Public License should contact Xara for
21 a license to do so. Such a license will normally be granted free of charge.
23 Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK.
26 ===========================XARAHEADEREND===================================*/
35 class CXaraFileRecord
;
40 typedef BOOL (RecordHandler
)(void*, CXaraFileRecord
*);
45 virtual ~CXarImport() {};
46 virtual BOOL
PrepareImport() = 0;
47 virtual BOOL
PrepareImport(TCHAR
* pFileName
) = 0;
48 #if defined(USE_COM_STREAM)
49 virtual BOOL
PrepareImport(IStream
* pStream
) = 0;
50 #endif // defined(USE_COM_STREAM)
51 virtual BOOL
PrepareImport(BYTE
* pBuffer
, UINT32 Size
) = 0;
52 virtual BOOL
SetHandler(void* pMagic
, RecordHandler
* pHandlerFunk
) = 0;
53 virtual BOOL
DoImport() = 0;
59 virtual ~CXarExport() {};
60 virtual BOOL
StartExport() = 0;
61 virtual BOOL
StartExport(TCHAR
* pFileName
) = 0;
62 #if defined(USE_COM_STREAM)
63 virtual BOOL
StartExport(IStream
* pStream
) = 0;
64 #endif // defined(USE_COM_STREAM)
65 virtual BOOL
StartBufferedExport() = 0;
66 virtual BOOL
WriteRecord(CXaraFileRecord
* pRecord
, UINT32
* pRecordNum
= NULL
) = 0;
67 virtual BOOL
WriteZeroSizedRecord(UINT32 Tag
, UINT32
* pRecordNum
= NULL
) = 0;
68 virtual BOOL
GetExportBuffer(BYTE
** ppBuffer
, UINT32
* pSize
) = 0;
73 CXarImport
* CreateImporter();
74 CXarExport
* CreateExporter();