aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_datacache_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_datacache_plugin.h')
-rw-r--r--src/include/gnunet_datacache_plugin.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/include/gnunet_datacache_plugin.h b/src/include/gnunet_datacache_plugin.h
index cdacd474b..c7ce0bef1 100644
--- a/src/include/gnunet_datacache_plugin.h
+++ b/src/include/gnunet_datacache_plugin.h
@@ -45,9 +45,9 @@ extern "C"
45 * @param key key of the content that was deleted 45 * @param key key of the content that was deleted
46 * @param size number of bytes that were made available 46 * @param size number of bytes that were made available
47 */ 47 */
48typedef void (*GNUNET_DATACACHE_DeleteNotifyCallback)(void *cls, 48typedef void (*GNUNET_DATACACHE_DeleteNotifyCallback) (void *cls,
49 const GNUNET_HashCode *key, 49 const GNUNET_HashCode *
50 size_t size); 50 key, size_t size);
51 51
52 52
53/** 53/**
@@ -57,7 +57,7 @@ typedef void (*GNUNET_DATACACHE_DeleteNotifyCallback)(void *cls,
57 */ 57 */
58struct GNUNET_DATACACHE_PluginEnvironment 58struct GNUNET_DATACACHE_PluginEnvironment
59{ 59{
60 60
61 61
62 /** 62 /**
63 * Configuration to use. 63 * Configuration to use.
@@ -91,11 +91,12 @@ struct GNUNET_DATACACHE_PluginEnvironment
91/** 91/**
92 * @brief struct returned by the initialization function of the plugin 92 * @brief struct returned by the initialization function of the plugin
93 */ 93 */
94struct GNUNET_DATACACHE_PluginFunctions { 94struct GNUNET_DATACACHE_PluginFunctions
95{
95 96
96 /** 97 /**
97 * Closure to pass to all plugin functions. 98 * Closure to pass to all plugin functions.
98 */ 99 */
99 void *cls; 100 void *cls;
100 101
101 /** 102 /**
@@ -108,12 +109,12 @@ struct GNUNET_DATACACHE_PluginFunctions {
108 * @param discard_time when to discard the value in any case 109 * @param discard_time when to discard the value in any case
109 * @return 0 on error, number of bytes used otherwise 110 * @return 0 on error, number of bytes used otherwise
110 */ 111 */
111 size_t (*put) (void *cls, 112 size_t (*put) (void *cls,
112 const GNUNET_HashCode * key, 113 const GNUNET_HashCode * key,
113 size_t size, 114 size_t size,
114 const char *data, 115 const char *data,
115 enum GNUNET_BLOCK_Type type, 116 enum GNUNET_BLOCK_Type type,
116 struct GNUNET_TIME_Absolute discard_time); 117 struct GNUNET_TIME_Absolute discard_time);
117 118
118 119
119 /** 120 /**
@@ -128,10 +129,9 @@ struct GNUNET_DATACACHE_PluginFunctions {
128 * @return the number of results found 129 * @return the number of results found
129 */ 130 */
130 unsigned int (*get) (void *cls, 131 unsigned int (*get) (void *cls,
131 const GNUNET_HashCode * key, 132 const GNUNET_HashCode * key,
132 enum GNUNET_BLOCK_Type type, 133 enum GNUNET_BLOCK_Type type,
133 GNUNET_DATACACHE_Iterator iter, 134 GNUNET_DATACACHE_Iterator iter, void *iter_cls);
134 void *iter_cls);
135 135
136 136
137 /** 137 /**
@@ -140,7 +140,7 @@ struct GNUNET_DATACACHE_PluginFunctions {
140 * 140 *
141 * @param cls closure (internal context for the plugin) 141 * @param cls closure (internal context for the plugin)
142 * @return GNUNET_OK on success, GNUNET_SYSERR on error 142 * @return GNUNET_OK on success, GNUNET_SYSERR on error
143 */ 143 */
144 int (*del) (void *cls); 144 int (*del) (void *cls);
145 145
146 146