AvahiProtocol protocol,
AvahiBrowserEvent event,
const char *domain,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void *userdata) {
printf ("DOMAIN-BROWSER: Callback on %p, interface (%d), protocol (%d), event (%d), domain (%s), data (%s)\n", (void*) b, interface, protocol, event, domain, (char*)userdata);
const AvahiAddress *a,
uint16_t port,
AvahiStringList *txt,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void *userdata) {
char addr[64];
const char *name,
const char *type,
const char *domain,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void *userdata) {
AvahiServiceResolver *sr;
AvahiBrowserEvent event,
const char *type,
const char *domain,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void *userdata) {
printf ("SERVICE-TYPE-BROWSER: Callback on %p, interface (%d), protocol (%d), event (%d), type (%s), domain (%s), data (%s)\n", (void*) b, interface, protocol, event, type, domain, (char*)userdata);
}
static void avahi_address_resolver_callback (
- AvahiAddressResolver *r,
+ AVAHI_GCC_UNUSED AvahiAddressResolver *r,
AvahiIfIndex interface,
AvahiProtocol protocol,
AvahiResolverEvent event,
const AvahiAddress *address,
const char *name,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void *userdata) {
char addr[64];
AvahiResolverEvent event,
const char *name,
const AvahiAddress *a,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void *userdata) {
AvahiClient *client;
avahi_address_snprint (addr, sizeof (addr), a);
printf ("HOST-NAME-RESOLVER: Callback on HostNameResolver, interface (%d), protocol (%d), event (%d), name (%s), address (%s), data (%s)\n", interface, protocol, event, name, addr, (char*)userdata);
}
-static void test_free_domain_browser(AvahiTimeout *timeout, void* userdata)
+static void test_free_domain_browser(AVAHI_GCC_UNUSED AvahiTimeout *timeout, void* userdata)
{
AvahiServiceBrowser *b = userdata;
printf ("Freeing domain browser\n");
avahi_service_browser_free (b);
}
-static void test_free_entry_group (AvahiTimeout *timeout, void* userdata)
+static void test_free_entry_group (AVAHI_GCC_UNUSED AvahiTimeout *timeout, void* userdata)
{
AvahiEntryGroup *g = userdata;
printf ("Freeing entry group\n");
avahi_entry_group_free (g);
}
-static void test_entry_group_reset (AvahiTimeout *timeout, void* userdata)
+static void test_entry_group_reset (AVAHI_GCC_UNUSED AvahiTimeout *timeout, void* userdata)
{
AvahiEntryGroup *g = userdata;
avahi_entry_group_commit (g);
}
-static void test_entry_group_update(AvahiTimeout *timeout, void* userdata) {
+static void test_entry_group_update(AVAHI_GCC_UNUSED AvahiTimeout *timeout, void* userdata) {
AvahiEntryGroup *g = userdata;
printf ("Updating entry group\n");
avahi_entry_group_update_service_txt(g, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "Lathiat's Site", "_http._tcp", NULL, "foo=bar3", NULL);
}
-static void terminate(AvahiTimeout *timeout, void *userdata) {
+static void terminate(AVAHI_GCC_UNUSED AvahiTimeout *timeout, AVAHI_GCC_UNUSED void *userdata) {
avahi_simple_poll_quit(simple_poll);
}
-int main (int argc, char *argv[]) {
+int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
AvahiClient *avahi;
AvahiEntryGroup *group, *group2;
AvahiDomainBrowser *domain;
case AVAHI_CLIENT_S_COLLISION:
case AVAHI_CLIENT_S_REGISTERING:
- case AVAHI_CLIENT_S_FAILURE:
/* Clear cached strings */
avahi_free(client->host_name);
client->domain_name = NULL;
break;
- case AVAHI_CLIENT_S_INVALID:
case AVAHI_CLIENT_S_RUNNING:
break;
} if (dbus_message_is_signal(message, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) {
char *name, *old, *new;
- if (!(dbus_message_get_args(
+ if (!dbus_message_get_args(
message, &error,
DBUS_TYPE_STRING, &name,
DBUS_TYPE_STRING, &old,
DBUS_TYPE_STRING, &new,
- DBUS_TYPE_INVALID) || dbus_error_is_set (&error))) {
+ DBUS_TYPE_INVALID) || dbus_error_is_set (&error)) {
fprintf(stderr, "WARNING: Failed to parse NameOwnerChanged signal: %s\n", error.message);
goto fail;
} else if (dbus_message_is_signal (message, AVAHI_DBUS_INTERFACE_SERVER, "StateChanged")) {
int32_t state;
- char *e;
+ char *e = NULL;
int c;
- if (!(dbus_message_get_args(
+ if (!dbus_message_get_args(
message, &error,
DBUS_TYPE_INT32, &state,
DBUS_TYPE_STRING, &e,
- DBUS_TYPE_INVALID) || dbus_error_is_set (&error))) {
+ DBUS_TYPE_INVALID) || dbus_error_is_set (&error)) {
fprintf(stderr, "WARNING: Failed to parse Server.StateChanged signal: %s\n", error.message);
goto fail;
}
char *e;
int c;
- if (!(dbus_message_get_args(
+ if (!dbus_message_get_args(
message, &error,
DBUS_TYPE_INT32, &state,
DBUS_TYPE_STRING, &e,
- DBUS_TYPE_INVALID)) ||
+ DBUS_TYPE_INVALID) ||
dbus_error_is_set(&error)) {
fprintf(stderr, "WARNING: Failed to parse EntryGroup.StateChanged signal: %s\n", error.message);
goto fail;
if (!reply || dbus_error_is_set (&error))
goto fail;
- if (!(dbus_message_get_args(reply, &error, DBUS_TYPE_INT32, &state, DBUS_TYPE_INVALID)) ||
+ if (!dbus_message_get_args(reply, &error, DBUS_TYPE_INT32, &state, DBUS_TYPE_INVALID) ||
dbus_error_is_set (&error))
goto fail;
/** States of a client object, a superset of AvahiServerState */
typedef enum {
- AVAHI_CLIENT_S_INVALID = AVAHI_SERVER_INVALID,
AVAHI_CLIENT_S_REGISTERING = AVAHI_SERVER_REGISTERING,
AVAHI_CLIENT_S_RUNNING = AVAHI_SERVER_RUNNING,
AVAHI_CLIENT_S_COLLISION = AVAHI_SERVER_COLLISION,
- AVAHI_CLIENT_S_FAILURE = AVAHI_SERVER_FAILURE,
AVAHI_CLIENT_DISCONNECTED = 100 /**< Lost DBUS connection to the Avahi daemon */
} AvahiClientState;
#include <avahi-common/malloc.h>
static void callback(
- AvahiServiceResolver *r,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
+ AVAHI_GCC_UNUSED AvahiServiceResolver *r,
+ AVAHI_GCC_UNUSED AvahiIfIndex interface,
+ AVAHI_GCC_UNUSED AvahiProtocol protocol,
AvahiResolverEvent event,
const char *name,
const char *type,
const char *domain,
const char *host_name,
- const AvahiAddress *a,
- uint16_t port,
- AvahiStringList *txt,
- AvahiLookupResultFlags flags,
- void *userdata) {
+ AVAHI_GCC_UNUSED const AvahiAddress *a,
+ AVAHI_GCC_UNUSED uint16_t port,
+ AVAHI_GCC_UNUSED AvahiStringList *txt,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void *userdata) {
fprintf(stderr, "%i name=%s type=%s domain=%s host=%s\n", event, name, type, domain, host_name);
}
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
AvahiSimplePoll *simple_poll;
const AvahiPoll *poll_api;
#include "alternative.h"
#include "malloc.h"
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
char *r = NULL;
int i, k;
connection_data_unref(d);
}
-static void watch_callback(AvahiWatch *avahi_watch, int fd, AvahiWatchEvent events, void *userdata) {
+static void watch_callback(AvahiWatch *avahi_watch, AVAHI_GCC_UNUSED int fd, AvahiWatchEvent events, void *userdata) {
DBusWatch *dbus_watch = userdata;
+
assert(avahi_watch);
assert(dbus_watch);
timeout->avahi_timeout = NULL;
}
-static void timeout_toggled(DBusTimeout *dbus_timeout, void *userdata) {
+static void timeout_toggled(DBusTimeout *dbus_timeout, AVAHI_GCC_UNUSED void *userdata) {
TimeoutData *timeout;
assert(dbus_timeout);
update_timeout(timeout);
}
-static void dispatch_status(DBusConnection *connection, DBusDispatchStatus new_status, void *userdata) {
+static void dispatch_status(AVAHI_GCC_UNUSED DBusConnection *connection, DBusDispatchStatus new_status, void *userdata) {
ConnectionData *d = userdata;
if (new_status == DBUS_DISPATCH_DATA_REMAINS)
#include "domain.h"
#include "malloc.h"
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
char *s;
char t[256], r[256];
const char *p;
#define AVAHI_GCC_NORETURN
#endif
+#ifdef __GNUC__
+#define AVAHI_GCC_UNUSED __attribute__ ((unused))
+#else
+/** Macro for not used parameter */
+#define AVAHI_GCC_UNUSED
+#endif
+
AVAHI_C_DECL_END
#endif
return &s->api;
}
-static int system_poll(struct pollfd *ufds, unsigned int nfds, int timeout, void *userdata) {
+static int system_poll(struct pollfd *ufds, unsigned int nfds, int timeout, AVAHI_GCC_UNUSED void *userdata) {
return poll(ufds, nfds, timeout);
}
for (;;)
if ((r = avahi_simple_poll_iterate(s, -1)) != 0)
- return r;
+ if (r >= 0 || errno != EINTR)
+ return r;
}
#include "strlst.h"
#include "malloc.h"
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
char *t, *v;
uint8_t data[1024];
AvahiStringList *a = NULL, *b, *p;
#endif
#include <stdio.h>
+
+#include "gccmacro.h"
#include "timeval.h"
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
struct timeval a = { 5, 5 }, b;
#include "watch.h"
#include "simple-watch.h"
#include "timeval.h"
+#include "gccmacro.h"
static const AvahiPoll *api = NULL;
static AvahiSimplePoll *simple_poll = NULL;
-static void callback(AvahiWatch *w, int fd, AvahiWatchEvent event, void *userdata) {
+static void callback(AvahiWatch *w, int fd, AvahiWatchEvent event, AVAHI_GCC_UNUSED void *userdata) {
if (event & AVAHI_WATCH_IN) {
ssize_t r;
}
}
-static void wakeup(AvahiTimeout *t, void *userdata) {
+static void wakeup(AvahiTimeout *t, AVAHI_GCC_UNUSED void *userdata) {
static int i = 0;
struct timeval tv;
}
}
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
struct timeval tv;
simple_poll = avahi_simple_poll_new();
#include <assert.h>
#include <stdio.h>
+#include <avahi-common/gccmacro.h>
+
#include "howl.h"
#define ASSERT_SW_OKAY(t) { sw_result r; r = (t); assert(r == SW_OKAY); }
#define ASSERT_NOT_NULL(t) { const void* r; r = (t); assert(r); }
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
sw_ipv4_address a;
char t[256];
uint8_t a1, a2, a3, a4;
#include <arpa/inet.h>
#include <sys/types.h>
+#include <avahi-common/gccmacro.h>
+
#include "howl.h"
#include "warn.h"
return SW_OKAY;
}
-sw_result sw_ipv4_address_fina(sw_ipv4_address self) {
+sw_result sw_ipv4_address_fina(AVAHI_GCC_UNUSED sw_ipv4_address self) {
AVAHI_WARN_LINKAGE;
#include <assert.h>
#include <stdio.h>
+#include <avahi-common/gccmacro.h>
#include "howl.h"
#define ASSERT_SW_OKAY(t) { sw_result _r; _r = (t); assert(_r == SW_OKAY); }
#define ASSERT_NOT_NULL(t) { const void* _r; r = (t); assert(_r); }
static sw_result reply(
- sw_discovery discovery,
- sw_discovery_oid oid,
+ AVAHI_GCC_UNUSED sw_discovery discovery,
+ AVAHI_GCC_UNUSED sw_discovery_oid oid,
sw_discovery_browse_status status,
- sw_uint32 interface_index,
- sw_const_string name,
- sw_const_string type,
+ AVAHI_GCC_UNUSED sw_uint32 interface_index,
+ AVAHI_GCC_UNUSED sw_const_string name,
+ AVAHI_GCC_UNUSED sw_const_string type,
sw_const_string domain,
- sw_opaque extra) {
+ AVAHI_GCC_UNUSED sw_opaque extra) {
switch (status) {
case SW_DISCOVERY_BROWSE_ADD_DOMAIN:
return SW_OKAY;
}
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
sw_discovery discovery;
sw_discovery_oid oid;
return;
switch (state) {
- case AVAHI_CLIENT_S_FAILURE:
case AVAHI_CLIENT_DISCONNECTED:
reg_report_status(data, SW_DISCOVERY_PUBLISH_INVALID);
break;
avahi_entry_group_reset(data->object);
break;
- case AVAHI_CLIENT_S_INVALID:
case AVAHI_CLIENT_S_REGISTERING:
/* Ignore */
break;
static void domain_browser_callback(
AvahiDomainBrowser *b,
AvahiIfIndex interface,
- AvahiProtocol protocol,
+ AVAHI_GCC_UNUSED AvahiProtocol protocol,
AvahiBrowserEvent event,
const char *domain,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void *userdata) {
oid_data* data = userdata;
static void service_resolver_callback(
AvahiServiceResolver *r,
AvahiIfIndex interface,
- AvahiProtocol protocol,
+ AVAHI_GCC_UNUSED AvahiProtocol protocol,
AvahiResolverEvent event,
const char *name,
const char *type,
const AvahiAddress *a,
uint16_t port,
AvahiStringList *txt,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void *userdata) {
oid_data* data = userdata;
static void service_browser_callback(
AvahiServiceBrowser *b,
AvahiIfIndex interface,
- AvahiProtocol protocol,
+ AVAHI_GCC_UNUSED AvahiProtocol protocol,
AvahiBrowserEvent event,
const char *name,
const char *type,
const char *domain,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void *userdata) {
oid_data* data = userdata;
#include <assert.h>
#include <stdio.h>
+#include <avahi-common/gccmacro.h>
#include "howl.h"
#define ASSERT_SW_OKAY(t) { sw_result _r; _r = (t); assert(_r == SW_OKAY); }
}
}
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
sw_text_record r;
sw_text_record_iterator it;
char key[255];
#include <config.h>
#endif
+#include <avahi-common/gccmacro.h>
+
#include "howl.h"
#include "warn.h"
-sw_string sw_strdup(sw_const_string str) {
+AVAHI_GCC_NORETURN
+sw_string sw_strdup(AVAHI_GCC_UNUSED sw_const_string str) {
AVAHI_WARN_UNSUPPORTED_ABORT;
- return NULL;
}
+AVAHI_GCC_NORETURN
sw_opaque _sw_debug_malloc(
- sw_size_t size,
- sw_const_string function,
- sw_const_string file,
- sw_uint32 line) {
+ AVAHI_GCC_UNUSED sw_size_t size,
+ AVAHI_GCC_UNUSED sw_const_string function,
+ AVAHI_GCC_UNUSED sw_const_string file,
+ AVAHI_GCC_UNUSED sw_uint32 line) {
AVAHI_WARN_UNSUPPORTED_ABORT;
- return NULL;
}
+AVAHI_GCC_NORETURN
sw_opaque _sw_debug_realloc(
- sw_opaque_t mem,
- sw_size_t size,
- sw_const_string function,
- sw_const_string file,
- sw_uint32 line) {
+ AVAHI_GCC_UNUSED sw_opaque_t mem,
+ AVAHI_GCC_UNUSED sw_size_t size,
+ AVAHI_GCC_UNUSED sw_const_string function,
+ AVAHI_GCC_UNUSED sw_const_string file,
+ AVAHI_GCC_UNUSED sw_uint32 line) {
AVAHI_WARN_UNSUPPORTED_ABORT;
- return NULL;
}
void _sw_debug_free(
- sw_opaque_t mem,
- sw_const_string function,
- sw_const_string file,
- sw_uint32 line) {
+ AVAHI_GCC_UNUSED sw_opaque_t mem,
+ AVAHI_GCC_UNUSED sw_const_string function,
+ AVAHI_GCC_UNUSED sw_const_string file,
+ AVAHI_GCC_UNUSED sw_uint32 line) {
AVAHI_WARN_UNSUPPORTED;
}
+AVAHI_GCC_NORETURN
sw_const_string sw_strerror(/* howl sucks */) {
AVAHI_WARN_UNSUPPORTED_ABORT;
- return NULL;
}
-sw_result sw_timer_init(sw_timer * self) {
+sw_result sw_timer_init(AVAHI_GCC_UNUSED sw_timer * self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_result sw_timer_fina(sw_timer self) {
+sw_result sw_timer_fina(AVAHI_GCC_UNUSED sw_timer self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_result sw_time_init(sw_time * self) {
+sw_result sw_time_init(AVAHI_GCC_UNUSED sw_time * self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_result sw_time_init_now(sw_time * self) {
+sw_result sw_time_init_now(AVAHI_GCC_UNUSED sw_time * self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_result sw_time_fina(sw_time self) {
+sw_result sw_time_fina(AVAHI_GCC_UNUSED sw_time self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
+AVAHI_GCC_NORETURN
sw_time sw_time_add(
- sw_time self,
- sw_time y) {
+ AVAHI_GCC_UNUSED sw_time self,
+ AVAHI_GCC_UNUSED sw_time y) {
AVAHI_WARN_UNSUPPORTED_ABORT;
}
+AVAHI_GCC_NORETURN
sw_time sw_time_sub(
- sw_time self,
- sw_time y) {
+ AVAHI_GCC_UNUSED sw_time self,
+ AVAHI_GCC_UNUSED sw_time y) {
AVAHI_WARN_UNSUPPORTED_ABORT;
}
+AVAHI_GCC_NORETURN
sw_int32 sw_time_cmp(
- sw_time self,
- sw_time y) {
+ AVAHI_GCC_UNUSED sw_time self,
+ AVAHI_GCC_UNUSED sw_time y) {
AVAHI_WARN_UNSUPPORTED_ABORT;
}
sw_result sw_salt_init(
- sw_salt * self,
- int argc,
- char ** argv) {
+ AVAHI_GCC_UNUSED sw_salt * self,
+ AVAHI_GCC_UNUSED int argc,
+ AVAHI_GCC_UNUSED char ** argv) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_result sw_salt_fina(sw_salt self) {
+sw_result sw_salt_fina(AVAHI_GCC_UNUSED sw_salt self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_salt_register_socket(
- sw_salt self,
- struct _sw_socket * socket,
- sw_socket_event events,
- sw_socket_handler handler,
- sw_socket_handler_func func,
- sw_opaque extra) {
+ AVAHI_GCC_UNUSED sw_salt self,
+ AVAHI_GCC_UNUSED struct _sw_socket * _socket,
+ AVAHI_GCC_UNUSED sw_socket_event events,
+ AVAHI_GCC_UNUSED sw_socket_handler handler,
+ AVAHI_GCC_UNUSED sw_socket_handler_func func,
+ AVAHI_GCC_UNUSED sw_opaque extra) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_salt_unregister_socket(
- sw_salt self,
- struct _sw_socket * socket) {
+ AVAHI_GCC_UNUSED sw_salt self,
+ AVAHI_GCC_UNUSED struct _sw_socket * _socket) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_salt_register_timer(
- sw_salt self,
- struct _sw_timer * timer,
- sw_time timeout,
- sw_timer_handler handler,
- sw_timer_handler_func func,
- sw_opaque extra) {
+ AVAHI_GCC_UNUSED sw_salt self,
+ AVAHI_GCC_UNUSED struct _sw_timer * timer,
+ AVAHI_GCC_UNUSED sw_time timeout,
+ AVAHI_GCC_UNUSED sw_timer_handler handler,
+ AVAHI_GCC_UNUSED sw_timer_handler_func func,
+ AVAHI_GCC_UNUSED sw_opaque extra) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_salt_unregister_timer(
- sw_salt self,
- struct _sw_timer * timer) {
+ AVAHI_GCC_UNUSED sw_salt self,
+ AVAHI_GCC_UNUSED struct _sw_timer * timer) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_salt_register_network_interface(
- sw_salt self,
- struct _sw_network_interface * netif,
- sw_network_interface_handler handler,
- sw_network_interface_handler_func func,
- sw_opaque extra) {
+ AVAHI_GCC_UNUSED sw_salt self,
+ AVAHI_GCC_UNUSED struct _sw_network_interface * netif,
+ AVAHI_GCC_UNUSED sw_network_interface_handler handler,
+ AVAHI_GCC_UNUSED sw_network_interface_handler_func func,
+ AVAHI_GCC_UNUSED sw_opaque extra) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_result sw_salt_unregister_network_interface_handler(sw_salt self) {
+sw_result sw_salt_unregister_network_interface_handler(AVAHI_GCC_UNUSED sw_salt self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_salt_register_signal(
- sw_salt self,
- struct _sw_signal * signal,
- sw_signal_handler handler,
- sw_signal_handler_func func,
- sw_opaque extra) {
+ AVAHI_GCC_UNUSED sw_salt self,
+ AVAHI_GCC_UNUSED struct _sw_signal * _signal,
+ AVAHI_GCC_UNUSED sw_signal_handler handler,
+ AVAHI_GCC_UNUSED sw_signal_handler_func func,
+ AVAHI_GCC_UNUSED sw_opaque extra) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_salt_unregister_signal(
- sw_salt self,
- struct _sw_signal * signal) {
+ AVAHI_GCC_UNUSED sw_salt self,
+ AVAHI_GCC_UNUSED struct _sw_signal * _signal) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
void sw_print_assert(
- int code,
- sw_const_string assert_string,
- sw_const_string file,
- sw_const_string func,
- int line) {
+ AVAHI_GCC_UNUSED int code,
+ AVAHI_GCC_UNUSED sw_const_string assert_string,
+ AVAHI_GCC_UNUSED sw_const_string file,
+ AVAHI_GCC_UNUSED sw_const_string func,
+ AVAHI_GCC_UNUSED int line) {
AVAHI_WARN_UNSUPPORTED;
}
void sw_print_debug(
- int level,
- sw_const_string format,
+ AVAHI_GCC_UNUSED int level,
+ AVAHI_GCC_UNUSED sw_const_string format,
...) {
AVAHI_WARN_UNSUPPORTED;
}
-sw_result sw_tcp_socket_init(sw_socket * self) {
+sw_result sw_tcp_socket_init(AVAHI_GCC_UNUSED sw_socket * self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_tcp_socket_init_with_desc(
- sw_socket * self,
- sw_sockdesc_t desc) {
+ AVAHI_GCC_UNUSED sw_socket * self,
+ AVAHI_GCC_UNUSED sw_sockdesc_t desc) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_result sw_udp_socket_init(
- sw_socket * self) {
+sw_result sw_udp_socket_init(AVAHI_GCC_UNUSED sw_socket * self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_result sw_multicast_socket_init(
- sw_socket * self) {
+sw_result sw_multicast_socket_init(AVAHI_GCC_UNUSED sw_socket * self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_result sw_socket_fina(sw_socket self) {
+sw_result sw_socket_fina(AVAHI_GCC_UNUSED sw_socket self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_bind(
- sw_socket self,
- sw_ipv4_address address,
- sw_port port) {
+ AVAHI_GCC_UNUSED sw_socket self,
+ AVAHI_GCC_UNUSED sw_ipv4_address address,
+ AVAHI_GCC_UNUSED sw_port port) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_join_multicast_group(
- sw_socket self,
- sw_ipv4_address local_address,
- sw_ipv4_address multicast_address,
- sw_uint32 ttl) {
+ AVAHI_GCC_UNUSED sw_socket self,
+ AVAHI_GCC_UNUSED sw_ipv4_address local_address,
+ AVAHI_GCC_UNUSED sw_ipv4_address multicast_address,
+ AVAHI_GCC_UNUSED sw_uint32 ttl) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_result sw_socket_leave_multicast_group(sw_socket self) {
+sw_result sw_socket_leave_multicast_group(AVAHI_GCC_UNUSED sw_socket self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_listen(
- sw_socket self,
- int qsize) {
+ AVAHI_GCC_UNUSED sw_socket self,
+ AVAHI_GCC_UNUSED int qsize) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_connect(
- sw_socket self,
- sw_ipv4_address address,
- sw_port port) {
+ AVAHI_GCC_UNUSED sw_socket self,
+ AVAHI_GCC_UNUSED sw_ipv4_address address,
+ AVAHI_GCC_UNUSED sw_port port) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_accept(
- sw_socket self,
- sw_socket * socket) {
+ AVAHI_GCC_UNUSED sw_socket self,
+ AVAHI_GCC_UNUSED sw_socket * _socket) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_send(
- sw_socket self,
- sw_octets buffer,
- sw_size_t len,
- sw_size_t * bytesWritten) {
+ AVAHI_GCC_UNUSED sw_socket self,
+ AVAHI_GCC_UNUSED sw_octets buffer,
+ AVAHI_GCC_UNUSED sw_size_t len,
+ AVAHI_GCC_UNUSED sw_size_t * bytesWritten) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_sendto(
- sw_socket self,
- sw_octets buffer,
- sw_size_t len,
- sw_size_t * bytesWritten,
- sw_ipv4_address to,
- sw_port port) {
+ AVAHI_GCC_UNUSED sw_socket self,
+ AVAHI_GCC_UNUSED sw_octets buffer,
+ AVAHI_GCC_UNUSED sw_size_t len,
+ AVAHI_GCC_UNUSED sw_size_t * bytesWritten,
+ AVAHI_GCC_UNUSED sw_ipv4_address to,
+ AVAHI_GCC_UNUSED sw_port port) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_recv(
- sw_socket self,
- sw_octets buffer,
- sw_size_t max,
- sw_size_t * len) {
+ AVAHI_GCC_UNUSED sw_socket self,
+ AVAHI_GCC_UNUSED sw_octets buffer,
+ AVAHI_GCC_UNUSED sw_size_t max,
+ AVAHI_GCC_UNUSED sw_size_t * len) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_recvfrom(
- sw_socket self,
- sw_octets buffer,
- sw_size_t max,
- sw_size_t * len,
- sw_ipv4_address * from,
- sw_port * port,
- sw_ipv4_address * dest,
- sw_uint32 * interface_index) {
+ AVAHI_GCC_UNUSED sw_socket self,
+ AVAHI_GCC_UNUSED sw_octets buffer,
+ AVAHI_GCC_UNUSED sw_size_t max,
+ AVAHI_GCC_UNUSED sw_size_t * len,
+ AVAHI_GCC_UNUSED sw_ipv4_address * from,
+ AVAHI_GCC_UNUSED sw_port * port,
+ AVAHI_GCC_UNUSED sw_ipv4_address * dest,
+ AVAHI_GCC_UNUSED sw_uint32 * interface_index) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_set_blocking_mode(
- sw_socket self,
- sw_bool blocking_mode) {
+ AVAHI_GCC_UNUSED sw_socket self,
+ AVAHI_GCC_UNUSED sw_bool blocking_mode) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_set_options(
- sw_socket self,
- sw_socket_options options) {
+ AVAHI_GCC_UNUSED sw_socket self,
+ AVAHI_GCC_UNUSED sw_socket_options options) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_ipv4_address sw_socket_ipv4_address(sw_socket self) {
+AVAHI_GCC_NORETURN
+sw_ipv4_address sw_socket_ipv4_address(AVAHI_GCC_UNUSED sw_socket self) {
AVAHI_WARN_UNSUPPORTED_ABORT;
}
-sw_port sw_socket_port(sw_socket self) {
+AVAHI_GCC_NORETURN
+sw_port sw_socket_port(AVAHI_GCC_UNUSED sw_socket self) {
AVAHI_WARN_UNSUPPORTED_ABORT;
}
-sw_sockdesc_t sw_socket_desc(sw_socket self) {
+AVAHI_GCC_NORETURN
+sw_sockdesc_t sw_socket_desc(AVAHI_GCC_UNUSED sw_socket self) {
AVAHI_WARN_UNSUPPORTED_ABORT;
}
-sw_result sw_socket_close(sw_socket self) {
+sw_result sw_socket_close(AVAHI_GCC_UNUSED sw_socket self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_result sw_socket_options_init(sw_socket_options * self) {
+sw_result sw_socket_options_init(AVAHI_GCC_UNUSED sw_socket_options * self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_result sw_socket_options_fina(sw_socket_options self) {
+sw_result sw_socket_options_fina(AVAHI_GCC_UNUSED sw_socket_options self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_options_set_debug(
- sw_socket_options self,
- sw_bool val) {
+ AVAHI_GCC_UNUSED sw_socket_options self,
+ AVAHI_GCC_UNUSED sw_bool val) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_options_set_nodelay(
- sw_socket_options self,
- sw_bool val) {
+ AVAHI_GCC_UNUSED sw_socket_options self,
+ AVAHI_GCC_UNUSED sw_bool val) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_options_set_dontroute(
- sw_socket_options self,
- sw_bool val) {
+ AVAHI_GCC_UNUSED sw_socket_options self,
+ AVAHI_GCC_UNUSED sw_bool val) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_options_set_keepalive(
- sw_socket_options self,
- sw_bool val) {
+ AVAHI_GCC_UNUSED sw_socket_options self,
+ AVAHI_GCC_UNUSED sw_bool val) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_options_set_linger(
- sw_socket_options self,
- sw_bool onoff,
- sw_uint32 linger) {
+ AVAHI_GCC_UNUSED sw_socket_options self,
+ AVAHI_GCC_UNUSED sw_bool onoff,
+ AVAHI_GCC_UNUSED sw_uint32 linger) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_options_set_reuseaddr(
- sw_socket_options self,
- sw_bool val) {
+ AVAHI_GCC_UNUSED sw_socket_options self,
+ AVAHI_GCC_UNUSED sw_bool val) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_options_set_rcvbuf(
- sw_socket_options self,
- sw_uint32 val) {
+ AVAHI_GCC_UNUSED sw_socket_options self,
+ AVAHI_GCC_UNUSED sw_uint32 val) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_socket_options_set_sndbuf(
- sw_socket_options self,
- sw_uint32 val) {
+ AVAHI_GCC_UNUSED sw_socket_options self,
+ AVAHI_GCC_UNUSED sw_uint32 val) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
+AVAHI_GCC_NORETURN
int sw_socket_error_code(void) {
AVAHI_WARN_UNSUPPORTED_ABORT;
}
sw_result sw_corby_orb_init(
- sw_corby_orb * self,
- sw_salt salt,
- const sw_corby_orb_config * config,
- sw_corby_orb_observer observer,
- sw_corby_orb_observer_func func,
- sw_opaque_t extra) {
+ AVAHI_GCC_UNUSED sw_corby_orb * self,
+ AVAHI_GCC_UNUSED sw_salt salt,
+ AVAHI_GCC_UNUSED const sw_corby_orb_config * config,
+ AVAHI_GCC_UNUSED sw_corby_orb_observer observer,
+ AVAHI_GCC_UNUSED sw_corby_orb_observer_func func,
+ AVAHI_GCC_UNUSED sw_opaque_t extra) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_result sw_corby_orb_fina(sw_corby_orb self) {
+sw_result sw_corby_orb_fina(AVAHI_GCC_UNUSED sw_corby_orb self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_orb_register_servant(
- sw_corby_orb self,
- sw_corby_servant servant,
- sw_corby_servant_cb cb,
- sw_const_string oid,
- struct _sw_corby_object ** object,
- sw_const_string protocol_name) {
+ AVAHI_GCC_UNUSED sw_corby_orb self,
+ AVAHI_GCC_UNUSED sw_corby_servant servant,
+ AVAHI_GCC_UNUSED sw_corby_servant_cb cb,
+ AVAHI_GCC_UNUSED sw_const_string oid,
+ AVAHI_GCC_UNUSED struct _sw_corby_object ** object,
+ AVAHI_GCC_UNUSED sw_const_string protocol_name) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_orb_unregister_servant(
- sw_corby_orb self,
- sw_const_string oid) {
+ AVAHI_GCC_UNUSED sw_corby_orb self,
+ AVAHI_GCC_UNUSED sw_const_string oid) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_orb_register_bidirectional_object(
- sw_corby_orb self,
- struct _sw_corby_object * object) {
+ AVAHI_GCC_UNUSED sw_corby_orb self,
+ AVAHI_GCC_UNUSED struct _sw_corby_object * object) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_orb_register_channel(
- sw_corby_orb self,
- struct _sw_corby_channel * channel) {
+ AVAHI_GCC_UNUSED sw_corby_orb self,
+ AVAHI_GCC_UNUSED struct _sw_corby_channel * channel) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_corby_orb_delegate sw_corby_orb_get_delegate(sw_corby_orb self) {
+AVAHI_GCC_NORETURN
+sw_corby_orb_delegate sw_corby_orb_get_delegate(AVAHI_GCC_UNUSED sw_corby_orb self) {
AVAHI_WARN_UNSUPPORTED_ABORT;
}
sw_result sw_corby_orb_set_delegate(
- sw_corby_orb self,
- sw_corby_orb_delegate delegate) {
+ AVAHI_GCC_UNUSED sw_corby_orb self,
+ AVAHI_GCC_UNUSED sw_corby_orb_delegate delegate) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_orb_set_observer(
- sw_corby_orb self,
- sw_corby_orb_observer observer,
- sw_corby_orb_observer_func func,
- sw_opaque_t extra) {
+ AVAHI_GCC_UNUSED sw_corby_orb self,
+ AVAHI_GCC_UNUSED sw_corby_orb_observer observer,
+ AVAHI_GCC_UNUSED sw_corby_orb_observer_func func,
+ AVAHI_GCC_UNUSED sw_opaque_t extra) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_orb_protocol_to_address(
- sw_corby_orb self,
- sw_const_string tag,
- sw_string addr,
- sw_port * port) {
+ AVAHI_GCC_UNUSED sw_corby_orb self,
+ AVAHI_GCC_UNUSED sw_const_string tag,
+ AVAHI_GCC_UNUSED sw_string addr,
+ AVAHI_GCC_UNUSED sw_port * port) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_orb_protocol_to_url(
- sw_corby_orb self,
- sw_const_string tag,
- sw_const_string name,
- sw_string url,
- sw_size_t url_len) {
+ AVAHI_GCC_UNUSED sw_corby_orb self,
+ AVAHI_GCC_UNUSED sw_const_string tag,
+ AVAHI_GCC_UNUSED sw_const_string name,
+ AVAHI_GCC_UNUSED sw_string url,
+ AVAHI_GCC_UNUSED sw_size_t url_len) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_orb_read_channel(
- sw_corby_orb self,
- struct _sw_corby_channel * channel) {
+ AVAHI_GCC_UNUSED sw_corby_orb self,
+ AVAHI_GCC_UNUSED struct _sw_corby_channel * channel) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_orb_dispatch_message(
- sw_corby_orb self,
- struct _sw_corby_channel * channel,
- struct _sw_corby_message * message,
- struct _sw_corby_buffer * buffer,
- sw_uint8 endian) {
+ AVAHI_GCC_UNUSED sw_corby_orb self,
+ AVAHI_GCC_UNUSED struct _sw_corby_channel * channel,
+ AVAHI_GCC_UNUSED struct _sw_corby_message * message,
+ AVAHI_GCC_UNUSED struct _sw_corby_buffer * buffer,
+ AVAHI_GCC_UNUSED sw_uint8 endian) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_result sw_corby_message_init(sw_corby_message * self) {
+sw_result sw_corby_message_init(AVAHI_GCC_UNUSED sw_corby_message * self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_result sw_corby_message_fina(sw_corby_message self) {
+sw_result sw_corby_message_fina(AVAHI_GCC_UNUSED sw_corby_message self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_result sw_corby_buffer_init(sw_corby_buffer * self) {
+sw_result sw_corby_buffer_init(AVAHI_GCC_UNUSED sw_corby_buffer * self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_init_with_size(
- sw_corby_buffer * self,
- sw_size_t size) {
+ AVAHI_GCC_UNUSED sw_corby_buffer * self,
+ AVAHI_GCC_UNUSED sw_size_t size) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_init_with_delegate(
- sw_corby_buffer * self,
- sw_corby_buffer_delegate delegate,
- sw_corby_buffer_overflow_func overflow,
- sw_corby_buffer_underflow_func underflow,
- sw_opaque_t extra) {
+ AVAHI_GCC_UNUSED sw_corby_buffer * self,
+ AVAHI_GCC_UNUSED sw_corby_buffer_delegate delegate,
+ AVAHI_GCC_UNUSED sw_corby_buffer_overflow_func overflow,
+ AVAHI_GCC_UNUSED sw_corby_buffer_underflow_func underflow,
+ AVAHI_GCC_UNUSED sw_opaque_t extra) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_init_with_size_and_delegate(
- sw_corby_buffer * self,
- sw_size_t size,
- sw_corby_buffer_delegate delegate,
- sw_corby_buffer_overflow_func overflow,
- sw_corby_buffer_underflow_func underflow,
- sw_opaque_t extra) {
+ AVAHI_GCC_UNUSED sw_corby_buffer * self,
+ AVAHI_GCC_UNUSED sw_size_t size,
+ AVAHI_GCC_UNUSED sw_corby_buffer_delegate delegate,
+ AVAHI_GCC_UNUSED sw_corby_buffer_overflow_func overflow,
+ AVAHI_GCC_UNUSED sw_corby_buffer_underflow_func underflow,
+ AVAHI_GCC_UNUSED sw_opaque_t extra) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_result sw_corby_buffer_fina(sw_corby_buffer self) {
+sw_result sw_corby_buffer_fina(AVAHI_GCC_UNUSED sw_corby_buffer self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-void sw_corby_buffer_reset(sw_corby_buffer self) {
+void sw_corby_buffer_reset(AVAHI_GCC_UNUSED sw_corby_buffer self) {
AVAHI_WARN_UNSUPPORTED;
}
sw_result sw_corby_buffer_set_octets(
- sw_corby_buffer self,
- sw_octets octets,
- sw_size_t size) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_octets octets,
+ AVAHI_GCC_UNUSED sw_size_t size) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_octets sw_corby_buffer_octets(sw_corby_buffer self) {
+sw_octets sw_corby_buffer_octets(AVAHI_GCC_UNUSED sw_corby_buffer self) {
AVAHI_WARN_UNSUPPORTED;
return NULL;
}
-sw_size_t sw_corby_buffer_bytes_used(sw_corby_buffer self) {
+sw_size_t sw_corby_buffer_bytes_used(AVAHI_GCC_UNUSED sw_corby_buffer self) {
AVAHI_WARN_UNSUPPORTED;
return 0;
}
-sw_size_t sw_corby_buffer_size(sw_corby_buffer self) {
+sw_size_t sw_corby_buffer_size(AVAHI_GCC_UNUSED sw_corby_buffer self) {
AVAHI_WARN_UNSUPPORTED;
return 0;
}
-sw_result sw_corby_buffer_put_int8(sw_corby_buffer self, sw_int8 val) {
+sw_result sw_corby_buffer_put_int8(
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_int8 val) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_put_uint8(
- sw_corby_buffer self,
- sw_uint8 val) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_uint8 val) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_put_int16(
- sw_corby_buffer self,
- sw_int16 val) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_int16 val) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_put_uint16(
- sw_corby_buffer self,
- sw_uint16 val) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_uint16 val) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_put_int32(
- sw_corby_buffer self,
- sw_int32 val) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_int32 val) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_put_uint32(
- sw_corby_buffer self,
- sw_uint32 val) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_uint32 val) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_put_octets(
- sw_corby_buffer self,
- sw_const_octets val,
- sw_size_t size) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_const_octets val,
+ AVAHI_GCC_UNUSED sw_size_t size) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_put_sized_octets(
- sw_corby_buffer self,
- sw_const_octets val,
- sw_uint32 len) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_const_octets val,
+ AVAHI_GCC_UNUSED sw_uint32 len) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_put_cstring(
- sw_corby_buffer self,
- sw_const_string val) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_const_string val) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_put_object(
- sw_corby_buffer self,
- const struct _sw_corby_object * object) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED const struct _sw_corby_object * object) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_put_pad(
- sw_corby_buffer self,
- sw_corby_buffer_pad pad) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_corby_buffer_pad pad) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_get_int8(
- sw_corby_buffer self,
- sw_int8 * val) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_int8 * val) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_get_uint8(
- sw_corby_buffer self,
- sw_uint8 * val) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_uint8 * val) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_get_int16(
- sw_corby_buffer self,
- sw_int16 * val,
- sw_uint8 endian) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_int16 * val,
+ AVAHI_GCC_UNUSED sw_uint8 endian) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_get_uint16(
- sw_corby_buffer self,
- sw_uint16 * val,
- sw_uint8 endian) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_uint16 * val,
+ AVAHI_GCC_UNUSED sw_uint8 endian) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_get_int32(
- sw_corby_buffer self,
- sw_int32 * val,
- sw_uint8 endian) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_int32 * val,
+ AVAHI_GCC_UNUSED sw_uint8 endian) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_get_uint32(
- sw_corby_buffer self,
- sw_uint32 * val,
- sw_uint8 endian) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_uint32 * val,
+ AVAHI_GCC_UNUSED sw_uint8 endian) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_get_octets(
- sw_corby_buffer self,
- sw_octets octets,
- sw_size_t size) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_octets octets,
+ AVAHI_GCC_UNUSED sw_size_t size) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_allocate_and_get_sized_octets(
- sw_corby_buffer self,
- sw_octets * val,
- sw_uint32 * size,
- sw_uint8 endian) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_octets * val,
+ AVAHI_GCC_UNUSED sw_uint32 * size,
+ AVAHI_GCC_UNUSED sw_uint8 endian) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_get_zerocopy_sized_octets(
- sw_corby_buffer self,
- sw_octets * val,
- sw_uint32 * size,
- sw_uint8 endian) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_octets * val,
+ AVAHI_GCC_UNUSED sw_uint32 * size,
+ AVAHI_GCC_UNUSED sw_uint8 endian) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_get_sized_octets(
- sw_corby_buffer self,
- sw_octets val,
- sw_uint32 * len,
- sw_uint8 endian) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_octets val,
+ AVAHI_GCC_UNUSED sw_uint32 * len,
+ AVAHI_GCC_UNUSED sw_uint8 endian) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_allocate_and_get_cstring(
- sw_corby_buffer self,
- sw_string * val,
- sw_uint32 * len,
- sw_uint8 endian) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_string * val,
+ AVAHI_GCC_UNUSED sw_uint32 * len,
+ AVAHI_GCC_UNUSED sw_uint8 endian) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_get_zerocopy_cstring(
- sw_corby_buffer self,
- sw_string * val,
- sw_uint32 * len,
- sw_uint8 endian) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_string * val,
+ AVAHI_GCC_UNUSED sw_uint32 * len,
+ AVAHI_GCC_UNUSED sw_uint8 endian) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_get_cstring(
- sw_corby_buffer self,
- sw_string val,
- sw_uint32 * len,
- sw_uint8 endian) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED sw_string val,
+ AVAHI_GCC_UNUSED sw_uint32 * len,
+ AVAHI_GCC_UNUSED sw_uint8 endian) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_buffer_get_object(
- sw_corby_buffer self,
- struct _sw_corby_object ** object,
- sw_uint8 endian) {
+ AVAHI_GCC_UNUSED sw_corby_buffer self,
+ AVAHI_GCC_UNUSED struct _sw_corby_object ** object,
+ AVAHI_GCC_UNUSED sw_uint8 endian) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_channel_start_request(
- sw_corby_channel self,
- sw_const_corby_profile profile,
- struct _sw_corby_buffer ** buffer,
- sw_const_string op,
- sw_uint32 oplen,
- sw_bool reply_expected) {
+ AVAHI_GCC_UNUSED sw_corby_channel self,
+ AVAHI_GCC_UNUSED sw_const_corby_profile profile,
+ AVAHI_GCC_UNUSED struct _sw_corby_buffer ** buffer,
+ AVAHI_GCC_UNUSED sw_const_string op,
+ AVAHI_GCC_UNUSED sw_uint32 oplen,
+ AVAHI_GCC_UNUSED sw_bool reply_expected) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_channel_start_reply(
- sw_corby_channel self,
- struct _sw_corby_buffer ** buffer,
- sw_uint32 request_id,
- sw_corby_reply_status status) {
+ AVAHI_GCC_UNUSED sw_corby_channel self,
+ AVAHI_GCC_UNUSED struct _sw_corby_buffer ** buffer,
+ AVAHI_GCC_UNUSED sw_uint32 request_id,
+ AVAHI_GCC_UNUSED sw_corby_reply_status status) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_channel_send(
- sw_corby_channel self,
- struct _sw_corby_buffer * buffer,
- sw_corby_buffer_observer observer,
- sw_corby_buffer_written_func func,
- sw_opaque_t extra) {
+ AVAHI_GCC_UNUSED sw_corby_channel self,
+ AVAHI_GCC_UNUSED struct _sw_corby_buffer * buffer,
+ AVAHI_GCC_UNUSED sw_corby_buffer_observer observer,
+ AVAHI_GCC_UNUSED sw_corby_buffer_written_func func,
+ AVAHI_GCC_UNUSED sw_opaque_t extra) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_channel_recv(
- sw_corby_channel self,
- sw_salt * salt,
- struct _sw_corby_message ** message,
- sw_uint32 * request_id,
- sw_string * op,
- sw_uint32 * op_len,
- struct _sw_corby_buffer ** buffer,
- sw_uint8 * endian,
- sw_bool block) {
+ AVAHI_GCC_UNUSED sw_corby_channel self,
+ AVAHI_GCC_UNUSED sw_salt * salt,
+ AVAHI_GCC_UNUSED struct _sw_corby_message ** message,
+ AVAHI_GCC_UNUSED sw_uint32 * request_id,
+ AVAHI_GCC_UNUSED sw_string * op,
+ AVAHI_GCC_UNUSED sw_uint32 * op_len,
+ AVAHI_GCC_UNUSED struct _sw_corby_buffer ** buffer,
+ AVAHI_GCC_UNUSED sw_uint8 * endian,
+ AVAHI_GCC_UNUSED sw_bool block) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_channel_last_recv_from(
- sw_corby_channel self,
- sw_ipv4_address * from,
- sw_port * from_port) {
+ AVAHI_GCC_UNUSED sw_corby_channel self,
+ AVAHI_GCC_UNUSED sw_ipv4_address * from,
+ AVAHI_GCC_UNUSED sw_port * from_port) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_channel_ff(
- sw_corby_channel self,
- struct _sw_corby_buffer * buffer) {
+ AVAHI_GCC_UNUSED sw_corby_channel self,
+ AVAHI_GCC_UNUSED struct _sw_corby_buffer * buffer) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
-sw_socket sw_corby_channel_socket(sw_corby_channel self) {
- AVAHI_WARN_UNSUPPORTED;
- return SW_E_NO_IMPL;
+AVAHI_GCC_NORETURN
+sw_socket sw_corby_channel_socket(AVAHI_GCC_UNUSED sw_corby_channel self) {
+ AVAHI_WARN_UNSUPPORTED_ABORT;
}
-sw_result sw_corby_channel_retain(sw_corby_channel self) {
+sw_result sw_corby_channel_retain(AVAHI_GCC_UNUSED sw_corby_channel self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_channel_set_delegate(
- sw_corby_channel self,
- sw_corby_channel_delegate delegate) {
+ AVAHI_GCC_UNUSED sw_corby_channel self,
+ AVAHI_GCC_UNUSED sw_corby_channel_delegate delegate) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
+AVAHI_GCC_NORETURN
sw_corby_channel_delegate sw_corby_channel_get_delegate(
- sw_corby_channel self) {
+ AVAHI_GCC_UNUSED sw_corby_channel self) {
AVAHI_WARN_UNSUPPORTED_ABORT;
}
void sw_corby_channel_set_app_data(
- sw_corby_channel self,
- sw_opaque app_data) {
+ AVAHI_GCC_UNUSED sw_corby_channel self,
+ AVAHI_GCC_UNUSED sw_opaque app_data) {
AVAHI_WARN_UNSUPPORTED;
}
-sw_opaque sw_corby_channel_get_app_data(sw_corby_channel self) {
+AVAHI_GCC_NORETURN
+sw_opaque sw_corby_channel_get_app_data(AVAHI_GCC_UNUSED sw_corby_channel self) {
AVAHI_WARN_UNSUPPORTED_ABORT;
}
-sw_result sw_corby_channel_fina(sw_corby_channel self) {
+sw_result sw_corby_channel_fina(AVAHI_GCC_UNUSED sw_corby_channel self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_object_init_from_url(
- sw_corby_object * self,
- struct _sw_corby_orb * orb,
- sw_const_string url,
- sw_socket_options options,
- sw_uint32 bufsize) {
+ AVAHI_GCC_UNUSED sw_corby_object * self,
+ AVAHI_GCC_UNUSED struct _sw_corby_orb * orb,
+ AVAHI_GCC_UNUSED sw_const_string url,
+ AVAHI_GCC_UNUSED sw_socket_options options,
+ AVAHI_GCC_UNUSED sw_uint32 bufsize) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_object_fina(
- sw_corby_object self) {
+ AVAHI_GCC_UNUSED sw_corby_object self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_object_start_request(
- sw_corby_object self,
- sw_const_string op,
- sw_uint32 op_len,
- sw_bool reply_expected,
- sw_corby_buffer * buffer) {
+ AVAHI_GCC_UNUSED sw_corby_object self,
+ AVAHI_GCC_UNUSED sw_const_string op,
+ AVAHI_GCC_UNUSED sw_uint32 op_len,
+ AVAHI_GCC_UNUSED sw_bool reply_expected,
+ AVAHI_GCC_UNUSED sw_corby_buffer * buffer) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_object_send(
- sw_corby_object self,
- sw_corby_buffer buffer,
- sw_corby_buffer_observer observer,
- sw_corby_buffer_written_func func,
- sw_opaque extra) {
+ AVAHI_GCC_UNUSED sw_corby_object self,
+ AVAHI_GCC_UNUSED sw_corby_buffer buffer,
+ AVAHI_GCC_UNUSED sw_corby_buffer_observer observer,
+ AVAHI_GCC_UNUSED sw_corby_buffer_written_func func,
+ AVAHI_GCC_UNUSED sw_opaque extra) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_object_recv(
- sw_corby_object self,
- sw_corby_message * message,
- sw_corby_buffer * buffer,
- sw_uint8 * endian,
- sw_bool block) {
+ AVAHI_GCC_UNUSED sw_corby_object self,
+ AVAHI_GCC_UNUSED sw_corby_message * message,
+ AVAHI_GCC_UNUSED sw_corby_buffer * buffer,
+ AVAHI_GCC_UNUSED sw_uint8 * endian,
+ AVAHI_GCC_UNUSED sw_bool block) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_object_channel(
- sw_corby_object self,
- sw_corby_channel * channel) {
+ AVAHI_GCC_UNUSED sw_corby_object self,
+ AVAHI_GCC_UNUSED sw_corby_channel * channel) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_corby_object_set_channel(
- sw_corby_object self,
- sw_corby_channel channel) {
+ AVAHI_GCC_UNUSED sw_corby_object self,
+ AVAHI_GCC_UNUSED sw_corby_channel channel) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_discovery_publish_host(
- sw_discovery self,
- sw_uint32 interface_index,
- sw_const_string name,
- sw_const_string domain,
- sw_ipv4_address address,
- sw_discovery_publish_reply reply,
- sw_opaque extra,
- sw_discovery_oid * oid) {
+ AVAHI_GCC_UNUSED sw_discovery self,
+ AVAHI_GCC_UNUSED sw_uint32 interface_index,
+ AVAHI_GCC_UNUSED sw_const_string name,
+ AVAHI_GCC_UNUSED sw_const_string domain,
+ AVAHI_GCC_UNUSED sw_ipv4_address address,
+ AVAHI_GCC_UNUSED sw_discovery_publish_reply reply,
+ AVAHI_GCC_UNUSED sw_opaque extra,
+ AVAHI_GCC_UNUSED sw_discovery_oid * oid) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_discovery_publish_update(
- sw_discovery self,
- sw_discovery_oid oid,
- sw_octets text_record,
- sw_uint32 text_record_len) {
+ AVAHI_GCC_UNUSED sw_discovery self,
+ AVAHI_GCC_UNUSED sw_discovery_oid oid,
+ AVAHI_GCC_UNUSED sw_octets text_record,
+ AVAHI_GCC_UNUSED sw_uint32 text_record_len) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_discovery_query_record(
- sw_discovery self,
- sw_uint32 interface_index,
- sw_uint32 flags,
- sw_const_string fullname,
- sw_uint16 rrtype,
- sw_uint16 rrclass,
- sw_discovery_query_record_reply reply,
- sw_opaque extra,
- sw_discovery_oid * oid) {
+ AVAHI_GCC_UNUSED sw_discovery self,
+ AVAHI_GCC_UNUSED sw_uint32 interface_index,
+ AVAHI_GCC_UNUSED sw_uint32 flags,
+ AVAHI_GCC_UNUSED sw_const_string fullname,
+ AVAHI_GCC_UNUSED sw_uint16 rrtype,
+ AVAHI_GCC_UNUSED sw_uint16 rrclass,
+ AVAHI_GCC_UNUSED sw_discovery_query_record_reply reply,
+ AVAHI_GCC_UNUSED sw_opaque extra,
+ AVAHI_GCC_UNUSED sw_discovery_oid * oid) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_text_record_string_iterator_init(
- sw_text_record_string_iterator * self,
- sw_const_string text_record_string) {
+ AVAHI_GCC_UNUSED sw_text_record_string_iterator * self,
+ AVAHI_GCC_UNUSED sw_const_string text_record_string) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_text_record_string_iterator_fina(
- sw_text_record_string_iterator self) {
+ AVAHI_GCC_UNUSED sw_text_record_string_iterator self) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
sw_result sw_text_record_string_iterator_next(
- sw_text_record_string_iterator self,
- char key[255],
- char val[255]) {
+ AVAHI_GCC_UNUSED sw_text_record_string_iterator self,
+ AVAHI_GCC_UNUSED char key[255],
+ AVAHI_GCC_UNUSED char val[255]) {
AVAHI_WARN_UNSUPPORTED;
return SW_E_NO_IMPL;
}
static void service_browser_callback(
AvahiServiceBrowser *b,
AvahiIfIndex interface,
- AvahiProtocol protocol,
+ AVAHI_GCC_UNUSED AvahiProtocol protocol,
AvahiBrowserEvent event,
const char *name,
const char *type,
const char *domain,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void *userdata) {
DNSServiceRef sdref = userdata;
assert(sdref->n_ref >= 1);
switch (state) {
- case AVAHI_CLIENT_S_FAILURE:
-
- error = map_error(avahi_client_errno(s));
-
- /* Fall through */
case AVAHI_CLIENT_DISCONNECTED:
case AVAHI_CLIENT_S_RUNNING:
case AVAHI_CLIENT_S_COLLISION:
- case AVAHI_CLIENT_S_INVALID:
case AVAHI_CLIENT_S_REGISTERING:
break;
}
static void service_resolver_callback(
AvahiServiceResolver *r,
AvahiIfIndex interface,
- AvahiProtocol protocol,
+ AVAHI_GCC_UNUSED AvahiProtocol protocol,
AvahiResolverEvent event,
const char *name,
const char *type,
const char *domain,
const char *host_name,
- const AvahiAddress *a,
+ AVAHI_GCC_UNUSED const AvahiAddress *a,
uint16_t port,
AvahiStringList *txt,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void *userdata) {
DNSServiceRef sdref = userdata;
static void domain_browser_callback(
AvahiDomainBrowser *b,
AvahiIfIndex interface,
- AvahiProtocol protocol,
+ AVAHI_GCC_UNUSED AvahiProtocol protocol,
AvahiBrowserEvent event,
const char *domain,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void *userdata) {
DNSServiceRef sdref = userdata;
reg_report_error(sdref, kDNSServiceErr_Unknown);
break;
- case AVAHI_CLIENT_S_FAILURE:
- reg_report_error(sdref, map_error(avahi_client_errno(s)));
- break;
-
case AVAHI_CLIENT_S_RUNNING: {
int ret;
break;
- case AVAHI_CLIENT_S_INVALID:
case AVAHI_CLIENT_S_REGISTERING:
/* Ignore */
break;
#include <assert.h>
#include <stdio.h>
+#include <avahi-common/gccmacro.h>
#include "dns_sd.h"
static void hexdump(const void* p, size_t size) {
}
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
const char *r;
TXTRecordRef ref;
uint8_t l;
#include <config.h>
#endif
+#include <avahi-common/gccmacro.h>
+
#include "dns_sd.h"
#include "warn.h"
DNSServiceErrorType DNSSD_API DNSServiceRegisterRecord (
- DNSServiceRef sdRef,
- DNSRecordRef *RecordRef,
- DNSServiceFlags flags,
- uint32_t interfaceIndex,
- const char *fullname,
- uint16_t rrtype,
- uint16_t rrclass,
- uint16_t rdlen,
- const void *rdata,
- uint32_t ttl,
- DNSServiceRegisterRecordReply callBack,
- void *context) {
+ AVAHI_GCC_UNUSED DNSServiceRef sdRef,
+ AVAHI_GCC_UNUSED DNSRecordRef *RecordRef,
+ AVAHI_GCC_UNUSED DNSServiceFlags flags,
+ AVAHI_GCC_UNUSED uint32_t interfaceIndex,
+ AVAHI_GCC_UNUSED const char *fullname,
+ AVAHI_GCC_UNUSED uint16_t rrtype,
+ AVAHI_GCC_UNUSED uint16_t rrclass,
+ AVAHI_GCC_UNUSED uint16_t rdlen,
+ AVAHI_GCC_UNUSED const void *rdata,
+ AVAHI_GCC_UNUSED uint32_t ttl,
+ AVAHI_GCC_UNUSED DNSServiceRegisterRecordReply callBack,
+ AVAHI_GCC_UNUSED void *context) {
AVAHI_WARN_UNSUPPORTED;
}
DNSServiceErrorType DNSSD_API DNSServiceQueryRecord (
- DNSServiceRef *sdRef,
- DNSServiceFlags flags,
- uint32_t interfaceIndex,
- const char *fullname,
- uint16_t rrtype,
- uint16_t rrclass,
- DNSServiceQueryRecordReply callBack,
- void *context) {
+ AVAHI_GCC_UNUSED DNSServiceRef *sdRef,
+ AVAHI_GCC_UNUSED DNSServiceFlags flags,
+ AVAHI_GCC_UNUSED uint32_t interfaceIndex,
+ AVAHI_GCC_UNUSED const char *fullname,
+ AVAHI_GCC_UNUSED uint16_t rrtype,
+ AVAHI_GCC_UNUSED uint16_t rrclass,
+ AVAHI_GCC_UNUSED DNSServiceQueryRecordReply callBack,
+ AVAHI_GCC_UNUSED void *context) {
AVAHI_WARN_UNSUPPORTED;
}
void DNSSD_API DNSServiceReconfirmRecord (
- DNSServiceFlags flags,
- uint32_t interfaceIndex,
- const char *fullname,
- uint16_t rrtype,
- uint16_t rrclass,
- uint16_t rdlen,
- const void *rdata) {
+ AVAHI_GCC_UNUSED DNSServiceFlags flags,
+ AVAHI_GCC_UNUSED uint32_t interfaceIndex,
+ AVAHI_GCC_UNUSED const char *fullname,
+ AVAHI_GCC_UNUSED uint16_t rrtype,
+ AVAHI_GCC_UNUSED uint16_t rrclass,
+ AVAHI_GCC_UNUSED uint16_t rdlen,
+ AVAHI_GCC_UNUSED const void *rdata) {
AVAHI_WARN_UNSUPPORTED;
return;
}
-DNSServiceErrorType DNSSD_API DNSServiceCreateConnection(DNSServiceRef *sdRef) {
+DNSServiceErrorType DNSSD_API DNSServiceCreateConnection(AVAHI_GCC_UNUSED DNSServiceRef *sdRef) {
AVAHI_WARN_UNSUPPORTED;
return kDNSServiceErr_Unsupported;
}
DNSServiceErrorType DNSSD_API DNSServiceAddRecord(
- DNSServiceRef sdRef,
- DNSRecordRef *RecordRef,
- DNSServiceFlags flags,
- uint16_t rrtype,
- uint16_t rdlen,
- const void *rdata,
- uint32_t ttl) {
+ AVAHI_GCC_UNUSED DNSServiceRef sdRef,
+ AVAHI_GCC_UNUSED DNSRecordRef *RecordRef,
+ AVAHI_GCC_UNUSED DNSServiceFlags flags,
+ AVAHI_GCC_UNUSED uint16_t rrtype,
+ AVAHI_GCC_UNUSED uint16_t rdlen,
+ AVAHI_GCC_UNUSED const void *rdata,
+ AVAHI_GCC_UNUSED uint32_t ttl) {
AVAHI_WARN_UNSUPPORTED;
}
DNSServiceErrorType DNSSD_API DNSServiceUpdateRecord(
- DNSServiceRef sdRef,
- DNSRecordRef RecordRef,
- DNSServiceFlags flags,
- uint16_t rdlen,
- const void *rdata,
- uint32_t ttl) {
+ AVAHI_GCC_UNUSED DNSServiceRef sdRef,
+ AVAHI_GCC_UNUSED DNSRecordRef RecordRef,
+ AVAHI_GCC_UNUSED DNSServiceFlags flags,
+ AVAHI_GCC_UNUSED uint16_t rdlen,
+ AVAHI_GCC_UNUSED const void *rdata,
+ AVAHI_GCC_UNUSED uint32_t ttl) {
AVAHI_WARN_UNSUPPORTED;
}
DNSServiceErrorType DNSSD_API DNSServiceRemoveRecord(
- DNSServiceRef sdRef,
- DNSRecordRef RecordRef,
- DNSServiceFlags flags) {
+ AVAHI_GCC_UNUSED DNSServiceRef sdRef,
+ AVAHI_GCC_UNUSED DNSRecordRef RecordRef,
+ AVAHI_GCC_UNUSED DNSServiceFlags flags) {
AVAHI_WARN_UNSUPPORTED;
#include <avahi-common/simple-watch.h>
#include <avahi-core/core.h>
-int main(int argc, char*argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char*argv[]) {
AvahiServer *server;
AvahiServerConfig config;
int error;
static const AvahiPoll *poll_api;
-static void quit_timeout_callback(AvahiTimeout *timeout, void* userdata) {
+static void quit_timeout_callback(AVAHI_GCC_UNUSED AvahiTimeout *timeout, void* userdata) {
AvahiSimplePoll *simple_poll = userdata;
avahi_simple_poll_quit(simple_poll);
}
-static void dump_line(const char *text, void* userdata) {
+static void dump_line(const char *text, AVAHI_GCC_UNUSED void* userdata) {
printf("%s\n", text);
}
AvahiProtocol protocol,
AvahiBrowserEvent event,
AvahiRecord *record,
- AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
char *t;
assert(r);
static void remove_entries(void);
static void create_entries(int new_name);
-static void entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, void* userdata) {
+static void entry_group_callback(AVAHI_GCC_UNUSED AvahiServer *s, AVAHI_GCC_UNUSED AvahiSEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void* userdata) {
avahi_log_debug("entry group state: %i", state);
if (state == AVAHI_ENTRY_GROUP_COLLISION) {
}
}
-static void server_callback(AvahiServer *s, AvahiServerState state, void* userdata) {
+static void server_callback(AvahiServer *s, AvahiServerState state, AVAHI_GCC_UNUSED void* userdata) {
server = s;
avahi_log_debug("server state: %i", state);
}
static void hnr_callback(
- AvahiSHostNameResolver *r,
+ AVAHI_GCC_UNUSED AvahiSHostNameResolver *r,
AvahiIfIndex iface,
AvahiProtocol protocol,
AvahiResolverEvent event,
const char *hostname,
const AvahiAddress *a,
- AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
char t[AVAHI_ADDRESS_STR_MAX];
if (a)
}
static void ar_callback(
- AvahiSAddressResolver *r,
+ AVAHI_GCC_UNUSED AvahiSAddressResolver *r,
AvahiIfIndex iface,
AvahiProtocol protocol,
AvahiResolverEvent event,
const AvahiAddress *a,
const char *hostname,
- AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
char t[AVAHI_ADDRESS_STR_MAX];
avahi_address_snprint(t, sizeof(t), a);
}
static void db_callback(
- AvahiSDomainBrowser *b,
+ AVAHI_GCC_UNUSED AvahiSDomainBrowser *b,
AvahiIfIndex iface,
AvahiProtocol protocol,
AvahiBrowserEvent event,
const char *domain,
- AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
avahi_log_debug("DB: (%i.%i) <%s> [%s]", iface, protocol, domain, browser_event_to_string(event));
}
static void stb_callback(
- AvahiSServiceTypeBrowser *b,
+ AVAHI_GCC_UNUSED AvahiSServiceTypeBrowser *b,
AvahiIfIndex iface,
AvahiProtocol protocol,
AvahiBrowserEvent event,
const char *service_type,
const char *domain,
- AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
avahi_log_debug("STB: (%i.%i) %s in <%s> [%s]", iface, protocol, service_type, domain, browser_event_to_string(event));
}
static void sb_callback(
- AvahiSServiceBrowser *b,
+ AVAHI_GCC_UNUSED AvahiSServiceBrowser *b,
AvahiIfIndex iface,
AvahiProtocol protocol,
AvahiBrowserEvent event,
const char *name,
const char *service_type,
const char *domain,
- AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
avahi_log_debug("SB: (%i.%i) <%s> as %s in <%s> [%s]", iface, protocol, name, service_type, domain, browser_event_to_string(event));
}
static void sr_callback(
- AvahiSServiceResolver *r,
+ AVAHI_GCC_UNUSED AvahiSServiceResolver *r,
AvahiIfIndex iface,
AvahiProtocol protocol,
AvahiResolverEvent event,
const AvahiAddress *a,
uint16_t port,
AvahiStringList *txt,
- AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
if (event != AVAHI_RESOLVER_FOUND)
avahi_log_debug("SR: (%i.%i) <%s> as %s in <%s> [%s]", iface, protocol, name, service_type, domain_name, resolver_event_to_string(event));
}
static void dsb_callback(
- AvahiSDNSServerBrowser *b,
+ AVAHI_GCC_UNUSED AvahiSDNSServerBrowser *b,
AvahiIfIndex iface,
AvahiProtocol protocol,
AvahiBrowserEvent event,
const char*hostname,
const AvahiAddress *a,
uint16_t port,
- AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
char t[AVAHI_ADDRESS_STR_MAX] = "n/a";
avahi_log_debug("DSB: (%i.%i): %s/%s:%i [%s]", iface, protocol, hostname, t, port, browser_event_to_string(event));
}
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
AvahiSRecordBrowser *r;
AvahiSHostNameResolver *hnr;
AvahiSAddressResolver *ar;
static void host_name_resolver_callback(
AvahiSHostNameResolver *r,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
+ AVAHI_GCC_UNUSED AvahiIfIndex interface,
+ AVAHI_GCC_UNUSED AvahiProtocol protocol,
AvahiResolverEvent event,
const char *host_name,
const AvahiAddress *a,
}
}
-static void defer_callback(AvahiTimeEvent *e, void *userdata) {
+static void defer_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void *userdata) {
AvahiSRecordBrowser *b = userdata;
int n;
static AvahiServer *avahi = NULL;
static const AvahiPoll *poll_api;
-static void dump_line(const char *text, void* userdata) {
+static void dump_line(const char *text, AVAHI_GCC_UNUSED void* userdata) {
printf("%s\n", text);
}
-static void dump_timeout_callback(AvahiTimeout *timeout, void* data) {
+static void dump_timeout_callback(AvahiTimeout *timeout, AVAHI_GCC_UNUSED void* userdata) {
struct timeval tv;
avahi_server_dump(avahi, dump_line, NULL);
try++;
}
-static void rename_timeout_callback(AvahiTimeout *timeout, void *userdata) {
+static void rename_timeout_callback(AvahiTimeout *timeout, AVAHI_GCC_UNUSED void *userdata) {
struct timeval tv;
if (access("flag", F_OK) == 0) {
poll_api->timeout_update(timeout, &tv);
}
-static void entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, void* userdata) {
+static void entry_group_callback(AVAHI_GCC_UNUSED AvahiServer *s, AVAHI_GCC_UNUSED AvahiSEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void* userdata) {
if (state == AVAHI_ENTRY_GROUP_COLLISION)
create_service(NULL);
else if (state == AVAHI_ENTRY_GROUP_ESTABLISHED) {
}
}
-static void server_callback(AvahiServer *s, AvahiServerState state, void* userdata) {
+static void server_callback(AvahiServer *s, AvahiServerState state, AVAHI_GCC_UNUSED void* userdata) {
avahi_log_debug("server state: %i", state);
if (state == AVAHI_SERVER_RUNNING) {
}
}
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
int error;
AvahiSimplePoll *simple_poll;
struct timeval tv;
#include "log.h"
#include "util.h"
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
char t[AVAHI_DOMAIN_NAME_MAX];
const char *a, *b, *c, *d;
AvahiDnsPacket *p;
}
}
-static void entry_group_register_time_event_callback(AvahiTimeEvent *e, void* userdata) {
+static void entry_group_register_time_event_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void* userdata) {
AvahiSEntryGroup *g = userdata;
assert(g);
#include "hashmap.h"
#include "util.h"
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
unsigned n;
AvahiHashmap *m;
const char *t;
return 0;
}
-static void socket_event(AvahiWatch *w, int fd, AvahiWatchEvent event, void *userdata) {
+static void socket_event(AvahiWatch *w, int fd, AVAHI_GCC_UNUSED AvahiWatchEvent event, void *userdata) {
AvahiNetlink *nl = userdata;
assert(w);
#include <stdio.h>
#include <assert.h>
+#include <avahi-common/gccmacro.h>
+
#include "prioq.h"
#define POINTER_TO_INT(p) ((int) (p))
rec(n->right);
}
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
AvahiPrioQueue *q, *q2;
int i;
return 1;
}
-static void elapse_callback(AvahiTimeEvent *e, void* data) {
+static void elapse_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void* data) {
AvahiProbeJob *pj = data, *next;
AvahiProbeScheduler *s;
AvahiDnsPacket *p;
const char *service_type,
const char *domain,
AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED void* userdata) {
avahi_log_debug("SB%i: (%i.%s) <%s> as <%s> in <%s> [%s] cached=%i", b == service_browser1 ? 1 : 2, iface, avahi_proto_to_string(protocol), name, service_type, domain, browser_event_to_string(event), !!(flags & AVAHI_LOOKUP_RESULT_CACHED));
}
-static void create_second_service_browser(AvahiTimeout *timeout, void* userdata) {
+static void create_second_service_browser(AvahiTimeout *timeout, AVAHI_GCC_UNUSED void* userdata) {
service_browser2 = avahi_s_service_browser_new(server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, SERVICE_TYPE, DOMAIN, 0, sb_callback, NULL);
assert(service_browser2);
poll_api->timeout_free(timeout);
}
-static void quit(AvahiTimeout *timeout, void *userdata) {
+static void quit(AVAHI_GCC_UNUSED AvahiTimeout *timeout, AVAHI_GCC_UNUSED void *userdata) {
avahi_simple_poll_quit(simple_poll);
}
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
struct timeval tv;
AvahiServerConfig config;
avahi_free(q);
}
-static void querier_elapse_callback(AvahiTimeEvent *e, void *userdata) {
+static void querier_elapse_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void *userdata) {
AvahiQuerier *q = userdata;
struct timeval tv;
avahi_dns_packet_free(p);
}
-static void elapse_callback(AvahiTimeEvent *e, void* data) {
+static void elapse_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void* data) {
AvahiQueryJob *qj = data;
AvahiQueryScheduler *s;
AvahiDnsPacket *p;
job_free(s, s->suppressed);
}
-static void enumerate_aux_records_callback(AvahiServer *s, AvahiRecord *r, int flush_cache, void* userdata) {
+static void enumerate_aux_records_callback(AVAHI_GCC_UNUSED AvahiServer *s, AvahiRecord *r, int flush_cache, void* userdata) {
AvahiResponseJob *rj = userdata;
assert(r);
avahi_dns_packet_free(p);
}
-static void elapse_callback(AvahiTimeEvent *e, void* data) {
+static void elapse_callback(AVAHI_GCC_UNUSED AvahiTimeEvent *e, void* data) {
AvahiResponseJob *rj = data;
assert(rj);
server_set_state(s, AVAHI_SERVER_RUNNING);
}
-void avahi_host_rr_entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, void *userdata) {
+void avahi_host_rr_entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void *userdata) {
assert(s);
assert(g);
avahi_time_event_update(e, &tv);
}
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
struct timeval tv;
AvahiSimplePoll *s;
q->poll_api->timeout_update(q->timeout, NULL);
}
-static void expiration_event(AvahiTimeout *timeout, void *userdata) {
+static void expiration_event(AVAHI_GCC_UNUSED AvahiTimeout *timeout, void *userdata) {
AvahiTimeEventQueue *q = userdata;
AvahiTimeEvent *e;
static AvahiSEntryGroup *group = NULL;
-static void server_callback(AvahiServer *s, AvahiServerState state, void* userdata) {
+static void server_callback(AvahiServer *s, AvahiServerState state, AVAHI_GCC_UNUSED void* userdata) {
avahi_log_debug("server state: %i", state);
}
}
-static void modify_txt_callback(AvahiTimeout *e, void *userdata) {
+static void modify_txt_callback(AVAHI_GCC_UNUSED AvahiTimeout *e, void *userdata) {
int ret;
AvahiServer *s = userdata;
assert(ret == AVAHI_OK);
}
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
AvahiSimplePoll *simple_poll;
const AvahiPoll *poll_api;
AvahiServer *server;
}
}
-static void socket_event(AvahiWatch *w, int fd, AvahiWatchEvent events, void *userdata) {
+static void socket_event(AVAHI_GCC_UNUSED AvahiWatch *w, int fd, AVAHI_GCC_UNUSED AvahiWatchEvent events, void *userdata) {
AvahiWideAreaLookupEngine *e = userdata;
AvahiAddress a;
AvahiDnsPacket *p = NULL;
}
-static DBusHandlerResult msg_signal_filter_impl(DBusConnection *c, DBusMessage *m, void *userdata) {
+static DBusHandlerResult msg_signal_filter_impl(AVAHI_GCC_UNUSED DBusConnection *c, DBusMessage *m, void *userdata) {
DBusError error;
dbus_error_init(&error);
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
-static DBusHandlerResult msg_server_impl(DBusConnection *c, DBusMessage *m, void *userdata) {
+static DBusHandlerResult msg_server_impl(DBusConnection *c, DBusMessage *m, AVAHI_GCC_UNUSED void *userdata) {
DBusError error;
dbus_error_init(&error);
else
e = AVAHI_DBUS_ERR_OK;
- dbus_message_append_args(m, DBUS_TYPE_INT32, &t, DBUS_TYPE_INVALID);
+ dbus_message_append_args(m, DBUS_TYPE_INT32, &t, DBUS_TYPE_STRING, &e, DBUS_TYPE_INVALID);
dbus_connection_send(server->bus, m, NULL);
dbus_message_unref(m);
}
#include "ini-file-parser.h"
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
AvahiIniFile *f;
AvahiIniFileGroup *g;
avahi_server = s;
#ifdef HAVE_DBUS
- if (c->enable_dbus)
+ if (c->enable_dbus && state != AVAHI_SERVER_INVALID && state != AVAHI_SERVER_FAILURE)
dbus_protocol_server_state_changed(state);
#endif
daemon_log(log_level_map[level], "%s", txt);
}
-static void dump(const char *text, void* userdata) {
+static void dump(const char *text, AVAHI_GCC_UNUSED void* userdata) {
avahi_log_info("%s", text);
}
-static void signal_callback(AvahiWatch *watch, int fd, AvahiWatchEvent event, void *userdata) {
+static void signal_callback(AvahiWatch *watch, AVAHI_GCC_UNUSED int fd, AVAHI_GCC_UNUSED AvahiWatchEvent event, AVAHI_GCC_UNUSED void *userdata) {
int sig;
const AvahiPoll *poll_api;
}
static void host_name_resolver_callback(
- AvahiSHostNameResolver *r,
+ AVAHI_GCC_UNUSED AvahiSHostNameResolver *r,
AvahiIfIndex iface,
AvahiProtocol protocol,
AvahiResolverEvent event,
const char *hostname,
const AvahiAddress *a,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void* userdata) {
Client *c = userdata;
}
static void address_resolver_callback(
- AvahiSAddressResolver *r,
+ AVAHI_GCC_UNUSED AvahiSAddressResolver *r,
AvahiIfIndex iface,
AvahiProtocol protocol,
AvahiResolverEvent event,
- const AvahiAddress *a,
+ AVAHI_GCC_UNUSED const AvahiAddress *a,
const char *hostname,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void* userdata) {
Client *c = userdata;
}
static void dns_server_browser_callback(
- AvahiSDNSServerBrowser *b,
+ AVAHI_GCC_UNUSED AvahiSDNSServerBrowser *b,
AvahiIfIndex interface,
AvahiProtocol protocol,
AvahiBrowserEvent event,
- const char *host_name,
+ AVAHI_GCC_UNUSED const char *host_name,
const AvahiAddress *a,
uint16_t port,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void* userdata) {
Client *c = userdata;
}
}
-static void client_work(AvahiWatch *watch, int fd, AvahiWatchEvent events, void *userdata) {
+static void client_work(AvahiWatch *watch, AVAHI_GCC_UNUSED int fd, AvahiWatchEvent events, void *userdata) {
Client *c = userdata;
assert(c);
(c->inbuf_length < sizeof(c->inbuf) ? AVAHI_WATCH_IN : 0));
}
-static void server_work(AvahiWatch *watch, int fd, AvahiWatchEvent events, void *userdata) {
+static void server_work(AVAHI_GCC_UNUSED AvahiWatch *watch, int fd, AvahiWatchEvent events, void *userdata) {
Server *s = userdata;
assert(s);
avahi_free(g);
}
-static void entry_group_callback(AvahiServer *s, AvahiSEntryGroup *eg, AvahiEntryGroupState state, void* userdata) {
+static void entry_group_callback(AvahiServer *s, AVAHI_GCC_UNUSED AvahiSEntryGroup *eg, AvahiEntryGroupState state, void* userdata) {
StaticServiceGroup *g = userdata;
assert(s);
return;
}
-static void XMLCALL xml_end(void *data, const char *el) {
+static void XMLCALL xml_end(void *data, AVAHI_GCC_UNUSED const char *el) {
struct xml_userdata *u = data;
assert(u);
}
static void service_browser_callback(
- AvahiSServiceBrowser *b,
+ AVAHI_GCC_UNUSED AvahiSServiceBrowser *b,
AvahiIfIndex interface,
AvahiProtocol protocol,
AvahiBrowserEvent event,
const char *service_name,
const char *service_type,
const char *domain_name,
- AvahiLookupResultFlags flags,
- void* userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
if (event == AVAHI_BROWSER_NEW) {
struct Service *s;
}
static void service_type_browser_callback(
- AvahiSServiceTypeBrowser *b,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
+ AVAHI_GCC_UNUSED AvahiSServiceTypeBrowser *b,
+ AVAHI_GCC_UNUSED AvahiIfIndex interface,
+ AVAHI_GCC_UNUSED AvahiProtocol protocol,
AvahiBrowserEvent event,
const char *service_type,
const char *domain,
- AvahiLookupResultFlags flags,
- void * userdata) {
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void * userdata) {
struct ServiceType *st;
GtkTreePath *path;
static void service_resolver_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,
- const char *domain,
+ AVAHI_GCC_UNUSED const char *name,
+ AVAHI_GCC_UNUSED const char *type,
+ AVAHI_GCC_UNUSED const char *domain,
const char *host_name,
const AvahiAddress *a,
uint16_t port,
AvahiStringList *txt,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void* userdata) {
struct Service *s;
update_label(s, host_name, a, port, txt);
}
-static void tree_view_on_cursor_changed(GtkTreeView *tv, gpointer userdata) {
+static void tree_view_on_cursor_changed(AVAHI_GCC_UNUSED GtkTreeView *tv, AVAHI_GCC_UNUSED gpointer userdata) {
struct Service *s;
if (!(s = get_service_on_cursor()))
service_resolver = avahi_s_service_resolver_new(server, s->interface, s->protocol, s->service_name, s->service_type->service_type, s->domain_name, AVAHI_PROTO_UNSPEC, 0, service_resolver_callback, s);
}
-static gboolean main_window_on_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data) {
+static gboolean main_window_on_delete_event(AVAHI_GCC_UNUSED GtkWidget *widget, AVAHI_GCC_UNUSED GdkEvent *event, AVAHI_GCC_UNUSED gpointer user_data) {
gtk_main_quit();
return FALSE;
}
#include <avahi-common/watch.h>
#include <avahi-common/timeval.h>
+#include <avahi-common/gccmacro.h>
+
#include "glib-watch.h"
static const AvahiPoll *api = NULL;
static GMainLoop *loop = NULL;
-static void callback(AvahiWatch *w, int fd, AvahiWatchEvent event, void *userdata) {
+static void callback(AvahiWatch *w, int fd, AvahiWatchEvent event, AVAHI_GCC_UNUSED void *userdata) {
if (event & AVAHI_WATCH_IN) {
ssize_t r;
}
}
-static void wakeup(AvahiTimeout *t, void *userdata) {
+static void wakeup(AvahiTimeout *t, AVAHI_GCC_UNUSED void *userdata) {
struct timeval tv;
static int i = 0;
api->timeout_update(t, &tv);
}
-int main(int argc, char *argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
AvahiGLibPoll *g;
struct timeval tv;
return FALSE;
}
-static gboolean dispatch_func(GSource *source, GSourceFunc callback, gpointer userdata) {
+static gboolean dispatch_func(GSource *source, AVAHI_GCC_UNUSED GSourceFunc callback, AVAHI_GCC_UNUSED gpointer userdata) {
AvahiGLibPoll* g = (AvahiGLibPoll*) source;
AvahiWatch *w;
AvahiTimeout *next_timeout;
EXTRA_DIST = \
avahi-publish-address.in \
avahi-publish-service.in \
- avahi-browse.in \
avahi-bookmarks.in \
avahi-resolve-host-name.in \
avahi-resolve-address.in \
pythonscripts = \
avahi-publish-address \
avahi-publish-service \
- avahi-browse \
avahi-bookmarks \
avahi-resolve-host-name \
avahi-resolve-address \
sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@
chmod +x $@
-avahi-browse: avahi-browse.in
- sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@
- chmod +x $@
-
avahi-bookmarks: avahi-bookmarks.in
sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@
chmod +x $@
endif
endif
endif
+
+if HAVE_DBUS
+
+bin_PROGRAMS = avahi-browse
+
+avahi_browse_SOURCES = avahi-browse.c sigint.c
+avahi_browse_CFLAGS = $(AM_CFLAGS)
+avahi_browse_LDADD = $(AM_LDADD) ../avahi-client/libavahi-client.la ../avahi-common/libavahi-common.la
+
+endif
+++ /dev/null
-#!@PYTHON@
-# -*-python-*-
-# $Id$
-
-# This file is part of avahi.
-#
-# avahi is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# avahi is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-# License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with avahi; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-# USA.
-
-import sys, getopt
-
-try:
- import avahi, gobject, dbus, avahi.ServiceTypeDatabase
-except ImportError:
- print "Sorry, to use this tool you need to install Avahi, pygtk and python-dbus."
- sys.exit(1)
-
-try:
- import dbus.glib
-except ImportError, e:
- pass
-
-def usage(retval = 0):
- print "%s [options] <type>\n" % sys.argv[0]
- print " -h --help Show this help"
- print " -d --domain The domain to browse"
- print " -a --all Show all services, regardless of the type"
- sys.exit(retval)
-
-try:
- opts, args = getopt.getopt(sys.argv[1:], "hd:a", ["help", "domain=", "all"])
-except getopt.GetoptError:
- usage(2)
-
-domain = None
-stype = None
-show_all = False
-
-for o, a in opts:
- if o in ("-h", "--help"):
- usage()
-
- if o in ("-d", "--domain"):
- domain = a
-
- if o in ("-a", "--all"):
- show_all = True
-
-if len(args) > 1:
- usage(2)
-
-if len(args) >= 1:
- stype = args[0];
-
-if stype is None and not show_all:
- usage(2)
-
-service_type_browsers = {}
-service_browsers = {}
-
-service_type_db = avahi.ServiceTypeDatabase.ServiceTypeDatabase()
-
-def siocgifname(interface):
- global server
-
- if interface <= 0:
- return "any"
- else:
- return server.GetNetworkInterfaceNameByIndex(interface)
-
-def lookup_service_type(stype):
- global service_type_db
-
- try:
- return service_type_db[stype]
- except KeyError:
- return "n/a"
-
-def service_resolved(interface, protocol, name, stype, domain, host, aprotocol, address, port, txt, flags):
- print "Service data for service '%s' of type '%s' (%s) in domain '%s' on %s.%i:" % (name, stype, lookup_service_type(stype), domain, siocgifname(interface), protocol)
- print "\tHost %s (%s), port %i, TXT data: %s" % (host, address, port, avahi.txt_array_to_string_array(txt))
-
-def print_error(err):
- print "Error:", str(err)
-
-def new_service(interface, protocol, name, stype, domain, flags):
- global server
-
- print "Found service '%s' of type '%s' (%s) in domain '%s' on %s.%i." % (name, stype, lookup_service_type(stype), domain, siocgifname(interface), protocol)
-
- # Asynchronous resolving
- server.ResolveService(interface, protocol, name, stype, domain, avahi.PROTO_UNSPEC, dbus.UInt32(0), reply_handler=service_resolved, error_handler=print_error)
-
-def remove_service(interface, protocol, name, stype, domain, flags):
- print "Service '%s' of type '%s' (%s) in domain '%s' on %s.%i disappeared." % (name, stype, lookup_service_type(stype), domain, siocgifname(interface), protocol)
-
-def new_service_type(interface, protocol, stype, domain, flags):
- global server, service_browsers
-
- # Are we already browsing this domain for this type?
- if service_browsers.has_key((interface, protocol, stype, domain)):
- return
-
- print "Browsing for services of type '%s' (%s) in domain '%s' on %s.%i ..." % (stype, lookup_service_type(stype), domain, siocgifname(interface), protocol)
-
- b = dbus.Interface(bus.get_object(avahi.DBUS_NAME, server.ServiceBrowserNew(interface, protocol, stype, domain, dbus.UInt32(0))), avahi.DBUS_INTERFACE_SERVICE_BROWSER)
- b.connect_to_signal('ItemNew', new_service)
- b.connect_to_signal('ItemRemove', remove_service)
-
- service_browsers[(interface, protocol, stype, domain)] = b
-
-def browse_domain(interface, protocol, domain):
- global server, service_type_browsers, stype
-
- # Are we already browsing this domain?
- if service_type_browsers.has_key((interface, protocol, domain)):
- return
-
- if stype is None:
- print "Browsing domain '%s' on %s.%i ..." % (domain, siocgifname(interface), protocol)
-
- b = dbus.Interface(bus.get_object(avahi.DBUS_NAME, server.ServiceTypeBrowserNew(interface, protocol, domain, dbus.UInt32(0))), avahi.DBUS_INTERFACE_SERVICE_TYPE_BROWSER)
- b.connect_to_signal('ItemNew', new_service_type)
-
- service_type_browsers[(interface, protocol, domain)] = b
- else:
- new_service_type(interface, protocol, stype, domain, dbus.UInt32(0))
-
-def new_domain(interface, protocol, domain, flags):
-
- # We browse for .local anyway...
- if domain != "local":
- browse_domain(interface, protocol, domain)
-
-
-bus = dbus.SystemBus()
-server = dbus.Interface(bus.get_object(avahi.DBUS_NAME, avahi.DBUS_PATH_SERVER), avahi.DBUS_INTERFACE_SERVER)
-
-if domain is None:
- # Explicitly browse .local
- browse_domain(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, "local")
-
- # Browse for other browsable domains
- db = dbus.Interface(bus.get_object(avahi.DBUS_NAME, server.DomainBrowserNew(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, "", avahi.DOMAIN_BROWSER_BROWSE, dbus.UInt32(0))), avahi.DBUS_INTERFACE_DOMAIN_BROWSER)
- db.connect_to_signal('ItemNew', new_domain)
-
-else:
- # Just browse the domain the user wants us to browse
- browse_domain(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, domain)
-
-try:
- gobject.MainLoop().run()
-except KeyboardInterrupt, k:
- pass
# If using GCC specify some additional parameters
if test "x$GCC" = "xyes" ; then
- DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wlarger-than-4000 -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter"
+ DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wlarger-than-4000 -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline"
if test "x$HAVE_NETLINK" = "xyes" ; then
# Test whether rtnetlink.h can be included when compiled with -std=c99
* Add static host configuration like static services [lathiat]
* wrap avahi_server_add_record() via DBUS and in avahi-client [lathiat]
* always set source address for outgoing packets
+* introduce AVAHI_CLIENT_FAILURE
later:
* add simplification routine for adding services
core_browse_services_CFLAGS = $(AM_CFLAGS)
core_browse_services_LDADD = $(AM_LDADD) ../avahi-core/libavahi-core.la ../avahi-common/libavahi-common.la
-
if HAVE_DBUS
if ENABLE_TESTS
static void resolve_callback(
AvahiServiceResolver *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);
const char *name,
const char *type,
const char *domain,
- AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void* userdata) {
AvahiClient *c = userdata;
case AVAHI_BROWSER_CACHE_EXHAUSTED:
fprintf(stderr, "(Browser) %s\n", event == AVAHI_BROWSER_CACHE_EXHAUSTED ? "CACHE_EXHAUSTED" : "ALL_FOR_NOW");
break;
-
}
}
-static void client_callback(AvahiClient *c, AvahiClientState state, void * userdata) {
+static void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UNUSED void * userdata) {
assert(c);
/* Called whenever the client or server state changes */
}
}
-int main(int argc, char*argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char*argv[]) {
AvahiClient *client = NULL;
AvahiServiceBrowser *sb = NULL;
int error;
static void create_services(AvahiClient *c);
-static void entry_group_callback(AvahiEntryGroup *g, AvahiEntryGroupState state, void *userdata) {
+static void entry_group_callback(AvahiEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void *userdata) {
assert(g == group);
/* Called whenever the entry group state changes */
avahi_simple_poll_quit(simple_poll);
}
-static void client_callback(AvahiClient *c, AvahiClientState state, void * userdata) {
+static void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UNUSED void * userdata) {
assert(c);
/* Called whenever the client or server state changes */
break;
- case AVAHI_CLIENT_S_FAILURE:
- case AVAHI_CLIENT_S_INVALID:
case AVAHI_CLIENT_S_REGISTERING:
;
}
}
-int main(int argc, char*argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char*argv[]) {
AvahiClient *client = NULL;
int error;
int ret = 1;
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);
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;
static void create_services(AvahiServer *s);
-static void entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, void *userdata) {
+static void entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void *userdata) {
assert(s);
assert(g == group);
avahi_simple_poll_quit(simple_poll);
}
-static void server_callback(AvahiServer *s, AvahiServerState state, void * userdata) {
+static void server_callback(AvahiServer *s, AvahiServerState state, AVAHI_GCC_UNUSED void * userdata) {
assert(s);
/* Called whenever the server state changes */
}
}
-int main(int argc, char*argv[]) {
+int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char*argv[]) {
AvahiServerConfig config;
AvahiServer *server = NULL;
int error;
/* Callback for Avahi API Timeout Event */
static void
-avahi_timeout_event (AvahiTimeout *timeout, void *userdata)
+avahi_timeout_event (AVAHI_GCC_UNUSED AvahiTimeout *timeout, AVAHI_GCC_UNUSED void *userdata)
{
g_message ("Avahi API Timeout reached!");
}
/* Callback for state changes on the Client */
static void
-avahi_client_callback (AvahiClient *client, AvahiClientState state, void *userdata)
+avahi_client_callback (AVAHI_GCC_UNUSED AvahiClient *client, AvahiClientState state, void *userdata)
{
GMainLoop *loop = userdata;
}
int
-main (int argc, char *argv[])
+main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[])
{
GMainLoop *loop = NULL;
const AvahiPoll *poll_api;