-static void record_browser_callback(AvahiSRecordBrowser *r, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, AvahiRecord *record, void* userdata) {
+static const char *browser_event_to_string(AvahiBrowserEvent event) {
+ switch (event) {
+ case AVAHI_BROWSER_NEW : return "NEW";
+ case AVAHI_BROWSER_REMOVE : return "REMOVE";
+ case AVAHI_BROWSER_CACHE_EXHAUSTED : return "CACHE_EXHAUSTED";
+ case AVAHI_BROWSER_ALL_FOR_NOW : return "ALL_FOR_NOW";
+ case AVAHI_BROWSER_FAILURE : return "FAILURE";
+ }
+
+ abort();
+}
+
+static const char *resolver_event_to_string(AvahiResolverEvent event) {
+ switch (event) {
+ case AVAHI_RESOLVER_FOUND: return "FOUND";
+ case AVAHI_RESOLVER_FAILURE: return "FAILURE";
+ }
+ abort();
+}
+
+static void record_browser_callback(
+ AvahiSRecordBrowser *r,
+ AvahiIfIndex interface,
+ AvahiProtocol protocol,
+ AvahiBrowserEvent event,
+ AvahiRecord *record,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {