QGpgME  10.3.4.0000000
Qt API for GpgME
qgpgmekeyformailboxjob.h
1 /*
2  qgpgmekeyformailboxjob.h
3 
4  This file is part of libkleopatra, the KDE keymanagement library
5  Copyright (c) 2004,2008 Klarälvdalens Datakonsult AB
6  This file is part of qgpgme, the Qt API binding for gpgme
7  Copyright (c) 2016 by Bundesamt für Sicherheit in der Informationstechnik
8  Software engineering by Intevation GmbH
9 
10  QGpgME is free software; you can redistribute it and/or
11  modify it under the terms of the GNU General Public License as
12  published by the Free Software Foundation; either version 2 of the
13  License, or (at your option) any later version.
14 
15  QGpgME is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program; if not, write to the Free Software
22  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 
24  In addition, as a special exception, the copyright holders give
25  permission to link the code of this program with any edition of
26  the Qt library by Trolltech AS, Norway (or with modified versions
27  of Qt that use the same license as Qt), and distribute linked
28  combinations including the two. You must obey the GNU General
29  Public License in all respects for all of the code used other than
30  Qt. If you modify this file, you may extend this exception to
31  your version of the file, but you are not obligated to do so. If
32  you do not wish to do so, delete this exception statement from
33  your version.
34 */
35 
36 #ifndef __QGPGME_QGPGMEKEYFORMAILBOXJOB_H__
37 #define __QGPGME_QGPGMEKEYFORMAILBOXJOB_H__
38 #include "keyformailboxjob.h"
39 
40 #include "threadedjobmixin.h"
41 
42 #ifdef BUILDING_QGPGME
43 # include "keylistresult.h"
44 # include "key.h"
45 #else
46 # include <gpgme++/keylistresult.h>
47 # include <gpgme++/key.h>
48 #endif
49 
50 namespace QGpgME
51 {
52 
54 #ifdef Q_MOC_RUN
55  : public KeyForMailboxJob
56 #else
57  : public _detail::ThreadedJobMixin<KeyForMailboxJob, std::tuple<GpgME::KeyListResult, GpgME::Key, GpgME::UserID, QString, GpgME::Error> >
58 #endif
59 {
60  Q_OBJECT
61 #ifdef Q_MOC_RUN
62 public Q_SLOTS:
63  void slotFinished();
64 #endif
65 public:
66  explicit QGpgMEKeyForMailboxJob(GpgME::Context *context);
68 
79  GpgME::Error start(const QString &mailbox, bool canEncrypt = true) Q_DECL_OVERRIDE;
80 
81  GpgME::KeyListResult exec(const QString &mailbox, bool canEncrypt, GpgME::Key &key, GpgME::UserID &uid) Q_DECL_OVERRIDE;
82 };
83 
84 }
85 #endif
QGpgME::_detail::ThreadedJobMixin
Definition: threadedjobmixin.h:124
QGpgME::QGpgMEKeyForMailboxJob::start
GpgME::Error start(const QString &mailbox, bool canEncrypt=true) Q_DECL_OVERRIDE
Definition: qgpgmekeyformailboxjob.cpp:128
QGpgME::KeyForMailboxJob
Get the best key to use for a Mailbox.
Definition: keyformailboxjob.h:73
QGpgME::QGpgMEKeyForMailboxJob
Definition: qgpgmekeyformailboxjob.h:53