diff options
Diffstat (limited to 'lang/qt/src')
102 files changed, 534 insertions, 111 deletions
diff --git a/lang/qt/src/Makefile.am b/lang/qt/src/Makefile.am index c81461e..3225142 100644 --- a/lang/qt/src/Makefile.am +++ b/lang/qt/src/Makefile.am @@ -1,5 +1,6 @@ # Makefile.am for GPGMEPP. -# Copyright (C) 2016 Intevation GmbH +# Copyright (C) 2016 Bundesamt für Sicherheit in der Informationstechnik +# Software engineering by Intevation GmbH # # This file is part of GPGMEPP. # @@ -35,7 +36,7 @@ qgpgme_sources = \ qgpgmesignjob.cpp qgpgmesignkeyjob.cpp qgpgmeverifydetachedjob.cpp \ qgpgmeverifyopaquejob.cpp threadedjobmixin.cpp \ qgpgmekeyformailboxjob.cpp gpgme_backend_debug.cpp \ - qgpgmetofupolicyjob.cpp \ + qgpgmetofupolicyjob.cpp qgpgmequickjob.cpp \ defaultkeygenerationjob.cpp qgpgmewkspublishjob.cpp \ dn.cpp cryptoconfig.cpp @@ -59,6 +60,7 @@ qgpgme_headers= \ protocol.h \ qgpgme_export.h \ qgpgmenewcryptoconfig.h \ + quickjob.h \ specialjob.h \ signjob.h \ signkeyjob.h \ @@ -96,6 +98,7 @@ camelcase_headers= \ MultiDeleteJob \ Protocol \ QGpgMENewCryptoConfig \ + QuickJob \ SpecialJob \ SignJob \ SignKeyJob \ @@ -144,6 +147,7 @@ private_qgpgme_headers = \ qgpgmekeyformailboxjob.h \ qgpgmewkspublishjob.h \ qgpgmetofupolicyjob.h \ + qgpgmequickjob.h \ threadedjobmixin.h qgpgme_moc_sources = \ @@ -201,7 +205,9 @@ qgpgme_moc_sources = \ keyformailboxjob.moc \ wkspublishjob.moc \ qgpgmekeyformailboxjob.moc \ - defaultkeygenerationjob.moc + defaultkeygenerationjob.moc \ + quickjob.moc \ + qgpgmequickjob.moc qgpgmeincludedir = $(includedir)/qgpgme qgpgmeinclude_HEADERS = $(qgpgme_headers) diff --git a/lang/qt/src/Makefile.in b/lang/qt/src/Makefile.in index 635aaaa..c35e288 100644 --- a/lang/qt/src/Makefile.in +++ b/lang/qt/src/Makefile.in @@ -154,8 +154,8 @@ am__objects_1 = dataprovider.lo job.lo multideletejob.lo \ qgpgmeverifydetachedjob.lo qgpgmeverifyopaquejob.lo \ threadedjobmixin.lo qgpgmekeyformailboxjob.lo \ gpgme_backend_debug.lo qgpgmetofupolicyjob.lo \ - defaultkeygenerationjob.lo qgpgmewkspublishjob.lo dn.lo \ - cryptoconfig.lo + qgpgmequickjob.lo defaultkeygenerationjob.lo \ + qgpgmewkspublishjob.lo dn.lo cryptoconfig.lo am__objects_2 = am_libqgpgme_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ $(am__objects_2) @@ -369,7 +369,6 @@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ -PYTHON_VERSIONS = @PYTHON_VERSIONS@ QTCHOOSER = @QTCHOOSER@ RANLIB = @RANLIB@ RC = @RC@ @@ -447,7 +446,8 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Makefile.am for GPGMEPP. -# Copyright (C) 2016 Intevation GmbH +# Copyright (C) 2016 Bundesamt für Sicherheit in der Informationstechnik +# Software engineering by Intevation GmbH # # This file is part of GPGMEPP. # @@ -483,7 +483,7 @@ qgpgme_sources = \ qgpgmesignjob.cpp qgpgmesignkeyjob.cpp qgpgmeverifydetachedjob.cpp \ qgpgmeverifyopaquejob.cpp threadedjobmixin.cpp \ qgpgmekeyformailboxjob.cpp gpgme_backend_debug.cpp \ - qgpgmetofupolicyjob.cpp \ + qgpgmetofupolicyjob.cpp qgpgmequickjob.cpp \ defaultkeygenerationjob.cpp qgpgmewkspublishjob.cpp \ dn.cpp cryptoconfig.cpp @@ -508,6 +508,7 @@ qgpgme_headers = \ protocol.h \ qgpgme_export.h \ qgpgmenewcryptoconfig.h \ + quickjob.h \ specialjob.h \ signjob.h \ signkeyjob.h \ @@ -545,6 +546,7 @@ camelcase_headers = \ MultiDeleteJob \ Protocol \ QGpgMENewCryptoConfig \ + QuickJob \ SpecialJob \ SignJob \ SignKeyJob \ @@ -593,6 +595,7 @@ private_qgpgme_headers = \ qgpgmekeyformailboxjob.h \ qgpgmewkspublishjob.h \ qgpgmetofupolicyjob.h \ + qgpgmequickjob.h \ threadedjobmixin.h qgpgme_moc_sources = \ @@ -650,7 +653,9 @@ qgpgme_moc_sources = \ keyformailboxjob.moc \ wkspublishjob.moc \ qgpgmekeyformailboxjob.moc \ - defaultkeygenerationjob.moc + defaultkeygenerationjob.moc \ + quickjob.moc \ + qgpgmequickjob.moc qgpgmeincludedir = $(includedir)/qgpgme qgpgmeinclude_HEADERS = $(qgpgme_headers) @@ -789,6 +794,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qgpgmekeylistjob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qgpgmelistallkeysjob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qgpgmenewcryptoconfig.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qgpgmequickjob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qgpgmerefreshkeysjob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qgpgmesecretkeyexportjob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qgpgmesignencryptjob.Plo@am__quote@ diff --git a/lang/qt/src/QuickJob b/lang/qt/src/QuickJob new file mode 100644 index 0000000..43b89d2 --- /dev/null +++ b/lang/qt/src/QuickJob @@ -0,0 +1 @@ +#include "qgpgme/quickjob.h" diff --git a/lang/qt/src/abstractimportjob.h b/lang/qt/src/abstractimportjob.h index 572f203..ab6b530 100644 --- a/lang/qt/src/abstractimportjob.h +++ b/lang/qt/src/abstractimportjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2009 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/adduseridjob.h b/lang/qt/src/adduseridjob.h index 1b5676f..cc3963c 100644 --- a/lang/qt/src/adduseridjob.h +++ b/lang/qt/src/adduseridjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/changeexpiryjob.h b/lang/qt/src/changeexpiryjob.h index 7902cb8..9083479 100644 --- a/lang/qt/src/changeexpiryjob.h +++ b/lang/qt/src/changeexpiryjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/changeownertrustjob.h b/lang/qt/src/changeownertrustjob.h index 75c1163..42a806a 100644 --- a/lang/qt/src/changeownertrustjob.h +++ b/lang/qt/src/changeownertrustjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/changepasswdjob.h b/lang/qt/src/changepasswdjob.h index 7290898..44de77c 100644 --- a/lang/qt/src/changepasswdjob.h +++ b/lang/qt/src/changepasswdjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2010 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/cryptoconfig.cpp b/lang/qt/src/cryptoconfig.cpp index be265d8..7121220 100644 --- a/lang/qt/src/cryptoconfig.cpp +++ b/lang/qt/src/cryptoconfig.cpp @@ -2,7 +2,8 @@ cryptoconfig.cpp This file is part of qgpgme, the Qt API binding for gpgme - Copyright (c) 2017 Intevation GmbH + Copyright (c) 2017 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 diff --git a/lang/qt/src/cryptoconfig.h b/lang/qt/src/cryptoconfig.h index c4de22d..d545e59 100644 --- a/lang/qt/src/cryptoconfig.h +++ b/lang/qt/src/cryptoconfig.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/dataprovider.cpp b/lang/qt/src/dataprovider.cpp index 8385686..a025a03 100644 --- a/lang/qt/src/dataprovider.cpp +++ b/lang/qt/src/dataprovider.cpp @@ -1,6 +1,7 @@ /* dataprovider.cpp Copyright (C) 2004 Klarävdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + Copyright (c) 2016 by Bundesamt für Sicherheit in der Informationstechnik + Software engineering by Intevation GmbH This file is part of QGPGME. @@ -184,7 +185,11 @@ static qint64 blocking_read(const std::shared_ptr<QIODevice> &io, char *buffer, if (p->error() == QProcess::UnknownError && p->exitStatus() == QProcess::NormalExit && p->exitCode() == 0) { - return 0; + if (io->atEnd()) { + // EOF + return 0; + } // continue reading even if process ended to ensure + // everything is read. } else { Error::setSystemError(GPG_ERR_EIO); return -1; diff --git a/lang/qt/src/dataprovider.h b/lang/qt/src/dataprovider.h index 337f264..980a6a9 100644 --- a/lang/qt/src/dataprovider.h +++ b/lang/qt/src/dataprovider.h @@ -1,6 +1,7 @@ /* dataprovider.h Copyright (C) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + Copyright (c) 2016 by Bundesamt für Sicherheit in der Informationstechnik + Software engineering by Intevation GmbH This file is part of QGPGME. diff --git a/lang/qt/src/decryptjob.h b/lang/qt/src/decryptjob.h index c4fc86f..7753e18 100644 --- a/lang/qt/src/decryptjob.h +++ b/lang/qt/src/decryptjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004, 2007 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 @@ -75,7 +76,7 @@ public: Starts the decryption operation. \a cipherText is the data to decrypt. */ - virtual QGPGME_DEPRECATED_EXPORT GpgME::Error start(const QByteArray &cipherText) = 0; + virtual GpgME::Error start(const QByteArray &cipherText) = 0; /*! \overload diff --git a/lang/qt/src/decryptverifyjob.h b/lang/qt/src/decryptverifyjob.h index 97af008..e5c4346 100644 --- a/lang/qt/src/decryptverifyjob.h +++ b/lang/qt/src/decryptverifyjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004, 2007 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 @@ -76,7 +77,7 @@ public: Starts the combined decryption and verification operation. \a cipherText is the data to decrypt and later verify. */ - virtual QGPGME_DEPRECATED_EXPORT GpgME::Error start(const QByteArray &cipherText) = 0; + virtual GpgME::Error start(const QByteArray &cipherText) = 0; /*! \overload diff --git a/lang/qt/src/defaultkeygenerationjob.h b/lang/qt/src/defaultkeygenerationjob.h index 5b7334c..fcefc4b 100644 --- a/lang/qt/src/defaultkeygenerationjob.h +++ b/lang/qt/src/defaultkeygenerationjob.h @@ -1,6 +1,8 @@ /* defaultkeygenerationjob.h Copyright (c) 2016 Klarälvdalens Datakonsult AB + 2016 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 diff --git a/lang/qt/src/deletejob.h b/lang/qt/src/deletejob.h index f8479b1..7ab0dd0 100644 --- a/lang/qt/src/deletejob.h +++ b/lang/qt/src/deletejob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/dn.cpp b/lang/qt/src/dn.cpp index f9fb2f6..d122333 100644 --- a/lang/qt/src/dn.cpp +++ b/lang/qt/src/dn.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 @@ -167,7 +168,7 @@ parse_dn_part(DnPair *array, const unsigned char *string) for (unsigned int i = 0; i < numOidMaps; ++i) if (!strcasecmp((char *)p, oidmap[i].oid)) { free(p); - gpgrt_asprintf(&p, oidmap[i].name); + gpgrt_asprintf(&p, "%s", oidmap[i].name); break; } array->key = p; diff --git a/lang/qt/src/dn.h b/lang/qt/src/dn.h index 17b1c30..ef6fea0 100644 --- a/lang/qt/src/dn.h +++ b/lang/qt/src/dn.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/downloadjob.h b/lang/qt/src/downloadjob.h index 09eecf6..7c8bb72 100644 --- a/lang/qt/src/downloadjob.h +++ b/lang/qt/src/downloadjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/encryptjob.h b/lang/qt/src/encryptjob.h index 4ff9c82..161a769 100644 --- a/lang/qt/src/encryptjob.h +++ b/lang/qt/src/encryptjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004, 2007 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/exportjob.h b/lang/qt/src/exportjob.h index 583d4c0..fc1f7ae 100644 --- a/lang/qt/src/exportjob.h +++ b/lang/qt/src/exportjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/hierarchicalkeylistjob.h b/lang/qt/src/hierarchicalkeylistjob.h index 2ec187d..0ebed3c 100644 --- a/lang/qt/src/hierarchicalkeylistjob.h +++ b/lang/qt/src/hierarchicalkeylistjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/importfromkeyserverjob.h b/lang/qt/src/importfromkeyserverjob.h index f548ea7..cc4a22d 100644 --- a/lang/qt/src/importfromkeyserverjob.h +++ b/lang/qt/src/importfromkeyserverjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/importjob.h b/lang/qt/src/importjob.h index 5c7b24d..7437fbd 100644 --- a/lang/qt/src/importjob.h +++ b/lang/qt/src/importjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/job.cpp b/lang/qt/src/job.cpp index 9ae3f31..c427020 100644 --- a/lang/qt/src/job.cpp +++ b/lang/qt/src/job.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2005 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 @@ -63,6 +64,7 @@ #include "wkspublishjob.h" #include "tofupolicyjob.h" #include "threadedjobmixin.h" +#include "quickjob.h" #include <QCoreApplication> #include <QDebug> @@ -138,6 +140,7 @@ make_job_subclass(SpecialJob) make_job_subclass(KeyForMailboxJob) make_job_subclass(WKSPublishJob) make_job_subclass(TofuPolicyJob) +make_job_subclass(QuickJob) #undef make_job_subclass @@ -169,3 +172,4 @@ make_job_subclass(TofuPolicyJob) #include "keyformailboxjob.moc" #include "wkspublishjob.moc" #include "tofupolicyjob.moc" +#include "quickjob.moc" diff --git a/lang/qt/src/job.h b/lang/qt/src/job.h index a0c0285..dc38360 100644 --- a/lang/qt/src/job.h +++ b/lang/qt/src/job.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/keyformailboxjob.h b/lang/qt/src/keyformailboxjob.h index d8b6c6b..42d1729 100644 --- a/lang/qt/src/keyformailboxjob.h +++ b/lang/qt/src/keyformailboxjob.h @@ -2,7 +2,8 @@ keyformailboxjob.h This file is part of qgpgme, the Qt API binding for gpgme - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/keygenerationjob.h b/lang/qt/src/keygenerationjob.h index a0beeac..04b97d9 100644 --- a/lang/qt/src/keygenerationjob.h +++ b/lang/qt/src/keygenerationjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/keylistjob.h b/lang/qt/src/keylistjob.h index 8dc736e..88eac87 100644 --- a/lang/qt/src/keylistjob.h +++ b/lang/qt/src/keylistjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/listallkeysjob.h b/lang/qt/src/listallkeysjob.h index 4fbb469..ebbdc16 100644 --- a/lang/qt/src/listallkeysjob.h +++ b/lang/qt/src/listallkeysjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/multideletejob.h b/lang/qt/src/multideletejob.h index 8e9eb14..a6eec1f 100644 --- a/lang/qt/src/multideletejob.h +++ b/lang/qt/src/multideletejob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/protocol.h b/lang/qt/src/protocol.h index 15d83e0..1a52097 100644 --- a/lang/qt/src/protocol.h +++ b/lang/qt/src/protocol.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2005 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 @@ -65,6 +66,7 @@ class SpecialJob; class KeyForMailboxJob; class WKSPublishJob; class TofuPolicyJob; +class QuickJob; /** The main entry point for QGpgME Comes in OpenPGP and SMIME(CMS) flavors. * @@ -156,6 +158,9 @@ public: /** A Job to set tofu policy */ virtual TofuPolicyJob *tofuPolicyJob() const = 0; + + /** A Job for the quick commands */ + virtual QuickJob *quickJob() const = 0; }; /** Obtain a reference to the OpenPGP Protocol. diff --git a/lang/qt/src/protocol_p.h b/lang/qt/src/protocol_p.h index 7f66fa4..b6d1abf 100644 --- a/lang/qt/src/protocol_p.h +++ b/lang/qt/src/protocol_p.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2005 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 @@ -59,6 +60,7 @@ #include "qgpgmekeyformailboxjob.h" #include "qgpgmewkspublishjob.h" #include "qgpgmetofupolicyjob.h" +#include "qgpgmequickjob.h" namespace { @@ -413,6 +415,18 @@ public: } return new QGpgME::QGpgMETofuPolicyJob(context); } + + QGpgME::QuickJob *quickJob() const Q_DECL_OVERRIDE + { + if (mProtocol != GpgME::OpenPGP) { + return Q_NULLPTR; + } + GpgME::Context *context = GpgME::Context::createForProtocol(mProtocol); + if (!context) { + return Q_NULLPTR; + } + return new QGpgME::QGpgMEQuickJob(context); + } }; } diff --git a/lang/qt/src/qgpgme_export.h b/lang/qt/src/qgpgme_export.h index 48296f7..72927fe 100644 --- a/lang/qt/src/qgpgme_export.h +++ b/lang/qt/src/qgpgme_export.h @@ -1,7 +1,8 @@ /* qgpgme_export.h - Export macros for qgpgme This file is part of qgpgme, the Qt API binding for gpgme - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmeadduseridjob.cpp b/lang/qt/src/qgpgmeadduseridjob.cpp index 4fc80d1..94894fc 100644 --- a/lang/qt/src/qgpgmeadduseridjob.cpp +++ b/lang/qt/src/qgpgmeadduseridjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmeadduseridjob.h b/lang/qt/src/qgpgmeadduseridjob.h index 294eb6c..71fa473 100644 --- a/lang/qt/src/qgpgmeadduseridjob.h +++ b/lang/qt/src/qgpgmeadduseridjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmebackend.cpp b/lang/qt/src/qgpgmebackend.cpp index f06244b..89f7b55 100644 --- a/lang/qt/src/qgpgmebackend.cpp +++ b/lang/qt/src/qgpgmebackend.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2005 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmebackend.h b/lang/qt/src/qgpgmebackend.h index cca8b71..a69b09a 100644 --- a/lang/qt/src/qgpgmebackend.h +++ b/lang/qt/src/qgpgmebackend.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2005 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmechangeexpiryjob.cpp b/lang/qt/src/qgpgmechangeexpiryjob.cpp index cf417ab..faa4e79 100644 --- a/lang/qt/src/qgpgmechangeexpiryjob.cpp +++ b/lang/qt/src/qgpgmechangeexpiryjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmechangeexpiryjob.h b/lang/qt/src/qgpgmechangeexpiryjob.h index 4abdf78..8356568 100644 --- a/lang/qt/src/qgpgmechangeexpiryjob.h +++ b/lang/qt/src/qgpgmechangeexpiryjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmechangeownertrustjob.cpp b/lang/qt/src/qgpgmechangeownertrustjob.cpp index d9a613f..0c67e98 100644 --- a/lang/qt/src/qgpgmechangeownertrustjob.cpp +++ b/lang/qt/src/qgpgmechangeownertrustjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmechangeownertrustjob.h b/lang/qt/src/qgpgmechangeownertrustjob.h index 7740616..80dc0e4 100644 --- a/lang/qt/src/qgpgmechangeownertrustjob.h +++ b/lang/qt/src/qgpgmechangeownertrustjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmechangepasswdjob.cpp b/lang/qt/src/qgpgmechangepasswdjob.cpp index b04273c..3465c6f 100644 --- a/lang/qt/src/qgpgmechangepasswdjob.cpp +++ b/lang/qt/src/qgpgmechangepasswdjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2010 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmechangepasswdjob.h b/lang/qt/src/qgpgmechangepasswdjob.h index e37789e..8910a46 100644 --- a/lang/qt/src/qgpgmechangepasswdjob.h +++ b/lang/qt/src/qgpgmechangepasswdjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2010 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmedecryptjob.cpp b/lang/qt/src/qgpgmedecryptjob.cpp index 449e9aa..598e22f 100644 --- a/lang/qt/src/qgpgmedecryptjob.cpp +++ b/lang/qt/src/qgpgmedecryptjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmedecryptjob.h b/lang/qt/src/qgpgmedecryptjob.h index 5335e84..2924378 100644 --- a/lang/qt/src/qgpgmedecryptjob.h +++ b/lang/qt/src/qgpgmedecryptjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmedecryptverifyjob.cpp b/lang/qt/src/qgpgmedecryptverifyjob.cpp index e6d3ff2..01cf247 100644 --- a/lang/qt/src/qgpgmedecryptverifyjob.cpp +++ b/lang/qt/src/qgpgmedecryptverifyjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmedecryptverifyjob.h b/lang/qt/src/qgpgmedecryptverifyjob.h index de2bce7..eaeec09 100644 --- a/lang/qt/src/qgpgmedecryptverifyjob.h +++ b/lang/qt/src/qgpgmedecryptverifyjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmedeletejob.cpp b/lang/qt/src/qgpgmedeletejob.cpp index 9145298..dffcb0c 100644 --- a/lang/qt/src/qgpgmedeletejob.cpp +++ b/lang/qt/src/qgpgmedeletejob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmedeletejob.h b/lang/qt/src/qgpgmedeletejob.h index 992442f..f5d586b 100644 --- a/lang/qt/src/qgpgmedeletejob.h +++ b/lang/qt/src/qgpgmedeletejob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmedownloadjob.cpp b/lang/qt/src/qgpgmedownloadjob.cpp index b0dca56..b5786a1 100644 --- a/lang/qt/src/qgpgmedownloadjob.cpp +++ b/lang/qt/src/qgpgmedownloadjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmedownloadjob.h b/lang/qt/src/qgpgmedownloadjob.h index 4091190..248c28f 100644 --- a/lang/qt/src/qgpgmedownloadjob.h +++ b/lang/qt/src/qgpgmedownloadjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmeencryptjob.cpp b/lang/qt/src/qgpgmeencryptjob.cpp index d13acab..aacec29 100644 --- a/lang/qt/src/qgpgmeencryptjob.cpp +++ b/lang/qt/src/qgpgmeencryptjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2007,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmeencryptjob.h b/lang/qt/src/qgpgmeencryptjob.h index 42c1c78..cba5ec9 100644 --- a/lang/qt/src/qgpgmeencryptjob.h +++ b/lang/qt/src/qgpgmeencryptjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2007,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmeexportjob.cpp b/lang/qt/src/qgpgmeexportjob.cpp index e6073f0..e2ce1f9 100644 --- a/lang/qt/src/qgpgmeexportjob.cpp +++ b/lang/qt/src/qgpgmeexportjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmeexportjob.h b/lang/qt/src/qgpgmeexportjob.h index 7561054..d529fee 100644 --- a/lang/qt/src/qgpgmeexportjob.h +++ b/lang/qt/src/qgpgmeexportjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmeimportfromkeyserverjob.cpp b/lang/qt/src/qgpgmeimportfromkeyserverjob.cpp index acefbb2..8f3b326 100644 --- a/lang/qt/src/qgpgmeimportfromkeyserverjob.cpp +++ b/lang/qt/src/qgpgmeimportfromkeyserverjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmeimportfromkeyserverjob.h b/lang/qt/src/qgpgmeimportfromkeyserverjob.h index 8c9f944..6ecce81 100644 --- a/lang/qt/src/qgpgmeimportfromkeyserverjob.h +++ b/lang/qt/src/qgpgmeimportfromkeyserverjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmeimportjob.cpp b/lang/qt/src/qgpgmeimportjob.cpp index dcabad3..a62d05f 100644 --- a/lang/qt/src/qgpgmeimportjob.cpp +++ b/lang/qt/src/qgpgmeimportjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmeimportjob.h b/lang/qt/src/qgpgmeimportjob.h index 424cb50..860db22 100644 --- a/lang/qt/src/qgpgmeimportjob.h +++ b/lang/qt/src/qgpgmeimportjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmekeyformailboxjob.cpp b/lang/qt/src/qgpgmekeyformailboxjob.cpp index 7054c78..534e9a3 100644 --- a/lang/qt/src/qgpgmekeyformailboxjob.cpp +++ b/lang/qt/src/qgpgmekeyformailboxjob.cpp @@ -2,7 +2,8 @@ qgpgmekeyformailboxjob.cpp This file is part of qgpgme, the Qt API binding for gpgme - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmekeyformailboxjob.h b/lang/qt/src/qgpgmekeyformailboxjob.h index 8ac2c1f..a14e470 100644 --- a/lang/qt/src/qgpgmekeyformailboxjob.h +++ b/lang/qt/src/qgpgmekeyformailboxjob.h @@ -4,7 +4,8 @@ This file is part of libkleopatra, the KDE keymanagement library Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB This file is part of qgpgme, the Qt API binding for gpgme - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmekeygenerationjob.cpp b/lang/qt/src/qgpgmekeygenerationjob.cpp index 31f3342..7cf4c8c 100644 --- a/lang/qt/src/qgpgmekeygenerationjob.cpp +++ b/lang/qt/src/qgpgmekeygenerationjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmekeygenerationjob.h b/lang/qt/src/qgpgmekeygenerationjob.h index 808b714..1fa28d5 100644 --- a/lang/qt/src/qgpgmekeygenerationjob.h +++ b/lang/qt/src/qgpgmekeygenerationjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmekeylistjob.cpp b/lang/qt/src/qgpgmekeylistjob.cpp index 887a902..891b0bd 100644 --- a/lang/qt/src/qgpgmekeylistjob.cpp +++ b/lang/qt/src/qgpgmekeylistjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmekeylistjob.h b/lang/qt/src/qgpgmekeylistjob.h index 2d5406a..9e505a1 100644 --- a/lang/qt/src/qgpgmekeylistjob.h +++ b/lang/qt/src/qgpgmekeylistjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmelistallkeysjob.cpp b/lang/qt/src/qgpgmelistallkeysjob.cpp index 7ba8bc9..0ed32ce 100644 --- a/lang/qt/src/qgpgmelistallkeysjob.cpp +++ b/lang/qt/src/qgpgmelistallkeysjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmelistallkeysjob.h b/lang/qt/src/qgpgmelistallkeysjob.h index 1fc69d4..091f9f1 100644 --- a/lang/qt/src/qgpgmelistallkeysjob.h +++ b/lang/qt/src/qgpgmelistallkeysjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmenewcryptoconfig.cpp b/lang/qt/src/qgpgmenewcryptoconfig.cpp index 6901eef..ba028a9 100644 --- a/lang/qt/src/qgpgmenewcryptoconfig.cpp +++ b/lang/qt/src/qgpgmenewcryptoconfig.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2010 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 @@ -48,6 +49,7 @@ #include <sstream> #include <string> +#include <functional> #include <cassert> #include <functional> diff --git a/lang/qt/src/qgpgmenewcryptoconfig.h b/lang/qt/src/qgpgmenewcryptoconfig.h index 7100e70..eade8eb 100644 --- a/lang/qt/src/qgpgmenewcryptoconfig.h +++ b/lang/qt/src/qgpgmenewcryptoconfig.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2010 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmequickjob.cpp b/lang/qt/src/qgpgmequickjob.cpp new file mode 100644 index 0000000..93027d9 --- /dev/null +++ b/lang/qt/src/qgpgmequickjob.cpp @@ -0,0 +1,123 @@ +/* qgpgmequickjob.cpp + + Copyright (c) 2017 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. +*/ + +#ifdef HAVE_CONFIG_H + #include "config.h" +#endif + +#include "qgpgmequickjob.h" + +#include "context.h" +#include "key.h" +#include "util.h" + +using namespace QGpgME; +using namespace GpgME; + +QGpgMEQuickJob::QGpgMEQuickJob(Context *context) + : mixin_type(context) +{ + lateInitialization(); +} + +QGpgMEQuickJob::~QGpgMEQuickJob() {} + +static QGpgMEQuickJob::result_type createWorker(GpgME::Context *ctx, + const QString &uid, + const char *algo, + const QDateTime &expires, + const GpgME::Key &key, + unsigned int flags) +{ + auto err = ctx->createKey(uid.toUtf8().constData(), + algo, + 0, + expires.isValid() ? (unsigned long) (expires.toMSecsSinceEpoch() / 1000) : 0, + key, + flags); + return std::make_tuple(err, QString(), Error()); +} + +static QGpgMEQuickJob::result_type addSubkeyWorker(GpgME::Context *ctx, + const GpgME::Key &key, + const char *algo, + const QDateTime &expires, + unsigned int flags) +{ + auto err = ctx->createSubkey(key, algo, 0, + expires.isValid() ? (unsigned long) (expires.toMSecsSinceEpoch() / 1000): 0, + flags); + return std::make_tuple(err, QString(), Error()); +} + +static QGpgMEQuickJob::result_type addUidWorker(GpgME::Context *ctx, + const GpgME::Key &key, + const QString &uid) +{ + auto err = ctx->addUid(key, uid.toUtf8().constData()); + return std::make_tuple(err, QString(), Error()); +} + +static QGpgMEQuickJob::result_type revUidWorker(GpgME::Context *ctx, + const GpgME::Key &key, + const QString &uid) +{ + auto err = ctx->revUid(key, uid.toUtf8().constData()); + return std::make_tuple(err, QString(), Error()); +} + +void QGpgMEQuickJob::startCreate(const QString &uid, + const char *algo, + const QDateTime &expires, + const GpgME::Key &key, + unsigned int flags) +{ + run(std::bind(&createWorker, std::placeholders::_1, uid, algo, + expires, key, flags)); +} + +void QGpgMEQuickJob::startAddUid(const GpgME::Key &key, const QString &uid) +{ + run(std::bind(&addUidWorker, std::placeholders::_1, key, uid)); +} + +void QGpgMEQuickJob::startRevUid(const GpgME::Key &key, const QString &uid) +{ + run(std::bind(&revUidWorker, std::placeholders::_1, key, uid)); +} + +void QGpgMEQuickJob::startAddSubkey(const GpgME::Key &key, const char *algo, + const QDateTime &expires, + unsigned int flags) +{ + run(std::bind(&addSubkeyWorker, std::placeholders::_1, key, algo, + expires, flags)); +} +#include "qgpgmequickjob.moc" diff --git a/lang/qt/src/qgpgmequickjob.h b/lang/qt/src/qgpgmequickjob.h new file mode 100644 index 0000000..82c7332 --- /dev/null +++ b/lang/qt/src/qgpgmequickjob.h @@ -0,0 +1,82 @@ +/* qgpgmequickjob.h + + Copyright (c) 2017 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_QGPGMEQUICKJOB_H +#define QGPGME_QGPGMEQUICKJOB_H + +#include "quickjob.h" + +#include "threadedjobmixin.h" + +namespace GpgME { +class Key; +} + +class QDateTime; +class QString; + +namespace QGpgME{ + +/** + * Interface to the modern key manipulation functions. + */ +class QGpgMEQuickJob +#ifdef Q_MOC_RUN + : public QuickJob +#else + : public _detail::ThreadedJobMixin<QuickJob, std::tuple<GpgME::Error, QString, GpgME::Error> > +#endif +{ + Q_OBJECT +#ifdef Q_MOC_RUN +public Q_SLOTS: + void slotFinished(); +#endif +public: + explicit QGpgMEQuickJob(GpgME::Context *context); + ~QGpgMEQuickJob(); + + void startCreate(const QString &uid, + const char *algo, + const QDateTime &expires = QDateTime(), + const GpgME::Key &key = GpgME::Key(), + unsigned int flags = 0) Q_DECL_OVERRIDE; + void startAddUid(const GpgME::Key &key, const QString &uid) Q_DECL_OVERRIDE; + void startRevUid(const GpgME::Key &key, const QString &uid) Q_DECL_OVERRIDE; + void startAddSubkey(const GpgME::Key &key, const char *algo, + const QDateTime &expires = QDateTime(), + unsigned int flags = 0) Q_DECL_OVERRIDE; + +Q_SIGNALS: + void result(const GpgME::Error &error, + const QString &auditLogAsHtml, const GpgME::Error &auditLogError); +}; + +} +#endif diff --git a/lang/qt/src/qgpgmerefreshkeysjob.cpp b/lang/qt/src/qgpgmerefreshkeysjob.cpp index 493a010..1ff26ec 100644 --- a/lang/qt/src/qgpgmerefreshkeysjob.cpp +++ b/lang/qt/src/qgpgmerefreshkeysjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarävdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmerefreshkeysjob.h b/lang/qt/src/qgpgmerefreshkeysjob.h index 2a54e38..4dfd942 100644 --- a/lang/qt/src/qgpgmerefreshkeysjob.h +++ b/lang/qt/src/qgpgmerefreshkeysjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmesecretkeyexportjob.cpp b/lang/qt/src/qgpgmesecretkeyexportjob.cpp index 75cd83a..0a41017 100644 --- a/lang/qt/src/qgpgmesecretkeyexportjob.cpp +++ b/lang/qt/src/qgpgmesecretkeyexportjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarävdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmesecretkeyexportjob.h b/lang/qt/src/qgpgmesecretkeyexportjob.h index ad53f99..78e4d77 100644 --- a/lang/qt/src/qgpgmesecretkeyexportjob.h +++ b/lang/qt/src/qgpgmesecretkeyexportjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmesignencryptjob.cpp b/lang/qt/src/qgpgmesignencryptjob.cpp index 9dcc619..bfaf58c 100644 --- a/lang/qt/src/qgpgmesignencryptjob.cpp +++ b/lang/qt/src/qgpgmesignencryptjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004, 2007 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmesignencryptjob.h b/lang/qt/src/qgpgmesignencryptjob.h index e76c245..789e69c 100644 --- a/lang/qt/src/qgpgmesignencryptjob.h +++ b/lang/qt/src/qgpgmesignencryptjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2007,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmesignjob.cpp b/lang/qt/src/qgpgmesignjob.cpp index e165f52..7e710f3 100644 --- a/lang/qt/src/qgpgmesignjob.cpp +++ b/lang/qt/src/qgpgmesignjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2007,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmesignjob.h b/lang/qt/src/qgpgmesignjob.h index 1d4a174..c6203a1 100644 --- a/lang/qt/src/qgpgmesignjob.h +++ b/lang/qt/src/qgpgmesignjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2007,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmesignkeyjob.cpp b/lang/qt/src/qgpgmesignkeyjob.cpp index 27aff5e..2befe53 100644 --- a/lang/qt/src/qgpgmesignkeyjob.cpp +++ b/lang/qt/src/qgpgmesignkeyjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmesignkeyjob.h b/lang/qt/src/qgpgmesignkeyjob.h index 6cdb7db..3b31191 100644 --- a/lang/qt/src/qgpgmesignkeyjob.h +++ b/lang/qt/src/qgpgmesignkeyjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmetofupolicyjob.cpp b/lang/qt/src/qgpgmetofupolicyjob.cpp index 34630a1..91283a8 100644 --- a/lang/qt/src/qgpgmetofupolicyjob.cpp +++ b/lang/qt/src/qgpgmetofupolicyjob.cpp @@ -1,6 +1,7 @@ /* qgpgmetofupolicyjob.cpp - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmetofupolicyjob.h b/lang/qt/src/qgpgmetofupolicyjob.h index e7272e7..482a8fd 100644 --- a/lang/qt/src/qgpgmetofupolicyjob.h +++ b/lang/qt/src/qgpgmetofupolicyjob.h @@ -1,6 +1,7 @@ /* qgpgmetofupolicyjob.h - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmeverifydetachedjob.cpp b/lang/qt/src/qgpgmeverifydetachedjob.cpp index ee74861..067366a 100644 --- a/lang/qt/src/qgpgmeverifydetachedjob.cpp +++ b/lang/qt/src/qgpgmeverifydetachedjob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2007,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmeverifydetachedjob.h b/lang/qt/src/qgpgmeverifydetachedjob.h index 051caf0..81c49f3 100644 --- a/lang/qt/src/qgpgmeverifydetachedjob.h +++ b/lang/qt/src/qgpgmeverifydetachedjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2007,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmeverifyopaquejob.cpp b/lang/qt/src/qgpgmeverifyopaquejob.cpp index aea406a..bd7636d 100644 --- a/lang/qt/src/qgpgmeverifyopaquejob.cpp +++ b/lang/qt/src/qgpgmeverifyopaquejob.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2007,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmeverifyopaquejob.h b/lang/qt/src/qgpgmeverifyopaquejob.h index 87c94a3..3ba0509 100644 --- a/lang/qt/src/qgpgmeverifyopaquejob.h +++ b/lang/qt/src/qgpgmeverifyopaquejob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004,2007,2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmewkspublishjob.cpp b/lang/qt/src/qgpgmewkspublishjob.cpp index 9773893..3d00631 100644 --- a/lang/qt/src/qgpgmewkspublishjob.cpp +++ b/lang/qt/src/qgpgmewkspublishjob.cpp @@ -1,6 +1,7 @@ /* wkspublishjob.cpp - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/qgpgmewkspublishjob.h b/lang/qt/src/qgpgmewkspublishjob.h index 5fd3c03..211cefb 100644 --- a/lang/qt/src/qgpgmewkspublishjob.h +++ b/lang/qt/src/qgpgmewkspublishjob.h @@ -1,6 +1,7 @@ /* qgpgmewkspublishjob.h - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/quickjob.h b/lang/qt/src/quickjob.h new file mode 100644 index 0000000..c0a655b --- /dev/null +++ b/lang/qt/src/quickjob.h @@ -0,0 +1,83 @@ +/* quickjob.h + + Copyright (c) 2017 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_QUICKJOB_H +#define QGPGME_QUICKJOB_H + +#include "job.h" + +#include "qgpgme_export.h" + +#include <QDateTime> + +#ifdef BUILDING_QGPGME +# include "key.h" +#else +# include <gpgme++/key.h> +#endif + +class QString; + +namespace QGpgME{ + +/** + * Interface to the modern key manipulation functions. + */ +class QGPGME_EXPORT QuickJob : public Job +{ + Q_OBJECT +public: + explicit QuickJob(QObject *parent = Q_NULLPTR); + ~QuickJob(); + + /** Start --quick-gen-key */ + virtual void startCreate(const QString &uid, + const char *algo, + const QDateTime &expires = QDateTime(), + const GpgME::Key &key = GpgME::Key(), + unsigned int flags = 0) = 0; + + /** Start --quick-adduid */ + virtual void startAddUid(const GpgME::Key &key, const QString &uid) = 0; + + /** Start --quick-revuid */ + virtual void startRevUid(const GpgME::Key &key, const QString &uid) = 0; + + /** Start --quick-add-key */ + virtual void startAddSubkey(const GpgME::Key &key, const char *algo, + const QDateTime &expires = QDateTime(), + unsigned int flags = 0) = 0; + +Q_SIGNALS: + void result(const GpgME::Error &error, + const QString &auditLogAsHtml, const GpgME::Error &auditLogError); +}; + +} +#endif diff --git a/lang/qt/src/refreshkeysjob.h b/lang/qt/src/refreshkeysjob.h index a97de80..c4ba74a 100644 --- a/lang/qt/src/refreshkeysjob.h +++ b/lang/qt/src/refreshkeysjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/signencryptjob.h b/lang/qt/src/signencryptjob.h index 4e07744..61ab5c6 100644 --- a/lang/qt/src/signencryptjob.h +++ b/lang/qt/src/signencryptjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004, 2007 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 @@ -94,7 +95,7 @@ public: \em recipient keys will not be performed, but full validity assumed for all \em recipient keys without further checks. */ - virtual QGPGME_DEPRECATED_EXPORT GpgME::Error start(const std::vector<GpgME::Key> &signers, + virtual GpgME::Error start(const std::vector<GpgME::Key> &signers, const std::vector<GpgME::Key> &recipients, const QByteArray &plainText, bool alwaysTrust = false) = 0; diff --git a/lang/qt/src/signjob.h b/lang/qt/src/signjob.h index cf5c628..b5b5af6 100644 --- a/lang/qt/src/signjob.h +++ b/lang/qt/src/signjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004, 2007 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/signkeyjob.h b/lang/qt/src/signkeyjob.h index b5efc01..7a7800d 100644 --- a/lang/qt/src/signkeyjob.h +++ b/lang/qt/src/signkeyjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/specialjob.h b/lang/qt/src/specialjob.h index 2c80f20..5690d2e 100644 --- a/lang/qt/src/specialjob.h +++ b/lang/qt/src/specialjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/threadedjobmixin.cpp b/lang/qt/src/threadedjobmixin.cpp index 66d21fb..74755c5 100644 --- a/lang/qt/src/threadedjobmixin.cpp +++ b/lang/qt/src/threadedjobmixin.cpp @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/threadedjobmixin.h b/lang/qt/src/threadedjobmixin.h index 5ad2737..32cdb8e 100644 --- a/lang/qt/src/threadedjobmixin.h +++ b/lang/qt/src/threadedjobmixin.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2008 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/tofupolicyjob.h b/lang/qt/src/tofupolicyjob.h index 3079f91..b3a79c5 100644 --- a/lang/qt/src/tofupolicyjob.h +++ b/lang/qt/src/tofupolicyjob.h @@ -1,6 +1,7 @@ /* tofupolicyjob.h - Copyright (c) 2016 Intevation GmbH + 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 diff --git a/lang/qt/src/verifydetachedjob.h b/lang/qt/src/verifydetachedjob.h index b339a8c..2293f3a 100644 --- a/lang/qt/src/verifydetachedjob.h +++ b/lang/qt/src/verifydetachedjob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004, 2007 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 @@ -77,7 +78,7 @@ public: signature data, while \a signedData contains the data over which the signature was made. */ - virtual QGPGME_DEPRECATED_EXPORT GpgME::Error start(const QByteArray &signature, + virtual GpgME::Error start(const QByteArray &signature, const QByteArray &signedData) = 0; /*! diff --git a/lang/qt/src/verifyopaquejob.h b/lang/qt/src/verifyopaquejob.h index f064049..bfa34e9 100644 --- a/lang/qt/src/verifyopaquejob.h +++ b/lang/qt/src/verifyopaquejob.h @@ -3,7 +3,8 @@ This file is part of qgpgme, the Qt API binding for gpgme Copyright (c) 2004, 2007 Klarälvdalens Datakonsult AB - Copyright (c) 2016 Intevation GmbH + 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 @@ -76,7 +77,7 @@ public: signature data, while \a signedData contains the data over which the signature was made. */ - virtual QGPGME_DEPRECATED_EXPORT GpgME::Error start(const QByteArray &signedData) = 0; + virtual GpgME::Error start(const QByteArray &signedData) = 0; /*! \overload diff --git a/lang/qt/src/wkspublishjob.h b/lang/qt/src/wkspublishjob.h index b17cba4..8d17e52 100644 --- a/lang/qt/src/wkspublishjob.h +++ b/lang/qt/src/wkspublishjob.h @@ -1,6 +1,7 @@ /* wkspublishjob.h - Copyright (c) 2016 Intevation GmbH + 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 |