Messagelib

attachmentfromfolderjob.h
1 /*
2  SPDX-FileCopyrightText: 2011 Martin Bedn├ír <[email protected]>
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>
13 namespace MessageCore
14 {
15 class AttachmentFromFolderJob : public AttachmentFromUrlBaseJob
16 {
17  Q_OBJECT
18 
19 public:
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  Q_REQUIRED_RESULT KZip::Compression compression() const;
44 
45 protected Q_SLOTS:
46  void doStart() override;
47 
48 private:
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-2021 The KDE developers.
Generated on Tue Nov 30 2021 23:05:45 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.