Changeset View
Changeset View
Standalone View
Standalone View
core/daemon.h
Show All 22 Lines | |||||
23 | 23 | | |||
24 | #include <QObject> | 24 | #include <QObject> | ||
25 | #include <QSet> | 25 | #include <QSet> | ||
26 | #include <QMap> | 26 | #include <QMap> | ||
27 | 27 | | |||
28 | #include "kdeconnectcore_export.h" | 28 | #include "kdeconnectcore_export.h" | ||
29 | #include "device.h" | 29 | #include "device.h" | ||
30 | 30 | | |||
31 | class NetworkPackage; | 31 | class NetworkPacket; | ||
32 | class DeviceLink; | 32 | class DeviceLink; | ||
33 | class Device; | 33 | class Device; | ||
34 | class QNetworkAccessManager; | 34 | class QNetworkAccessManager; | ||
35 | 35 | | |||
36 | class KDECONNECTCORE_EXPORT Daemon | 36 | class KDECONNECTCORE_EXPORT Daemon | ||
37 | : public QObject | 37 | : public QObject | ||
38 | { | 38 | { | ||
39 | Q_OBJECT | 39 | Q_OBJECT | ||
Show All 36 Lines | |||||
76 | Q_SIGNALS: | 76 | Q_SIGNALS: | ||
77 | Q_SCRIPTABLE void deviceAdded(const QString& id); | 77 | Q_SCRIPTABLE void deviceAdded(const QString& id); | ||
78 | Q_SCRIPTABLE void deviceRemoved(const QString& id); //Note that paired devices will never be removed | 78 | Q_SCRIPTABLE void deviceRemoved(const QString& id); //Note that paired devices will never be removed | ||
79 | Q_SCRIPTABLE void deviceVisibilityChanged(const QString& id, bool isVisible); | 79 | Q_SCRIPTABLE void deviceVisibilityChanged(const QString& id, bool isVisible); | ||
80 | Q_SCRIPTABLE void announcedNameChanged(const QString& announcedName); | 80 | Q_SCRIPTABLE void announcedNameChanged(const QString& announcedName); | ||
81 | Q_SCRIPTABLE void pairingRequestsChanged(); | 81 | Q_SCRIPTABLE void pairingRequestsChanged(); | ||
82 | 82 | | |||
83 | private Q_SLOTS: | 83 | private Q_SLOTS: | ||
84 | void onNewDeviceLink(const NetworkPackage& identityPackage, DeviceLink* dl); | 84 | void onNewDeviceLink(const NetworkPacket& identityPacket, DeviceLink* dl); | ||
85 | void onDeviceStatusChanged(); | 85 | void onDeviceStatusChanged(); | ||
86 | 86 | | |||
87 | private: | 87 | private: | ||
88 | void addDevice(Device* device); | 88 | void addDevice(Device* device); | ||
89 | bool isDiscoveringDevices() const; | 89 | bool isDiscoveringDevices() const; | ||
90 | void removeDevice(Device* d); | 90 | void removeDevice(Device* d); | ||
91 | void cleanDevices(); | 91 | void cleanDevices(); | ||
92 | 92 | | |||
93 | QScopedPointer<struct DaemonPrivate> d; | 93 | QScopedPointer<struct DaemonPrivate> d; | ||
94 | }; | 94 | }; | ||
95 | 95 | | |||
96 | #endif | 96 | #endif |