File indexing completed on 2024-06-23 05:18:31

0001 /*
0002   SPDX-FileCopyrightText: 2009 Constantin Berzan <exit3219@gmail.com>
0003 
0004   SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005 */
0006 
0007 #pragma once
0008 
0009 #include <MessageCore/AttachmentLoadJob>
0010 
0011 #include "messagecomposer_export.h"
0012 
0013 namespace MessageComposer
0014 {
0015 // TODO I have no idea how to test this.  Have a fake keyring???
0016 /**
0017  * @brief The AttachmentFromPublicKeyJob class
0018  */
0019 class MESSAGECOMPOSER_EXPORT AttachmentFromPublicKeyJob : public MessageCore::AttachmentLoadJob
0020 {
0021     Q_OBJECT
0022 
0023 public:
0024     explicit AttachmentFromPublicKeyJob(const QString &fingerprint, QObject *parent = nullptr);
0025     ~AttachmentFromPublicKeyJob() override;
0026 
0027     [[nodiscard]] QString fingerprint() const;
0028     void setFingerprint(const QString &fingerprint);
0029 
0030 protected Q_SLOTS:
0031     void doStart() override;
0032 
0033 private:
0034     class AttachmentFromPublicKeyJobPrivate;
0035     friend class AttachmentFromPublicKeyJobPrivate;
0036     std::unique_ptr<AttachmentFromPublicKeyJobPrivate> const d;
0037 };
0038 } //