Line 0
Link Here
|
|
|
1 |
/************************* * * * * * * * * * * * * *************************** |
2 |
Copyright (c) 1999-2003 Ryan Bobko |
3 |
ryan@ostrich-emulators.com |
4 |
|
5 |
This program is free software; you can redistribute it and/or modify |
6 |
it under the terms of the GNU General Public License as published by |
7 |
the Free Software Foundation; either version 2 of the License, or |
8 |
(at your option) any later version. |
9 |
|
10 |
This program is distributed in the hope that it will be useful, |
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
GNU General Public License for more details. |
14 |
|
15 |
You should have received a copy of the GNU General Public License |
16 |
along with this program; if not, write to the Free Software |
17 |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
18 |
************************** * * * * * * * * * * * * **************************/ |
19 |
|
20 |
#ifndef XMLIMPORTER_H |
21 |
#define XMLIMPORTER_H |
22 |
|
23 |
#include "localfileplugin.h" |
24 |
|
25 |
#include <stdlib.h> |
26 |
#include <tree.h> |
27 |
#include <xmlmemory.h> |
28 |
#include <parser.h> |
29 |
|
30 |
class XMLDBPlugin : public LocalFileDBPlugin { |
31 |
public: |
32 |
XMLDBPlugin(); |
33 |
virtual ~XMLDBPlugin(); |
34 |
|
35 |
virtual bool load( QHacc * eng, const QString& home, QString& error ); |
36 |
virtual bool save( const QString&, bool, QString& ); |
37 |
|
38 |
virtual QString description() const; |
39 |
static QString sdescription(); |
40 |
|
41 |
virtual QString understands() const; // what QHACC_HOME keywords do I know? |
42 |
static QString sunderstands(); // what QHACC_HOME keywords do I know? |
43 |
|
44 |
protected: |
45 |
void writeTable( QHaccResultSet& data, const char ** lbls, uint lblcnt, |
46 |
xmlDocPtr tree, xmlNsPtr ns, const QString& label ) const; |
47 |
void readTable( QHaccResultSet& data, const char ** lbls, |
48 |
uint lblcnt, xmlNodePtr cur, xmlDocPtr doc, |
49 |
const QString& label ) const; |
50 |
}; |
51 |
|
52 |
#endif |