diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-10-04 08:17:52 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-10-04 08:17:52 +0000 |
commit | a9e1af3613a7fff3edde2362cb235acb63cfd350 (patch) | |
tree | f10428560bad378e7f1143f6ff7905c066ed5d9e /src/include/gnunet_container_lib.h | |
parent | 5fc9d7e6702ff300f5bce13352811962145b0383 (diff) | |
download | gnunet-a9e1af3613a7fff3edde2362cb235acb63cfd350.tar.gz gnunet-a9e1af3613a7fff3edde2362cb235acb63cfd350.zip |
improved bf api
Diffstat (limited to 'src/include/gnunet_container_lib.h')
-rw-r--r-- | src/include/gnunet_container_lib.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h index b19dd52dc..e0f47c78d 100644 --- a/src/include/gnunet_container_lib.h +++ b/src/include/gnunet_container_lib.h | |||
@@ -111,7 +111,7 @@ GNUNET_CONTAINER_bloomfilter_init (const | |||
111 | * @param size the size of the given data array | 111 | * @param size the size of the given data array |
112 | * @return GNUNET_SYSERR if the data array of the wrong size | 112 | * @return GNUNET_SYSERR if the data array of the wrong size |
113 | */ | 113 | */ |
114 | int GNUNET_CONTAINER_bloomfilter_get_raw_data (struct | 114 | int GNUNET_CONTAINER_bloomfilter_get_raw_data (const struct |
115 | GNUNET_CONTAINER_BloomFilter | 115 | GNUNET_CONTAINER_BloomFilter |
116 | *bf, char *data, | 116 | *bf, char *data, |
117 | size_t size); | 117 | size_t size); |
@@ -122,7 +122,7 @@ int GNUNET_CONTAINER_bloomfilter_get_raw_data (struct | |||
122 | * @param bf the filter | 122 | * @param bf the filter |
123 | * @return GNUNET_YES if the element is in the filter, GNUNET_NO if not | 123 | * @return GNUNET_YES if the element is in the filter, GNUNET_NO if not |
124 | */ | 124 | */ |
125 | int GNUNET_CONTAINER_bloomfilter_test (struct GNUNET_CONTAINER_BloomFilter | 125 | int GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter |
126 | *bf, const GNUNET_HashCode * e); | 126 | *bf, const GNUNET_HashCode * e); |
127 | 127 | ||
128 | /** | 128 | /** |
@@ -150,6 +150,18 @@ void GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter | |||
150 | void GNUNET_CONTAINER_bloomfilter_free (struct GNUNET_CONTAINER_BloomFilter | 150 | void GNUNET_CONTAINER_bloomfilter_free (struct GNUNET_CONTAINER_BloomFilter |
151 | *bf); | 151 | *bf); |
152 | 152 | ||
153 | |||
154 | /** | ||
155 | * Get size of the bloom filter. | ||
156 | * | ||
157 | * @param bf the filter | ||
158 | * @return number of bytes used for the data of the bloom filter | ||
159 | */ | ||
160 | size_t | ||
161 | GNUNET_CONTAINER_bloomfilter_get_size (const struct GNUNET_CONTAINER_BloomFilter | ||
162 | *bf); | ||
163 | |||
164 | |||
153 | /** | 165 | /** |
154 | * Reset a bloom filter to empty. | 166 | * Reset a bloom filter to empty. |
155 | * @param bf the filter | 167 | * @param bf the filter |