...) {
va_list va;
- int r;
-
- assert(group);
-
- va_start(va, port);
- r = avahi_entry_group_add_service_va(group, interface, protocol, flags, name, type, domain, host, port, va);
- va_end(va);
- return r;
-}
-
-int avahi_entry_group_add_service_va(
- AvahiEntryGroup *group,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
- AvahiPublishFlags flags,
- const char *name,
- const char *type,
- const char *domain,
- const char *host,
- uint16_t port,
- va_list va) {
-
int r;
AvahiStringList *txt;
assert(group);
+ va_start(va, port);
txt = avahi_string_list_new_va(va);
r = avahi_entry_group_add_service_strlst(group, interface, protocol, flags, name, type, domain, host, port, txt);
avahi_string_list_free(txt);
-
+ va_end(va);
return r;
}
...) {
va_list va;
- int r;
-
- va_start(va, domain);
- r = avahi_entry_group_update_service_txt_va(group, interface, protocol, flags, name, type, domain, va);
- va_end(va);
- return r;
-}
-
-int avahi_entry_group_update_service_txt_va(
- AvahiEntryGroup *group,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
- AvahiPublishFlags flags,
- const char *name,
- const char *type,
- const char *domain,
- va_list va) {
-
int r;
AvahiStringList *txt;
+ va_start(va, domain);
txt = avahi_string_list_new_va(va);
r = avahi_entry_group_update_service_txt_strlst(group, interface, protocol, flags, name, type, domain, txt);
avahi_string_list_free(txt);
-
+ va_end(va);
return r;
}
uint16_t port,
AvahiStringList *txt);
-/** Add a service, takes a NULL terminated va_list for text records */
-int avahi_entry_group_add_service_va(
- AvahiEntryGroup *group,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
- AvahiPublishFlags flags,
- const char *name,
- const char *type,
- const char *domain,
- const char *host,
- uint16_t port,
- va_list va);
-
/** Add a subtype for a service */
int avahi_entry_group_add_service_subtype(
AvahiEntryGroup *group,
const char *domain,
AvahiStringList *strlst);
-/** Update a TXT record for an existing service */
-int avahi_entry_group_update_service_txt_va(
- AvahiEntryGroup *g,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
- AvahiPublishFlags flags,
- const char *name,
- const char *type,
- const char *domain,
- va_list va);
-
/** Add a host/address pair */
int avahi_entry_group_add_address(
AvahiEntryGroup *group,
return server_add_service_strlst_nocopy(s, g, interface, protocol, flags, name, type, domain, host, port, avahi_string_list_copy(strlst));
}
-int avahi_server_add_service_va(
- AvahiServer *s,
- AvahiSEntryGroup *g,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
- AvahiPublishFlags flags,
- const char *name,
- const char *type,
- const char *domain,
- const char *host,
- uint16_t port,
- va_list va) {
-
- assert(s);
- assert(type);
- assert(name);
-
- return server_add_service_strlst_nocopy(s, g, interface, protocol, flags, name, type, domain, host, port, avahi_string_list_new_va(va));
-}
-
int avahi_server_add_service(
AvahiServer *s,
AvahiSEntryGroup *g,
int ret;
va_start(va, port);
- ret = avahi_server_add_service_va(s, g, interface, protocol, flags, name, type, domain, host, port, va);
+ ret = server_add_service_strlst_nocopy(s, g, interface, protocol, flags, name, type, domain, host, port, avahi_string_list_new_va(va));
va_end(va);
return ret;
return server_update_service_txt_strlst_nocopy(s, g, interface, protocol, flags, name, type, domain, avahi_string_list_copy(strlst));
}
-/** Update the TXT record for a service with the NULL terminated list of strings of the va_list. */
-int avahi_server_update_service_txt_va(
- AvahiServer *s,
- AvahiSEntryGroup *g,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
- AvahiPublishFlags flags,
- const char *name,
- const char *type,
- const char *domain,
- va_list va) {
-
- return server_update_service_txt_strlst_nocopy(s, g, interface, protocol, flags, name, type, domain, avahi_string_list_new_va(va));
-}
-
/** Update the TXT record for a service with the NULL termonate list of strings */
int avahi_server_update_service_txt(
AvahiServer *s,
int ret;
va_start(va, domain);
- ret = avahi_server_update_service_txt_va(s, g, interface, protocol, flags, name, type, domain, va);
+ ret = server_update_service_txt_strlst_nocopy(s, g, interface, protocol, flags, name, type, domain, avahi_string_list_new_va(va));
va_end(va);
return ret;
uint16_t port, /**< Port number of the service */
... /**< Text records, terminated by NULL */) AVAHI_GCC_SENTINEL;
-/** Mostly identical to avahi_server_add_service(), but takes an va_list for the TXT records. */
-int avahi_server_add_service_va(
- AvahiServer *s,
- AvahiSEntryGroup *g,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
- AvahiPublishFlags flags,
- const char *name,
- const char *type,
- const char *domain,
- const char *host,
- uint16_t port,
- va_list va);
-
/** Mostly identical to avahi_server_add_service(), but takes an AvahiStringList object for the TXT records. The AvahiStringList object is copied. */
int avahi_server_add_service_strlst(
AvahiServer *s,
const char *domain,
AvahiStringList *strlst);
-/** Update the TXT record for a service with the NULL terminated list of strings of the va_list. */
-int avahi_server_update_service_txt_va(
- AvahiServer *s,
- AvahiSEntryGroup *g,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
- AvahiPublishFlags flags,
- const char *name,
- const char *type,
- const char *domain,
- va_list va);
-
/** Update the TXT record for a service with the NULL termonate list of strings */
int avahi_server_update_service_txt(
AvahiServer *s,