Eneboo - Documentación para desarrolladores
src/flbase/aqsobjects/AQSZipWriter_p.h
Ir a la documentación de este archivo.
00001 /***************************************************************************
00002  AQSZipWriter_p.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 AQSZIPWRITER_P_H_
00020 #define AQSZIPWRITER_P_H_
00021 
00022 #include "AQSIODevice_p.h"
00023 #include "AQObjects.h"
00024 
00025 class AQSZipWriter : public AQSVoidPtr
00026 {
00027   Q_OBJECT
00028 
00029   AQ_DECLARE_AQS_VOID_AQOBJECT(ZipWriter, VoidPtr);
00030 
00031 protected:
00032   void specializedInternalFinish() {
00033     if (!wrap_)
00034       delete o_;
00035   }
00036 
00037   //@AQ_BEGIN_DEF_PUB_SLOTS@
00038 public slots:
00039   QIODevice *device() const;
00040   bool isWritable() const;
00041   bool exists() const;
00042   uint status() const;
00043   void setCompressionPolicy(uint);
00044   uint compressionPolicy() const;
00045   void setCreationPermissions(uint);
00046   uint creationPermissions() const;
00047   void addFile(const QString &, QByteArray *);
00048   void addFile(const QString &, AQSByteArray *);
00049   void addFile(const QString &, QIODevice *);
00050   void addFile(const QString &, AQSIODevice *);
00051   void addDirectory(const QString &);
00052   void addSymLink(const QString &, const QString &);
00053   void close();
00054 
00055 protected:
00056   static void *construct(const QSArgumentList &args) {
00057     QMap<int, QStringList> candidates;
00058     candidates[1].append(QString::fromLatin1("QString"));
00059     candidates[2].append(QString::fromLatin1("QString,uint"));
00060     candidates[1].append(QString::fromLatin1("QIODevice*"));
00061     QString sgt(castArgsSignature(args, candidates));
00062     if (sgt == QString::fromLatin1("QString"))
00063       return new AQZipWriter(*(argValue<QString *>(args[0])));
00064     if (sgt == QString::fromLatin1("QString,uint"))
00065       return new AQZipWriter(*(argValue<QString *>(args[0])),
00066                              args[1].variant().toUInt());
00067     if (sgt == QString::fromLatin1("QIODevice*"))
00068       return new AQZipWriter(argValue<QIODevice *>(args[0]));
00069     return 0;
00070   }
00071 
00072 public:
00073   static QMap<int, QStringList> candidateConstructors() {
00074     QMap<int, QStringList> candidates;
00075     candidates[1].append(QString::fromLatin1("QString"));
00076     candidates[2].append(QString::fromLatin1("QString,uint"));
00077     candidates[1].append(QString::fromLatin1("QIODevice*"));
00078     return candidates;
00079   }
00080   //@AQ_END_DEF_PUB_SLOTS@
00081 };
00082 
00083 //@AQ_BEGIN_IMP_PUB_SLOTS@
00084 inline QIODevice *AQSZipWriter::device() const
00085 {
00086   AQ_CALL_RET(device());
00087 }
00088 inline bool AQSZipWriter::isWritable() const
00089 {
00090   AQ_CALL_RET_V(isWritable(), bool);
00091 }
00092 inline bool AQSZipWriter::exists() const
00093 {
00094   AQ_CALL_RET_V(exists(), bool);
00095 }
00096 inline uint AQSZipWriter::status() const
00097 {
00098   AQ_CALL_RET_V(status(), uint);
00099 }
00100 inline void AQSZipWriter::setCompressionPolicy(uint arg0)
00101 {
00102   AQ_CALL_VOID(setCompressionPolicy(static_cast<AQZipWriter::CompressionPolicy>(arg0)));
00103 }
00104 inline uint AQSZipWriter::compressionPolicy() const
00105 {
00106   AQ_CALL_RET_V(compressionPolicy(), uint);
00107 }
00108 inline void AQSZipWriter::setCreationPermissions(uint arg0)
00109 {
00110   AQ_CALL_VOID(setCreationPermissions(static_cast<QFileInfo::PermissionSpec>(arg0)));
00111 }
00112 inline uint AQSZipWriter::creationPermissions() const
00113 {
00114   AQ_CALL_RET_V(creationPermissions(), uint);
00115 }
00116 inline void AQSZipWriter::addFile(const QString &arg0,  QByteArray *arg1)
00117 {
00118   AQ_CALL_VOID(addFile(arg0, *arg1));
00119 }
00120 inline void AQSZipWriter::addFile(const QString &arg0, AQSByteArray *arg1)
00121 {
00122   AQ_CALL_VOID(addFile(arg0, *arg1));
00123 }
00124 inline void AQSZipWriter::addFile(const QString &arg0,  QIODevice *arg1)
00125 {
00126   AQ_CALL_VOID(addFile(arg0, arg1));
00127 }
00128 inline void AQSZipWriter::addFile(const QString &arg0, AQSIODevice *arg1)
00129 {
00130   AQ_CALL_VOID(addFile(arg0, *arg1));
00131 }
00132 inline void AQSZipWriter::addDirectory(const QString &arg0)
00133 {
00134   AQ_CALL_VOID(addDirectory(arg0));
00135 }
00136 inline void AQSZipWriter::addSymLink(const QString &arg0,  const QString &arg1)
00137 {
00138   AQ_CALL_VOID(addSymLink(arg0, arg1));
00139 }
00140 inline void AQSZipWriter::close()
00141 {
00142   AQ_CALL_VOID(close());
00143 }
00144 //@AQ_END_IMP_PUB_SLOTS@
00145 
00146 #endif /* AQSZIPWRITER_P_H_ */
00147 // @AQOBJECT_VOID@
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'