diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-06-16 20:32:40 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-06-16 20:32:40 +0000 |
commit | adb7f45adb8eff27515519f05042fc6ec616b38e (patch) | |
tree | 46e25c1b0659d125a2efae82fdcd5404c70ce2ef /src/datastore/plugin_datastore_template.c | |
parent | dc6e9887c24209d0e3dfb6cfb30fbde6ae3b47e9 (diff) | |
download | gnunet-adb7f45adb8eff27515519f05042fc6ec616b38e.tar.gz gnunet-adb7f45adb8eff27515519f05042fc6ec616b38e.zip |
improving datastore API
Diffstat (limited to 'src/datastore/plugin_datastore_template.c')
-rw-r--r-- | src/datastore/plugin_datastore_template.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/datastore/plugin_datastore_template.c b/src/datastore/plugin_datastore_template.c index 70b8c635e..1e3d4343b 100644 --- a/src/datastore/plugin_datastore_template.c +++ b/src/datastore/plugin_datastore_template.c | |||
@@ -62,8 +62,10 @@ static unsigned long long template_plugin_get_size (void *cls) | |||
62 | * @param priority priority of the content | 62 | * @param priority priority of the content |
63 | * @param anonymity anonymity-level for the content | 63 | * @param anonymity anonymity-level for the content |
64 | * @param expiration expiration time for the content | 64 | * @param expiration expiration time for the content |
65 | * @param msg set to error message | ||
66 | * @return GNUNET_OK on success | ||
65 | */ | 67 | */ |
66 | static void | 68 | static int |
67 | template_plugin_put (void *cls, | 69 | template_plugin_put (void *cls, |
68 | const GNUNET_HashCode * key, | 70 | const GNUNET_HashCode * key, |
69 | uint32_t size, | 71 | uint32_t size, |
@@ -71,8 +73,11 @@ template_plugin_put (void *cls, | |||
71 | uint32_t type, | 73 | uint32_t type, |
72 | uint32_t priority, | 74 | uint32_t priority, |
73 | uint32_t anonymity, | 75 | uint32_t anonymity, |
74 | struct GNUNET_TIME_Absolute expiration) | 76 | struct GNUNET_TIME_Absolute expiration, |
77 | char **msg) | ||
75 | { | 78 | { |
79 | *msg = GNUNET_strdup ("not implemented"); | ||
80 | return GNUNET_SYSERR; | ||
76 | } | 81 | } |
77 | 82 | ||
78 | 83 | ||
@@ -122,12 +127,17 @@ template_plugin_get (void *cls, | |||
122 | * @param expire new expiration time should be the | 127 | * @param expire new expiration time should be the |
123 | * MAX of any existing expiration time and | 128 | * MAX of any existing expiration time and |
124 | * this value | 129 | * this value |
130 | * @param msg set to error message | ||
131 | * @return GNUNET_OK on success | ||
125 | */ | 132 | */ |
126 | static void | 133 | static int |
127 | template_plugin_update (void *cls, | 134 | template_plugin_update (void *cls, |
128 | unsigned long long uid, | 135 | unsigned long long uid, |
129 | int delta, struct GNUNET_TIME_Absolute expire) | 136 | int delta, struct GNUNET_TIME_Absolute expire, |
137 | char **msg) | ||
130 | { | 138 | { |
139 | *msg = GNUNET_strdup ("not implemented"); | ||
140 | return GNUNET_SYSERR; | ||
131 | } | 141 | } |
132 | 142 | ||
133 | 143 | ||