kdeconnect-kde/core/backends/loopback/loopbacklinkprovider.h
Rob Emery ad75b438cb Implementing link priorities
Now that devices can potentially be connected via both network and bluetooth simultaneously we should prioritise connections over the highest performing link (probably wifi/network). To this end the
m_deviceLinks are now sorted based on priority with the fastest links first; this means that when Device::sendPacket is scheduling to send a packet, it should always use the fastest link first.
2023-10-01 10:39:59 +00:00

41 lines
850 B
C++

/**
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#ifndef LOOPBACKLINKPROVIDER_H
#define LOOPBACKLINKPROVIDER_H
#include "../linkprovider.h"
#include "loopbackdevicelink.h"
#include <QPointer>
class LoopbackLinkProvider : public LinkProvider
{
Q_OBJECT
public:
LoopbackLinkProvider();
~LoopbackLinkProvider() override;
QString name() override
{
return QStringLiteral("LoopbackLinkProvider");
}
int priority() override
{
return 0;
}
void onStart() override;
void onStop() override;
void onNetworkChange() override;
void onLinkDestroyed(const QString &, DeviceLink *) override
{
}
private:
QPointer<LoopbackDeviceLink> loopbackDeviceLink;
};
#endif