service_name = n;
}
- if (avahi_server_add_service(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_http._tcp", service_name, NULL, NULL, 80, "foo", NULL) < 0) {
+ if (avahi_server_add_service(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, service_name, "_http._tcp", NULL, NULL, 80, "foo", NULL) < 0) {
avahi_log_error("Failed to add HTTP service");
goto fail;
}
- if (avahi_server_add_service(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_ftp._tcp", service_name, NULL, NULL, 21, "foo", NULL) < 0) {
+ if (avahi_server_add_service(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, service_name, "_ftp._tcp", NULL, NULL, 21, "foo", NULL) < 0) {
avahi_log_error("Failed to add FTP service");
goto fail;
}
- if (avahi_server_add_service(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_webdav._tcp", service_name, NULL, NULL, 80, "foo", NULL) < 0) {
+ if (avahi_server_add_service(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, service_name, "_webdav._tcp", NULL, NULL, 80, "foo", NULL) < 0) {
avahi_log_error("Failed to add WEBDAV service");
goto fail;
}
sleep(2); /* ugly ugly ugly hack */
group = avahi_entry_group_new(avahi, entry_group_callback, NULL);
- avahi_server_add_service(avahi, group, 0, AF_UNSPEC, "_http._tcp", name, NULL, NULL, 80, "foo", NULL);
+ avahi_server_add_service(avahi, group, 0, AF_UNSPEC, name, "_http._tcp", NULL, NULL, 80, "foo", NULL);
avahi_entry_group_commit(group);
try++;
AvahiEntryGroup *g,
AvahiIfIndex interface,
AvahiProtocol protocol,
- const gchar *type, /**< DNS-SD type, e.g. "_http._tcp" */
const gchar *name, /**< Service name, e.g. "Lennart's Files" */
+ const gchar *type, /**< DNS-SD type, e.g. "_http._tcp" */
const gchar *domain,
const gchar *host, /**< Host name where this servcie resides, or NULL if on the local host */
guint16 port, /**< Port number of the service */
AvahiEntryGroup *g,
AvahiIfIndex interface,
AvahiProtocol protocol,
- const gchar *type,
const gchar *name,
+ const gchar *type,
const gchar *domain,
const gchar *host,
guint16 port,
AvahiEntryGroup *g,
AvahiIfIndex interface,
AvahiProtocol protocol,
- const gchar *type,
const gchar *name,
+ const gchar *type,
const gchar *domain,
const gchar *host,
guint16 port,
g_free(t);
hw->entry_group = avahi_entry_group_new(m->server, avahi_host_rr_entry_group_callback, NULL);
- if (avahi_server_add_service(m->server, hw->entry_group, hw->index, AVAHI_PROTO_UNSPEC, "_workstation._tcp", name, NULL, NULL, 9, NULL) < 0) {
+ if (avahi_server_add_service(m->server, hw->entry_group, hw->index, AVAHI_PROTO_UNSPEC, name, "_workstation._tcp", NULL, NULL, 9, NULL) < 0) {
avahi_log_warn(__FILE__": avahi_server_add_service() failed.");
avahi_entry_group_free(hw->entry_group);
hw->entry_group = NULL;
AvahiEntryGroup *g,
gint interface,
guchar protocol,
- const gchar *type,
const gchar *name,
+ const gchar *type,
const gchar *domain,
const gchar *host,
guint16 port,
AvahiEntryGroup *g,
gint interface,
guchar protocol,
- const gchar *type,
const gchar *name,
+ const gchar *type,
const gchar *domain,
const gchar *host,
guint16 port,
g_assert(type);
g_assert(name);
- return avahi_server_add_service_strlst(s, g, interface, protocol, type, name, domain, host, port, avahi_string_list_new_va(va));
+ return avahi_server_add_service_strlst(s, g, interface, protocol, name, type, domain, host, port, avahi_string_list_new_va(va));
}
gint avahi_server_add_service(
AvahiEntryGroup *g,
gint interface,
guchar protocol,
- const gchar *type,
const gchar *name,
+ const gchar *type,
const gchar *domain,
const gchar *host,
guint16 port,
g_assert(name);
va_start(va, port);
- ret = avahi_server_add_service_va(s, g, interface, protocol, type, name, domain, host, port, va);
+ ret = avahi_server_add_service_va(s, g, interface, protocol, name, type, domain, host, port, va);
va_end(va);
return ret;
}
m, &error,
DBUS_TYPE_INT32, &interface,
DBUS_TYPE_INT32, &protocol,
- DBUS_TYPE_STRING, &type,
DBUS_TYPE_STRING, &name,
+ DBUS_TYPE_STRING, &type,
DBUS_TYPE_STRING, &domain,
DBUS_TYPE_STRING, &host,
DBUS_TYPE_UINT16, &port,
if (host && !*host)
host = NULL;
- if (avahi_server_add_service_strlst(avahi_server, i->entry_group, (AvahiIfIndex) interface, (AvahiProtocol) protocol, type, name, domain, host, port, strlst) < 0) {
+ if (avahi_server_add_service_strlst(avahi_server, i->entry_group, (AvahiIfIndex) interface, (AvahiProtocol) protocol, name, type, domain, host, port, strlst) < 0) {
avahi_log_warn("Failed to add service: %s", name);
return respond_error(c, m, "org.freedesktop.Avahi.InvalidServiceError", NULL);
} else
g.connect_to_signal('StateChanged', entry_group_state_changed_callback)
-g.AddService(0, 0, "_http._tcp", "foo", "", "", dbus.UInt16(4712), ["fuck=hallo", "gurke=mega"])
+g.AddService(0, 0, "Test Web Site", "_http._tcp", "", "", dbus.UInt16(4712), ["fuck=hallo", "gurke=mega"])
g.AddAddress(0, 0, "foo.local", "47.11.8.15")
g.Commit()
avahi_server,
g->entry_group,
-1, AF_UNSPEC,
- s->type, g->chosen_name,
+ g->chosen_name, s->type,
s->domain_name, s->host_name, s->port,
avahi_string_list_copy(s->txt_records)) < 0) {
avahi_log_error("Failed to add service '%s' of type '%s', ignoring service group (%s)", g->chosen_name, s->type, g->filename);