kdeconnect-kde/core/backends/devicelink.h

45 lines
786 B
C
Raw Normal View History

2013-06-06 04:57:06 +01:00
/**
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
2013-06-06 04:57:06 +01:00
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
2013-06-06 04:57:06 +01:00
*/
#ifndef DEVICELINK_H
#define DEVICELINK_H
#include <QObject>
#include "deviceinfo.h"
2019-04-30 18:03:24 +01:00
#include "networkpacket.h"
2013-06-06 04:57:06 +01:00
class LinkProvider;
class DeviceLink : public QObject
2013-06-06 04:57:06 +01:00
{
Q_OBJECT
public:
DeviceLink(const QString &deviceId, LinkProvider *parent);
2013-06-06 04:57:06 +01:00
QString deviceId() const
{
return deviceInfo().id;
}
int priority() const
{
return priorityFromProvider;
}
virtual bool sendPacket(NetworkPacket &np) = 0;
virtual DeviceInfo deviceInfo() const = 0;
private:
int priorityFromProvider;
Q_SIGNALS:
void receivedPacket(const NetworkPacket &np);
2013-06-06 04:57:06 +01:00
};
#endif