Messagelib

attachmentfromfolderjob.h
1/*
2 SPDX-FileCopyrightText: 2011 Martin Bednár <serafean@gmail.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "MessageCore/AttachmentFromUrlBaseJob"
10
11#include <KZip>
12#include <memory>
13namespace MessageCore
14{
15class AttachmentFromFolderJob : public AttachmentFromUrlBaseJob
16{
17 Q_OBJECT
18
19public:
20 /**
21 * Creates a new job.
22 *
23 * @param url The url of the folder that will be compressed and added as attachment.
24 * @param parent The parent object.
25 */
26
27 explicit AttachmentFromFolderJob(const QUrl &url = QUrl(), QObject *parent = nullptr);
28
29 /**
30 * Destroys the job.
31 */
32
33 ~AttachmentFromFolderJob() override;
34
35 /**
36 * Sets the @p compression method, either KZip::Deflate or KZip::NoCompression.
37 */
38 void setCompression(KZip::Compression compression);
39
40 /**
41 * Returns the compression method used
42 */
43 [[nodiscard]] KZip::Compression compression() const;
44
45protected Q_SLOTS:
46 void doStart() override;
47
48private:
49 //@cond PRIVATE
50 class AttachmentLoadJobPrivate;
51 std::unique_ptr<AttachmentLoadJobPrivate> const d;
52};
53}
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.