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

ark

  • sources
  • kde-4.14
  • kdeutils
  • ark
  • kerfuffle
archiveinterface.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2007 Henrique Pinto <henrique.pinto@kdemail.net>
3  * Copyright (c) 2008-2009 Harald Hvaal <haraldhv@stud.ntnu.no>
4  * Copyright (c) 2009-2012 Raphael Kubo da Costa <rakuco@FreeBSD.org>
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ( INCLUDING, BUT
21  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY
23  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF
25  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #ifndef ARCHIVEINTERFACE_H
29 #define ARCHIVEINTERFACE_H
30 
31 #include "archive.h"
32 #include "kerfuffle_export.h"
33 
34 #include <QObject>
35 #include <QStringList>
36 #include <QString>
37 #include <QVariantList>
38 
39 namespace Kerfuffle
40 {
41 class Query;
42 
43 class KERFUFFLE_EXPORT ReadOnlyArchiveInterface: public QObject
44 {
45  Q_OBJECT
46 public:
47  explicit ReadOnlyArchiveInterface(QObject *parent, const QVariantList & args);
48  virtual ~ReadOnlyArchiveInterface();
49 
53  QString filename() const;
54 
61  virtual bool isReadOnly() const;
62 
63  virtual bool open();
64 
74  virtual bool list() = 0;
75  void setPassword(const QString &password);
76 
88  virtual bool copyFiles(const QList<QVariant> & files, const QString & destinationDirectory, ExtractionOptions options) = 0;
89 
90  bool waitForFinishedSignal();
91 
92  virtual bool doKill();
93  virtual bool doSuspend();
94  virtual bool doResume();
95 
96 signals:
97  void error(const QString &message, const QString &details = QString());
98  void entry(const ArchiveEntry &archiveEntry);
99  void entryRemoved(const QString &path);
100  void progress(double progress);
101  void info(const QString &info);
102  void finished(bool result);
103  void userQuery(Query *query);
104 
105 protected:
106  QString password() const;
113  void setWaitForFinishedSignal(bool value);
114 
115 private:
116  QString m_filename;
117  QString m_password;
118  bool m_waitForFinishedSignal;
119 };
120 
121 class KERFUFFLE_EXPORT ReadWriteArchiveInterface: public ReadOnlyArchiveInterface
122 {
123  Q_OBJECT
124 public:
125  explicit ReadWriteArchiveInterface(QObject *parent, const QVariantList & args);
126  virtual ~ReadWriteArchiveInterface();
127 
128  virtual bool isReadOnly() const;
129 
130  //see archive.h for a list of what the compressionoptions might
131  //contain
132  virtual bool addFiles(const QStringList & files, const CompressionOptions& options) = 0;
133  virtual bool deleteFiles(const QList<QVariant> & files) = 0;
134 };
135 
136 } // namespace Kerfuffle
137 
138 #endif // ARCHIVEINTERFACE_H
Kerfuffle::Query
Definition: queries.h:44
kerfuffle_export.h
archive.h
Kerfuffle::ReadOnlyArchiveInterface
Definition: archiveinterface.h:43
Kerfuffle::ReadWriteArchiveInterface
Definition: archiveinterface.h:121
QHash
QObject
QString
QList
KERFUFFLE_EXPORT
#define KERFUFFLE_EXPORT
Definition: kerfuffle_export.h:41
QStringList
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:36 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

ark

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

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • sweeper

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal