From c58379bde376cb2298fca14f83a86626f1b76f2f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 7 May 2005 13:37:03 +0000 Subject: rename libavahi-core to avahi-core git-svn-id: file:///home/lennart/svn/public/avahi/trunk@57 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- libavahi-core/cache.h | 87 --------------------------------------------------- 1 file changed, 87 deletions(-) delete mode 100644 libavahi-core/cache.h (limited to 'libavahi-core/cache.h') diff --git a/libavahi-core/cache.h b/libavahi-core/cache.h deleted file mode 100644 index d64b3ee..0000000 --- a/libavahi-core/cache.h +++ /dev/null @@ -1,87 +0,0 @@ -#ifndef foocachehfoo -#define foocachehfoo - -/* $Id$ */ - -/*** - This file is part of avahi. - - avahi is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - avahi is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General - Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with avahi; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - USA. -***/ - -#include - -struct _AvahiCache; -typedef struct _AvahiCache AvahiCache; - -#include "prioq.h" -#include "server.h" -#include "llist.h" -#include "timeeventq.h" - -typedef enum { - AVAHI_CACHE_VALID, - AVAHI_CACHE_EXPIRY1, - AVAHI_CACHE_EXPIRY2, - AVAHI_CACHE_EXPIRY3, - AVAHI_CACHE_FINAL -} AvahiCacheEntryState; - -typedef struct AvahiCacheEntry AvahiCacheEntry; - -struct AvahiCacheEntry { - AvahiCache *cache; - AvahiRecord *record; - GTimeVal timestamp; - GTimeVal expiry; - - AvahiAddress origin; - - AvahiCacheEntryState state; - AvahiTimeEvent *time_event; - - AVAHI_LLIST_FIELDS(AvahiCacheEntry, by_key); - AVAHI_LLIST_FIELDS(AvahiCacheEntry, entry); -}; - -struct _AvahiCache { - AvahiServer *server; - - AvahiInterface *interface; - - GHashTable *hash_table; - - AVAHI_LLIST_HEAD(AvahiCacheEntry, entries); -}; - -AvahiCache *avahi_cache_new(AvahiServer *server, AvahiInterface *interface); -void avahi_cache_free(AvahiCache *c); - -AvahiCacheEntry *avahi_cache_lookup_key(AvahiCache *c, AvahiKey *k); -AvahiCacheEntry *avahi_cache_lookup_record(AvahiCache *c, AvahiRecord *r); - -void avahi_cache_update(AvahiCache *c, AvahiRecord *r, gboolean unique, const AvahiAddress *a); - -void avahi_cache_drop_record(AvahiCache *c, AvahiRecord *r); - -void avahi_cache_dump(AvahiCache *c, FILE *f); - -typedef gpointer AvahiCacheWalkCallback(AvahiCache *c, AvahiKey *pattern, AvahiCacheEntry *e, gpointer userdata); -gpointer avahi_cache_walk(AvahiCache *c, AvahiKey *pattern, AvahiCacheWalkCallback cb, gpointer userdata); - -gboolean avahi_cache_entry_half_ttl(AvahiCache *c, AvahiCacheEntry *e); - -#endif -- cgit