From f47bc992ae6ca6a9043d4de5bfc10179e4676256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Thu, 28 Apr 2022 12:04:10 +0200 Subject: qt: Rename QGpgMERefreshKeysJob to QGpgMERefreshSMIMEKeysJob * lang/qt/src/qgpgmerefreshkeysjob.h, lang/qt/src/qgpgmerefreshkeysjob.cpp: Change name to * lang/qt/src/qgpgmerefreshsmimekeysjob.h, lang/qt/src/qgpgmerefreshsmimekeysjob.cpp: ... this, and adapt the include guard. (class QGpgMERefreshKeysJob): Rename to QGpgMERefreshSMIMEKeysJob. * lang/qt/src/Makefile.am: Adapt mentioned file names accordingly. * lang/qt/src/protocol_p.h (Protocol::refreshKeysJob): Use renamed class. -- To avoid confusion with a similar job for OpenPGP keys with a completely different implementation, we rename this class to make clear that it is specific for S/MIME keys. GnuPG-bug-id: 5951 --- lang/qt/src/Makefile.am | 6 +- lang/qt/src/protocol_p.h | 4 +- lang/qt/src/qgpgmerefreshkeysjob.cpp | 230 ------------------------------ lang/qt/src/qgpgmerefreshkeysjob.h | 80 ----------- lang/qt/src/qgpgmerefreshsmimekeysjob.cpp | 230 ++++++++++++++++++++++++++++++ lang/qt/src/qgpgmerefreshsmimekeysjob.h | 80 +++++++++++ 6 files changed, 315 insertions(+), 315 deletions(-) delete mode 100644 lang/qt/src/qgpgmerefreshkeysjob.cpp delete mode 100644 lang/qt/src/qgpgmerefreshkeysjob.h create mode 100644 lang/qt/src/qgpgmerefreshsmimekeysjob.cpp create mode 100644 lang/qt/src/qgpgmerefreshsmimekeysjob.h diff --git a/lang/qt/src/Makefile.am b/lang/qt/src/Makefile.am index 3b0b9c3c..e20d239d 100644 --- a/lang/qt/src/Makefile.am +++ b/lang/qt/src/Makefile.am @@ -35,7 +35,7 @@ qgpgme_sources = \ qgpgmeimportjob.cpp qgpgmekeygenerationjob.cpp qgpgmekeylistjob.cpp \ qgpgmelistallkeysjob.cpp qgpgmenewcryptoconfig.cpp \ qgpgmereceivekeysjob.cpp \ - qgpgmerefreshkeysjob.cpp \ + qgpgmerefreshsmimekeysjob.cpp \ qgpgmerevokekeyjob.cpp \ qgpgmesignencryptjob.cpp \ qgpgmesignjob.cpp qgpgmesignkeyjob.cpp qgpgmeverifydetachedjob.cpp \ @@ -161,7 +161,7 @@ private_qgpgme_headers = \ qgpgmekeylistjob.h \ qgpgmelistallkeysjob.h \ qgpgmereceivekeysjob.h \ - qgpgmerefreshkeysjob.h \ + qgpgmerefreshsmimekeysjob.h \ qgpgmerevokekeyjob.h \ qgpgmesignencryptjob.h \ qgpgmesignjob.h \ @@ -215,7 +215,7 @@ qgpgme_moc_sources = \ qgpgmekeylistjob.moc \ qgpgmelistallkeysjob.moc \ qgpgmereceivekeysjob.moc \ - qgpgmerefreshkeysjob.moc \ + qgpgmerefreshsmimekeysjob.moc \ qgpgmerevokekeyjob.moc \ qgpgmesignencryptjob.moc \ qgpgmesignjob.moc \ diff --git a/lang/qt/src/protocol_p.h b/lang/qt/src/protocol_p.h index 2ca1cf18..91c522f1 100644 --- a/lang/qt/src/protocol_p.h +++ b/lang/qt/src/protocol_p.h @@ -42,7 +42,7 @@ #include "qgpgmelistallkeysjob.h" #include "qgpgmedecryptjob.h" #include "qgpgmedecryptverifyjob.h" -#include "qgpgmerefreshkeysjob.h" +#include "qgpgmerefreshsmimekeysjob.h" #include "qgpgmedeletejob.h" #include "qgpgmedownloadjob.h" #include "qgpgmesignencryptjob.h" @@ -288,7 +288,7 @@ public: } // this operation is not supported by gpgme, so we have to call gpgsm ourselves: - return new QGpgME::QGpgMERefreshKeysJob(); + return new QGpgME::QGpgMERefreshSMIMEKeysJob(); } QGpgME::DownloadJob *downloadJob(bool armor) const Q_DECL_OVERRIDE diff --git a/lang/qt/src/qgpgmerefreshkeysjob.cpp b/lang/qt/src/qgpgmerefreshkeysjob.cpp deleted file mode 100644 index 5f78f2ae..00000000 --- a/lang/qt/src/qgpgmerefreshkeysjob.cpp +++ /dev/null @@ -1,230 +0,0 @@ -/* - qgpgmerefreshkeysjob.cpp - - This file is part of qgpgme, the Qt API binding for gpgme - Copyright (c) 2004 Klarävdalens Datakonsult AB - Copyright (c) 2016 by Bundesamt für Sicherheit in der Informationstechnik - Software engineering by Intevation GmbH - - QGpgME is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - QGpgME is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - In addition, as a special exception, the copyright holders give - permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked - combinations including the two. You must obey the GNU General - Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to - your version of the file, but you are not obligated to do so. If - you do not wish to do so, delete this exception statement from - your version. -*/ - -#define MAX_CMD_LENGTH 32768 - -#ifdef HAVE_CONFIG_H - #include "config.h" -#endif - -#include "qgpgmerefreshkeysjob.h" - -#include -#include "qgpgme_debug.h" - -#include "context.h" - -#include -#include - -#include - -#include - -QGpgME::QGpgMERefreshKeysJob::QGpgMERefreshKeysJob() - : RefreshKeysJob(nullptr), - mProcess(nullptr), - mError(0) -{ - -} - -QGpgME::QGpgMERefreshKeysJob::~QGpgMERefreshKeysJob() -{ - -} - -GpgME::Error QGpgME::QGpgMERefreshKeysJob::start(const QStringList &patterns) -{ - assert(mPatternsToDo.empty()); - - mPatternsToDo = patterns; - if (mPatternsToDo.empty()) { - mPatternsToDo.push_back(QStringLiteral(" ")); // empty list means all -> mae - } - // sure to fail the first - // startAProcess() guard clause - - return startAProcess(); -} - -#if MAX_CMD_LENGTH < 65 + 128 -#error MAX_CMD_LENGTH is too low -#endif - -GpgME::Error QGpgME::QGpgMERefreshKeysJob::startAProcess() -{ - if (mPatternsToDo.empty()) { - return GpgME::Error(); - } - // create and start gpgsm process: - mProcess = new QProcess(this); - mProcess->setObjectName(QStringLiteral("gpgsm -k --with-validation --force-crl-refresh --enable-crl-checks")); - - // FIXME: obbtain the path to gpgsm from gpgme, so we use the same instance. - mProcess->setProgram(QStringLiteral("gpgsm")); - QStringList arguments; - arguments << QStringLiteral("-k") - << QStringLiteral("--with-validation") - << QStringLiteral("--force-crl-refresh") - << QStringLiteral("--enable-crl-checks"); - unsigned int commandLineLength = MAX_CMD_LENGTH; - commandLineLength -= - strlen("gpgsm") + 1 + strlen("-k") + 1 + - strlen("--with-validation") + 1 + strlen("--force-crl-refresh") + 1 + - strlen("--enable-crl-checks") + 1; - while (!mPatternsToDo.empty()) { - const QByteArray pat = mPatternsToDo.front().toUtf8().trimmed(); - const unsigned int patLength = pat.length(); - if (patLength >= commandLineLength) { - break; - } - mPatternsToDo.pop_front(); - if (pat.isEmpty()) { - continue; - } - arguments << QLatin1String(pat); - commandLineLength -= patLength + 1; - } - - mProcess->setArguments(arguments); - - connect(mProcess, SIGNAL(finished(int,QProcess::ExitStatus)), - SLOT(slotProcessExited(int,QProcess::ExitStatus))); - connect(mProcess, SIGNAL(readyReadStandardOutput()), - SLOT(slotStdout())); - connect(mProcess, &QProcess::readyReadStandardError, - this, &QGpgMERefreshKeysJob::slotStderr); - - mProcess->start(); - if (!mProcess->waitForStarted()) { - mError = GpgME::Error::fromCode(GPG_ERR_ENOENT, GPG_ERR_SOURCE_GPGSM); // what else? - deleteLater(); - return mError; - } else { - return GpgME::Error(); - } -} - -void QGpgME::QGpgMERefreshKeysJob::slotCancel() -{ - if (mProcess) { - mProcess->kill(); - } - mProcess = nullptr; - mError = GpgME::Error::fromCode(GPG_ERR_CANCELED, GPG_ERR_SOURCE_GPGSM); -} - -void QGpgME::QGpgMERefreshKeysJob::slotStatus(QProcess *proc, const QString &type, const QStringList &args) -{ - if (proc != mProcess) { - return; - } - QStringList::const_iterator it = args.begin(); - bool ok = false; - - if (type == QLatin1String("ERROR")) { - - if (args.size() < 2) { - qCDebug(QGPGME_LOG) << "not recognising ERROR with < 2 args!"; - return; - } - const int source = (*++it).toInt(&ok); - if (!ok) { - qCDebug(QGPGME_LOG) << "expected number for first ERROR arg, got something else"; - return; - } - ok = false; - const int code = (*++it).toInt(&ok); - if (!ok) { - qCDebug(QGPGME_LOG) << "expected number for second ERROR arg, got something else"; - return; - } - mError = GpgME::Error::fromCode(code, source); - - } else if (type == QLatin1String("PROGRESS")) { - - if (args.size() < 4) { - qCDebug(QGPGME_LOG) << "not recognising PROGRESS with < 4 args!"; - return; - } - const QString what = *++it; - ok = false; - (*++it).toInt(&ok); - if (!ok) { - qCDebug(QGPGME_LOG) << "expected number for \"type\", got something else"; - return; - } - ok = false; - const int cur = (*++it).toInt(&ok); - if (!ok) { - qCDebug(QGPGME_LOG) << "expected number for \"cur\", got something else"; - return; - } - ok = false; - const int total = (*++it).toInt(&ok); - if (!ok) { - qCDebug(QGPGME_LOG) << "expected number for \"total\", got something else"; - return; - } - // TODO port - Q_EMIT progress(QString(), cur, total); - - } -} - -void QGpgME::QGpgMERefreshKeysJob::slotStderr() -{ - // implement? or not? -} - -void QGpgME::QGpgMERefreshKeysJob::slotProcessExited(int exitCode, QProcess::ExitStatus exitStatus) -{ - if (!mError && !mPatternsToDo.empty()) { - if (const GpgME::Error err = startAProcess()) { - mError = err; - } else { - return; - } - } - - Q_EMIT done(); - if (!mError && - (exitStatus != QProcess::NormalExit || exitCode != 0)) { - mError = GpgME::Error::fromCode(GPG_ERR_GENERAL, GPG_ERR_SOURCE_GPGSM); - } - Q_EMIT result(mError); - deleteLater(); -} -#include "qgpgmerefreshkeysjob.moc" diff --git a/lang/qt/src/qgpgmerefreshkeysjob.h b/lang/qt/src/qgpgmerefreshkeysjob.h deleted file mode 100644 index 4dfd942f..00000000 --- a/lang/qt/src/qgpgmerefreshkeysjob.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - qgpgmerefreshkeysjob.h - - This file is part of qgpgme, the Qt API binding for gpgme - Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 by Bundesamt für Sicherheit in der Informationstechnik - Software engineering by Intevation GmbH - - QGpgME is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - QGpgME is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - In addition, as a special exception, the copyright holders give - permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked - combinations including the two. You must obey the GNU General - Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to - your version of the file, but you are not obligated to do so. If - you do not wish to do so, delete this exception statement from - your version. -*/ - -#ifndef __QGPGME_QGPGMEREFRESHKEYSJOB_H__ -#define __QGPGME_QGPGMEREFRESHKEYSJOB_H__ - -#include "refreshkeysjob.h" -#ifdef BUILDING_QGPGME -# include "context.h" -#else -#include "gpgme++/context.h" -#endif - -#include -#include - -namespace QGpgME -{ - -class QGpgMERefreshKeysJob : public RefreshKeysJob -{ - Q_OBJECT -public: - QGpgMERefreshKeysJob(); - ~QGpgMERefreshKeysJob(); - - /* from RefreshKeysJob */ - GpgME::Error start(const QStringList &patterns) Q_DECL_OVERRIDE; - -private Q_SLOTS: - /* from Job */ - void slotCancel() Q_DECL_OVERRIDE; - - void slotStatus(QProcess *, const QString &, const QStringList &); - void slotStderr(); - void slotProcessExited(int exitCode, QProcess::ExitStatus exitStatus); - -private: - GpgME::Error startAProcess(); - -private: - QProcess *mProcess; - GpgME::Error mError; - QStringList mPatternsToDo; -}; - -} - -#endif // __QGPGME_QGPGMEREFRESHKEYSJOB_H__ diff --git a/lang/qt/src/qgpgmerefreshsmimekeysjob.cpp b/lang/qt/src/qgpgmerefreshsmimekeysjob.cpp new file mode 100644 index 00000000..e300454b --- /dev/null +++ b/lang/qt/src/qgpgmerefreshsmimekeysjob.cpp @@ -0,0 +1,230 @@ +/* + qgpgmerefreshsmimekeysjob.cpp + + This file is part of qgpgme, the Qt API binding for gpgme + Copyright (c) 2004 Klarävdalens Datakonsult AB + Copyright (c) 2016 by Bundesamt für Sicherheit in der Informationstechnik + Software engineering by Intevation GmbH + + QGpgME is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + QGpgME is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + In addition, as a special exception, the copyright holders give + permission to link the code of this program with any edition of + the Qt library by Trolltech AS, Norway (or with modified versions + of Qt that use the same license as Qt), and distribute linked + combinations including the two. You must obey the GNU General + Public License in all respects for all of the code used other than + Qt. If you modify this file, you may extend this exception to + your version of the file, but you are not obligated to do so. If + you do not wish to do so, delete this exception statement from + your version. +*/ + +#define MAX_CMD_LENGTH 32768 + +#ifdef HAVE_CONFIG_H + #include "config.h" +#endif + +#include "qgpgmerefreshsmimekeysjob.h" + +#include +#include "qgpgme_debug.h" + +#include "context.h" + +#include +#include + +#include + +#include + +QGpgME::QGpgMERefreshSMIMEKeysJob::QGpgMERefreshSMIMEKeysJob() + : RefreshKeysJob(nullptr), + mProcess(nullptr), + mError(0) +{ + +} + +QGpgME::QGpgMERefreshSMIMEKeysJob::~QGpgMERefreshSMIMEKeysJob() +{ + +} + +GpgME::Error QGpgME::QGpgMERefreshSMIMEKeysJob::start(const QStringList &patterns) +{ + assert(mPatternsToDo.empty()); + + mPatternsToDo = patterns; + if (mPatternsToDo.empty()) { + mPatternsToDo.push_back(QStringLiteral(" ")); // empty list means all -> mae + } + // sure to fail the first + // startAProcess() guard clause + + return startAProcess(); +} + +#if MAX_CMD_LENGTH < 65 + 128 +#error MAX_CMD_LENGTH is too low +#endif + +GpgME::Error QGpgME::QGpgMERefreshSMIMEKeysJob::startAProcess() +{ + if (mPatternsToDo.empty()) { + return GpgME::Error(); + } + // create and start gpgsm process: + mProcess = new QProcess(this); + mProcess->setObjectName(QStringLiteral("gpgsm -k --with-validation --force-crl-refresh --enable-crl-checks")); + + // FIXME: obbtain the path to gpgsm from gpgme, so we use the same instance. + mProcess->setProgram(QStringLiteral("gpgsm")); + QStringList arguments; + arguments << QStringLiteral("-k") + << QStringLiteral("--with-validation") + << QStringLiteral("--force-crl-refresh") + << QStringLiteral("--enable-crl-checks"); + unsigned int commandLineLength = MAX_CMD_LENGTH; + commandLineLength -= + strlen("gpgsm") + 1 + strlen("-k") + 1 + + strlen("--with-validation") + 1 + strlen("--force-crl-refresh") + 1 + + strlen("--enable-crl-checks") + 1; + while (!mPatternsToDo.empty()) { + const QByteArray pat = mPatternsToDo.front().toUtf8().trimmed(); + const unsigned int patLength = pat.length(); + if (patLength >= commandLineLength) { + break; + } + mPatternsToDo.pop_front(); + if (pat.isEmpty()) { + continue; + } + arguments << QLatin1String(pat); + commandLineLength -= patLength + 1; + } + + mProcess->setArguments(arguments); + + connect(mProcess, SIGNAL(finished(int,QProcess::ExitStatus)), + SLOT(slotProcessExited(int,QProcess::ExitStatus))); + connect(mProcess, SIGNAL(readyReadStandardOutput()), + SLOT(slotStdout())); + connect(mProcess, &QProcess::readyReadStandardError, + this, &QGpgMERefreshSMIMEKeysJob::slotStderr); + + mProcess->start(); + if (!mProcess->waitForStarted()) { + mError = GpgME::Error::fromCode(GPG_ERR_ENOENT, GPG_ERR_SOURCE_GPGSM); // what else? + deleteLater(); + return mError; + } else { + return GpgME::Error(); + } +} + +void QGpgME::QGpgMERefreshSMIMEKeysJob::slotCancel() +{ + if (mProcess) { + mProcess->kill(); + } + mProcess = nullptr; + mError = GpgME::Error::fromCode(GPG_ERR_CANCELED, GPG_ERR_SOURCE_GPGSM); +} + +void QGpgME::QGpgMERefreshSMIMEKeysJob::slotStatus(QProcess *proc, const QString &type, const QStringList &args) +{ + if (proc != mProcess) { + return; + } + QStringList::const_iterator it = args.begin(); + bool ok = false; + + if (type == QLatin1String("ERROR")) { + + if (args.size() < 2) { + qCDebug(QGPGME_LOG) << "not recognising ERROR with < 2 args!"; + return; + } + const int source = (*++it).toInt(&ok); + if (!ok) { + qCDebug(QGPGME_LOG) << "expected number for first ERROR arg, got something else"; + return; + } + ok = false; + const int code = (*++it).toInt(&ok); + if (!ok) { + qCDebug(QGPGME_LOG) << "expected number for second ERROR arg, got something else"; + return; + } + mError = GpgME::Error::fromCode(code, source); + + } else if (type == QLatin1String("PROGRESS")) { + + if (args.size() < 4) { + qCDebug(QGPGME_LOG) << "not recognising PROGRESS with < 4 args!"; + return; + } + const QString what = *++it; + ok = false; + (*++it).toInt(&ok); + if (!ok) { + qCDebug(QGPGME_LOG) << "expected number for \"type\", got something else"; + return; + } + ok = false; + const int cur = (*++it).toInt(&ok); + if (!ok) { + qCDebug(QGPGME_LOG) << "expected number for \"cur\", got something else"; + return; + } + ok = false; + const int total = (*++it).toInt(&ok); + if (!ok) { + qCDebug(QGPGME_LOG) << "expected number for \"total\", got something else"; + return; + } + // TODO port + Q_EMIT progress(QString(), cur, total); + + } +} + +void QGpgME::QGpgMERefreshSMIMEKeysJob::slotStderr() +{ + // implement? or not? +} + +void QGpgME::QGpgMERefreshSMIMEKeysJob::slotProcessExited(int exitCode, QProcess::ExitStatus exitStatus) +{ + if (!mError && !mPatternsToDo.empty()) { + if (const GpgME::Error err = startAProcess()) { + mError = err; + } else { + return; + } + } + + Q_EMIT done(); + if (!mError && + (exitStatus != QProcess::NormalExit || exitCode != 0)) { + mError = GpgME::Error::fromCode(GPG_ERR_GENERAL, GPG_ERR_SOURCE_GPGSM); + } + Q_EMIT result(mError); + deleteLater(); +} +#include "qgpgmerefreshsmimekeysjob.moc" diff --git a/lang/qt/src/qgpgmerefreshsmimekeysjob.h b/lang/qt/src/qgpgmerefreshsmimekeysjob.h new file mode 100644 index 00000000..8ed0b379 --- /dev/null +++ b/lang/qt/src/qgpgmerefreshsmimekeysjob.h @@ -0,0 +1,80 @@ +/* + qgpgmerefreshsmimekeysjob.h + + This file is part of qgpgme, the Qt API binding for gpgme + Copyright (c) 2004 Klarälvdalens Datakonsult AB + Copyright (c) 2016 by Bundesamt für Sicherheit in der Informationstechnik + Software engineering by Intevation GmbH + + QGpgME is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + QGpgME is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + In addition, as a special exception, the copyright holders give + permission to link the code of this program with any edition of + the Qt library by Trolltech AS, Norway (or with modified versions + of Qt that use the same license as Qt), and distribute linked + combinations including the two. You must obey the GNU General + Public License in all respects for all of the code used other than + Qt. If you modify this file, you may extend this exception to + your version of the file, but you are not obligated to do so. If + you do not wish to do so, delete this exception statement from + your version. +*/ + +#ifndef __QGPGME_QGPGMEREFRESHSMIMEKEYSJOB_H__ +#define __QGPGME_QGPGMEREFRESHSMIMEKEYSJOB_H__ + +#include "refreshkeysjob.h" +#ifdef BUILDING_QGPGME +# include "context.h" +#else +#include "gpgme++/context.h" +#endif + +#include +#include + +namespace QGpgME +{ + +class QGpgMERefreshSMIMEKeysJob : public RefreshKeysJob +{ + Q_OBJECT +public: + QGpgMERefreshSMIMEKeysJob(); + ~QGpgMERefreshSMIMEKeysJob(); + + /* from RefreshKeysJob */ + GpgME::Error start(const QStringList &patterns) Q_DECL_OVERRIDE; + +private Q_SLOTS: + /* from Job */ + void slotCancel() Q_DECL_OVERRIDE; + + void slotStatus(QProcess *, const QString &, const QStringList &); + void slotStderr(); + void slotProcessExited(int exitCode, QProcess::ExitStatus exitStatus); + +private: + GpgME::Error startAProcess(); + +private: + QProcess *mProcess; + GpgME::Error mError; + QStringList mPatternsToDo; +}; + +} + +#endif // __QGPGME_QGPGMEREFRESHSMIMEKEYSJOB_H__ -- cgit v1.2.3