2023-06-22 10:53:42 +01:00
|
|
|
/**
|
|
|
|
* SPDX-FileCopyrightText: 2023 Albert Vaca Cintora <albertvaka@gmail.com>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef KDECONNECT_MDNS_DISCOVERY_H
|
|
|
|
#define KDECONNECT_MDNS_DISCOVERY_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
#include "kdeconnectcore_export.h"
|
|
|
|
|
2023-07-05 20:09:28 +01:00
|
|
|
#include "mdns_wrapper.h"
|
|
|
|
|
2023-06-22 10:53:42 +01:00
|
|
|
class LanLinkProvider;
|
|
|
|
|
|
|
|
class KDECONNECTCORE_EXPORT MdnsDiscovery : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit MdnsDiscovery(LanLinkProvider *parent);
|
|
|
|
~MdnsDiscovery();
|
|
|
|
|
2023-07-31 08:57:44 +01:00
|
|
|
void onStart();
|
|
|
|
void onStop();
|
2023-06-22 10:53:42 +01:00
|
|
|
|
2023-07-05 20:09:28 +01:00
|
|
|
public Q_SLOTS:
|
2023-07-31 08:57:44 +01:00
|
|
|
void onNetworkChange();
|
2023-07-05 20:09:28 +01:00
|
|
|
|
2023-06-22 10:53:42 +01:00
|
|
|
private:
|
2023-07-05 20:09:28 +01:00
|
|
|
MdnsWrapper::Discoverer mdnsDiscoverer;
|
|
|
|
MdnsWrapper::Announcer mdnsAnnouncer;
|
2023-06-22 10:53:42 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // KDECONNECT_SERVER_H
|