mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-03 00:29:35 +02:00
Add missing includes
This commit is contained in:
parent
aa82ba8397
commit
3228c418d4
2 changed files with 8 additions and 6 deletions
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
// local headers
|
// local headers
|
||||||
#include "common/aixlog.hpp"
|
#include "common/aixlog.hpp"
|
||||||
|
#include "common/snap_exception.hpp"
|
||||||
|
|
||||||
// standard headers
|
// standard headers
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -200,12 +201,12 @@ bool BrowseBonjour::browse(const string& serviceName, mDNSResult& result, int /*
|
||||||
service.get(), 0, 0, serviceName.c_str(), "local.",
|
service.get(), 0, 0, serviceName.c_str(), "local.",
|
||||||
[](DNSServiceRef /*service*/, DNSServiceFlags /*flags*/, uint32_t /*interfaceIndex*/, DNSServiceErrorType errorCode, const char* serviceName,
|
[](DNSServiceRef /*service*/, DNSServiceFlags /*flags*/, uint32_t /*interfaceIndex*/, DNSServiceErrorType errorCode, const char* serviceName,
|
||||||
const char* regtype, const char* replyDomain, void* context)
|
const char* regtype, const char* replyDomain, void* context)
|
||||||
{
|
{
|
||||||
auto replyCollection = static_cast<deque<mDNSReply>*>(context);
|
auto replyCollection = static_cast<deque<mDNSReply>*>(context);
|
||||||
|
|
||||||
CHECKED(errorCode);
|
CHECKED(errorCode);
|
||||||
replyCollection->push_back(mDNSReply{string(serviceName), string(regtype), string(replyDomain)});
|
replyCollection->push_back(mDNSReply{string(serviceName), string(regtype), string(replyDomain)});
|
||||||
},
|
},
|
||||||
&replyCollection));
|
&replyCollection));
|
||||||
|
|
||||||
runService(service);
|
runService(service);
|
||||||
|
@ -220,12 +221,12 @@ bool BrowseBonjour::browse(const string& serviceName, mDNSResult& result, int /*
|
||||||
service.get(), 0, 0, reply.name.c_str(), reply.regtype.c_str(), reply.domain.c_str(),
|
service.get(), 0, 0, reply.name.c_str(), reply.regtype.c_str(), reply.domain.c_str(),
|
||||||
[](DNSServiceRef /*service*/, DNSServiceFlags /*flags*/, uint32_t /*interfaceIndex*/, DNSServiceErrorType errorCode, const char* /*fullName*/,
|
[](DNSServiceRef /*service*/, DNSServiceFlags /*flags*/, uint32_t /*interfaceIndex*/, DNSServiceErrorType errorCode, const char* /*fullName*/,
|
||||||
const char* hosttarget, uint16_t port, uint16_t /*txtLen*/, const unsigned char* /*txtRecord*/, void* context)
|
const char* hosttarget, uint16_t port, uint16_t /*txtLen*/, const unsigned char* /*txtRecord*/, void* context)
|
||||||
{
|
{
|
||||||
auto resultCollection = static_cast<deque<mDNSResolve>*>(context);
|
auto resultCollection = static_cast<deque<mDNSResolve>*>(context);
|
||||||
|
|
||||||
CHECKED(errorCode);
|
CHECKED(errorCode);
|
||||||
resultCollection->push_back(mDNSResolve{string(hosttarget), ntohs(port)});
|
resultCollection->push_back(mDNSResolve{string(hosttarget), ntohs(port)});
|
||||||
},
|
},
|
||||||
&resolveCollection));
|
&resolveCollection));
|
||||||
|
|
||||||
runService(service);
|
runService(service);
|
||||||
|
@ -243,7 +244,7 @@ bool BrowseBonjour::browse(const string& serviceName, mDNSResult& result, int /*
|
||||||
service.get(), kDNSServiceFlagsLongLivedQuery, 0, kDNSServiceProtocol_IPv4, resolve.fullName.c_str(),
|
service.get(), kDNSServiceFlagsLongLivedQuery, 0, kDNSServiceProtocol_IPv4, resolve.fullName.c_str(),
|
||||||
[](DNSServiceRef /*service*/, DNSServiceFlags /*flags*/, uint32_t interfaceIndex, DNSServiceErrorType /*errorCode*/, const char* hostname,
|
[](DNSServiceRef /*service*/, DNSServiceFlags /*flags*/, uint32_t interfaceIndex, DNSServiceErrorType /*errorCode*/, const char* hostname,
|
||||||
const sockaddr* address, uint32_t /*ttl*/, void* context)
|
const sockaddr* address, uint32_t /*ttl*/, void* context)
|
||||||
{
|
{
|
||||||
auto result = static_cast<mDNSResult*>(context);
|
auto result = static_cast<mDNSResult*>(context);
|
||||||
|
|
||||||
result->host = string(hostname);
|
result->host = string(hostname);
|
||||||
|
@ -257,7 +258,7 @@ bool BrowseBonjour::browse(const string& serviceName, mDNSResult& result, int /*
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
result->valid = true;
|
result->valid = true;
|
||||||
},
|
},
|
||||||
&resultCollection[i++]));
|
&resultCollection[i++]));
|
||||||
}
|
}
|
||||||
runService(service);
|
runService(service);
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// standard headers
|
// standard headers
|
||||||
|
#include <cstdint>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
enum IPVersion
|
enum IPVersion
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue