aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_peerstore_service.h
diff options
context:
space:
mode:
authorOmar Tarabai <tarabai@devegypt.com>2014-05-07 17:13:47 +0000
committerOmar Tarabai <tarabai@devegypt.com>2014-05-07 17:13:47 +0000
commit603d264417198385513b09844ddf4557dcc44952 (patch)
treef6a38a068f8e0e88a31debb064dce21d3790ecc2 /src/include/gnunet_peerstore_service.h
parent87d9416ddb4d60f3ad057da83bc45f9f16cdcae2 (diff)
downloadgnunet-603d264417198385513b09844ddf4557dcc44952.tar.gz
gnunet-603d264417198385513b09844ddf4557dcc44952.zip
update to PEERSTORE api
Diffstat (limited to 'src/include/gnunet_peerstore_service.h')
-rw-r--r--src/include/gnunet_peerstore_service.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/include/gnunet_peerstore_service.h b/src/include/gnunet_peerstore_service.h
index 1fd068d27..ff0add942 100644
--- a/src/include/gnunet_peerstore_service.h
+++ b/src/include/gnunet_peerstore_service.h
@@ -55,6 +55,52 @@ struct GNUNET_PEERSTORE_AddContext;
55 */ 55 */
56typedef void (*GNUNET_PEERSTORE_Continuation)(void *cls, const char *emsg); 56typedef void (*GNUNET_PEERSTORE_Continuation)(void *cls, const char *emsg);
57 57
58/**
59 * Connect to the PEERSTORE service.
60 *
61 * @return NULL on error
62 */
63struct GNUNET_PEERSTORE_Handle *
64GNUNET_PEERSTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
65
66/**
67 * Disconnect from the PEERSTORE service
68 *
69 * @param h handle to disconnect
70 */
71void
72GNUNET_PEERSTORE_disconnect(struct GNUNET_PEERSTORE_Handle *h);
73
74/**
75 * Store a new entry in the PEERSTORE
76 *
77 * @param h Handle to the PEERSTORE service
78 * @param peer Peer Identity
79 * @param sub_system name of the sub system
80 * @param value entry value BLOB
81 * @param size size of 'value'
82 * @param lifetime relative time after which the entry is (possibly) deleted
83 * @param cont Continuation function after the store request is processed
84 * @param cont_cls Closure for 'cont'
85 */
86struct GNUNET_PEERSTORE_StoreContext *
87GNUNET_PEERSTORE_store (struct GNUNET_PEERSTORE_Handle *h,
88 const struct GNUNET_PeerIdentity *peer,
89 const char *sub_system,
90 const void *value,
91 size_t size,
92 struct GNUNET_TIME_Relative lifetime,
93 GNUNET_PEERSTORE_Continuation cont,
94 void *cont_cls);
95
96/**
97 * Cancel a store request
98 *
99 * @param sc Store request context
100 */
101void
102GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_StoreContext *sc);
103
58#if 0 /* keep Emacsens' auto-indent happy */ 104#if 0 /* keep Emacsens' auto-indent happy */
59{ 105{
60#endif 106#endif