KVIrc 5.2.6
Developer APIs
KviPackageWriter.h
Go to the documentation of this file.
1#ifndef _KviPackageWriter_h_
2#define _KviPackageWriter_h_
3//=============================================================================
4//
5// File : KviPackageWriter.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#include "KviPackageIOEngine.h"
35
36class KviFile;
39class QByteArray;
40class QFileInfo;
41class QString;
42
51{
52public:
58
62 virtual ~KviPackageWriter();
63
64private:
69
70public:
75 {
76 NoCompression = 1,
77 FollowSymLinks = 2
78 };
79
84 {
85 NoProgressDialog = 1
86 };
87
100 bool addFile(const QString & szLocalFileName, const QString & szTargetFileName, kvi_u32_t uAddFileFlags = 0);
101
109 bool addDirectory(const QString & szLocalDirectoryName, const QString & szTargetDirectoryPrefix, kvi_u32_t uAddFileFlags = 0);
110
117 void addInfoField(const QString & szName, const QString & szValue);
118
125 void addInfoField(const QString & szName, QByteArray * pArray);
126
138 bool pack(const QString & szFileName, kvi_u32_t uPackFlags = 0);
139
140private:
149 bool packInternal(const QString & szFileName, kvi_u32_t uPackFlags = 0);
150
159 bool packFile(KviFile * pFile, KviPackageWriterDataField * pDataField);
160
171 bool addFileInternal(const QFileInfo * fi, const QString & szLocalFileName, const QString & szTargetFileName, kvi_u32_t uAddFileFlags = 0);
172
173}; // class KviPackageWriter
174
175#endif //_KviPackageWriter_h_
File packaging utilities.
KVIrc File class.
Definition KviFile.h:50
This class is the base class engine to work with KVIrc package files.
Definition KviPackageIOEngine.h:53
Definition KviPackageWriter.cpp:45
Definition KviPackageWriter.cpp:57
This class is used to create KVIrc package files.
Definition KviPackageWriter.h:51
KviPackageWriterPrivate * m_p
Definition KviPackageWriter.h:68
AddFileFlags
Definition KviPackageWriter.h:75
PackFlags
Definition KviPackageWriter.h:84
This file contains compile time settings.
#define KVILIB_API
Definition kvi_settings.h:124
KviKvsArray * pArray
Definition libkviserverdb.cpp:478