2013-06-06 04:57:06 +01:00
|
|
|
/**
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
|
2013-06-06 04:57:06 +01:00
|
|
|
*
|
2020-08-17 10:48:10 +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
|
|
|
*/
|
|
|
|
|
2013-07-24 17:42:33 +01:00
|
|
|
#include "loopbacklinkprovider.h"
|
2013-06-18 19:04:53 +01:00
|
|
|
|
2014-09-21 23:59:34 +01:00
|
|
|
#include "core_debug.h"
|
2013-07-23 15:11:54 +01:00
|
|
|
|
2013-07-24 17:42:33 +01:00
|
|
|
LoopbackLinkProvider::LoopbackLinkProvider()
|
2013-06-18 19:04:53 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-07-24 17:42:33 +01:00
|
|
|
LoopbackLinkProvider::~LoopbackLinkProvider()
|
2013-06-18 19:04:53 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-04-05 00:32:15 +01:00
|
|
|
void LoopbackLinkProvider::onNetworkChange()
|
2013-06-18 19:04:53 +01:00
|
|
|
{
|
2023-06-27 12:10:59 +01:00
|
|
|
LoopbackDeviceLink *newLoopbackDeviceLink = new LoopbackDeviceLink(this);
|
|
|
|
Q_EMIT onConnectionReceived(newLoopbackDeviceLink);
|
2013-09-09 21:28:18 +01:00
|
|
|
|
|
|
|
if (loopbackDeviceLink) {
|
|
|
|
delete loopbackDeviceLink;
|
|
|
|
}
|
2013-09-26 23:01:59 +01:00
|
|
|
|
2013-09-09 21:28:18 +01:00
|
|
|
loopbackDeviceLink = newLoopbackDeviceLink;
|
2013-08-14 02:10:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void LoopbackLinkProvider::onStart()
|
|
|
|
{
|
2015-04-05 00:32:15 +01:00
|
|
|
onNetworkChange();
|
2013-08-14 02:10:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void LoopbackLinkProvider::onStop()
|
|
|
|
{
|
2013-09-09 21:28:18 +01:00
|
|
|
if (loopbackDeviceLink) {
|
|
|
|
delete loopbackDeviceLink;
|
|
|
|
}
|
2013-06-18 19:04:53 +01:00
|
|
|
}
|
2023-07-26 09:15:11 +01:00
|
|
|
|
|
|
|
#include "moc_loopbacklinkprovider.cpp"
|