File indexing completed on 2021-12-21 14:36:50

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_P_H
0007 #define _KGPGCAFF_P_H
0008 
0009 #include "caff.h"
0010 #include "core/KGpgSignableNode.h"
0011 #include "transactions/kgpgsigntransactionhelper.h"
0012 
0013 #include <QObject>
0014 #include <QScopedPointer>
0015 #include <QString>
0016 #include <QStringList>
0017 
0018 class QTemporaryDir;
0019 
0020 class KGpgCaffPrivate : public QObject {
0021 
0022     KGpgCaff * const q_ptr;
0023     Q_DECLARE_PUBLIC(KGpgCaff)
0024     Q_DISABLE_COPY(KGpgCaffPrivate)
0025 
0026     QScopedPointer<QTemporaryDir> m_tempdir;
0027     QStringList m_signers;
0028     QString m_secringfile;
0029     QString m_secringdir; ///< where GnuPG >=2.1 store their secret keyring information
0030     const KGpgCaff::OperationFlags m_flags;
0031     const KGpgSignTransactionHelper::carefulCheck m_checklevel;
0032     const int m_gpgVersion;
0033 
0034     void reexportKey(const KGpgSignableNode *node);
0035     void abortOperation(int result);
0036     void checkNextLoop();
0037 public:
0038     KGpgCaffPrivate(KGpgCaff *parent, const KGpgSignableNode::List &ids, const QStringList &signers,
0039             const KGpgCaff::OperationFlags flags, const KGpgSignTransactionHelper::carefulCheck checklevel);
0040     ~KGpgCaffPrivate() override;
0041 
0042     KGpgSignableNode::List m_allids;
0043     KGpgSignableNode::const_List m_noEncIds;    ///< keys without encryption capability that were skipped
0044     KGpgSignableNode::const_List m_alreadyIds;  ///< ids already signed
0045 
0046 private:
0047     void slotSigningFinished(int result);
0048     void slotDelUidFinished(int result);
0049     void slotExportFinished(int result);
0050     void slotTextEncrypted(int result);
0051     void slotReimportDone(int result);
0052 };
0053 
0054 #endif /* _KGPGCAFF_P_H */