kdeconnect-kde/core/backends/devicelink.h

51 lines
921 B
C
Raw Permalink 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>
2019-04-30 18:03:24 +01:00
#include "networkpacket.h"
2013-06-06 04:57:06 +01:00
2015-11-30 18:36:01 +00:00
class PairingHandler;
class NetworkPacket;
class LinkProvider;
2015-11-30 18:36:01 +00:00
class Device;
class QSslCertificate;
class DeviceLink : public QObject
2013-06-06 04:57:06 +01:00
{
Q_OBJECT
public:
DeviceLink(const QString &deviceId, LinkProvider *parent);
2021-10-27 05:53:06 +01:00
~DeviceLink() override = default;
2013-06-06 04:57:06 +01:00
const QString &deviceId() const
{
return m_deviceId;
}
LinkProvider *provider()
{
return m_linkProvider;
}
virtual bool sendPacket(NetworkPacket &np) = 0;
virtual QSslCertificate certificate() const = 0;
Q_SIGNALS:
void receivedPacket(const NetworkPacket &np);
2013-06-06 04:57:06 +01:00
private:
const QString m_deviceId;
LinkProvider *m_linkProvider;
2013-06-06 04:57:06 +01:00
};
#endif