Ananas Library  0.9.5
adataexchange.h
1 /****************************************************************************
2 ** $Id: adataexchange.h,v 1.6 2006/08/23 07:46:23 app Exp $
3 **
4 ** Import/export data function header file of
5 ** Ananas application library
6 **
7 ** Created : 20031201
8 **
9 ** Copyright (C) 2003-2004 Leader InfoTech. All rights reserved.
10 ** Copyright (C) 2003-2006 Grigory Panov, Yoshkar-Ola.
11 **
12 ** This file is part of the Designer application of the Ananas
13 ** automation accounting system.
14 **
15 ** This file may be distributed and/or modified under the terms of the
16 ** GNU General Public License version 2 as published by the Free Software
17 ** Foundation and appearing in the file LICENSE.GPL included in the
18 ** packaging of this file.
19 **
20 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
21 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22 **
23 ** See http://www.leaderit.ru/page=ananas or email sales@leaderit.ru
24 ** See http://www.leaderit.ru/gpl/ for GPL licensing information.
25 **
26 ** Contact org@leaderit.ru if any conditions of this licensing are
27 ** not clear to you.
28 **
29 **********************************************************************/
30 
31 #ifndef ADATEXCHANGE_H
32 #define ADATEXCHANGE_H
33 
34 #include "qdom.h"
35 #include "qstringlist.h"
36 #include "ananas.h"
37 #include <qobject.h>
38 
39 
40 class aDatabase;
41 
52 class ANANAS_EXPORT aBackup: public QObject
53 {
54  Q_OBJECT
55 public:
56 
57  aBackup();
58  virtual ~aBackup();
59 
60  virtual bool importData(const QString& rcfile, const QString &archfile, bool dropDB, bool replaceTemplates=0);
61  virtual bool exportData(const QString& rcfile, const QString &archfile, bool withTemplates=0 );
62  virtual QString lastError() const;
63 
64 signals:
65  void progress(int,int);
66 
67 protected:
68  virtual void setLastError(const QString & errorText);
69  virtual bool unzipArchive(const QString& archName, const QString& tmpDirName);
70  virtual bool zipArchive(const QString& archName, const QString& tmpDirName);
71  virtual bool checkStructure();
72  virtual QDomDocument createManifest(const QStringList& templates);
73  virtual void changeRC(const QString& nameRC, const QString& newConfigName);
74  virtual bool dumpBase(const QString& rcfile, const QString& tmpDirName, int &progress, int totalSteps);
75  virtual bool writeXml(const QString & fileName, QDomDocument xml);
76  void cleanupTmpFiles(const QString& tmpDirName, QStringList *files);
77 
78 private:
79  QString txtError;
80 // QString tmpDirName;
81 
82 };
83 
84 #endif //ADATEXCHANGE_H
Класс aBackup определяет программный интерфейс для бэкапа и востановления базы данных. Наследует QObject.
Definition: adataexchange.h:52
Класс для работы с СУБД. Ananas Data Abstraction Layer. Наследует QObject.
Definition: adatabase.h:77