diff options
author | Omar Tarabai <tarabai@devegypt.com> | 2014-06-04 16:03:17 +0000 |
---|---|---|
committer | Omar Tarabai <tarabai@devegypt.com> | 2014-06-04 16:03:17 +0000 |
commit | f286cd0b87731774b9448a0cdc82f7c8682c4efe (patch) | |
tree | d84ace0bf67dd4f8a99888548f6ab635206eab4f /src/include/gnunet_peerstore_service.h | |
parent | 7d18e9d89d2c920f9139bec7f55f01b00b5fd81a (diff) | |
download | gnunet-f286cd0b87731774b9448a0cdc82f7c8682c4efe.tar.gz gnunet-f286cd0b87731774b9448a0cdc82f7c8682c4efe.zip |
peerstore: added 'replace' option and other fixes
Diffstat (limited to 'src/include/gnunet_peerstore_service.h')
-rw-r--r-- | src/include/gnunet_peerstore_service.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/include/gnunet_peerstore_service.h b/src/include/gnunet_peerstore_service.h index acb7e0492..7a79a8b56 100644 --- a/src/include/gnunet_peerstore_service.h +++ b/src/include/gnunet_peerstore_service.h | |||
@@ -38,6 +38,25 @@ extern "C" | |||
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | /** | 40 | /** |
41 | * Options for storing values in PEERSTORE | ||
42 | */ | ||
43 | enum GNUNET_PEERSTORE_StoreOption | ||
44 | { | ||
45 | |||
46 | /** | ||
47 | * Possibly store multiple values under given key. | ||
48 | */ | ||
49 | GNUNET_PEERSTORE_STOREOPTION_MULTIPLE, | ||
50 | |||
51 | /** | ||
52 | * Delete any previous values for the given key before | ||
53 | * storing the given value. | ||
54 | */ | ||
55 | GNUNET_PEERSTORE_STOREOPTION_REPLACE, | ||
56 | |||
57 | }; | ||
58 | |||
59 | /** | ||
41 | * Handle to the peerstore service. | 60 | * Handle to the peerstore service. |
42 | */ | 61 | */ |
43 | struct GNUNET_PEERSTORE_Handle; | 62 | struct GNUNET_PEERSTORE_Handle; |
@@ -130,7 +149,8 @@ GNUNET_PEERSTORE_disconnect(struct GNUNET_PEERSTORE_Handle *h); | |||
130 | * @param key entry key | 149 | * @param key entry key |
131 | * @param value entry value BLOB | 150 | * @param value entry value BLOB |
132 | * @param size size of 'value' | 151 | * @param size size of 'value' |
133 | * @param lifetime relative time after which the entry is (possibly) deleted | 152 | * @param expiry absolute time after which the entry is (possibly) deleted |
153 | * @param options store operation option | ||
134 | * @param cont Continuation function after the store request is processed | 154 | * @param cont Continuation function after the store request is processed |
135 | * @param cont_cls Closure for 'cont' | 155 | * @param cont_cls Closure for 'cont' |
136 | */ | 156 | */ |
@@ -142,6 +162,7 @@ GNUNET_PEERSTORE_store (struct GNUNET_PEERSTORE_Handle *h, | |||
142 | const void *value, | 162 | const void *value, |
143 | size_t size, | 163 | size_t size, |
144 | struct GNUNET_TIME_Absolute expiry, | 164 | struct GNUNET_TIME_Absolute expiry, |
165 | enum GNUNET_PEERSTORE_StoreOption options, | ||
145 | GNUNET_PEERSTORE_Continuation cont, | 166 | GNUNET_PEERSTORE_Continuation cont, |
146 | void *cont_cls); | 167 | void *cont_cls); |
147 | 168 | ||