diff options
Diffstat (limited to 'src/include/gnunet_datacache_plugin.h')
-rw-r--r-- | src/include/gnunet_datacache_plugin.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/include/gnunet_datacache_plugin.h b/src/include/gnunet_datacache_plugin.h index fbfcdf1..2e07501 100644 --- a/src/include/gnunet_datacache_plugin.h +++ b/src/include/gnunet_datacache_plugin.h @@ -46,7 +46,7 @@ extern "C" * @param size number of bytes that were made available */ typedef void (*GNUNET_DATACACHE_DeleteNotifyCallback) (void *cls, - const GNUNET_HashCode * + const struct GNUNET_HashCode * key, size_t size); @@ -107,11 +107,15 @@ struct GNUNET_DATACACHE_PluginFunctions * @param data data to store * @param type type of the value * @param discard_time when to discard the value in any case - * @return 0 on error, number of bytes used otherwise + * @param path_info_len number of entries in 'path_info' + * @param path_info a path through the network + * @return 0 if duplicate, -1 on error, number of bytes used otherwise */ - size_t (*put) (void *cls, const GNUNET_HashCode * key, size_t size, - const char *data, enum GNUNET_BLOCK_Type type, - struct GNUNET_TIME_Absolute discard_time); + ssize_t (*put) (void *cls, const struct GNUNET_HashCode * key, size_t size, + const char *data, enum GNUNET_BLOCK_Type type, + struct GNUNET_TIME_Absolute discard_time, + unsigned int path_info_len, + const struct GNUNET_PeerIdentity *path_info); /** @@ -125,7 +129,7 @@ struct GNUNET_DATACACHE_PluginFunctions * @param iter_cls closure for iter * @return the number of results found */ - unsigned int (*get) (void *cls, const GNUNET_HashCode * key, + unsigned int (*get) (void *cls, const struct GNUNET_HashCode * key, enum GNUNET_BLOCK_Type type, GNUNET_DATACACHE_Iterator iter, void *iter_cls); |