diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-09-23 14:57:57 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-09-23 14:57:57 +0900 |
commit | 7678d77b1cb0dcfd8887016d35b27fbedb136050 (patch) | |
tree | d2755d9f5f184e958f8259ed11bde6991d1bc273 /src/include | |
parent | 8ecf052b2976ee8148b20013b45114ba32e8cd78 (diff) | |
download | gnunet-7678d77b1cb0dcfd8887016d35b27fbedb136050.tar.gz gnunet-7678d77b1cb0dcfd8887016d35b27fbedb136050.zip |
NAMESTORE: Add select ... for update / edit records APIs
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_namestore_plugin.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/include/gnunet_namestore_plugin.h b/src/include/gnunet_namestore_plugin.h index 82bac1f9e..5e8ac3203 100644 --- a/src/include/gnunet_namestore_plugin.h +++ b/src/include/gnunet_namestore_plugin.h | |||
@@ -186,6 +186,25 @@ struct GNUNET_NAMESTORE_PluginFunctions | |||
186 | enum GNUNET_GenericReturnValue | 186 | enum GNUNET_GenericReturnValue |
187 | (*transaction_commit) (void *cls, char **emsg); | 187 | (*transaction_commit) (void *cls, char **emsg); |
188 | 188 | ||
189 | /** | ||
190 | * Edit records in the datastore for which we are the authority. | ||
191 | * Should be called within a transaction (after begin) and maps | ||
192 | * to a SELECT ... FOR UPDATE in PQ. | ||
193 | * | ||
194 | * @param cls closure (internal context for the plugin) | ||
195 | * @param zone private key of the zone | ||
196 | * @param label name of the record in the zone | ||
197 | * @param iter function to call with the result | ||
198 | * @param iter_cls closure for @a iter | ||
199 | * @return #GNUNET_OK on success, #GNUNET_NO for no results, else #GNUNET_SYSERR | ||
200 | */ | ||
201 | int | ||
202 | (*edit_records) (void *cls, | ||
203 | const struct GNUNET_IDENTITY_PrivateKey *zone, | ||
204 | const char *label, | ||
205 | GNUNET_NAMESTORE_RecordIterator iter, | ||
206 | void *iter_cls); | ||
207 | |||
189 | }; | 208 | }; |
190 | 209 | ||
191 | 210 | ||