Messagelib

signjob.h
1/*
2 SPDX-FileCopyrightText: 2009 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
3 SPDX-FileCopyrightText: 2009 Leo Franchi <lfranchi@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#pragma once
9
10#include "contentjobbase.h"
11#include "messagecomposer_export.h"
12#include <Libkleo/Enum>
13#include <MessageComposer/InfoPart>
14
15#include <gpgme++/key.h>
16#include <vector>
17
18namespace KMime
19{
20class Content;
21}
22
23namespace MessageComposer
24{
25class SignJobPrivate;
26
27/**
28 Signs the contents of a message.
29 Used as a subjob of CryptoMessage
30*/
31class MESSAGECOMPOSER_EXPORT SignJob : public ContentJobBase
32{
33 Q_OBJECT
34
35public:
36 explicit SignJob(QObject *parent = nullptr);
37 ~SignJob() override;
38
39 void setContent(KMime::Content *content);
40 void setCryptoMessageFormat(Kleo::CryptoMessageFormat format);
41 void setSigningKeys(const std::vector<GpgME::Key> &signers);
42
43 void setSkeletonMessage(KMime::Message *skeletonMessage);
44 void setProtectedHeaders(bool protectedHeaders);
45
46 [[nodiscard]] KMime::Content *origContent();
47
48protected Q_SLOTS:
49 void doStart() override;
50 void slotResult(KJob *job) override;
51 void process() override;
52
53private:
54 Q_DECLARE_PRIVATE(SignJob)
55};
56}
The ContentJobBase class.
Signs the contents of a message.
Definition signjob.h:32
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.