Changeset View
Changeset View
Standalone View
Standalone View
core/backends/linkprovider.h
Show All 17 Lines | |||||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #ifndef LINKPROVIDER_H | 21 | #ifndef LINKPROVIDER_H | ||
22 | #define LINKPROVIDER_H | 22 | #define LINKPROVIDER_H | ||
23 | 23 | | |||
24 | #include <QObject> | 24 | #include <QObject> | ||
25 | 25 | | |||
26 | #include "core/networkpackage.h" | 26 | #include "core/networkpacket.h" | ||
27 | #include "pairinghandler.h" | 27 | #include "pairinghandler.h" | ||
28 | 28 | | |||
29 | class DeviceLink; | 29 | class DeviceLink; | ||
30 | 30 | | |||
31 | class KDECONNECTCORE_EXPORT LinkProvider | 31 | class KDECONNECTCORE_EXPORT LinkProvider | ||
32 | : public QObject | 32 | : public QObject | ||
33 | { | 33 | { | ||
34 | Q_OBJECT | 34 | Q_OBJECT | ||
Show All 14 Lines | 48 | public Q_SLOTS: | |||
49 | virtual void onStart() = 0; | 49 | virtual void onStart() = 0; | ||
50 | virtual void onStop() = 0; | 50 | virtual void onStop() = 0; | ||
51 | virtual void onNetworkChange() = 0; | 51 | virtual void onNetworkChange() = 0; | ||
52 | 52 | | |||
53 | Q_SIGNALS: | 53 | Q_SIGNALS: | ||
54 | //NOTE: The provider will destroy the DeviceLink when it's no longer accessible, | 54 | //NOTE: The provider will destroy the DeviceLink when it's no longer accessible, | ||
55 | // and every user should listen to the destroyed signal to remove its references. | 55 | // and every user should listen to the destroyed signal to remove its references. | ||
56 | // That's the reason because there is no "onConnectionLost". | 56 | // That's the reason because there is no "onConnectionLost". | ||
57 | void onConnectionReceived(const NetworkPackage& identityPackage, DeviceLink*) const; | 57 | void onConnectionReceived(const NetworkPacket& identityPacket, DeviceLink*) const; | ||
58 | 58 | | |||
59 | }; | 59 | }; | ||
60 | 60 | | |||
61 | #endif | 61 | #endif |