diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-03-26 13:58:11 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-03-26 13:58:11 +0000 |
commit | 8e7f83aa5b6d910e80c56b31f4eb79b02e7ca67b (patch) | |
tree | 6a2da3b54fe17c82a998254d35b3c5d562e21ac4 /subscribe.h | |
parent | ad1f9d3725a300f10eca071c6fe2f2c583f51436 (diff) |
* add subscription feature - with reissuing
* interpret goodbye responses
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@17 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'subscribe.h')
-rw-r--r-- | subscribe.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/subscribe.h b/subscribe.h new file mode 100644 index 0000000..75818c7 --- /dev/null +++ b/subscribe.h @@ -0,0 +1,39 @@ +#ifndef foosubscribehfoo +#define foosubscribehfoo + +typedef struct _flxSubscription flxSubscription; + +#include "llist.h" +#include "server.h" + +typedef enum { + FLX_SUBSCRIPTION_NEW, + FLX_SUBSCRIPTION_REMOVE, + FLX_SUBSCRIPTION_CHANGE +} flxSubscriptionEvent; + +typedef void (*flxSubscriptionCallback)(flxSubscription *s, flxRecord *record, gint interface, guchar protocol, flxSubscriptionEvent event, gpointer userdata); + +struct _flxSubscription { + flxServer *server; + flxKey *key; + gint interface; + guchar protocol; + gint n_query; + guint sec_delay; + + flxTimeEvent *time_event; + + flxSubscriptionCallback callback; + gpointer userdata; + + FLX_LLIST_FIELDS(flxSubscription, subscriptions); + FLX_LLIST_FIELDS(flxSubscription, by_key); +}; + +flxSubscription *flx_subscription_new(flxServer *s, flxKey *key, gint interface, guchar protocol, flxSubscriptionCallback callback, gpointer userdata); +void flx_subscription_free(flxSubscription *s); + +void flx_subscription_notify(flxServer *s, flxInterface *i, flxRecord *record, flxSubscriptionEvent event); + +#endif |