|
Packit |
d7e8d0 |
/* qgpgmequickjob.h
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
Copyright (c) 2017 Intevation GmbH
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
QGpgME is free software; you can redistribute it and/or
|
|
Packit |
d7e8d0 |
modify it under the terms of the GNU General Public License as
|
|
Packit |
d7e8d0 |
published by the Free Software Foundation; either version 2 of the
|
|
Packit |
d7e8d0 |
License, or (at your option) any later version.
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
QGpgME is distributed in the hope that it will be useful,
|
|
Packit |
d7e8d0 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
d7e8d0 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
d7e8d0 |
General Public License for more details.
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
You should have received a copy of the GNU General Public License along
|
|
Packit |
d7e8d0 |
with this program; if not, write to the Free Software Foundation, Inc.,
|
|
Packit |
d7e8d0 |
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
In addition, as a special exception, the copyright holders give
|
|
Packit |
d7e8d0 |
permission to link the code of this program with any edition of
|
|
Packit |
d7e8d0 |
the Qt library by Trolltech AS, Norway (or with modified versions
|
|
Packit |
d7e8d0 |
of Qt that use the same license as Qt), and distribute linked
|
|
Packit |
d7e8d0 |
combinations including the two. You must obey the GNU General
|
|
Packit |
d7e8d0 |
Public License in all respects for all of the code used other than
|
|
Packit |
d7e8d0 |
Qt. If you modify this file, you may extend this exception to
|
|
Packit |
d7e8d0 |
your version of the file, but you are not obligated to do so. If
|
|
Packit |
d7e8d0 |
you do not wish to do so, delete this exception statement from
|
|
Packit |
d7e8d0 |
your version.
|
|
Packit |
d7e8d0 |
*/
|
|
Packit |
d7e8d0 |
#ifndef QGPGME_QGPGMEQUICKJOB_H
|
|
Packit |
d7e8d0 |
#define QGPGME_QGPGMEQUICKJOB_H
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
#include "quickjob.h"
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
#include "threadedjobmixin.h"
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
namespace GpgME {
|
|
Packit |
d7e8d0 |
class Key;
|
|
Packit |
d7e8d0 |
}
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
class QDateTime;
|
|
Packit |
d7e8d0 |
class QString;
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
namespace QGpgME{
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
/**
|
|
Packit |
d7e8d0 |
* Interface to the modern key manipulation functions.
|
|
Packit |
d7e8d0 |
*/
|
|
Packit |
d7e8d0 |
class QGpgMEQuickJob
|
|
Packit |
d7e8d0 |
#ifdef Q_MOC_RUN
|
|
Packit |
d7e8d0 |
: public QuickJob
|
|
Packit |
d7e8d0 |
#else
|
|
Packit |
d7e8d0 |
: public _detail::ThreadedJobMixin<QuickJob, std::tuple<GpgME::Error, QString, GpgME::Error> >
|
|
Packit |
d7e8d0 |
#endif
|
|
Packit |
d7e8d0 |
{
|
|
Packit |
d7e8d0 |
Q_OBJECT
|
|
Packit |
d7e8d0 |
#ifdef Q_MOC_RUN
|
|
Packit |
d7e8d0 |
public Q_SLOTS:
|
|
Packit |
d7e8d0 |
void slotFinished();
|
|
Packit |
d7e8d0 |
#endif
|
|
Packit |
d7e8d0 |
public:
|
|
Packit |
d7e8d0 |
explicit QGpgMEQuickJob(GpgME::Context *context);
|
|
Packit |
d7e8d0 |
~QGpgMEQuickJob();
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
void startCreate(const QString &uid,
|
|
Packit |
d7e8d0 |
const char *algo,
|
|
Packit |
d7e8d0 |
const QDateTime &expires = QDateTime(),
|
|
Packit |
d7e8d0 |
const GpgME::Key &key = GpgME::Key(),
|
|
Packit |
d7e8d0 |
unsigned int flags = 0) Q_DECL_OVERRIDE;
|
|
Packit |
d7e8d0 |
void startAddUid(const GpgME::Key &key, const QString &uid) Q_DECL_OVERRIDE;
|
|
Packit |
d7e8d0 |
void startRevUid(const GpgME::Key &key, const QString &uid) Q_DECL_OVERRIDE;
|
|
Packit |
d7e8d0 |
void startAddSubkey(const GpgME::Key &key, const char *algo,
|
|
Packit |
d7e8d0 |
const QDateTime &expires = QDateTime(),
|
|
Packit |
d7e8d0 |
unsigned int flags = 0) Q_DECL_OVERRIDE;
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
Q_SIGNALS:
|
|
Packit |
d7e8d0 |
void result(const GpgME::Error &error,
|
|
Packit |
d7e8d0 |
const QString &auditLogAsHtml, const GpgME::Error &auditLogError);
|
|
Packit |
d7e8d0 |
};
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
}
|
|
Packit |
d7e8d0 |
#endif
|