kdeconnect-kde/core/backends/loopback/loopbacklinkprovider.cpp

44 lines
850 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
*/
#include "loopbacklinkprovider.h"
#include "core_debug.h"
LoopbackLinkProvider::LoopbackLinkProvider()
{
}
LoopbackLinkProvider::~LoopbackLinkProvider()
{
}
void LoopbackLinkProvider::onNetworkChange()
{
LoopbackDeviceLink *newLoopbackDeviceLink = new LoopbackDeviceLink(this);
Q_EMIT onConnectionReceived(newLoopbackDeviceLink);
if (loopbackDeviceLink) {
delete loopbackDeviceLink;
}
loopbackDeviceLink = newLoopbackDeviceLink;
2013-08-14 02:10:38 +01:00
}
void LoopbackLinkProvider::onStart()
{
onNetworkChange();
2013-08-14 02:10:38 +01:00
}
void LoopbackLinkProvider::onStop()
{
if (loopbackDeviceLink) {
delete loopbackDeviceLink;
}
}
#include "moc_loopbacklinkprovider.cpp"