Messagelib

signjob.h
1 /*
2  SPDX-FileCopyrightText: 2009 Klaralvdalens Datakonsult AB, a KDAB Group company, [email protected]
3  SPDX-FileCopyrightText: 2009 Leo Franchi <[email protected]>
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 
18 namespace KMime
19 {
20 class Content;
21 }
22 
23 namespace MessageComposer
24 {
25 class SignJobPrivate;
26 
27 /**
28  Signs the contents of a message.
29  Used as a subjob of CryptoMessage
30 */
31 class MESSAGECOMPOSER_EXPORT SignJob : public ContentJobBase
32 {
33  Q_OBJECT
34 
35 public:
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  Q_REQUIRED_RESULT KMime::Content *origContent();
47 
48 protected Q_SLOTS:
49  void doStart() override;
50  void slotResult(KJob *job) override;
51  void process() override;
52 
53 private:
54  Q_DECLARE_PRIVATE(SignJob)
55 };
56 }
57 
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
Signs the contents of a message.
Definition: signjob.h:31
The ContentJobBase class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Dec 6 2021 23:04:58 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.