diff options
Diffstat (limited to 'src/include/gnunet_datastore_plugin.h')
-rw-r--r-- | src/include/gnunet_datastore_plugin.h | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/src/include/gnunet_datastore_plugin.h b/src/include/gnunet_datastore_plugin.h index f33588bce..b0aa0c6c9 100644 --- a/src/include/gnunet_datastore_plugin.h +++ b/src/include/gnunet_datastore_plugin.h | |||
@@ -92,15 +92,12 @@ struct GNUNET_DATASTORE_PluginEnvironment | |||
92 | * @return GNUNET_OK to keep the item | 92 | * @return GNUNET_OK to keep the item |
93 | * GNUNET_NO to delete the item | 93 | * GNUNET_NO to delete the item |
94 | */ | 94 | */ |
95 | typedef int (*PluginDatumProcessor) (void *cls, | 95 | typedef int (*PluginDatumProcessor) (void *cls, const GNUNET_HashCode * key, |
96 | const GNUNET_HashCode * key, | 96 | uint32_t size, const void *data, |
97 | uint32_t size, | ||
98 | const void *data, | ||
99 | enum GNUNET_BLOCK_Type type, | 97 | enum GNUNET_BLOCK_Type type, |
100 | uint32_t priority, | 98 | uint32_t priority, uint32_t anonymity, |
101 | uint32_t anonymity, | 99 | struct GNUNET_TIME_Absolute expiration, |
102 | struct GNUNET_TIME_Absolute | 100 | uint64_t uid); |
103 | expiration, uint64_t uid); | ||
104 | 101 | ||
105 | /** | 102 | /** |
106 | * Get an estimate of how much space the database is | 103 | * Get an estimate of how much space the database is |
@@ -130,13 +127,9 @@ typedef unsigned long long (*PluginEstimateSize) (void *cls); | |||
130 | * @return GNUNET_OK on success, | 127 | * @return GNUNET_OK on success, |
131 | * GNUNET_SYSERR on failure | 128 | * GNUNET_SYSERR on failure |
132 | */ | 129 | */ |
133 | typedef int (*PluginPut) (void *cls, | 130 | typedef int (*PluginPut) (void *cls, const GNUNET_HashCode * key, uint32_t size, |
134 | const GNUNET_HashCode * key, | 131 | const void *data, enum GNUNET_BLOCK_Type type, |
135 | uint32_t size, | 132 | uint32_t priority, uint32_t anonymity, |
136 | const void *data, | ||
137 | enum GNUNET_BLOCK_Type type, | ||
138 | uint32_t priority, | ||
139 | uint32_t anonymity, | ||
140 | uint32_t replication, | 133 | uint32_t replication, |
141 | struct GNUNET_TIME_Absolute expiration, char **msg); | 134 | struct GNUNET_TIME_Absolute expiration, char **msg); |
142 | 135 | ||
@@ -159,8 +152,7 @@ typedef int (*PluginPut) (void *cls, | |||
159 | * proc should be called with NULL if there is no result | 152 | * proc should be called with NULL if there is no result |
160 | * @param proc_cls closure for proc | 153 | * @param proc_cls closure for proc |
161 | */ | 154 | */ |
162 | typedef void (*PluginGetKey) (void *cls, | 155 | typedef void (*PluginGetKey) (void *cls, uint64_t offset, |
163 | uint64_t offset, | ||
164 | const GNUNET_HashCode * key, | 156 | const GNUNET_HashCode * key, |
165 | const GNUNET_HashCode * vhash, | 157 | const GNUNET_HashCode * vhash, |
166 | enum GNUNET_BLOCK_Type type, | 158 | enum GNUNET_BLOCK_Type type, |
@@ -178,8 +170,8 @@ typedef void (*PluginGetKey) (void *cls, | |||
178 | * @param proc function to call the value (once only). | 170 | * @param proc function to call the value (once only). |
179 | * @param proc_cls closure for proc | 171 | * @param proc_cls closure for proc |
180 | */ | 172 | */ |
181 | typedef void (*PluginGetRandom) (void *cls, | 173 | typedef void (*PluginGetRandom) (void *cls, PluginDatumProcessor proc, |
182 | PluginDatumProcessor proc, void *proc_cls); | 174 | void *proc_cls); |
183 | 175 | ||
184 | 176 | ||
185 | /** | 177 | /** |
@@ -205,9 +197,7 @@ typedef void (*PluginGetRandom) (void *cls, | |||
205 | * @param msg set to an error message (on error) | 197 | * @param msg set to an error message (on error) |
206 | * @return GNUNET_OK on success | 198 | * @return GNUNET_OK on success |
207 | */ | 199 | */ |
208 | typedef int (*PluginUpdate) (void *cls, | 200 | typedef int (*PluginUpdate) (void *cls, uint64_t uid, int delta, |
209 | uint64_t uid, | ||
210 | int delta, | ||
211 | struct GNUNET_TIME_Absolute expire, char **msg); | 201 | struct GNUNET_TIME_Absolute expire, char **msg); |
212 | 202 | ||
213 | 203 | ||
@@ -223,8 +213,7 @@ typedef int (*PluginUpdate) (void *cls, | |||
223 | * @param proc function to call on the matching value | 213 | * @param proc function to call on the matching value |
224 | * @param proc_cls closure for proc | 214 | * @param proc_cls closure for proc |
225 | */ | 215 | */ |
226 | typedef void (*PluginGetType) (void *cls, | 216 | typedef void (*PluginGetType) (void *cls, uint64_t offset, |
227 | uint64_t offset, | ||
228 | enum GNUNET_BLOCK_Type type, | 217 | enum GNUNET_BLOCK_Type type, |
229 | PluginDatumProcessor proc, void *proc_cls); | 218 | PluginDatumProcessor proc, void *proc_cls); |
230 | 219 | ||