File indexing completed on 2024-10-06 09:39:48
0001 /* 0002 This file is part of the KDE libraries 0003 SPDX-FileCopyrightText: 2017 Elvis Angelaccio <elvis.angelaccio@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0006 */ 0007 0008 #ifndef KIOEXECD_H 0009 #define KIOEXECD_H 0010 0011 #include <KDEDModule> 0012 0013 #include <QMap> 0014 #include <QTimer> 0015 #include <QUrl> 0016 0017 class KDirWatch; 0018 0019 class KIOExecd : public KDEDModule 0020 { 0021 Q_OBJECT 0022 Q_CLASSINFO("D-Bus Interface", "org.kde.KIOExecd") 0023 0024 public: 0025 KIOExecd(QObject *parent, const QList<QVariant> &); 0026 ~KIOExecd() override; 0027 0028 public Q_SLOTS: 0029 void watch(const QString &path, const QString &destUrl); 0030 0031 private Q_SLOTS: 0032 void slotDirty(const QString &path); 0033 void slotDeleted(const QString &path); 0034 void slotCreated(const QString &path); 0035 void slotCheckDeletedFiles(); 0036 0037 private: 0038 KDirWatch *m_watcher; 0039 // temporary file and associated remote file 0040 QMap<QString, QUrl> m_watched; 0041 // temporary file and the last date it was removed 0042 QMap<QString, QDateTime> m_deleted; 0043 QTimer m_timer; 0044 }; 0045 0046 #endif