mDNS is now handled more or less in the same way audio is. Multiple mDNS backends are available, shairport tries them all until one works. This makes it, IMHO, cleaner, and easier to add other mDNS backends in the future, such as using tinysvcmdns or dns-sd library. Also it will also allow to define mDNS backends as plugins, in a similar way it is done in PR #230.
19 lines
446 B
C
19 lines
446 B
C
#ifndef _MDNS_H
|
|
#define _MDNS_H
|
|
|
|
extern int mdns_pid;
|
|
|
|
void mdns_unregister(void);
|
|
void mdns_register(void);
|
|
|
|
typedef struct {
|
|
int (*mdns_register)(char *apname, int port);
|
|
void (*mdns_unregister)(void);
|
|
} mdns_backend;
|
|
|
|
#define MDNS_RECORD "tp=UDP", "sm=false", "ek=1", "et=0,1", "cn=0,1", "ch=2", \
|
|
"ss=16", "sr=44100", "vn=3", "txtvers=1", \
|
|
config.password ? "pw=true" : "pw=false"
|
|
|
|
#endif // _MDNS_H
|