]> git.meshlink.io Git - catta/blobdiff - server.h
add client part of probing
[catta] / server.h
index 63f2bf6557704d4ae32fae456c5fba070a17c469..f90bfe77aaa11e009ca7b63f2e884417502cb74b 100644 (file)
--- a/server.h
+++ b/server.h
@@ -1,32 +1,29 @@
 #ifndef fooflxserverhfoo
 #define fooflxserverhfoo
 
-typedef struct _flxEntry flxEntry;
-typedef struct _flxResponseJob flxResponseJob;
+typedef struct _flxServerEntry flxServerEntry;
 
 #include "flx.h"
 #include "iface.h"
 #include "prioq.h"
 #include "llist.h"
 #include "timeeventq.h"
+#include "announce.h"
+#include "subscribe.h"
 
-struct _flxEntry {
+struct _flxServerEntry {
     flxRecord *record;
     gint id;
     gint interface;
     guchar protocol;
 
-    gboolean unique;
+    flxServerEntryFlags flags;
 
-    FLX_LLIST_FIELDS(flxEntry, entry);
-    FLX_LLIST_FIELDS(flxEntry, by_name);
-    FLX_LLIST_FIELDS(flxEntry, by_id);
-};
-
-struct _flxResponseJob {
-    flxTimeEvent *time_event;
-    flxRecord *record;
-    FLX_LLIST_FIELDS(flxResponseJob, response);
+    FLX_LLIST_FIELDS(flxServerEntry, entry);
+    FLX_LLIST_FIELDS(flxServerEntry, by_key);
+    FLX_LLIST_FIELDS(flxServerEntry, by_id);
+    
+    FLX_LLIST_HEAD(flxAnnouncement, announcements);
 };
 
 struct _flxServer {
@@ -35,10 +32,12 @@ struct _flxServer {
 
     gint current_id;
     
+    FLX_LLIST_HEAD(flxServerEntry, entries);
     GHashTable *rrset_by_id;
-    GHashTable *rrset_by_name;
+    GHashTable *rrset_by_key;
 
-    FLX_LLIST_HEAD(flxEntry, entries);
+    FLX_LLIST_HEAD(flxSubscription, subscriptions);
+    GHashTable *subscription_hashtable;
 
     flxTimeEventQueue *time_event_queue;
     
@@ -51,5 +50,6 @@ struct _flxServer {
     
 };
 
+gboolean flx_server_entry_match_interface(flxServerEntry *e, flxInterface *i);
 
 #endif