KVIrc  4.9.2
DeveloperAPIs
KviPackageIOEngine.h
Go to the documentation of this file.
1 #ifndef _KviPackageIOEngine_h_
2 #define _KviPackageIOEngine_h_
3 //=============================================================================
4 //
5 // File : KviPackageIOEngine.h
6 // Creation date : Tue 26 Dec 2006 05:33:33 by Szymon Stefanek
7 //
8 // This file is part of the KVIrc IRC Client distribution
9 // Copyright (C) 2006-2010 Szymon Stefanek <pragma at kvirc dot net>
10 //
11 // This program is FREE software. You can redistribute it and/or
12 // modify it under the terms of the GNU General Public License
13 // as published by the Free Software Foundation; either version 2
14 // of the License, or (at your option) any later version.
15 //
16 // This program is distributed in the HOPE that it will be USEFUL,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 // See the GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, write to the Free Software Foundation,
23 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 //
25 //=============================================================================
26 
33 #include "kvi_settings.h"
34 
35 #include "KviQString.h"
36 #include "KviPointerHashTable.h"
37 
38 #include <QObject>
39 #include <QByteArray>
40 
41 class QProgressDialog;
42 class QLabel;
43 
44 #define KVI_PACKAGE_INFOFIELD_TYPE_STRING 1
45 #define KVI_PACKAGE_INFOFIELD_TYPE_BINARYBUFFER 2
46 #define KVI_PACKAGE_DATAFIELD_TYPE_FILE 1
47 #define KVI_PACKAGE_DATAFIELD_FLAG_FILE_DEFLATE 1
48 
54 {
55 public:
61 
65  virtual ~KviPackageIOEngine();
66 
67 private:
68  QString m_szLastError;
71  QProgressDialog * m_pProgressDialog;
73 
74 public:
79  const QString & lastError() { return m_szLastError; };
80 
85  KviPointerHashTable<QString, QString> * stringInfoFields() { return m_pStringInfoFields; };
86 
91  KviPointerHashTable<QString, QByteArray> * binaryInfoFields() { return m_pBinaryInfoFields; };
92 protected:
98  void setLastError(const QString & szLastError) { m_szLastError = szLastError; };
99 
106  void showProgressDialog(const QString & szCaption, int iTotalSteps);
107 
112  void hideProgressDialog();
113 
120  bool updateProgress(int iProgress, const QString & szLabel);
121 
128  bool writeError();
129 
136  bool readError();
137 };
138 
139 #endif //_KviPackageIOEngine_h_
KviPointerHashTable< QString, QString > * m_pStringInfoFields
Definition: KviPackageIOEngine.h:69
KviPointerHashTable< QString, QByteArray > * binaryInfoFields()
Returns the binary info fields.
Definition: KviPackageIOEngine.h:91
void setLastError(const QString &szLastError)
Sets the last error.
Definition: KviPackageIOEngine.h:98
Pointer Hash Table.
KviPointerHashTable< QString, QByteArray > * m_pBinaryInfoFields
Definition: KviPackageIOEngine.h:70
QProgressDialog * m_pProgressDialog
Definition: KviPackageIOEngine.h:71
const QString & lastError()
Returns the last error.
Definition: KviPackageIOEngine.h:79
This file contains compile time settings.
KviPointerHashTable< QString, QString > * stringInfoFields()
Returns the string info fields.
Definition: KviPackageIOEngine.h:85
QLabel * m_pProgressDialogLabel
Definition: KviPackageIOEngine.h:72
This class is the base class engine to work with KVIrc package files.
Definition: KviPackageIOEngine.h:53
#define KVILIB_API
Definition: kvi_settings.h:125
Helper functions for the QString class.
QString m_szLastError
Definition: KviPackageIOEngine.h:68