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 {
39  Q_D(TransparentJob);
40 
41  d->content = content;
42 }
43 
44 void TransparentJob::process()
45 {
46  Q_D(TransparentJob);
47  d->resultContent = d->content;
48  emitResult();
49 }
A job that just wraps some KMime::Content into a job object for use as a subjob in another job...
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
The ContentJobBase class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Nov 26 2021 23:16:44 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.