Messagelib

attachmenttemporaryfilesdirs.h
1 /*
2  SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "mimetreeparser_export.h"
10 #include <QObject>
11 #include <QStringList>
12 #include <memory>
13 namespace MimeTreeParser
14 {
15 class AttachmentTemporaryFilesDirsPrivate;
16 /**
17  * @brief The AttachmentTemporaryFilesDirs class
18  * @author Laurent Montel <montel@kde.org>
19  */
20 class MIMETREEPARSER_EXPORT AttachmentTemporaryFilesDirs : public QObject
21 {
22  Q_OBJECT
23 public:
24  explicit AttachmentTemporaryFilesDirs(QObject *parent = nullptr);
25  ~AttachmentTemporaryFilesDirs() override;
26 
27  void addTempFile(const QString &file);
28  void addTempDir(const QString &dir);
29  [[nodiscard]] QStringList temporaryFiles() const;
30  void removeTempFiles();
31  void forceCleanTempFiles();
32 
33  [[nodiscard]] QStringList temporaryDirs() const;
34 
35  void setDelayRemoveAllInMs(int ms);
36 
37 private:
38  MIMETREEPARSER_NO_EXPORT void slotRemoveTempFiles();
39  std::unique_ptr<AttachmentTemporaryFilesDirsPrivate> const d;
40 };
41 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Feb 15 2024 03:55:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.