Eneboo - Documentación para desarrolladores
tools/aqzip/AQZipWriter.h
Ir a la documentación de este archivo.
00001 /***************************************************************************
00002  AQZipWriter.h
00003  -------------------
00004  begin                : 12/12/2011
00005  copyright            : (C) 2003-2011 by InfoSiAL S.L.
00006  email                : mail@infosial.com
00007  ***************************************************************************/
00008 /***************************************************************************
00009  *   This program is free software; you can redistribute it and/or modify  *
00010  *   it under the terms of the GNU General Public License as published by  *
00011  *   the Free Software Foundation; version 2 of the License.               *
00012  ***************************************************************************/
00013 /***************************************************************************
00014  Este  programa es software libre. Puede redistribuirlo y/o modificarlo
00015  bajo  los  términos  de  la  Licencia  Pública General de GNU   en  su
00016  versión 2, publicada  por  la  Free  Software Foundation.
00017  ***************************************************************************/
00018 
00019 #ifndef AQZIPWRITER_H
00020 #define AQZIPWRITER_H
00021 
00022 #include <qstring.h>
00023 #include <qfile.h>
00024 #include <qfileinfo.h>
00025 
00026 class AQZipWriterPrivate;
00027 
00028 class AQZipWriter
00029 {
00030 public:
00031   AQZipWriter(const QString &fileName, uint mode = (IO_WriteOnly | IO_Truncate));
00032 
00033   explicit AQZipWriter(QIODevice *device);
00034   ~AQZipWriter();
00035 
00036   QIODevice *device() const;
00037 
00038   bool isWritable() const;
00039   bool exists() const;
00040 
00041   enum Status {
00042     NoError,
00043     FileWriteError,
00044     FileOpenError,
00045     FilePermissionsError,
00046     FileError
00047   };
00048 
00049   Status status() const;
00050 
00051   enum CompressionPolicy {
00052     AlwaysCompress,
00053     NeverCompress,
00054     AutoCompress
00055   };
00056 
00057   void setCompressionPolicy(CompressionPolicy policy);
00058   CompressionPolicy compressionPolicy() const;
00059 
00060   void setCreationPermissions(QFileInfo::PermissionSpec permissions);
00061   QFileInfo::PermissionSpec creationPermissions() const;
00062 
00063   void addFile(const QString &fileName, const QByteArray &data);
00064 
00065   void addFile(const QString &fileName, QIODevice *device);
00066 
00067   void addDirectory(const QString &dirName);
00068 
00069   void addSymLink(const QString &fileName, const QString &destination);
00070 
00071   void close();
00072 private:
00073   AQZipWriterPrivate *d;
00074   AQZipWriter(const AQZipWriter &);
00075   AQZipWriter &operator=(const AQZipWriter &);
00076 };
00077 
00078 #endif // AQZIPWRITER_H
00079 
00080 /****************************************************************************
00081 **
00082 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
00083 ** All rights reserved.
00084 ** Contact: Nokia Corporation (qt-info@nokia.com)
00085 **
00086 ** This file is part of the QtGui module of the Qt Toolkit.
00087 **
00088 ** $QT_BEGIN_LICENSE:LGPL$
00089 ** GNU Lesser General Public License Usage
00090 ** This file may be used under the terms of the GNU Lesser General Public
00091 ** License version 2.1 as published by the Free Software Foundation and
00092 ** appearing in the file LICENSE.LGPL included in the packaging of this
00093 ** file. Please review the following information to ensure the GNU Lesser
00094 ** General Public License version 2.1 requirements will be met:
00095 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
00096 **
00097 ** In addition, as a special exception, Nokia gives you certain additional
00098 ** rights. These rights are described in the Nokia Qt LGPL Exception
00099 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
00100 **
00101 ** GNU General Public License Usage
00102 ** Alternatively, this file may be used under the terms of the GNU General
00103 ** Public License version 3.0 as published by the Free Software Foundation
00104 ** and appearing in the file LICENSE.GPL included in the packaging of this
00105 ** file. Please review the following information to ensure the GNU General
00106 ** Public License version 3.0 requirements will be met:
00107 ** http://www.gnu.org/copyleft/gpl.html.
00108 **
00109 ** Other Usage
00110 ** Alternatively, this file may be used in accordance with the terms and
00111 ** conditions contained in a signed written agreement between you and Nokia.
00112 **
00113 **
00114 **
00115 **
00116 **
00117 ** $QT_END_LICENSE$
00118 **
00119 ****************************************************************************/
00120 
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'