X-Git-Url: http://the.earth.li/gitweb/?p=onak.git;a=blobdiff_plain;f=hash.h;h=cd9363a8b3f5179a2b8a28f911b16a3b2edd51ca;hp=b7caa1a5d74f3fa0027d16654237e8fee6f4669b;hb=743957a08f068529d3add3e8485678b4e5034195;hpb=4b8483ae278577a3adc8d84da81d77019704466f diff --git a/hash.h b/hash.h index b7caa1a..cd9363a 100644 --- a/hash.h +++ b/hash.h @@ -1,14 +1,25 @@ /* * hash.h - hashing routines mainly used for caching key details. * - * Jonathan McDowell + * Copyright 2000-2002 Jonathan McDowell * - * Copyright 2000-2002 Project Purple + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; version 2 of the License. + * + * This program 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 General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ #ifndef __HASH_H__ #define __HASH_H__ +#include "keystructs.h" #include "ll.h" #include "stats.h" @@ -23,6 +34,14 @@ */ void inithash(void); +/** + * destroyhash - Clean up the hash after use. + * + * This function destroys the hash after use, freeing any memory that was + * used during its lifetime. + */ +void destroyhash(void); + /** * addtohash - Adds a key to the hash. * @key: The key to add. @@ -63,16 +82,6 @@ unsigned long hashelements(void); * Gets a particular entry from the hash. Useful for doing something over * all entries in the hash. */ -struct ll *gethashtableentry(int entry); - -/** - * hash_getkeysigs - Gets the signatures on a key. - * @keyid: The key we want the signatures for. - * - * This function gets the signatures on a key. It's the same as the - * getkeysigs function from the keydb module except we also cache the data - * so that if we need it again we already have it available. - */ -struct ll *hash_getkeysigs(uint64_t keyid); +struct ll *gethashtableentry(unsigned int entry); #endif /* __HASH_H__ */