summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-08-13 22:04:21 +0000
committerLennart Poettering <lennart@poettering.net>2005-08-13 22:04:21 +0000
commit8b5cd6ffd9137b14b7ed678f10a551e3911e4a40 (patch)
tree58574af05d4632561961d3df07cc0a3052211be8 /examples
parent7f5fd7ab759d8881e04f9edf31decdb000498fd1 (diff)
Rename some server side objects/symbols so that they do not conflict with the same things on the client side. i.e. AvahiEntryGroup -> AvahiSEntryGroup
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@310 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'examples')
-rw-r--r--examples/browse-services.c14
-rw-r--r--examples/publish-service.c12
2 files changed, 13 insertions, 13 deletions
diff --git a/examples/browse-services.c b/examples/browse-services.c
index 472b053..7227bd7 100644
--- a/examples/browse-services.c
+++ b/examples/browse-services.c
@@ -35,7 +35,7 @@
static AvahiSimplePoll *simple_poll = NULL;
static void resolve_callback(
- AvahiServiceResolver *r,
+ AvahiSServiceResolver *r,
AvahiIfIndex interface,
AvahiProtocol protocol,
AvahiResolverEvent event,
@@ -67,11 +67,11 @@ static void resolve_callback(
avahi_free(t);
}
- avahi_service_resolver_free(r);
+ avahi_s_service_resolver_free(r);
}
static void browse_callback(
- AvahiServiceBrowser *b,
+ AvahiSServiceBrowser *b,
AvahiIfIndex interface,
AvahiProtocol protocol,
AvahiBrowserEvent event,
@@ -98,14 +98,14 @@ static void browse_callback(
we free it. If the server is terminated before the callback
function is called the server will free the resolver for us. */
- if (!(avahi_service_resolver_new(s, interface, protocol, name, type, domain, AVAHI_PROTO_UNSPEC, resolve_callback, s)))
+ if (!(avahi_s_service_resolver_new(s, interface, protocol, name, type, domain, AVAHI_PROTO_UNSPEC, resolve_callback, s)))
fprintf(stderr, "Failed to resolve service '%s': %s\n", name, avahi_strerror(avahi_server_errno(s)));
}
int main(int argc, char*argv[]) {
AvahiServerConfig config;
AvahiServer *server = NULL;
- AvahiServiceBrowser *sb;
+ AvahiSServiceBrowser *sb;
int error;
int ret = 1;
@@ -138,7 +138,7 @@ int main(int argc, char*argv[]) {
}
/* Create the service browser */
- if (!(sb = avahi_service_browser_new(server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_http._tcp", NULL, browse_callback, server))) {
+ if (!(sb = avahi_s_service_browser_new(server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_http._tcp", NULL, browse_callback, server))) {
fprintf(stderr, "Failed to create service browser: %s\n", avahi_strerror(avahi_server_errno(server)));
goto fail;
}
@@ -154,7 +154,7 @@ fail:
/* Cleanup things */
if (sb)
- avahi_service_browser_free(sb);
+ avahi_s_service_browser_free(sb);
if (server)
avahi_server_free(server);
diff --git a/examples/publish-service.c b/examples/publish-service.c
index 4a78402..6132622 100644
--- a/examples/publish-service.c
+++ b/examples/publish-service.c
@@ -32,13 +32,13 @@
#include <avahi-common/simple-watch.h>
#include <avahi-common/malloc.h>
-static AvahiEntryGroup *group = NULL;
+static AvahiSEntryGroup *group = NULL;
static AvahiSimplePoll *simple_poll = NULL;
static char *name = NULL;
static void create_services(AvahiServer *s);
-static void entry_group_callback(AvahiServer *s, AvahiEntryGroup *g, AvahiEntryGroupState state, void *userdata) {
+static void entry_group_callback(AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, void *userdata) {
assert(s);
assert(g == group);
@@ -70,7 +70,7 @@ static void create_services(AvahiServer *s) {
/* If this is the first time we're called, let's create a new entry group */
if (!group) {
- if (!(group = avahi_entry_group_new(s, entry_group_callback, NULL))) {
+ if (!(group = avahi_s_entry_group_new(s, entry_group_callback, NULL))) {
fprintf(stderr, "avahi_entry_group_new() failed: %s\n", avahi_strerror(avahi_server_errno(s)));
goto fail;
}
@@ -94,7 +94,7 @@ static void create_services(AvahiServer *s) {
}
/* Tell the server to register the service */
- if ((ret = avahi_entry_group_commit(group)) < 0) {
+ if ((ret = avahi_s_entry_group_commit(group)) < 0) {
fprintf(stderr, "Failed to commit entry_group: %s\n", avahi_strerror(ret));
goto fail;
}
@@ -137,7 +137,7 @@ static void server_callback(AvahiServer *s, AvahiServerState state, void * userd
* in AVAHI_SERVER_RUNNING state we will register them
* again with the new host name. */
if (group)
- avahi_entry_group_reset(group);
+ avahi_s_entry_group_reset(group);
}
}
@@ -186,7 +186,7 @@ fail:
/* Cleanup things */
if (group)
- avahi_entry_group_free(group);
+ avahi_s_entry_group_free(group);
if (server)
avahi_server_free(server);