File indexing completed on 2024-05-12 04:58:53

0001 /**
0002  * SPDX-FileCopyrightText: 2023 Albert Vaca Cintora <albertvaka@gmail.com>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 #ifndef KDECONNECT_MDNS_DISCOVERY_H
0008 #define KDECONNECT_MDNS_DISCOVERY_H
0009 
0010 #include <QObject>
0011 
0012 #include "kdeconnectcore_export.h"
0013 
0014 #include "mdns_wrapper.h"
0015 
0016 class LanLinkProvider;
0017 
0018 class KDECONNECTCORE_EXPORT MdnsDiscovery : public QObject
0019 {
0020     Q_OBJECT
0021 
0022 public:
0023     explicit MdnsDiscovery(LanLinkProvider *parent);
0024     ~MdnsDiscovery();
0025 
0026     void onStart();
0027     void onStop();
0028 
0029 public Q_SLOTS:
0030     void onNetworkChange();
0031 
0032 private:
0033     MdnsWrapper::Discoverer mdnsDiscoverer;
0034     MdnsWrapper::Announcer mdnsAnnouncer;
0035 };
0036 
0037 #endif // KDECONNECT_SERVER_H