]> git.meshlink.io Git - catta/blobdiff - subscribe.h
Rename flx_* to avahi_*
[catta] / subscribe.h
index 6520433c50b0c721a91775d7603369674e49ec24..3ea0d8a4eed61ef3f425f490791eb1f17eb129b6 100644 (file)
@@ -1,41 +1,31 @@
 #ifndef foosubscribehfoo
 #define foosubscribehfoo
 
-typedef struct _flxSubscription flxSubscription;
-
 #include "llist.h"
+#include "Avahi.h"
+#include "subscribe.h"
+#include "timeeventq.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;
+struct _AvahiSubscription {
+    AvahiServer *server;
+    AvahiKey *key;
     gint interface;
     guchar protocol;
     gint n_query;
     guint sec_delay;
 
-    flxTimeEvent *time_event;
+    AvahiTimeEvent *time_event;
 
-    flxSubscriptionCallback callback;
+    AvahiSubscriptionCallback callback;
     gpointer userdata;
 
-    FLX_LLIST_FIELDS(flxSubscription, subscriptions);
-    FLX_LLIST_FIELDS(flxSubscription, by_key);
+    AVAHI_LLIST_FIELDS(AvahiSubscription, subscriptions);
+    AVAHI_LLIST_FIELDS(AvahiSubscription, 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);
+void avahi_subscription_notify(AvahiServer *s, AvahiInterface *i, AvahiRecord *record, AvahiSubscriptionEvent event);
 
-gboolean flx_is_subscribed(flxServer *s, flxKey *k);
+gboolean avahi_is_subscribed(AvahiServer *s, AvahiKey *k);
 
 #endif