Messagelib

attachmentfrommimecontentjob.h
1/*
2 SPDX-FileCopyrightText: 2009 Constantin Berzan <exit3219@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "messagecore_private_export.h"
10
11#include "attachmentloadjob.h"
12#include <memory>
13namespace KMime
14{
15class Content;
16}
17
18namespace MessageCore
19{
20/**
21 * @short A job to load an attachment from a mime content.
22 *
23 * @author Constantin Berzan <exit3219@gmail.com>
24 */
25class MESSAGECORE_TESTS_EXPORT AttachmentFromMimeContentJob : public AttachmentLoadJob
26{
27 Q_OBJECT
28
29public:
30 /**
31 * Creates a new job.
32 *
33 * @param content The mime content to load the attachment from.
34 * @param parent The parent object.
35 */
36 explicit AttachmentFromMimeContentJob(const KMime::Content *content, QObject *parent = nullptr);
37
38 /**
39 * Destroys the job.
40 */
42
43 /**
44 * Sets the mime @p content to load the attachment from.
45 */
46 void setMimeContent(const KMime::Content *content);
47
48 /**
49 * Returns the mime content to load the attachment from.
50 */
51 [[nodiscard]] const KMime::Content *mimeContent() const;
52
53protected Q_SLOTS:
54 void doStart() override;
55
56private:
57 //@cond PRIVATE
58 class AttachmentFromMimeContentJobPrivate;
59 std::unique_ptr<AttachmentFromMimeContentJobPrivate> const d;
60 //@endcond
61};
62}
A job to load an attachment from a mime content.
~AttachmentFromMimeContentJob() override
Destroys the job.
A base class for jobs to load attachments from different sources.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sun Feb 25 2024 18:37:31 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.