aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/plugin_datastore_template.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/datastore/plugin_datastore_template.c')
-rw-r--r--src/datastore/plugin_datastore_template.c42
1 files changed, 31 insertions, 11 deletions
diff --git a/src/datastore/plugin_datastore_template.c b/src/datastore/plugin_datastore_template.c
index 1e3d4343b..4c8f9e1f9 100644
--- a/src/datastore/plugin_datastore_template.c
+++ b/src/datastore/plugin_datastore_template.c
@@ -82,6 +82,25 @@ template_plugin_put (void *cls,
82 82
83 83
84/** 84/**
85 * Function invoked on behalf of a "PluginIterator"
86 * asking the database plugin to call the iterator
87 * with the next item.
88 *
89 * @param next_cls whatever argument was given
90 * to the PluginIterator as "next_cls".
91 * @param end_it set to GNUNET_YES if we
92 * should terminate the iteration early
93 * (iterator should be still called once more
94 * to signal the end of the iteration).
95 */
96static void
97template_next_request (void *next_cls,
98 int end_it)
99{
100}
101
102
103/**
85 * Iterate over the results for a particular key 104 * Iterate over the results for a particular key
86 * in the datastore. 105 * in the datastore.
87 * 106 *
@@ -100,10 +119,10 @@ template_plugin_put (void *cls,
100 */ 119 */
101static void 120static void
102template_plugin_get (void *cls, 121template_plugin_get (void *cls,
103 const GNUNET_HashCode * key, 122 const GNUNET_HashCode * key,
104 const GNUNET_HashCode * vhash, 123 const GNUNET_HashCode * vhash,
105 uint32_t type, 124 uint32_t type,
106 GNUNET_DATASTORE_Iterator iter, void *iter_cls) 125 PluginIterator iter, void *iter_cls)
107{ 126{
108} 127}
109 128
@@ -153,9 +172,9 @@ template_plugin_update (void *cls,
153 */ 172 */
154static void 173static void
155template_plugin_iter_low_priority (void *cls, 174template_plugin_iter_low_priority (void *cls,
156 uint32_t type, 175 uint32_t type,
157 GNUNET_DATASTORE_Iterator iter, 176 PluginIterator iter,
158 void *iter_cls) 177 void *iter_cls)
159{ 178{
160} 179}
161 180
@@ -174,7 +193,7 @@ template_plugin_iter_low_priority (void *cls,
174static void 193static void
175template_plugin_iter_zero_anonymity (void *cls, 194template_plugin_iter_zero_anonymity (void *cls,
176 uint32_t type, 195 uint32_t type,
177 GNUNET_DATASTORE_Iterator iter, 196 PluginIterator iter,
178 void *iter_cls) 197 void *iter_cls)
179{ 198{
180} 199}
@@ -194,7 +213,7 @@ template_plugin_iter_zero_anonymity (void *cls,
194static void 213static void
195template_plugin_iter_ascending_expiration (void *cls, 214template_plugin_iter_ascending_expiration (void *cls,
196 uint32_t type, 215 uint32_t type,
197 GNUNET_DATASTORE_Iterator iter, 216 PluginIterator iter,
198 void *iter_cls) 217 void *iter_cls)
199{ 218{
200} 219}
@@ -214,7 +233,7 @@ template_plugin_iter_ascending_expiration (void *cls,
214static void 233static void
215template_plugin_iter_migration_order (void *cls, 234template_plugin_iter_migration_order (void *cls,
216 uint32_t type, 235 uint32_t type,
217 GNUNET_DATASTORE_Iterator iter, 236 PluginIterator iter,
218 void *iter_cls) 237 void *iter_cls)
219{ 238{
220} 239}
@@ -234,7 +253,7 @@ template_plugin_iter_migration_order (void *cls,
234static void 253static void
235template_plugin_iter_all_now (void *cls, 254template_plugin_iter_all_now (void *cls,
236 uint32_t type, 255 uint32_t type,
237 GNUNET_DATASTORE_Iterator iter, 256 PluginIterator iter,
238 void *iter_cls) 257 void *iter_cls)
239{ 258{
240} 259}
@@ -265,6 +284,7 @@ libgnunet_plugin_datastore_template_init (void *cls)
265 api->cls = plugin; 284 api->cls = plugin;
266 api->get_size = &template_plugin_get_size; 285 api->get_size = &template_plugin_get_size;
267 api->put = &template_plugin_put; 286 api->put = &template_plugin_put;
287 api->next_request = &template_next_request;
268 api->get = &template_plugin_get; 288 api->get = &template_plugin_get;
269 api->update = &template_plugin_update; 289 api->update = &template_plugin_update;
270 api->iter_low_priority = &template_plugin_iter_low_priority; 290 api->iter_low_priority = &template_plugin_iter_low_priority;