[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r33466 - gnunet/src/include
From: |
gnunet |
Subject: |
[GNUnet-SVN] r33466 - gnunet/src/include |
Date: |
Mon, 2 Jun 2014 13:28:28 +0200 |
Author: otarabai
Date: 2014-06-02 13:28:28 +0200 (Mon, 02 Jun 2014)
New Revision: 33466
Modified:
gnunet/src/include/gnunet_peerstore_service.h
gnunet/src/include/gnunet_protocols.h
Log:
header file changes
Modified: gnunet/src/include/gnunet_peerstore_service.h
===================================================================
--- gnunet/src/include/gnunet_peerstore_service.h 2014-06-02 09:40:12 UTC
(rev 33465)
+++ gnunet/src/include/gnunet_peerstore_service.h 2014-06-02 11:28:28 UTC
(rev 33466)
@@ -166,7 +166,7 @@
*/
struct GNUNET_PEERSTORE_IterateContext *
GNUNET_PEERSTORE_iterate (struct GNUNET_PEERSTORE_Handle *h,
- char *sub_system,
+ const char *sub_system,
const struct GNUNET_PeerIdentity *peer,
const char *key,
struct GNUNET_TIME_Relative timeout,
@@ -181,6 +181,33 @@
void
GNUNET_PEERSTORE_iterate_cancel (struct GNUNET_PEERSTORE_IterateContext *ic);
+/**
+ * Request watching a given key
+ * User will be notified with any new values added to key
+ *
+ * @param h handle to the PEERSTORE service
+ * @param sub_system name of sub system
+ * @param peer Peer identity
+ * @param key entry key string
+ * @param callback function called with each new value
+ * @param callback_cls closure for @a callback
+ * @return Handle to watch request
+ */
+struct GNUNET_PEERSTORE_WatchContext *
+GNUNET_PEERSTORE_watch (struct GNUNET_PEERSTORE_Handle *h,
+ const char *sub_system,
+ const struct GNUNET_PeerIdentity *peer,
+ const char *key,
+ GNUNET_PEERSTORE_Processor callback, void *callback_cls);
+
+/**
+ * Cancel a watch request
+ *
+ * @wc handle to the watch request
+ */
+void
+GNUNET_PEERSTORE_watch_cancel(struct GNUNET_PEERSTORE_WatchContext *wc);
+
#if 0 /* keep Emacsens' auto-indent happy */
{
#endif
Modified: gnunet/src/include/gnunet_protocols.h
===================================================================
--- gnunet/src/include/gnunet_protocols.h 2014-06-02 09:40:12 UTC (rev
33465)
+++ gnunet/src/include/gnunet_protocols.h 2014-06-02 11:28:28 UTC (rev
33466)
@@ -2477,10 +2477,9 @@
#define GNUNET_MESSAGE_TYPE_PEERSTORE_STORE 820
/**
- * Store result messages
+ * Store result message
*/
#define GNUNET_MESSAGE_TYPE_PEERSTORE_STORE_RESULT_OK 821
-#define GNUNET_MESSAGE_TYPE_PEERSTORE_STORE_RESULT_FAIL 822
/**
* Iteration request
@@ -2493,7 +2492,21 @@
#define GNUNET_MESSAGE_TYPE_PEERSTORE_ITERATE_RECORD 824
#define GNUNET_MESSAGE_TYPE_PEERSTORE_ITERATE_END 825
+/**
+ * Watch request
+ */
+#define GNUNET_MESSAGE_TYPE_PEERSTORE_WATCH 826
+/**
+ * Watch response
+ */
+#define GNUNET_MESSAGE_TYPE_PEERSTORE_WATCH_RECORD 827
+
+/**
+ * Watch cancel request
+ */
+#define GNUNET_MESSAGE_TYPE_PEERSTORE_WATCH_CANCEL 828
+
/*******************************************************************************
* SOCIAL message types
******************************************************************************/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r33466 - gnunet/src/include,
gnunet <=