Messagelib

draftstatus.h
1/*
2 SPDX-FileCopyrightText: 2021 Sandro Knauß <sknauss@kde.org>
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
13namespace MessageComposer
14{
15
16class MESSAGECOMPOSER_EXPORT DraftEncryptionState
17{
18public:
19 explicit DraftEncryptionState(const KMime::Message::Ptr &msg);
20
21 void setState(bool encrypt);
22 void removeState();
23
24 [[nodiscard]] bool encryptionState() const;
25 [[nodiscard]] bool isDefined() const;
26
27private:
28 const KMime::Message::Ptr mMsg;
29};
30
31class MESSAGECOMPOSER_EXPORT DraftSignatureState
32{
33public:
34 explicit DraftSignatureState(const KMime::Message::Ptr &msg);
35
36 void setState(bool sign);
37 void removeState();
38
39 [[nodiscard]] bool signState() const;
40 [[nodiscard]] bool isDefined() const;
41
42private:
43 const KMime::Message::Ptr mMsg;
44};
45
46class MESSAGECOMPOSER_EXPORT DraftCryptoMessageFormatState
47{
48public:
49 explicit DraftCryptoMessageFormatState(const KMime::Message::Ptr &msg);
50
51 void setState(Kleo::CryptoMessageFormat cryptoMessageFormat);
52 void removeState();
53
54 [[nodiscard]] Kleo::CryptoMessageFormat cryptoMessageFormatState() const;
55 [[nodiscard]] bool isDefined() const;
56
57private:
58 const KMime::Message::Ptr mMsg;
59};
60
61void 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-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.