aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_peerstore_service.h
diff options
context:
space:
mode:
authorOmar Tarabai <tarabai@devegypt.com>2014-06-04 16:03:17 +0000
committerOmar Tarabai <tarabai@devegypt.com>2014-06-04 16:03:17 +0000
commitf286cd0b87731774b9448a0cdc82f7c8682c4efe (patch)
treed84ace0bf67dd4f8a99888548f6ab635206eab4f /src/include/gnunet_peerstore_service.h
parent7d18e9d89d2c920f9139bec7f55f01b00b5fd81a (diff)
peerstore: added 'replace' option and other fixes
Diffstat (limited to 'src/include/gnunet_peerstore_service.h')
-rw-r--r--src/include/gnunet_peerstore_service.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/include/gnunet_peerstore_service.h b/src/include/gnunet_peerstore_service.h
index acb7e04928..7a79a8b567 100644
--- a/src/include/gnunet_peerstore_service.h
+++ b/src/include/gnunet_peerstore_service.h
@@ -38,6 +38,25 @@ extern "C"
#endif
/**
+ * Options for storing values in PEERSTORE
+ */
+enum GNUNET_PEERSTORE_StoreOption
+{
+
+ /**
+ * Possibly store multiple values under given key.
+ */
+ GNUNET_PEERSTORE_STOREOPTION_MULTIPLE,
+
+ /**
+ * Delete any previous values for the given key before
+ * storing the given value.
+ */
+ GNUNET_PEERSTORE_STOREOPTION_REPLACE,
+
+};
+
+/**
* Handle to the peerstore service.
*/
struct GNUNET_PEERSTORE_Handle;
@@ -130,7 +149,8 @@ GNUNET_PEERSTORE_disconnect(struct GNUNET_PEERSTORE_Handle *h);
* @param key entry key
* @param value entry value BLOB
* @param size size of 'value'
- * @param lifetime relative time after which the entry is (possibly) deleted
+ * @param expiry absolute time after which the entry is (possibly) deleted
+ * @param options store operation option
* @param cont Continuation function after the store request is processed
* @param cont_cls Closure for 'cont'
*/
@@ -142,6 +162,7 @@ GNUNET_PEERSTORE_store (struct GNUNET_PEERSTORE_Handle *h,
const void *value,
size_t size,
struct GNUNET_TIME_Absolute expiry,
+ enum GNUNET_PEERSTORE_StoreOption options,
GNUNET_PEERSTORE_Continuation cont,
void *cont_cls);