projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
getting mysql to work
[oweals/gnunet.git]
/
src
/
datastore
/
plugin_datastore_template.c
diff --git
a/src/datastore/plugin_datastore_template.c
b/src/datastore/plugin_datastore_template.c
index 4c8f9e1f9e57a1f91f2cc3c86f4fa85a264c74f7..f736dcf20c852ef5ca0d350bfc591c9f8cc3d29e 100644
(file)
--- a/
src/datastore/plugin_datastore_template.c
+++ b/
src/datastore/plugin_datastore_template.c
@@
-4,7
+4,7
@@
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version
2
, or (at your
+ by the Free Software Foundation; either version
3
, or (at your
option) any later version.
GNUnet is distributed in the hope that it will be useful, but
option) any later version.
GNUnet is distributed in the hope that it will be useful, but
@@
-43,10
+43,13
@@
struct Plugin
/**
* Get an estimate of how much space the database is
* currently using.
/**
* Get an estimate of how much space the database is
* currently using.
+ *
+ * @param cls our "struct Plugin*"
* @return number of bytes used on disk
*/
static unsigned long long template_plugin_get_size (void *cls)
{
* @return number of bytes used on disk
*/
static unsigned long long template_plugin_get_size (void *cls)
{
+ GNUNET_break (0);
return 0;
}
return 0;
}
@@
-67,15
+70,16
@@
static unsigned long long template_plugin_get_size (void *cls)
*/
static int
template_plugin_put (void *cls,
*/
static int
template_plugin_put (void *cls,
- const GNUNET_HashCode * key,
- uint32_t size,
- const void *data,
-
uint32_t
type,
- uint32_t priority,
- uint32_t anonymity,
+
const GNUNET_HashCode * key,
+
uint32_t size,
+
const void *data,
+
enum GNUNET_BLOCK_Type
type,
+
uint32_t priority,
+
uint32_t anonymity,
struct GNUNET_TIME_Absolute expiration,
char **msg)
{
struct GNUNET_TIME_Absolute expiration,
char **msg)
{
+ GNUNET_break (0);
*msg = GNUNET_strdup ("not implemented");
return GNUNET_SYSERR;
}
*msg = GNUNET_strdup ("not implemented");
return GNUNET_SYSERR;
}
@@
-94,9
+98,10
@@
template_plugin_put (void *cls,
* to signal the end of the iteration).
*/
static void
* to signal the end of the iteration).
*/
static void
-template_next_request (void *next_cls,
+template_
plugin_
next_request (void *next_cls,
int end_it)
{
int end_it)
{
+ GNUNET_break (0);
}
}
@@
-121,9
+126,10
@@
static void
template_plugin_get (void *cls,
const GNUNET_HashCode * key,
const GNUNET_HashCode * vhash,
template_plugin_get (void *cls,
const GNUNET_HashCode * key,
const GNUNET_HashCode * vhash,
-
uint32_t
type,
+
enum GNUNET_BLOCK_Type
type,
PluginIterator iter, void *iter_cls)
{
PluginIterator iter, void *iter_cls)
{
+ GNUNET_break (0);
}
}
@@
-138,6
+144,7
@@
template_plugin_get (void *cls,
* Note that it is possible for multiple values to match this put.
* In that case, all of the respective values are updated.
*
* Note that it is possible for multiple values to match this put.
* In that case, all of the respective values are updated.
*
+ * @param cls our "struct Plugin*"
* @param uid unique identifier of the datum
* @param delta by how much should the priority
* change? If priority + delta < 0 the
* @param uid unique identifier of the datum
* @param delta by how much should the priority
* change? If priority + delta < 0 the
@@
-151,10
+158,11
@@
template_plugin_get (void *cls,
*/
static int
template_plugin_update (void *cls,
*/
static int
template_plugin_update (void *cls,
- u
nsigned long long
uid,
+ u
int64_t
uid,
int delta, struct GNUNET_TIME_Absolute expire,
char **msg)
{
int delta, struct GNUNET_TIME_Absolute expire,
char **msg)
{
+ GNUNET_break (0);
*msg = GNUNET_strdup ("not implemented");
return GNUNET_SYSERR;
}
*msg = GNUNET_strdup ("not implemented");
return GNUNET_SYSERR;
}
@@
-164,6
+172,7
@@
template_plugin_update (void *cls,
* Select a subset of the items in the datastore and call
* the given iterator for each of them.
*
* Select a subset of the items in the datastore and call
* the given iterator for each of them.
*
+ * @param cls our "struct Plugin*"
* @param type entries of which type should be considered?
* Use 0 for any type.
* @param iter function to call on each matching value;
* @param type entries of which type should be considered?
* Use 0 for any type.
* @param iter function to call on each matching value;
@@
-172,10
+181,11
@@
template_plugin_update (void *cls,
*/
static void
template_plugin_iter_low_priority (void *cls,
*/
static void
template_plugin_iter_low_priority (void *cls,
-
uint32_t
type,
+
enum GNUNET_BLOCK_Type
type,
PluginIterator iter,
void *iter_cls)
{
PluginIterator iter,
void *iter_cls)
{
+ GNUNET_break (0);
}
}
@@
-184,6
+194,7
@@
template_plugin_iter_low_priority (void *cls,
* Select a subset of the items in the datastore and call
* the given iterator for each of them.
*
* Select a subset of the items in the datastore and call
* the given iterator for each of them.
*
+ * @param cls our "struct Plugin*"
* @param type entries of which type should be considered?
* Use 0 for any type.
* @param iter function to call on each matching value;
* @param type entries of which type should be considered?
* Use 0 for any type.
* @param iter function to call on each matching value;
@@
-192,10
+203,11
@@
template_plugin_iter_low_priority (void *cls,
*/
static void
template_plugin_iter_zero_anonymity (void *cls,
*/
static void
template_plugin_iter_zero_anonymity (void *cls,
-
uint32_t
type,
- PluginIterator iter,
- void *iter_cls)
+
enum GNUNET_BLOCK_Type
type,
+
PluginIterator iter,
+
void *iter_cls)
{
{
+ GNUNET_break (0);
}
}
@@
-204,6
+216,7
@@
template_plugin_iter_zero_anonymity (void *cls,
* Select a subset of the items in the datastore and call
* the given iterator for each of them.
*
* Select a subset of the items in the datastore and call
* the given iterator for each of them.
*
+ * @param cls our "struct Plugin*"
* @param type entries of which type should be considered?
* Use 0 for any type.
* @param iter function to call on each matching value;
* @param type entries of which type should be considered?
* Use 0 for any type.
* @param iter function to call on each matching value;
@@
-212,10
+225,11
@@
template_plugin_iter_zero_anonymity (void *cls,
*/
static void
template_plugin_iter_ascending_expiration (void *cls,
*/
static void
template_plugin_iter_ascending_expiration (void *cls,
-
uint32_t
type,
- PluginIterator iter,
- void *iter_cls)
+
enum GNUNET_BLOCK_Type
type,
+
PluginIterator iter,
+
void *iter_cls)
{
{
+ GNUNET_break (0);
}
}
@@
-224,6
+238,7
@@
template_plugin_iter_ascending_expiration (void *cls,
* Select a subset of the items in the datastore and call
* the given iterator for each of them.
*
* Select a subset of the items in the datastore and call
* the given iterator for each of them.
*
+ * @param cls our "struct Plugin*"
* @param type entries of which type should be considered?
* Use 0 for any type.
* @param iter function to call on each matching value;
* @param type entries of which type should be considered?
* Use 0 for any type.
* @param iter function to call on each matching value;
@@
-232,10
+247,11
@@
template_plugin_iter_ascending_expiration (void *cls,
*/
static void
template_plugin_iter_migration_order (void *cls,
*/
static void
template_plugin_iter_migration_order (void *cls,
-
uint32_t
type,
- PluginIterator iter,
- void *iter_cls)
+
enum GNUNET_BLOCK_Type
type,
+
PluginIterator iter,
+
void *iter_cls)
{
{
+ GNUNET_break (0);
}
}
@@
-244,6
+260,7
@@
template_plugin_iter_migration_order (void *cls,
* Select a subset of the items in the datastore and call
* the given iterator for each of them.
*
* Select a subset of the items in the datastore and call
* the given iterator for each of them.
*
+ * @param cls our "struct Plugin*"
* @param type entries of which type should be considered?
* Use 0 for any type.
* @param iter function to call on each matching value;
* @param type entries of which type should be considered?
* Use 0 for any type.
* @param iter function to call on each matching value;
@@
-252,10
+269,11
@@
template_plugin_iter_migration_order (void *cls,
*/
static void
template_plugin_iter_all_now (void *cls,
*/
static void
template_plugin_iter_all_now (void *cls,
-
uint32_t
type,
- PluginIterator iter,
- void *iter_cls)
+
enum GNUNET_BLOCK_Type
type,
+
PluginIterator iter,
+
void *iter_cls)
{
{
+ GNUNET_break (0);
}
}
@@
-265,11
+283,15
@@
template_plugin_iter_all_now (void *cls,
static void
template_plugin_drop (void *cls)
{
static void
template_plugin_drop (void *cls)
{
+ GNUNET_break (0);
}
/**
* Entry point for the plugin.
}
/**
* Entry point for the plugin.
+ *
+ * @param cls the "struct GNUNET_DATASTORE_PluginEnvironment*"
+ * @return our "struct Plugin*"
*/
void *
libgnunet_plugin_datastore_template_init (void *cls)
*/
void *
libgnunet_plugin_datastore_template_init (void *cls)
@@
-284,7
+306,7
@@
libgnunet_plugin_datastore_template_init (void *cls)
api->cls = plugin;
api->get_size = &template_plugin_get_size;
api->put = &template_plugin_put;
api->cls = plugin;
api->get_size = &template_plugin_get_size;
api->put = &template_plugin_put;
- api->next_request = &template_next_request;
+ api->next_request = &template_
plugin_
next_request;
api->get = &template_plugin_get;
api->update = &template_plugin_update;
api->iter_low_priority = &template_plugin_iter_low_priority;
api->get = &template_plugin_get;
api->update = &template_plugin_update;
api->iter_low_priority = &template_plugin_iter_low_priority;
@@
-301,6
+323,8
@@
libgnunet_plugin_datastore_template_init (void *cls)
/**
* Exit point from the plugin.
/**
* Exit point from the plugin.
+ * @param cls our "struct Plugin*"
+ * @return always NULL
*/
void *
libgnunet_plugin_datastore_template_done (void *cls)
*/
void *
libgnunet_plugin_datastore_template_done (void *cls)