File indexing completed on 2024-04-28 04:57:01

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 LINKPROVIDER_H
0008 #define LINKPROVIDER_H
0009 
0010 #include <QObject>
0011 
0012 #include "networkpacket.h"
0013 #include "pairinghandler.h"
0014 
0015 class DeviceLink;
0016 
0017 class KDECONNECTCORE_EXPORT LinkProvider : public QObject
0018 {
0019     Q_OBJECT
0020 
0021 public:
0022     LinkProvider();
0023 
0024     virtual QString name() = 0;
0025     virtual int priority() = 0;
0026 
0027 public Q_SLOTS:
0028     virtual void onStart() = 0;
0029     virtual void onStop() = 0;
0030     virtual void onNetworkChange() = 0;
0031     virtual void onLinkDestroyed(const QString &deviceId, DeviceLink *oldPtr) = 0;
0032 
0033     void suspend(bool suspend);
0034 
0035 Q_SIGNALS:
0036     void onConnectionReceived(DeviceLink *);
0037 };
0038 
0039 #endif