diff options
Diffstat (limited to 'src/include/gnunet_peerstore_service.h')
-rw-r--r-- | src/include/gnunet_peerstore_service.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/include/gnunet_peerstore_service.h b/src/include/gnunet_peerstore_service.h index c4000c680..37d3ca7fe 100644 --- a/src/include/gnunet_peerstore_service.h +++ b/src/include/gnunet_peerstore_service.h | |||
@@ -46,6 +46,10 @@ extern "C" { | |||
46 | #endif | 46 | #endif |
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | /** | ||
50 | * Key used for storing HELLO in the peerstore | ||
51 | */ | ||
52 | #define GNUNET_PEERSTORE_HELLO_KEY "peerstore-peer-hello-uri" | ||
49 | 53 | ||
50 | /** | 54 | /** |
51 | * Key used for storing addresses in URL format in the peerstore | 55 | * Key used for storing addresses in URL format in the peerstore |
@@ -182,6 +186,33 @@ typedef void (*GNUNET_PEERSTORE_Processor) ( | |||
182 | const char *emsg); | 186 | const char *emsg); |
183 | 187 | ||
184 | 188 | ||
189 | |||
190 | /** | ||
191 | * Add hello to peerstore. | ||
192 | * | ||
193 | * @param h handle for peerstore. | ||
194 | * @param msg The hello to add. | ||
195 | * @param cont The continuation function to execute after storing. | ||
196 | * @param cont_cls The continuation function closure. | ||
197 | * @return The context for storing. | ||
198 | */ | ||
199 | struct GNUNET_PEERSTORE_StoreHelloContext * | ||
200 | GNUNET_PEERSTORE_hello_add (struct GNUNET_PEERSTORE_Handle *h, | ||
201 | const struct GNUNET_MessageHeader *msg, | ||
202 | const struct GNUNET_CRYPTO_EddsaPrivateKey *priv, | ||
203 | GNUNET_PEERSTORE_Continuation cont, | ||
204 | void *cont_cls); | ||
205 | |||
206 | |||
207 | /** | ||
208 | * Cancel the request to add a hello. | ||
209 | * | ||
210 | * @param huc The context for storing a hello. | ||
211 | */ | ||
212 | void | ||
213 | GNUNET_PEERSTORE_hello_add_cancel (struct GNUNET_PEERSTORE_StoreHelloContext *huc); | ||
214 | |||
215 | |||
185 | /** | 216 | /** |
186 | * Connect to the PEERSTORE service. | 217 | * Connect to the PEERSTORE service. |
187 | * | 218 | * |