From c1d9b9cffd6f756339c1d98a2d2914d49195cb41 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 11 Oct 2005 00:18:57 +0000 Subject: add support for service subtypes: avahi_server_add_service_subtype() git-svn-id: file:///home/lennart/svn/public/avahi/trunk@714 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- examples/core-publish-service.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'examples') diff --git a/examples/core-publish-service.c b/examples/core-publish-service.c index 62badf3..f826a5f 100644 --- a/examples/core-publish-service.c +++ b/examples/core-publish-service.c @@ -96,6 +96,12 @@ static void create_services(AvahiServer *s) { goto fail; } + /* Add an additional (hypothetic) subtype */ + if ((ret = avahi_server_add_service_subtype(s, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, name, "_printer._tcp", NULL, "_magic._sub._printer._tcp") < 0)) { + fprintf(stderr, "Failed to add subtype _magic._sub._printer._tcp: %s\n", avahi_strerror(ret)); + goto fail; + } + /* Tell the server to register the service */ if ((ret = avahi_s_entry_group_commit(group)) < 0) { fprintf(stderr, "Failed to commit entry_group: %s\n", avahi_strerror(ret)); -- cgit