* the embeddable mDNS stack for embedded applications.
*
* End user applications should *not* use this API and should use
- * the DBUS or C APIs, please see
+ * the D-Bus or C APIs, please see
* client-browse-services.c and glib-integration.c
*
* I repeat, you probably do *not* want to use this example.
static void resolve_callback(
AvahiSServiceResolver *r,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
+ AVAHI_GCC_UNUSED AvahiIfIndex interface,
+ AVAHI_GCC_UNUSED AvahiProtocol protocol,
AvahiResolverEvent event,
const char *name,
const char *type,
uint16_t port,
AvahiStringList *txt,
AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED void* userdata) {
assert(r);
host_name, port, a,
t,
avahi_string_list_get_service_cookie(txt),
- avahi_server_is_service_local(server, interface, protocol, name, type, domain),
+ !!(flags & AVAHI_LOOKUP_RESULT_LOCAL),
!!(flags & AVAHI_LOOKUP_RESULT_WIDE_AREA),
!!(flags & AVAHI_LOOKUP_RESULT_MULTICAST),
!!(flags & AVAHI_LOOKUP_RESULT_CACHED));
const char *name,
const char *type,
const char *domain,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void* userdata) {
AvahiServer *s = userdata;
}
}
-int main(int argc, char*argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char*argv[]) {
AvahiServerConfig config;
AvahiSServiceBrowser *sb = NULL;
int error;
}
/* Run the main loop */
- for (;;)
- if (avahi_simple_poll_iterate(simple_poll, -1) != 0)
- break;
+ avahi_simple_poll_loop(simple_poll);
ret = 0;