Messagelib

draftstatus.h
1 /*
2  SPDX-FileCopyrightText: 2021 Sandro Knauß <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "messagecomposer_export.h"
10 #include <KMime/Message>
11 #include <Libkleo/Enum>
12 
13 namespace MessageComposer
14 {
15 
16 class MESSAGECOMPOSER_EXPORT DraftEncryptionState
17 {
18 public:
19  explicit DraftEncryptionState(const KMime::Message::Ptr &msg);
20 
21  void setState(bool encrypt);
22  void removeState();
23 
24  Q_REQUIRED_RESULT bool encryptionState() const;
25  Q_REQUIRED_RESULT bool isDefined() const;
26 
27 private:
29 };
30 
31 class MESSAGECOMPOSER_EXPORT DraftSignatureState
32 {
33 public:
34  explicit DraftSignatureState(const KMime::Message::Ptr &msg);
35 
36  void setState(bool sign);
37  void removeState();
38 
39  Q_REQUIRED_RESULT bool signState() const;
40  Q_REQUIRED_RESULT bool isDefined() const;
41 
42 private:
44 };
45 
46 class MESSAGECOMPOSER_EXPORT DraftCryptoMessageFormatState
47 {
48 public:
49  explicit DraftCryptoMessageFormatState(const KMime::Message::Ptr &msg);
50 
51  void setState(Kleo::CryptoMessageFormat cryptoMessageFormat);
52  void removeState();
53 
54  Q_REQUIRED_RESULT Kleo::CryptoMessageFormat cryptoMessageFormatState() const;
55  Q_REQUIRED_RESULT bool isDefined() const;
56 
57 private:
59 };
60 
61 void MESSAGECOMPOSER_EXPORT removeDraftCryptoHeaders(const KMime::Message::Ptr &msg);
62 
63 }
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-2023 The KDE developers.
Generated on Sun Mar 26 2023 04:08:11 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.