diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-03-24 21:52:46 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-03-24 21:52:46 +0000 |
commit | c8dd2dc8f91a322178c43281cbc5c8fc16da5219 (patch) | |
tree | 296eb55385d7f4af705af0fc71068a9201549888 /cache.h | |
parent | c18626ad35cdf94edbff196070ccbb6ae825abd0 (diff) |
* add cache management
* add support for SRV records
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@15 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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,10 +30,9 @@ struct flxCacheEntry { flxAddress origin; flxCacheEntryState state; + flxTimeEvent *time_event; FLX_LLIST_FIELDS(flxCacheEntry, by_name); - - flxPrioQueueNode *node; }; @@ -39,11 +40,12 @@ struct _flxCache { flxServer *server; flxInterface *interface; + guchar protocol; GHashTable *hash_table; }; -flxCache *flx_cache_new(flxServer *server, flxInterface *interface); +flxCache *flx_cache_new(flxServer *server, flxInterface *interface, guchar protocol); void flx_cache_free(flxCache *c); flxCacheEntry *flx_cache_lookup_key(flxCache *c, flxKey *k); |