aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_peerstore_service.h
diff options
context:
space:
mode:
authorOmar Tarabai <tarabai@devegypt.com>2014-05-13 22:08:22 +0000
committerOmar Tarabai <tarabai@devegypt.com>2014-05-13 22:08:22 +0000
commitdb2ee15ca4302b0e7fa78e318833cd136265b746 (patch)
tree118bf881b689d5f2f42353611e9e132ea128eadb /src/include/gnunet_peerstore_service.h
parent748449cc89a8ef631b8c3c5c3b9168634fc355a5 (diff)
downloadgnunet-db2ee15ca4302b0e7fa78e318833cd136265b746.tar.gz
gnunet-db2ee15ca4302b0e7fa78e318833cd136265b746.zip
PEERSTORE api overhaul
Diffstat (limited to 'src/include/gnunet_peerstore_service.h')
-rw-r--r--src/include/gnunet_peerstore_service.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/include/gnunet_peerstore_service.h b/src/include/gnunet_peerstore_service.h
index ff0add942..d8b8935cc 100644
--- a/src/include/gnunet_peerstore_service.h
+++ b/src/include/gnunet_peerstore_service.h
@@ -43,17 +43,17 @@ extern "C"
43struct GNUNET_PEERSTORE_Handle; 43struct GNUNET_PEERSTORE_Handle;
44 44
45/** 45/**
46 * Context for add requests 46 * Context for a store request
47 */ 47 */
48struct GNUNET_PEERSTORE_AddContext; 48struct GNUNET_PEERSTORE_StoreContext;
49 49
50/** 50/**
51 * Continuation called with a status result. 51 * Continuation called with a status result.
52 * 52 *
53 * @param cls closure 53 * @param cls closure
54 * @param emsg error message, NULL on success 54 * @param success #GNUNET_OK or #GNUNET_SYSERR
55 */ 55 */
56typedef void (*GNUNET_PEERSTORE_Continuation)(void *cls, const char *emsg); 56typedef void (*GNUNET_PEERSTORE_Continuation)(void *cls, int success);
57 57
58/** 58/**
59 * Connect to the PEERSTORE service. 59 * Connect to the PEERSTORE service.
@@ -75,8 +75,9 @@ GNUNET_PEERSTORE_disconnect(struct GNUNET_PEERSTORE_Handle *h);
75 * Store a new entry in the PEERSTORE 75 * Store a new entry in the PEERSTORE
76 * 76 *
77 * @param h Handle to the PEERSTORE service 77 * @param h Handle to the PEERSTORE service
78 * @param peer Peer Identity
79 * @param sub_system name of the sub system 78 * @param sub_system name of the sub system
79 * @param peer Peer Identity
80 * @param key entry key
80 * @param value entry value BLOB 81 * @param value entry value BLOB
81 * @param size size of 'value' 82 * @param size size of 'value'
82 * @param lifetime relative time after which the entry is (possibly) deleted 83 * @param lifetime relative time after which the entry is (possibly) deleted
@@ -85,8 +86,9 @@ GNUNET_PEERSTORE_disconnect(struct GNUNET_PEERSTORE_Handle *h);
85 */ 86 */
86struct GNUNET_PEERSTORE_StoreContext * 87struct GNUNET_PEERSTORE_StoreContext *
87GNUNET_PEERSTORE_store (struct GNUNET_PEERSTORE_Handle *h, 88GNUNET_PEERSTORE_store (struct GNUNET_PEERSTORE_Handle *h,
88 const struct GNUNET_PeerIdentity *peer,
89 const char *sub_system, 89 const char *sub_system,
90 const struct GNUNET_PeerIdentity *peer,
91 const char *key,
90 const void *value, 92 const void *value,
91 size_t size, 93 size_t size,
92 struct GNUNET_TIME_Relative lifetime, 94 struct GNUNET_TIME_Relative lifetime,