ioapi.h | ioapi.h | |||
---|---|---|---|---|
skipping to change at line 14 | skipping to change at line 14 | |||
Version 1.01e, February 12th, 2005 | Version 1.01e, February 12th, 2005 | |||
Copyright (C) 1998-2005 Gilles Vollant | Copyright (C) 1998-2005 Gilles Vollant | |||
Modified by Sergey A. Tachenov to integrate with Qt. | Modified by Sergey A. Tachenov to integrate with Qt. | |||
*/ | */ | |||
#ifndef _ZLIBIOAPI_H | #ifndef _ZLIBIOAPI_H | |||
#define _ZLIBIOAPI_H | #define _ZLIBIOAPI_H | |||
#ifndef OF | ||||
#define OF _Z_OF | ||||
#endif | ||||
#define ZLIB_FILEFUNC_SEEK_CUR (1) | #define ZLIB_FILEFUNC_SEEK_CUR (1) | |||
#define ZLIB_FILEFUNC_SEEK_END (2) | #define ZLIB_FILEFUNC_SEEK_END (2) | |||
#define ZLIB_FILEFUNC_SEEK_SET (0) | #define ZLIB_FILEFUNC_SEEK_SET (0) | |||
#define ZLIB_FILEFUNC_MODE_READ (1) | #define ZLIB_FILEFUNC_MODE_READ (1) | |||
#define ZLIB_FILEFUNC_MODE_WRITE (2) | #define ZLIB_FILEFUNC_MODE_WRITE (2) | |||
#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) | #define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) | |||
#define ZLIB_FILEFUNC_MODE_EXISTING (4) | #define ZLIB_FILEFUNC_MODE_EXISTING (4) | |||
#define ZLIB_FILEFUNC_MODE_CREATE (8) | #define ZLIB_FILEFUNC_MODE_CREATE (8) | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 4 lines changed or added | |||
quazip.h | quazip.h | |||
---|---|---|---|---|
skipping to change at line 417 | skipping to change at line 417 | |||
*/ | */ | |||
QStringList getFileNameList() const; | QStringList getFileNameList() const; | |||
/// Returns information list about all files inside the archive. | /// Returns information list about all files inside the archive. | |||
/** | /** | |||
\return A list of QuaZipFileInfo objects or an empty list if there | \return A list of QuaZipFileInfo objects or an empty list if there | |||
was an error or if the archive is empty (call getZipError() to | was an error or if the archive is empty (call getZipError() to | |||
figure out which). | figure out which). | |||
\sa getFileNameList() | \sa getFileNameList() | |||
*/ | */ | |||
QList<QuaZipFileInfo> getFileInfoList() const; | QList<QuaZipFileInfo> getFileInfoList() const; | |||
/// Sets the default file name codec to use. | ||||
/** | ||||
* The default codec is used by the constructors, so calling this funct | ||||
ion | ||||
* won't affect the QuaZip instances already created at that moment. | ||||
* | ||||
* The codec specified here can be overriden by calling setFileNameCode | ||||
c(). | ||||
* If neither function is called, QTextCodec::codecForLocale() will be | ||||
used | ||||
* to decode or encode file names. Use this function with caution if | ||||
* the application uses other libraries that depend on QuaZIP. Those | ||||
* libraries can either call this function by themselves, thus overridi | ||||
ng | ||||
* your setting or can rely on the default encoding, thus failing | ||||
* mysteriously if you change it. For these reasons, it isn't recommend | ||||
ed | ||||
* to use this function if you are developing a library, not an applica | ||||
tion. | ||||
* Instead, ask your library users to call it in case they need specifi | ||||
c | ||||
* encoding. | ||||
* | ||||
* In most cases, using setFileNameCodec() instead is the right choice. | ||||
* However, if you depend on third-party code that uses QuaZIP, then th | ||||
e | ||||
* reasons stated above can actually become a reason to use this functi | ||||
on | ||||
* in case the third-party code in question fails because it doesn't | ||||
* understand the encoding you need and doesn't provide a way to specif | ||||
y it. | ||||
* This applies to the JlCompress class as well, as it was contributed | ||||
and | ||||
* doesn't support explicit encoding parameters. | ||||
* | ||||
* In short: use setFileNameCodec() when you can, resort to | ||||
* setDefaultFileNameCodec() when you don't have access to the QuaZip | ||||
* instance. | ||||
* | ||||
* @param codec The codec to use by default. If NULL, resets to default | ||||
. | ||||
*/ | ||||
static void setDefaultFileNameCodec(QTextCodec *codec); | ||||
/** | ||||
* @overload | ||||
* Equivalent to calling | ||||
* setDefltFileNameCodec(QTextCodec::codecForName(codecName)). | ||||
*/ | ||||
static void setDefaultFileNameCodec(const char *codecName); | ||||
}; | }; | |||
#endif | #endif | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 49 lines changed or added | |||
quazipnewinfo.h | quazipnewinfo.h | |||
---|---|---|---|---|
skipping to change at line 28 | skipping to change at line 28 | |||
along with this program; if not, write to the Free Software Foundation, | along with this program; if not, write to the Free Software Foundation, | |||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
See COPYING file for the full LGPL text. | See COPYING file for the full LGPL text. | |||
Original ZIP package is copyrighted by Gilles Vollant, see | Original ZIP package is copyrighted by Gilles Vollant, see | |||
quazip/(un)zip.h files for details, basically it's zlib license. | quazip/(un)zip.h files for details, basically it's zlib license. | |||
**/ | **/ | |||
#include <QDateTime> | #include <QDateTime> | |||
#include <QFile> | ||||
#include <QString> | #include <QString> | |||
#include "quazip_global.h" | #include "quazip_global.h" | |||
/// Information about a file to be created. | /// Information about a file to be created. | |||
/** This structure holds information about a file to be created inside | /** This structure holds information about a file to be created inside | |||
* ZIP archive. At least name should be set to something correct before | * ZIP archive. At least name should be set to something correct before | |||
* passing this structure to | * passing this structure to | |||
* QuaZipFile::open(OpenMode,const QuaZipNewInfo&,int,int,bool). | * QuaZipFile::open(OpenMode,const QuaZipNewInfo&,int,int,bool). | |||
**/ | **/ | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||