1 /* 2 This file is part of the KDE project 3 4 SPDX-FileCopyrightText: 2004 Jakub Stachowski <qbast@go2.pl> 5 6 SPDX-License-Identifier: LGPL-2.0-or-later 7 */ 8 9 #ifndef MDNSD_SERVICEBROWSER_P_H 10 #define MDNSD_SERVICEBROWSER_P_H 11 12 #include <QObject> 13 #include <QTimer> 14 15 #include "mdnsd-responder.h" 16 #include "servicebrowser.h" 17 18 namespace KDNSSD 19 { 20 class ServiceBrowserPrivate : public Responder 21 { 22 Q_OBJECT 23 public: ServiceBrowserPrivate(ServiceBrowser * parent)24 ServiceBrowserPrivate(ServiceBrowser *parent) 25 : Responder() 26 , m_parent(parent) 27 { 28 } 29 QList<RemoteService::Ptr> m_services; 30 QList<RemoteService::Ptr> m_duringResolve; 31 QString m_type; 32 QString m_domain; 33 QString m_subtype; 34 bool m_autoResolve; 35 bool m_finished; 36 ServiceBrowser *m_parent; 37 QTimer timeout; 38 39 // get already found service identical to s or null if not found 40 RemoteService::Ptr find(RemoteService::Ptr s, const QList<RemoteService::Ptr> &where) const; 41 virtual void customEvent(QEvent *event); 42 public Q_SLOTS: 43 void queryFinished(); 44 void serviceResolved(bool success); 45 void onTimeout(); 46 }; 47 48 } 49 50 #endif 51