File indexing completed on 2024-12-01 07:38:28

0001 /**
0002  * SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 #ifndef KIOKDECONNECT_H
0008 #define KIOKDECONNECT_H
0009 
0010 #include <QObject>
0011 
0012 #include <KIO/WorkerBase>
0013 
0014 #include "dbusinterfaces.h"
0015 
0016 class KioKdeconnect : public QObject, public KIO::WorkerBase
0017 {
0018     Q_OBJECT
0019 
0020 public:
0021     KioKdeconnect(const QByteArray &pool, const QByteArray &app);
0022 
0023     KIO::WorkerResult get(const QUrl &url) override;
0024     KIO::WorkerResult listDir(const QUrl &url) override;
0025     KIO::WorkerResult stat(const QUrl &url) override;
0026 
0027     KIO::WorkerResult listAllDevices(); // List all devices exported by m_dbusInterface
0028     KIO::WorkerResult listDevice(const QString &device); // List m_currentDevice
0029 
0030 private:
0031     /**
0032      * KDED DBus interface, used to communicate to the daemon since we need some status (like connected)
0033      */
0034     DaemonDbusInterface *m_dbusInterface;
0035 };
0036 
0037 #endif