mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Fix warnings in Bonjour code
Mostly shadowing warnings and some unused functions.
This commit is contained in:
parent
8ecc3d1e02
commit
99d37cffe8
@ -30,8 +30,8 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "BonjourServiceBrowser.h"
|
||||
|
||||
BonjourServiceBrowser::BonjourServiceBrowser(QObject *parent)
|
||||
: QObject(parent), dnssref(0), bonjourSocket(0) {
|
||||
BonjourServiceBrowser::BonjourServiceBrowser(QObject *p)
|
||||
: QObject(p), dnssref(0), bonjourSocket(0) {
|
||||
}
|
||||
|
||||
BonjourServiceBrowser::~BonjourServiceBrowser() {
|
||||
|
||||
@ -47,9 +47,6 @@ class BonjourServiceBrowser : public QObject {
|
||||
inline QList<BonjourRecord> currentRecords() const {
|
||||
return bonjourRecords;
|
||||
}
|
||||
inline QString serviceType() const {
|
||||
return browsingType;
|
||||
}
|
||||
|
||||
signals:
|
||||
void currentBonjourRecordsChanged(const QList<BonjourRecord> &list);
|
||||
@ -65,7 +62,6 @@ class BonjourServiceBrowser : public QObject {
|
||||
DNSServiceRef dnssref;
|
||||
QSocketNotifier *bonjourSocket;
|
||||
QList<BonjourRecord> bonjourRecords;
|
||||
QString browsingType;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@ -31,8 +31,8 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "BonjourServiceRegister.h"
|
||||
|
||||
BonjourServiceRegister::BonjourServiceRegister(QObject *parent)
|
||||
: QObject(parent), dnssref(0), bonjourSocket(0) {
|
||||
BonjourServiceRegister::BonjourServiceRegister(QObject *p)
|
||||
: QObject(p), dnssref(0), bonjourSocket(0) {
|
||||
}
|
||||
|
||||
BonjourServiceRegister::~BonjourServiceRegister() {
|
||||
@ -50,7 +50,7 @@ void BonjourServiceRegister::registerService(const BonjourRecord &record, quint1
|
||||
quint16 bigEndianPort = servicePort;
|
||||
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
|
||||
{
|
||||
bigEndianPort = 0 | ((servicePort & 0x00ff) << 8) | ((servicePort & 0xff00) >> 8);
|
||||
bigEndianPort = static_cast<quint16>(((servicePort & 0x00ff) << 8) | ((servicePort & 0xff00) >> 8));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ class QSocketNotifier;
|
||||
class BonjourServiceRegister : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
BonjourServiceRegister(QObject *parent = 0);
|
||||
BonjourServiceRegister(QObject *p = 0);
|
||||
~BonjourServiceRegister();
|
||||
|
||||
void registerService(const BonjourRecord &record, quint16 servicePort);
|
||||
|
||||
@ -55,7 +55,7 @@ void BonjourServiceResolver::resolveBonjourRecord(const BonjourRecord &record) {
|
||||
record.serviceName.toUtf8().constData(),
|
||||
record.registeredType.toUtf8().constData(),
|
||||
record.replyDomain.toUtf8().constData(),
|
||||
(DNSServiceResolveReply)bonjourResolveReply, rr);
|
||||
static_cast<DNSServiceResolveReply>(bonjourResolveReply), rr);
|
||||
|
||||
if (err == kDNSServiceErr_NoError) {
|
||||
int sockfd = DNSServiceRefSockFD(rr->dnssref);
|
||||
@ -89,7 +89,7 @@ void BonjourServiceResolver::bonjourSocketReadyRead(int sockfd) {
|
||||
void BonjourServiceResolver::bonjourResolveReply(DNSServiceRef, DNSServiceFlags ,
|
||||
quint32 , DNSServiceErrorType errorCode,
|
||||
const char *, const char *hosttarget, quint16 port,
|
||||
quint16 , const char *, void *context) {
|
||||
quint16 , const unsigned char *, void *context) {
|
||||
ResolveRecord *rr = static_cast<ResolveRecord *>(context);
|
||||
rr->bsr->qmResolvers.remove(DNSServiceRefSockFD(rr->dnssref));
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ class BonjourServiceResolver : public QObject {
|
||||
static void DNSSD_API bonjourResolveReply(DNSServiceRef sdRef, DNSServiceFlags flags,
|
||||
quint32 interfaceIndex, DNSServiceErrorType errorCode,
|
||||
const char *fullName, const char *hosttarget, quint16 port,
|
||||
quint16 txtLen, const char *txtRecord, void *context);
|
||||
quint16 txtLen, const unsigned char *txtRecord, void *context);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user