File indexing completed on 2024-04-14 05:43:31

0001 /*
0002     SPDX-FileCopyrightText: 2009, 2010, 2012 Rolf Eike Beer <kde@opensource.sf-tec.de>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef _KGPGCAFF_H
0007 #define _KGPGCAFF_H
0008 
0009 #include "core/KGpgSignableNode.h"
0010 
0011 #include <QObject>
0012 #include <QStringList>
0013 
0014 
0015 class KGpgCaffPrivate;
0016 
0017 class KGpgCaff : public QObject {
0018     Q_OBJECT
0019 
0020     KGpgCaffPrivate * const d_ptr;
0021     Q_DECLARE_PRIVATE(KGpgCaff)
0022     Q_DISABLE_COPY(KGpgCaff)
0023 
0024 public:
0025     enum OperationFlags {
0026         DefaultMode = 0,        ///< use none of the other flags
0027         IgnoreAlreadySigned = 1     ///< uids that are already signed will not be mailed again
0028     };
0029 
0030     /**
0031      * @brief create a new object to sign and mail key ids
0032      * @param parent parent object
0033      * @param ids list of keys to sign
0034      * @param signids secret key ids to sign @p ids with
0035      * @param checklevel check level, @see carefulCheck
0036      * @param flags control flags
0037      */
0038     KGpgCaff(QObject *parent, const KGpgSignableNode::List &ids, const QStringList &signids,
0039             const int checklevel = 0, const OperationFlags flags = DefaultMode);
0040 
0041 public Q_SLOTS:
0042     void run();
0043 
0044 Q_SIGNALS:
0045     void done();
0046     void aborted();
0047 };
0048 
0049 #endif /* _KGPGCAFF_H */