QuaZIP quazip-0-6-2
quazipfileinfo.h
00001 #ifndef QUA_ZIPFILEINFO_H
00002 #define QUA_ZIPFILEINFO_H
00003 
00004 /*
00005 Copyright (C) 2005-2014 Sergey A. Tachenov
00006 
00007 This file is part of QuaZIP.
00008 
00009 QuaZIP is free software: you can redistribute it and/or modify
00010 it under the terms of the GNU Lesser General Public License as published by
00011 the Free Software Foundation, either version 3 of the License, or
00012 (at your option) any later version.
00013 
00014 QuaZIP is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 GNU Lesser General Public License for more details.
00018 
00019 You should have received a copy of the GNU Lesser General Public License
00020 along with QuaZIP.  If not, see <http://www.gnu.org/licenses/>.
00021 
00022 See COPYING file for the full LGPL text.
00023 
00024 Original ZIP package is copyrighted by Gilles Vollant and contributors,
00025 see quazip/(un)zip.h files for details. Basically it's the zlib license.
00026 */
00027 
00028 #include <QByteArray>
00029 #include <QDateTime>
00030 #include <QFile>
00031 
00032 #include "quazip_global.h"
00033 
00035 
00037 struct QUAZIP_EXPORT QuaZipFileInfo {
00039   QString name;
00041   quint16 versionCreated;
00043   quint16 versionNeeded;
00045   quint16 flags;
00047   quint16 method;
00049   QDateTime dateTime;
00051   quint32 crc;
00053   quint32 compressedSize;
00055   quint32 uncompressedSize;
00057   quint16 diskNumberStart;
00059   quint16 internalAttr;
00061   quint32 externalAttr;
00063   QString comment;
00065   QByteArray extra;
00067 
00071   QFile::Permissions getPermissions() const;
00072 };
00073 
00075 
00077 struct QUAZIP_EXPORT QuaZipFileInfo64 {
00079   QString name;
00081   quint16 versionCreated;
00083   quint16 versionNeeded;
00085   quint16 flags;
00087   quint16 method;
00089 
00096   QDateTime dateTime;
00098   quint32 crc;
00100   quint64 compressedSize;
00102   quint64 uncompressedSize;
00104   quint16 diskNumberStart;
00106   quint16 internalAttr;
00108   quint32 externalAttr;
00110   QString comment;
00112   QByteArray extra;
00114 
00118   QFile::Permissions getPermissions() const;
00120 
00130   bool toQuaZipFileInfo(QuaZipFileInfo &info) const;
00132 
00143   QDateTime getNTFSmTime(int *fineTicks = NULL) const;
00145 
00156   QDateTime getNTFSaTime(int *fineTicks = NULL) const;
00158 
00169   QDateTime getNTFScTime(int *fineTicks = NULL) const;
00170 };
00171 
00172 #endif