diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-09-29 01:51:53 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-09-29 01:51:53 +0000 |
commit | 424aefe8a431b79496672799dc4f4430fa935252 (patch) | |
tree | 0975ca5ba0321a21119f5313834bc20ff6144241 /avahi-core/announce.c | |
parent | 6b3876eb3740666e9f3e036d49efc7b3b3ee5b45 (diff) |
* make all flags parameters UINT32 when marshalling for DBUS
* rename AvahiEntryFlags to AvahiPublishFlags
* add flags parameter to add_service() and friends
* validity checking of flags, interface and protocol parameters of add_service() and friends
* make AVAHI_VALID_FLAGS a global macro
* add new flag AVAHI_PUBLISH_NO_REVERSE, if set address records will no be created with matching reverse lookup PTR RRs
* add new flag AVAHI_PUBLISH_NO_COOKIE, for not implicitly adding the service cookie to TXT records
* minor cleanups
Yes, this will break the mono bindings. More breakages to come.
NO_REVERSE and NO_COOKIE needs testing.
Lathiat, I guess the new flag NO_REVERSE makes the immediate need to add a client side API to add arbitrary RRs obsolete for now. You might consider moving it in the TODO list to "later".
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@648 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core/announce.c')
-rw-r--r-- | avahi-core/announce.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/avahi-core/announce.c b/avahi-core/announce.c index c21b147..025331d 100644 --- a/avahi-core/announce.c +++ b/avahi-core/announce.c @@ -155,7 +155,7 @@ static void next_state(AvahiAnnouncement *a) { } else if (a->state == AVAHI_ANNOUNCING) { - if (a->entry->flags & AVAHI_ENTRY_UNIQUE) + if (a->entry->flags & AVAHI_PUBLISH_UNIQUE) /* Send the whole rrset at once */ avahi_server_prepare_matching_responses(a->server, a->interface, a->entry->record->key, 0); else @@ -212,9 +212,9 @@ static void go_to_initial_state(AvahiAnnouncement *a, int immediately) { assert(a); e = a->entry; - if ((e->flags & AVAHI_ENTRY_UNIQUE) && !(e->flags & AVAHI_ENTRY_NOPROBE)) + if ((e->flags & AVAHI_PUBLISH_UNIQUE) && !(e->flags & AVAHI_PUBLISH_NO_PROBE)) a->state = AVAHI_PROBING; - else if (!(e->flags & AVAHI_ENTRY_NOANNOUNCE)) { + else if (!(e->flags & AVAHI_PUBLISH_NO_ANNOUNCE)) { if (!e->group || e->group->state == AVAHI_ENTRY_GROUP_ESTABLISHED) a->state = AVAHI_ANNOUNCING; @@ -336,7 +336,7 @@ int avahi_entry_is_registered(AvahiServer *s, AvahiEntry *e, AvahiInterface *i) return a->state == AVAHI_ANNOUNCING || a->state == AVAHI_ESTABLISHED || - (a->state == AVAHI_WAITING && !(e->flags & AVAHI_ENTRY_UNIQUE)); + (a->state == AVAHI_WAITING && !(e->flags & AVAHI_PUBLISH_UNIQUE)); } int avahi_entry_is_probing(AvahiServer *s, AvahiEntry *e, AvahiInterface *i) { @@ -354,7 +354,7 @@ int avahi_entry_is_probing(AvahiServer *s, AvahiEntry *e, AvahiInterface *i) { return a->state == AVAHI_PROBING || - (a->state == AVAHI_WAITING && (e->flags & AVAHI_ENTRY_UNIQUE)); + (a->state == AVAHI_WAITING && (e->flags & AVAHI_PUBLISH_UNIQUE)); } void avahi_entry_return_to_initial_state(AvahiServer *s, AvahiEntry *e, AvahiInterface *i) { @@ -403,7 +403,7 @@ static void send_goodbye_callback(AvahiInterfaceMonitor *m, AvahiInterface *i, v if (!avahi_interface_match(i, e->interface, e->protocol)) return; - if (e->flags & AVAHI_ENTRY_NOANNOUNCE) + if (e->flags & AVAHI_PUBLISH_NO_ANNOUNCE) return; if (!avahi_entry_is_registered(m->server, e, i)) @@ -412,7 +412,7 @@ static void send_goodbye_callback(AvahiInterfaceMonitor *m, AvahiInterface *i, v if (!(g = make_goodbye_record(e->record))) return; /* OOM */ - avahi_interface_post_response(i, g, e->flags & AVAHI_ENTRY_UNIQUE, NULL, 1); + avahi_interface_post_response(i, g, e->flags & AVAHI_PUBLISH_UNIQUE, NULL, 1); avahi_record_unref(g); } |