File indexing completed on 2024-04-28 15:22:04
0001 /* 0002 This file is part of the KDE project 0003 0004 SPDX-FileCopyrightText: 2004 Jakub Stachowski <qbast@go2.pl> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #ifndef AVAHI_DOMAINBROWSER_P_H 0010 #define AVAHI_DOMAINBROWSER_P_H 0011 0012 #include "avahi_domainbrowser_interface.h" 0013 #include "avahi_listener_p.h" 0014 #include "domainbrowser.h" 0015 #include <QSet> 0016 0017 namespace KDNSSD 0018 { 0019 class DomainBrowserPrivate : public QObject, public AvahiListener 0020 { 0021 Q_OBJECT 0022 public: 0023 DomainBrowserPrivate(DomainBrowser::DomainType type, DomainBrowser *parent) 0024 : m_type(type) 0025 , m_browser(nullptr) 0026 , m_parent(parent) 0027 , m_started(false) 0028 { 0029 } 0030 ~DomainBrowserPrivate() override 0031 { 0032 if (m_browser) { 0033 m_browser->Free(); 0034 } 0035 } 0036 0037 DomainBrowser::DomainType m_type; 0038 org::freedesktop::Avahi::DomainBrowser *m_browser = nullptr; 0039 DomainBrowser *m_parent = nullptr; 0040 bool m_started = false; 0041 QSet<QString> m_domains; 0042 0043 public Q_SLOTS: 0044 // NB: The global slots are runtime connected! If their signature changes 0045 // make sure the SLOT() signature gets updated! 0046 void gotGlobalItemNew(int interface, int protocol, const QString &domain, uint flags, QDBusMessage msg); 0047 void gotGlobalItemRemove(int interface, int protocol, const QString &domain, uint flags, QDBusMessage msg); 0048 void gotGlobalAllForNow(QDBusMessage msg); 0049 0050 void gotNewDomain(int, int, const QString &, uint); 0051 void gotRemoveDomain(int, int, const QString &, uint); 0052 }; 0053 0054 } 0055 #endif