• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdeutils
  • Sitemap
  • Contact Us
 

ark

archivebase.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2007 Henrique Pinto <henrique.pinto@kdemail.net>
00003  *
00004  * Redistribution and use in source and binary forms, with or without
00005  * modification, are permitted provided that the following conditions
00006  * are met:
00007  *
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  *
00014  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
00015  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00016  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00017  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
00018  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ( INCLUDING, BUT
00019  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00020  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY
00021  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00022  * ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF
00023  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00024  */
00025 
00026 #ifndef ARCHIVEBASE_H
00027 #define ARCHIVEBASE_H
00028 
00029 #include "archive.h"
00030 #include "archiveinterface.h"
00031 #include "jobs.h"
00032 #include "kerfuffle_export.h"
00033 
00034 namespace ThreadWeaver
00035 {
00036     class Job;
00037 } // namespace ThreadWeaver
00038 
00039 namespace Kerfuffle
00040 {
00041     class KERFUFFLE_EXPORT ArchiveBase: public QObject, public Archive
00042     {
00043         Q_OBJECT
00044         public:
00045             /*
00046              * Creates an Arch to operate on the given interface.
00047              * This takes ownership of the interface, which is deleted
00048              * on the destructor.
00049              */
00050             ArchiveBase( ReadOnlyArchiveInterface *archive );
00051             virtual ~ArchiveBase();
00052 
00053             virtual KJob* open();
00054             virtual KJob* create();
00055             virtual ListJob* list();
00056             virtual DeleteJob* deleteFiles( const QList<QVariant> & files );
00057             virtual AddJob* addFiles( const QStringList & files, const CompressionOptions& options = CompressionOptions() );
00058             virtual ExtractJob* copyFiles( const QList<QVariant> & files, const QString & destinationDir, Archive::CopyFlags flags );
00059 
00060             virtual bool isReadOnly();
00061             virtual QString fileName();
00062 
00063             virtual bool isSingleFolderArchive();
00064             virtual QString subfolderName();
00065             virtual bool isPasswordProtected();
00066 
00067             virtual void setPassword(QString password);
00068 
00069         private slots:
00070             void onListFinished(KJob*);
00071 
00072         private:
00073             void listIfNotListed();
00074             ReadOnlyArchiveInterface *m_iface;
00075             bool m_hasBeenListed;
00076             bool m_isSingleFolderArchive;
00077             bool m_isPasswordProtected;
00078             QString m_subfolderName;
00079             qlonglong m_extractedFilesSize;
00080 
00081     };
00082 } // namespace Kerfuffle
00083 
00084 #endif // ARCHIVEBASE_H

ark

Skip menu "ark"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • okteta
  • printer-applet
  • superkaramba
  • sweeper
Generated for kdeutils by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal