diff options
Diffstat (limited to 'src/datacache')
-rw-r--r-- | src/datacache/datacache.c | 2 | ||||
-rw-r--r-- | src/datacache/plugin_datacache.h | 5 | ||||
-rw-r--r-- | src/datacache/plugin_datacache_sqlite.c | 10 | ||||
-rw-r--r-- | src/datacache/plugin_datacache_template.c | 10 |
4 files changed, 25 insertions, 2 deletions
diff --git a/src/datacache/datacache.c b/src/datacache/datacache.c index 3b233d16d..afdfb0c4c 100644 --- a/src/datacache/datacache.c +++ b/src/datacache/datacache.c | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file datacache/datacache_api.c | 22 | * @file datacache/datacache.c |
23 | * @brief datacache API implementation | 23 | * @brief datacache API implementation |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
diff --git a/src/datacache/plugin_datacache.h b/src/datacache/plugin_datacache.h index 39119339d..d3768cf44 100644 --- a/src/datacache/plugin_datacache.h +++ b/src/datacache/plugin_datacache.h | |||
@@ -105,7 +105,7 @@ struct GNUNET_DATACACHE_PluginFunctions { | |||
105 | /** | 105 | /** |
106 | * Store an item in the datastore. | 106 | * Store an item in the datastore. |
107 | * | 107 | * |
108 | * @param key key to store data under | 108 | * @param cls closure (internal context for the plugin) |
109 | * @param size number of bytes in data | 109 | * @param size number of bytes in data |
110 | * @param data data to store | 110 | * @param data data to store |
111 | * @param type type of the value | 111 | * @param type type of the value |
@@ -124,9 +124,11 @@ struct GNUNET_DATACACHE_PluginFunctions { | |||
124 | * Iterate over the results for a particular key | 124 | * Iterate over the results for a particular key |
125 | * in the datastore. | 125 | * in the datastore. |
126 | * | 126 | * |
127 | * @param cls closure (internal context for the plugin) | ||
127 | * @param key | 128 | * @param key |
128 | * @param type entries of which type are relevant? | 129 | * @param type entries of which type are relevant? |
129 | * @param iter maybe NULL (to just count) | 130 | * @param iter maybe NULL (to just count) |
131 | * @param iter_cls closure for iter | ||
130 | * @return the number of results found | 132 | * @return the number of results found |
131 | */ | 133 | */ |
132 | unsigned int (*get) (void *cls, | 134 | unsigned int (*get) (void *cls, |
@@ -140,6 +142,7 @@ struct GNUNET_DATACACHE_PluginFunctions { | |||
140 | * Delete the entry with the lowest expiration value | 142 | * Delete the entry with the lowest expiration value |
141 | * from the datacache right now. | 143 | * from the datacache right now. |
142 | * | 144 | * |
145 | * @param cls closure (internal context for the plugin) | ||
143 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 146 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
144 | */ | 147 | */ |
145 | int (*del) (void *cls); | 148 | int (*del) (void *cls); |
diff --git a/src/datacache/plugin_datacache_sqlite.c b/src/datacache/plugin_datacache_sqlite.c index e8ef5cd09..7595211c1 100644 --- a/src/datacache/plugin_datacache_sqlite.c +++ b/src/datacache/plugin_datacache_sqlite.c | |||
@@ -86,6 +86,7 @@ sq_prepare (sqlite3 * dbh, const char *zSql, /* SQL statement, UTF-8 encoded | |||
86 | /** | 86 | /** |
87 | * Store an item in the datastore. | 87 | * Store an item in the datastore. |
88 | * | 88 | * |
89 | * @param cls closure (our "struct Plugin") | ||
89 | * @param key key to store data under | 90 | * @param key key to store data under |
90 | * @param size number of bytes in data | 91 | * @param size number of bytes in data |
91 | * @param data data to store | 92 | * @param data data to store |
@@ -155,9 +156,11 @@ sqlite_plugin_put (void *cls, | |||
155 | * Iterate over the results for a particular key | 156 | * Iterate over the results for a particular key |
156 | * in the datastore. | 157 | * in the datastore. |
157 | * | 158 | * |
159 | * @param cls closure (our "struct Plugin") | ||
158 | * @param key | 160 | * @param key |
159 | * @param type entries of which type are relevant? | 161 | * @param type entries of which type are relevant? |
160 | * @param iter maybe NULL (to just count) | 162 | * @param iter maybe NULL (to just count) |
163 | * @param iter_cls closure for iter | ||
161 | * @return the number of results found | 164 | * @return the number of results found |
162 | */ | 165 | */ |
163 | static unsigned int | 166 | static unsigned int |
@@ -259,6 +262,7 @@ sqlite_plugin_get (void *cls, | |||
259 | * Delete the entry with the lowest expiration value | 262 | * Delete the entry with the lowest expiration value |
260 | * from the datacache right now. | 263 | * from the datacache right now. |
261 | * | 264 | * |
265 | * @param cls closure (our "struct Plugin") | ||
262 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 266 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
263 | */ | 267 | */ |
264 | static int | 268 | static int |
@@ -337,6 +341,9 @@ sqlite_plugin_del (void *cls) | |||
337 | 341 | ||
338 | /** | 342 | /** |
339 | * Entry point for the plugin. | 343 | * Entry point for the plugin. |
344 | * | ||
345 | * @param cls closure (the "struct GNUNET_DATACACHE_PluginEnvironmnet") | ||
346 | * @return the plugin's closure (our "struct Plugin") | ||
340 | */ | 347 | */ |
341 | void * | 348 | void * |
342 | libgnunet_plugin_datacache_sqlite_init (void *cls) | 349 | libgnunet_plugin_datacache_sqlite_init (void *cls) |
@@ -398,6 +405,9 @@ libgnunet_plugin_datacache_sqlite_init (void *cls) | |||
398 | 405 | ||
399 | /** | 406 | /** |
400 | * Exit point from the plugin. | 407 | * Exit point from the plugin. |
408 | * | ||
409 | * @param cls closure (our "struct Plugin") | ||
410 | * @return NULL | ||
401 | */ | 411 | */ |
402 | void * | 412 | void * |
403 | libgnunet_plugin_datacache_sqlite_done (void *cls) | 413 | libgnunet_plugin_datacache_sqlite_done (void *cls) |
diff --git a/src/datacache/plugin_datacache_template.c b/src/datacache/plugin_datacache_template.c index 501284c30..163f72a7a 100644 --- a/src/datacache/plugin_datacache_template.c +++ b/src/datacache/plugin_datacache_template.c | |||
@@ -43,6 +43,7 @@ struct Plugin | |||
43 | /** | 43 | /** |
44 | * Store an item in the datastore. | 44 | * Store an item in the datastore. |
45 | * | 45 | * |
46 | * @param cls closure (our "struct Plugin") | ||
46 | * @param key key to store data under | 47 | * @param key key to store data under |
47 | * @param size number of bytes in data | 48 | * @param size number of bytes in data |
48 | * @param data data to store | 49 | * @param data data to store |
@@ -67,9 +68,11 @@ template_plugin_put (void *cls, | |||
67 | * Iterate over the results for a particular key | 68 | * Iterate over the results for a particular key |
68 | * in the datastore. | 69 | * in the datastore. |
69 | * | 70 | * |
71 | * @param cls closure (our "struct Plugin") | ||
70 | * @param key | 72 | * @param key |
71 | * @param type entries of which type are relevant? | 73 | * @param type entries of which type are relevant? |
72 | * @param iter maybe NULL (to just count) | 74 | * @param iter maybe NULL (to just count) |
75 | * @param iter_cls closure for iter | ||
73 | * @return the number of results found | 76 | * @return the number of results found |
74 | */ | 77 | */ |
75 | static unsigned int | 78 | static unsigned int |
@@ -88,6 +91,7 @@ template_plugin_get (void *cls, | |||
88 | * Delete the entry with the lowest expiration value | 91 | * Delete the entry with the lowest expiration value |
89 | * from the datacache right now. | 92 | * from the datacache right now. |
90 | * | 93 | * |
94 | * @param cls closure (our "struct Plugin") | ||
91 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 95 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
92 | */ | 96 | */ |
93 | static int | 97 | static int |
@@ -100,6 +104,9 @@ template_plugin_del (void *cls) | |||
100 | 104 | ||
101 | /** | 105 | /** |
102 | * Entry point for the plugin. | 106 | * Entry point for the plugin. |
107 | * | ||
108 | * @param cls closure (the "struct GNUNET_DATACACHE_PluginEnvironmnet") | ||
109 | * @return the plugin's closure (our "struct Plugin") | ||
103 | */ | 110 | */ |
104 | void * | 111 | void * |
105 | libgnunet_plugin_datacache_template_init (void *cls) | 112 | libgnunet_plugin_datacache_template_init (void *cls) |
@@ -123,6 +130,9 @@ libgnunet_plugin_datacache_template_init (void *cls) | |||
123 | 130 | ||
124 | /** | 131 | /** |
125 | * Exit point from the plugin. | 132 | * Exit point from the plugin. |
133 | * | ||
134 | * @param cls closure (our "struct Plugin") | ||
135 | * @return NULL | ||
126 | */ | 136 | */ |
127 | void * | 137 | void * |
128 | libgnunet_plugin_datacache_template_done (void *cls) | 138 | libgnunet_plugin_datacache_template_done (void *cls) |