diff options
Diffstat (limited to '3rdparty/qqbonjour-src')
-rw-r--r-- | 3rdparty/qqbonjour-src/BonjourRecord.h | 57 | ||||
-rw-r--r-- | 3rdparty/qqbonjour-src/BonjourServiceBrowser.cpp | 85 | ||||
-rw-r--r-- | 3rdparty/qqbonjour-src/BonjourServiceBrowser.h | 67 | ||||
-rw-r--r-- | 3rdparty/qqbonjour-src/BonjourServiceRegister.cpp | 98 | ||||
-rw-r--r-- | 3rdparty/qqbonjour-src/BonjourServiceRegister.h | 69 | ||||
-rw-r--r-- | 3rdparty/qqbonjour-src/BonjourServiceResolver.cpp | 107 | ||||
-rw-r--r-- | 3rdparty/qqbonjour-src/BonjourServiceResolver.h | 74 | ||||
-rw-r--r-- | 3rdparty/qqbonjour-src/LICENSE | 25 | ||||
-rw-r--r-- | 3rdparty/qqbonjour-src/README | 13 |
9 files changed, 0 insertions, 595 deletions
diff --git a/3rdparty/qqbonjour-src/BonjourRecord.h b/3rdparty/qqbonjour-src/BonjourRecord.h deleted file mode 100644 index 3bf553eb1..000000000 --- a/3rdparty/qqbonjour-src/BonjourRecord.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright (c) 2007, Trenton Schulz - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MUMBLE_BONJOUR_RECORD_H_ -#define MUMBLE_BONJOUR_RECORD_H_ - -#include <QtCore/QMetaType> -#include <QtCore/QString> - -class BonjourRecord { - public: - BonjourRecord() {} - BonjourRecord(const QString &name, const QString ®Type, const QString &domain) - : serviceName(name), registeredType(regType), replyDomain(domain) {} - BonjourRecord(const char *name, const char *regType, const char *domain) { - serviceName = QString::fromUtf8(name); - registeredType = QString::fromUtf8(regType); - replyDomain = QString::fromUtf8(domain); - } - QString serviceName; - QString registeredType; - QString replyDomain; - bool operator==(const BonjourRecord &other) const { - return serviceName == other.serviceName - && registeredType == other.registeredType - && replyDomain == other.replyDomain; - } -}; - -Q_DECLARE_METATYPE(BonjourRecord) - -#endif diff --git a/3rdparty/qqbonjour-src/BonjourServiceBrowser.cpp b/3rdparty/qqbonjour-src/BonjourServiceBrowser.cpp deleted file mode 100644 index 329c42c4b..000000000 --- a/3rdparty/qqbonjour-src/BonjourServiceBrowser.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* -Copyright (c) 2007, Trenton Schulz - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "BonjourServiceBrowser.h" - -#include <QtCore/QSocketNotifier> - -BonjourServiceBrowser::BonjourServiceBrowser(QObject *p) - : QObject(p), dnssref(0), bonjourSocket(0) { -} - -BonjourServiceBrowser::~BonjourServiceBrowser() { - if (dnssref) { - DNSServiceRefDeallocate(dnssref); - dnssref = 0; - } -} - -void BonjourServiceBrowser::browseForServiceType(const QString &serviceType) { - DNSServiceErrorType err = DNSServiceBrowse(&dnssref, 0, 0, serviceType.toUtf8().constData(), 0, - bonjourBrowseReply, this); - if (err != kDNSServiceErr_NoError) { - emit error(err); - } else { - int sockfd = DNSServiceRefSockFD(dnssref); - if (sockfd == -1) { - emit error(kDNSServiceErr_Invalid); - } else { - bonjourSocket = new QSocketNotifier(sockfd, QSocketNotifier::Read, this); - connect(bonjourSocket, SIGNAL(activated(int)), this, SLOT(bonjourSocketReadyRead())); - } - } -} - -void BonjourServiceBrowser::bonjourSocketReadyRead() { - DNSServiceErrorType err = DNSServiceProcessResult(dnssref); - if (err != kDNSServiceErr_NoError) - emit error(err); -} - -void BonjourServiceBrowser::bonjourBrowseReply(DNSServiceRef , DNSServiceFlags flags, - quint32 , DNSServiceErrorType errorCode, - const char *serviceName, const char *regType, - const char *replyDomain, void *context) { - BonjourServiceBrowser *serviceBrowser = static_cast<BonjourServiceBrowser *>(context); - if (errorCode != kDNSServiceErr_NoError) { - emit serviceBrowser->error(errorCode); - } else { - BonjourRecord bonjourRecord(serviceName, regType, replyDomain); - if (flags & kDNSServiceFlagsAdd) { - if (!serviceBrowser->bonjourRecords.contains(bonjourRecord)) - serviceBrowser->bonjourRecords.append(bonjourRecord); - } else { - serviceBrowser->bonjourRecords.removeAll(bonjourRecord); - } - if (!(flags & kDNSServiceFlagsMoreComing)) { - emit serviceBrowser->currentBonjourRecordsChanged(serviceBrowser->bonjourRecords); - } - } -} diff --git a/3rdparty/qqbonjour-src/BonjourServiceBrowser.h b/3rdparty/qqbonjour-src/BonjourServiceBrowser.h deleted file mode 100644 index 0bc0c743a..000000000 --- a/3rdparty/qqbonjour-src/BonjourServiceBrowser.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -Copyright (c) 2007, Trenton Schulz -Copyright (c) 2009-2011, Stefan Hacker - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MUMBLE_BONJOURSERVICEBROWSER_H_ -#define MUMBLE_BONJOURSERVICEBROWSER_H_ - -#include <dns_sd.h> - -#include <QtCore/QObject> - -#include "BonjourRecord.h" - -class QSocketNotifier; - -class BonjourServiceBrowser : public QObject { - Q_OBJECT - public: - BonjourServiceBrowser(QObject *parent = 0); - ~BonjourServiceBrowser(); - void browseForServiceType(const QString &serviceType); - inline QList<BonjourRecord> currentRecords() const { - return bonjourRecords; - } - - signals: - void currentBonjourRecordsChanged(const QList<BonjourRecord> &list); - void error(DNSServiceErrorType err); - - private slots: - void bonjourSocketReadyRead(); - - private: - static void DNSSD_API bonjourBrowseReply(DNSServiceRef , DNSServiceFlags flags, quint32, - DNSServiceErrorType errorCode, const char *serviceName, - const char *regType, const char *replyDomain, void *context); - DNSServiceRef dnssref; - QSocketNotifier *bonjourSocket; - QList<BonjourRecord> bonjourRecords; -}; - -#endif diff --git a/3rdparty/qqbonjour-src/BonjourServiceRegister.cpp b/3rdparty/qqbonjour-src/BonjourServiceRegister.cpp deleted file mode 100644 index b9143e3ed..000000000 --- a/3rdparty/qqbonjour-src/BonjourServiceRegister.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright (c) 2007, Trenton Schulz -Copyright (c) 2009-2011, Stefan Hacker - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "BonjourServiceRegister.h" - -#include <QtCore/QSocketNotifier> - -BonjourServiceRegister::BonjourServiceRegister(QObject *p) - : QObject(p), dnssref(0), bonjourSocket(0) { -} - -BonjourServiceRegister::~BonjourServiceRegister() { - if (dnssref) { - DNSServiceRefDeallocate(dnssref); - dnssref = 0; - } -} - -void BonjourServiceRegister::registerService(const BonjourRecord &record, quint16 servicePort) { - if (dnssref) { - qWarning("Warning: Already registered a service for this object, aborting new register"); - return; - } - quint16 bigEndianPort = servicePort; -#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN - { - bigEndianPort = static_cast<quint16>(((servicePort & 0x00ff) << 8) | ((servicePort & 0xff00) >> 8)); - } -#endif - - DNSServiceErrorType err = DNSServiceRegister(&dnssref, 0, 0, - record.serviceName.isEmpty() ? 0 - : record.serviceName.toUtf8().constData(), - record.registeredType.toUtf8().constData(), - record.replyDomain.isEmpty() ? 0 - : record.replyDomain.toUtf8().constData(), 0, - bigEndianPort, 0, 0, bonjourRegisterService, this); - if (err != kDNSServiceErr_NoError) { - emit error(err); - } else { - int sockfd = DNSServiceRefSockFD(dnssref); - if (sockfd == -1) { - emit error(kDNSServiceErr_Invalid); - } else { - bonjourSocket = new QSocketNotifier(sockfd, QSocketNotifier::Read, this); - connect(bonjourSocket, SIGNAL(activated(int)), this, SLOT(bonjourSocketReadyRead())); - } - } -} - - -void BonjourServiceRegister::bonjourSocketReadyRead() { - DNSServiceErrorType err = DNSServiceProcessResult(dnssref); - if (err != kDNSServiceErr_NoError) - emit error(err); -} - - -void DNSSD_API BonjourServiceRegister::bonjourRegisterService(DNSServiceRef, DNSServiceFlags, - DNSServiceErrorType errorCode, const char *name, - const char *regtype, const char *domain, - void *data) { - BonjourServiceRegister *serviceRegister = static_cast<BonjourServiceRegister *>(data); - if (errorCode != kDNSServiceErr_NoError) { - emit serviceRegister->error(errorCode); - } else { - serviceRegister->finalRecord = BonjourRecord(QString::fromUtf8(name), - QString::fromUtf8(regtype), - QString::fromUtf8(domain)); - emit serviceRegister->serviceRegistered(serviceRegister->finalRecord); - } -} diff --git a/3rdparty/qqbonjour-src/BonjourServiceRegister.h b/3rdparty/qqbonjour-src/BonjourServiceRegister.h deleted file mode 100644 index 6b37749c3..000000000 --- a/3rdparty/qqbonjour-src/BonjourServiceRegister.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright (c) 2007, Trenton Schulz -Copyright (c) 2009-2011, Stefan Hacker - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MUMBLE_BONJOUR_SERVICE_REGISTER_H_ -#define MUMBLE_BONJOUR_SERVICE_REGISTER_H_ - -// Bonjour flags -#include <dns_sd.h> -#include <QtCore/QObject> - -#include "BonjourRecord.h" - -class QSocketNotifier; - -class BonjourServiceRegister : public QObject { - Q_OBJECT - public: - BonjourServiceRegister(QObject *p = 0); - ~BonjourServiceRegister(); - - void registerService(const BonjourRecord &record, quint16 servicePort); - inline BonjourRecord registeredRecord() const { - return finalRecord; - } - - signals: - void error(DNSServiceErrorType error); - void serviceRegistered(const BonjourRecord &record); - - private slots: - void bonjourSocketReadyRead(); - - private: - static void DNSSD_API bonjourRegisterService(DNSServiceRef sdRef, DNSServiceFlags, - DNSServiceErrorType errorCode, const char *name, - const char *regtype, const char *domain, - void *context); - DNSServiceRef dnssref; - QSocketNotifier *bonjourSocket; - BonjourRecord finalRecord; -}; - -#endif diff --git a/3rdparty/qqbonjour-src/BonjourServiceResolver.cpp b/3rdparty/qqbonjour-src/BonjourServiceResolver.cpp deleted file mode 100644 index 18b9e571d..000000000 --- a/3rdparty/qqbonjour-src/BonjourServiceResolver.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/* -Copyright (c) 2007, Trenton Schulz -Copyright (C) 2009-2011, Thorvald Natvig <thorvald@natvig.com> - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "BonjourServiceResolver.h" - -#include <QtCore/QSocketNotifier> -#include <QtCore/QtEndian> - -BonjourServiceResolver::ResolveRecord::ResolveRecord(const BonjourRecord &r, BonjourServiceResolver *p) : record(r), bsr(p), dnssref(NULL), bonjourSocket(NULL), bonjourPort(-1) { -} - -BonjourServiceResolver::ResolveRecord::~ResolveRecord() { - delete bonjourSocket; - if (dnssref) - DNSServiceRefDeallocate(dnssref); -} - -BonjourServiceResolver::BonjourServiceResolver(QObject *p) : QObject(p) { -} - -BonjourServiceResolver::~BonjourServiceResolver() { - foreach(ResolveRecord *rr, qmResolvers) - delete rr; -} - -void BonjourServiceResolver::resolveBonjourRecord(const BonjourRecord &record) { - ResolveRecord *rr = new ResolveRecord(record, this); - - DNSServiceErrorType err = DNSServiceResolve(& rr->dnssref, 0, 0, - record.serviceName.toUtf8().constData(), - record.registeredType.toUtf8().constData(), - record.replyDomain.toUtf8().constData(), - static_cast<DNSServiceResolveReply>(bonjourResolveReply), rr); - - if (err == kDNSServiceErr_NoError) { - int sockfd = DNSServiceRefSockFD(rr->dnssref); - if (sockfd == -1) { - err = kDNSServiceErr_Invalid; - } else { - rr->bonjourSocket = new QSocketNotifier(sockfd, QSocketNotifier::Read, this); - connect(rr->bonjourSocket, SIGNAL(activated(int)), this, SLOT(bonjourSocketReadyRead(int))); - qmResolvers.insert(sockfd, rr); - return; - } - } - - emit error(record, err); - delete rr; -} - -void BonjourServiceResolver::bonjourSocketReadyRead(int sockfd) { - ResolveRecord *rr = qmResolvers.value(sockfd); - - if (! rr) - return; - - DNSServiceErrorType err = DNSServiceProcessResult(rr->dnssref); - if (err != kDNSServiceErr_NoError) { - emit error(rr->record, err); - qmResolvers.remove(DNSServiceRefSockFD(rr->dnssref)); - delete rr; - } -} - - -void BonjourServiceResolver::bonjourResolveReply(DNSServiceRef, DNSServiceFlags , - quint32 , DNSServiceErrorType errorCode, - const char *, const char *hosttarget, quint16 port, - quint16 , const unsigned char *, void *context) { - ResolveRecord *rr = static_cast<ResolveRecord *>(context); - rr->bsr->qmResolvers.remove(DNSServiceRefSockFD(rr->dnssref)); - - if (errorCode != kDNSServiceErr_NoError) { - emit rr->bsr->error(rr->record, errorCode); - delete rr; - return; - } - rr->bonjourPort = qFromBigEndian<quint16>(port); - emit rr->bsr->bonjourRecordResolved(rr->record, QString::fromUtf8(hosttarget), rr->bonjourPort); - delete rr; -} diff --git a/3rdparty/qqbonjour-src/BonjourServiceResolver.h b/3rdparty/qqbonjour-src/BonjourServiceResolver.h deleted file mode 100644 index d2a669ea1..000000000 --- a/3rdparty/qqbonjour-src/BonjourServiceResolver.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -Copyright (c) 2007, Trenton Schulz -Copyright (c) 2009-2011, Stefan Hacker -Copyright (C) 2009-2011, Thorvald Natvig <thorvald@natvig.com> - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MUMBLE_BONJOURSERVICERESOLVER_H_ -#define MUMBLE_BONJOURSERVICERESOLVER_H_ - -#include <QtCore/QMap> -#include <QtCore/QObject> - -#include <dns_sd.h> - -#include "BonjourRecord.h" - -class QSocketNotifier; - -class BonjourServiceResolver : public QObject { - Q_OBJECT - protected: - struct ResolveRecord { - BonjourRecord record; - BonjourServiceResolver *bsr; - DNSServiceRef dnssref; - QSocketNotifier *bonjourSocket; - int bonjourPort; - ResolveRecord(const BonjourRecord &, BonjourServiceResolver *); - ~ResolveRecord(); - }; - - QMap<int, ResolveRecord *> qmResolvers; - public: - BonjourServiceResolver(QObject *parent); - ~BonjourServiceResolver(); - - void resolveBonjourRecord(const BonjourRecord &record); - signals: - void bonjourRecordResolved(BonjourRecord record, QString hostname, int port); - void error(BonjourRecord record, DNSServiceErrorType error); - private slots: - void bonjourSocketReadyRead(int); - private: - static void DNSSD_API bonjourResolveReply(DNSServiceRef sdRef, DNSServiceFlags flags, - quint32 interfaceIndex, DNSServiceErrorType errorCode, - const char *fullName, const char *hosttarget, quint16 port, - quint16 txtLen, const unsigned char *txtRecord, void *context); -}; - -#endif diff --git a/3rdparty/qqbonjour-src/LICENSE b/3rdparty/qqbonjour-src/LICENSE deleted file mode 100644 index 0d974d830..000000000 --- a/3rdparty/qqbonjour-src/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2007, Trenton Schulz - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/3rdparty/qqbonjour-src/README b/3rdparty/qqbonjour-src/README deleted file mode 100644 index c13703607..000000000 --- a/3rdparty/qqbonjour-src/README +++ /dev/null @@ -1,13 +0,0 @@ -The files in this directory are originally from an article -in Qt Quarterly 23: - -https://doc.qt.io/archives/qq/qq23-bonjour.html - -The files in this directory are used directly in the -Mumble and Murmur build. Because of this, there is no -"qqbonjour-build" directory. - -These files are modified and are now de facto maintained by -the Mumble project. - -For information about the license, see the LICENSE file. |