diff options
Diffstat (limited to 'src/datastore/plugin_datastore_sqlite.c')
-rw-r--r-- | src/datastore/plugin_datastore_sqlite.c | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c index 486b9b96e..234519079 100644 --- a/src/datastore/plugin_datastore_sqlite.c +++ b/src/datastore/plugin_datastore_sqlite.c | |||
@@ -62,8 +62,10 @@ static unsigned long long sqlite_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 an error message | ||
66 | * @return GNUNET_OK on success | ||
65 | */ | 67 | */ |
66 | static void | 68 | static int |
67 | sqlite_plugin_put (void *cls, | 69 | sqlite_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 @@ sqlite_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 | ||
@@ -100,6 +105,8 @@ sqlite_plugin_get (void *cls, | |||
100 | uint32_t type, | 105 | uint32_t type, |
101 | GNUNET_DATASTORE_Iterator iter, void *iter_cls) | 106 | GNUNET_DATASTORE_Iterator iter, void *iter_cls) |
102 | { | 107 | { |
108 | static struct GNUNET_TIME_Absolute zero; | ||
109 | iter (iter_cls, NULL, 0, NULL, 0, 0, 0, zero, 0); | ||
103 | } | 110 | } |
104 | 111 | ||
105 | 112 | ||
@@ -122,12 +129,17 @@ sqlite_plugin_get (void *cls, | |||
122 | * @param expire new expiration time should be the | 129 | * @param expire new expiration time should be the |
123 | * MAX of any existing expiration time and | 130 | * MAX of any existing expiration time and |
124 | * this value | 131 | * this value |
132 | * @param msg set to an error message | ||
133 | * @return GNUNET_OK on success | ||
125 | */ | 134 | */ |
126 | static void | 135 | static int |
127 | sqlite_plugin_update (void *cls, | 136 | sqlite_plugin_update (void *cls, |
128 | unsigned long long uid, | 137 | unsigned long long uid, |
129 | int delta, struct GNUNET_TIME_Absolute expire) | 138 | int delta, struct GNUNET_TIME_Absolute expire, |
139 | char **msg) | ||
130 | { | 140 | { |
141 | *msg = GNUNET_strdup ("not implemented"); | ||
142 | return GNUNET_SYSERR; | ||
131 | } | 143 | } |
132 | 144 | ||
133 | 145 | ||
@@ -147,10 +159,11 @@ sqlite_plugin_iter_low_priority (void *cls, | |||
147 | GNUNET_DATASTORE_Iterator iter, | 159 | GNUNET_DATASTORE_Iterator iter, |
148 | void *iter_cls) | 160 | void *iter_cls) |
149 | { | 161 | { |
162 | static struct GNUNET_TIME_Absolute zero; | ||
163 | iter (iter_cls, NULL, 0, NULL, 0, 0, 0, zero, 0); | ||
150 | } | 164 | } |
151 | 165 | ||
152 | 166 | ||
153 | |||
154 | /** | 167 | /** |
155 | * Select a subset of the items in the datastore and call | 168 | * Select a subset of the items in the datastore and call |
156 | * the given iterator for each of them. | 169 | * the given iterator for each of them. |
@@ -167,6 +180,8 @@ sqlite_plugin_iter_zero_anonymity (void *cls, | |||
167 | GNUNET_DATASTORE_Iterator iter, | 180 | GNUNET_DATASTORE_Iterator iter, |
168 | void *iter_cls) | 181 | void *iter_cls) |
169 | { | 182 | { |
183 | static struct GNUNET_TIME_Absolute zero; | ||
184 | iter (iter_cls, NULL, 0, NULL, 0, 0, 0, zero, 0); | ||
170 | } | 185 | } |
171 | 186 | ||
172 | 187 | ||
@@ -187,6 +202,8 @@ sqlite_plugin_iter_ascending_expiration (void *cls, | |||
187 | GNUNET_DATASTORE_Iterator iter, | 202 | GNUNET_DATASTORE_Iterator iter, |
188 | void *iter_cls) | 203 | void *iter_cls) |
189 | { | 204 | { |
205 | static struct GNUNET_TIME_Absolute zero; | ||
206 | iter (iter_cls, NULL, 0, NULL, 0, 0, 0, zero, 0); | ||
190 | } | 207 | } |
191 | 208 | ||
192 | 209 | ||
@@ -207,6 +224,8 @@ sqlite_plugin_iter_migration_order (void *cls, | |||
207 | GNUNET_DATASTORE_Iterator iter, | 224 | GNUNET_DATASTORE_Iterator iter, |
208 | void *iter_cls) | 225 | void *iter_cls) |
209 | { | 226 | { |
227 | static struct GNUNET_TIME_Absolute zero; | ||
228 | iter (iter_cls, NULL, 0, NULL, 0, 0, 0, zero, 0); | ||
210 | } | 229 | } |
211 | 230 | ||
212 | 231 | ||
@@ -227,6 +246,8 @@ sqlite_plugin_iter_all_now (void *cls, | |||
227 | GNUNET_DATASTORE_Iterator iter, | 246 | GNUNET_DATASTORE_Iterator iter, |
228 | void *iter_cls) | 247 | void *iter_cls) |
229 | { | 248 | { |
249 | static struct GNUNET_TIME_Absolute zero; | ||
250 | iter (iter_cls, NULL, 0, NULL, 0, 0, 0, zero, 0); | ||
230 | } | 251 | } |
231 | 252 | ||
232 | 253 | ||