mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-04 04:36:44 +02:00
37 lines
579 B
C++
37 lines
579 B
C++
#ifndef BROWSEMDNS_H
|
|
#define BROWSEMDNS_H
|
|
|
|
#include <string>
|
|
|
|
enum IPVersion
|
|
{
|
|
IPv4 = 0,
|
|
IPv6 = 1
|
|
};
|
|
|
|
|
|
struct mDNSResult
|
|
{
|
|
IPVersion ip_version;
|
|
int iface_idx;
|
|
std::string ip;
|
|
std::string host;
|
|
uint16_t port;
|
|
bool valid;
|
|
};
|
|
|
|
class BrowsemDNS
|
|
{
|
|
public:
|
|
virtual bool browse(const std::string& serviceName, mDNSResult& result, int timeout) = 0;
|
|
};
|
|
|
|
#if defined(HAS_AVAHI)
|
|
#include "browse_avahi.hpp"
|
|
typedef BrowseAvahi BrowseZeroConf;
|
|
#elif defined(HAS_BONJOUR)
|
|
#include "browse_bonjour.hpp"
|
|
typedef BrowseBonjour BrowseZeroConf;
|
|
#endif
|
|
|
|
#endif
|