aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_peerinfo_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-06-24 11:54:36 +0000
committerChristian Grothoff <christian@grothoff.org>2016-06-24 11:54:36 +0000
commiteafc8188ef6584f77dc4dbc6827210f384986e1a (patch)
tree501f87ddd224b0cbd5aaf9008b57005b129cac24 /src/include/gnunet_peerinfo_service.h
parent2e95a6961bf57170b215ab28e50dbf2376d46747 (diff)
downloadgnunet-eafc8188ef6584f77dc4dbc6827210f384986e1a.tar.gz
gnunet-eafc8188ef6584f77dc4dbc6827210f384986e1a.zip
update peerinfo API to use MQ
Diffstat (limited to 'src/include/gnunet_peerinfo_service.h')
-rw-r--r--src/include/gnunet_peerinfo_service.h37
1 files changed, 5 insertions, 32 deletions
diff --git a/src/include/gnunet_peerinfo_service.h b/src/include/gnunet_peerinfo_service.h
index 4ab12d0bf..cdf7b26bd 100644
--- a/src/include/gnunet_peerinfo_service.h
+++ b/src/include/gnunet_peerinfo_service.h
@@ -81,23 +81,6 @@ GNUNET_PEERINFO_disconnect (struct GNUNET_PEERINFO_Handle *h);
81 81
82 82
83/** 83/**
84 * Continuation called with a status result.
85 *
86 * @param cls closure
87 * @param emsg error message, NULL on success
88 */
89typedef void
90(*GNUNET_PEERINFO_Continuation)(void *cls,
91 const char *emsg);
92
93
94/**
95 * Opaque handle to cancel 'add' operation.
96 */
97struct GNUNET_PEERINFO_AddContext;
98
99
100/**
101 * Add a host to the persistent list. This method operates in 84 * Add a host to the persistent list. This method operates in
102 * semi-reliable mode: if the transmission is not completed by 85 * semi-reliable mode: if the transmission is not completed by
103 * the time #GNUNET_PEERINFO_disconnect() is called, it will be 86 * the time #GNUNET_PEERINFO_disconnect() is called, it will be
@@ -112,27 +95,17 @@ struct GNUNET_PEERINFO_AddContext;
112 * @return handle to cancel add operation; all pending 95 * @return handle to cancel add operation; all pending
113 * 'add' operations will be cancelled automatically 96 * 'add' operations will be cancelled automatically
114 * on disconnect, so it is not necessary to keep this 97 * on disconnect, so it is not necessary to keep this
115 * handle (unless @a cont is NULL and at some point 98 * handle (unless @a cont is non-NULL and at some point
116 * calling @a cont must be prevented) 99 * calling @a cont must be prevented)
117 */ 100 */
118struct GNUNET_PEERINFO_AddContext * 101struct GNUNET_MQ_Envelope *
119GNUNET_PEERINFO_add_peer (struct GNUNET_PEERINFO_Handle *h, 102GNUNET_PEERINFO_add_peer (struct GNUNET_PEERINFO_Handle *h,
120 const struct GNUNET_HELLO_Message *hello, 103 const struct GNUNET_HELLO_Message *hello,
121 GNUNET_PEERINFO_Continuation cont, 104 GNUNET_MQ_NotifyCallback cont,
122 void *cont_cls); 105 void *cont_cls);
123 106
124 107
125/** 108/**
126 * Cancel pending 'add' operation. Must only be called before
127 * either 'cont' or #GNUNET_PEERINFO_disconnect() are invoked.
128 *
129 * @param ac handle for the add operation to cancel
130 */
131void
132GNUNET_PEERINFO_add_peer_cancel (struct GNUNET_PEERINFO_AddContext *ac);
133
134
135/**
136 * Type of an iterator over the hosts. Note that each 109 * Type of an iterator over the hosts. Note that each
137 * host will be called with each available protocol. 110 * host will be called with each available protocol.
138 * 111 *
@@ -175,8 +148,8 @@ struct GNUNET_PEERINFO_IteratorContext *
175GNUNET_PEERINFO_iterate (struct GNUNET_PEERINFO_Handle *h, 148GNUNET_PEERINFO_iterate (struct GNUNET_PEERINFO_Handle *h,
176 int include_friend_only, 149 int include_friend_only,
177 const struct GNUNET_PeerIdentity *peer, 150 const struct GNUNET_PeerIdentity *peer,
178 struct GNUNET_TIME_Relative timeout, 151 GNUNET_PEERINFO_Processor callback,
179 GNUNET_PEERINFO_Processor callback, void *callback_cls); 152 void *callback_cls);
180 153
181 154
182/** 155/**