Messagelib

transparentjob.cpp
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 #include "job/transparentjob.h"
9 
10 #include "contentjobbase_p.h"
11 
12 #include "messagecomposer_debug.h"
13 #include <KMime/Content>
14 #include <KMime/KMimeMessage>
15 using namespace MessageComposer;
16 
17 class MessageComposer::TransparentJobPrivate : public MessageComposer::ContentJobBasePrivate
18 {
19 public:
20  TransparentJobPrivate(TransparentJob *qq)
21  : ContentJobBasePrivate(qq)
22  {
23  }
24 
25  KMime::Content *content = nullptr;
26 
27  Q_DECLARE_PUBLIC(TransparentJob)
28 };
29 
30 TransparentJob::TransparentJob(QObject *parent)
31  : MessageComposer::ContentJobBase(*new TransparentJobPrivate(this), parent)
32 {
33 }
34 
35 TransparentJob::~TransparentJob() = default;
36 
37 void TransparentJob::setContent(KMime::Content *content)
38 {
40 
41  d->content = content;
42 }
43 
44 void TransparentJob::process()
45 {
47  d->resultContent = d->content;
48  emitResult();
49 }
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
The ContentJobBase class.
A job that just wraps some KMime::Content into a job object for use as a subjob in another job.
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Wed May 25 2022 03:55:41 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.