File indexing completed on 2024-04-28 15:22:06
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 MDNSD_SERVICEBROWSER_P_H 0010 #define MDNSD_SERVICEBROWSER_P_H 0011 0012 #include <QObject> 0013 #include <QTimer> 0014 0015 #include "mdnsd-responder.h" 0016 #include "servicebrowser.h" 0017 0018 namespace KDNSSD 0019 { 0020 class ServiceBrowserPrivate : public Responder 0021 { 0022 Q_OBJECT 0023 public: 0024 ServiceBrowserPrivate(ServiceBrowser *parent) 0025 : Responder() 0026 , m_parent(parent) 0027 { 0028 } 0029 QList<RemoteService::Ptr> m_services; 0030 QList<RemoteService::Ptr> m_duringResolve; 0031 QString m_type; 0032 QString m_domain; 0033 QString m_subtype; 0034 bool m_autoResolve; 0035 bool m_finished; 0036 ServiceBrowser *m_parent; 0037 QTimer timeout; 0038 0039 // get already found service identical to s or null if not found 0040 RemoteService::Ptr find(RemoteService::Ptr s, const QList<RemoteService::Ptr> &where) const; 0041 virtual void customEvent(QEvent *event); 0042 public Q_SLOTS: 0043 void queryFinished(); 0044 void serviceResolved(bool success); 0045 void onTimeout(); 0046 }; 0047 0048 } 0049 0050 #endif