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>
13namespace MimeTreeParser
14{
15class AttachmentTemporaryFilesDirsPrivate;
16/**
17 * @brief The AttachmentTemporaryFilesDirs class
18 * @author Laurent Montel <montel@kde.org>
19 */
20class MIMETREEPARSER_EXPORT AttachmentTemporaryFilesDirs : public QObject
21{
22 Q_OBJECT
23public:
24 explicit AttachmentTemporaryFilesDirs(QObject *parent = nullptr);
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
37private:
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 Sat Dec 21 2024 16:59:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.