]> git.meshlink.io Git - catta/blobdiff - cache.h
* add announcing/goodbye
[catta] / cache.h
diff --git a/cache.h b/cache.h
index ec0e974ae3122c9908d94f801e12d941b45eae5c..f51e18e6069eeda0fe3f7bf95e3d4bafc2ffa185 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -9,18 +9,20 @@ typedef struct _flxCache flxCache;
 #include "prioq.h"
 #include "server.h"
 #include "llist.h"
+#include "timeeventq.h"
 
 typedef enum {
     FLX_CACHE_VALID,
     FLX_CACHE_EXPIRY1,
     FLX_CACHE_EXPIRY2,
-    FLX_CACHE_EXPIRY3
-        
+    FLX_CACHE_EXPIRY3,
+    FLX_CACHE_FINAL
 } flxCacheEntryState;
 
 typedef struct flxCacheEntry flxCacheEntry;
 
 struct flxCacheEntry {
+    flxCache *cache;
     flxRecord *record;
     GTimeVal timestamp;
     GTimeVal expiry;
@@ -28,15 +30,15 @@ struct flxCacheEntry {
     flxAddress origin;
 
     flxCacheEntryState state;
+    flxTimeEvent *time_event;
 
     FLX_LLIST_FIELDS(flxCacheEntry, by_name);
-
-    flxPrioQueueNode *node;
     
 };
 
 struct _flxCache {
     flxServer *server;
+    
     flxInterface *interface;
     
     GHashTable *hash_table;
@@ -53,4 +55,6 @@ flxCacheEntry *flx_cache_update(flxCache *c, flxRecord *r, gboolean unique, cons
 void flx_cache_drop_key(flxCache *c, flxKey *k);
 void flx_cache_drop_record(flxCache *c,  flxRecord *r);
 
+void flx_cache_dump(flxCache *c, FILE *f);
+
 #endif