]> git.meshlink.io Git - catta/blob - subscribe.h
fix two memory leaks
[catta] / subscribe.h
1 #ifndef foosubscribehfoo
2 #define foosubscribehfoo
3
4 #include "llist.h"
5 #include "flx.h"
6 #include "subscribe.h"
7 #include "timeeventq.h"
8 #include "server.h"
9
10 struct _flxSubscription {
11     flxServer *server;
12     flxKey *key;
13     gint interface;
14     guchar protocol;
15     gint n_query;
16     guint sec_delay;
17
18     flxTimeEvent *time_event;
19
20     flxSubscriptionCallback callback;
21     gpointer userdata;
22
23     FLX_LLIST_FIELDS(flxSubscription, subscriptions);
24     FLX_LLIST_FIELDS(flxSubscription, by_key);
25 };
26
27 void flx_subscription_notify(flxServer *s, flxInterface *i, flxRecord *record, flxSubscriptionEvent event);
28
29 gboolean flx_is_subscribed(flxServer *s, flxKey *k);
30
31 #endif