aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2011-07-26 18:31:48 +0000
committerNathan S. Evans <evans@in.tum.de>2011-07-26 18:31:48 +0000
commit1558b76dfd91a5fb09a025f6e54dcf78230e22e0 (patch)
tree5d9f351da3d74b057a490236d68b9026bb6220a6
parenta56f758246cd672b67e4a8369da3631ab1eedfc5 (diff)
downloadgnunet-1558b76dfd91a5fb09a025f6e54dcf78230e22e0.tar.gz
gnunet-1558b76dfd91a5fb09a025f6e54dcf78230e22e0.zip
good
-rw-r--r--src/include/gnunet_peerinfo_service.h71
1 files changed, 0 insertions, 71 deletions
diff --git a/src/include/gnunet_peerinfo_service.h b/src/include/gnunet_peerinfo_service.h
index ff4d99d95..1411168c0 100644
--- a/src/include/gnunet_peerinfo_service.h
+++ b/src/include/gnunet_peerinfo_service.h
@@ -89,45 +89,6 @@ GNUNET_PEERINFO_add_peer (struct GNUNET_PEERINFO_Handle *h,
89 89
90 90
91/** 91/**
92 * Connect to the peerinfo service.
93 *
94 * @param cfg configuration to use
95 * @return NULL on error (configuration related, actual connection
96 * etablishment may happen asynchronously).
97 */
98struct GNUNET_PEERINFO_Handle *
99GNUNET_PEERINFO_standalone_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
100
101
102/**
103 * Disconnect from the peerinfo service. Note that all iterators must
104 * have completed or have been cancelled by the time this function is
105 * called (otherwise, calling this function is a serious error).
106 * Furthermore, if 'GNUNET_PEERINFO_add_peer' operations are still
107 * pending, they will be cancelled silently on disconnect.
108 *
109 * @param h handle to disconnect
110 */
111void
112GNUNET_PEERINFO_standalone_disconnect (struct GNUNET_PEERINFO_Handle *h);
113
114
115/**
116 * Add a host to the persistent list. This method operates in
117 * semi-reliable mode: if the transmission is not completed by
118 * the time 'GNUNET_PEERINFO_disconnect' is called, it will be
119 * aborted. Furthermore, if a second HELLO is added for the
120 * same peer before the first one was transmitted, PEERINFO may
121 * merge the two HELLOs prior to transmission to the service.
122 *
123 * @param h handle to the peerinfo service
124 * @param hello the verified (!) HELLO message
125 */
126void
127GNUNET_PEERINFO_standalone_add_peer (struct GNUNET_PEERINFO_Handle *h,
128 const struct GNUNET_HELLO_Message *hello);
129
130/**
131 * Type of an iterator over the hosts. Note that each 92 * Type of an iterator over the hosts. Note that each
132 * host will be called with each available protocol. 93 * host will be called with each available protocol.
133 * 94 *
@@ -183,41 +144,9 @@ GNUNET_PEERINFO_iterate (struct GNUNET_PEERINFO_Handle *h,
183void 144void
184GNUNET_PEERINFO_iterate_cancel (struct GNUNET_PEERINFO_IteratorContext *ic); 145GNUNET_PEERINFO_iterate_cancel (struct GNUNET_PEERINFO_IteratorContext *ic);
185 146
186/**
187 * Call a method for each known matching host and change its trust
188 * value. The callback method will be invoked once for each matching
189 * host and then finally once with a NULL pointer. After that final
190 * invocation, the iterator context must no longer be used.
191 *
192 * Instead of calling this function with 'peer == NULL'
193 * it is often better to use 'GNUNET_PEERINFO_notify'.
194 *
195 * @param h handle to the peerinfo service
196 * @param peer restrict iteration to this peer only (can be NULL)
197 * @param timeout how long to wait until timing out
198 * @param callback the method to call for each peer
199 * @param callback_cls closure for callback
200 * @return NULL on error (in this case, 'callback' is never called!),
201 * otherwise an iterator context
202 */
203struct GNUNET_PEERINFO_IteratorContext *
204GNUNET_PEERINFO_standalone_iterate (struct GNUNET_PEERINFO_Handle *h,
205 const struct GNUNET_PeerIdentity *peer,
206 struct GNUNET_TIME_Relative timeout,
207 GNUNET_PEERINFO_Processor callback,
208 void *callback_cls);
209
210 147
211 148
212/** 149/**
213 * Cancel an iteration over peer information.
214 *
215 * @param ic context of the iterator to cancel
216 */
217void
218GNUNET_PEERINFO_standalone_iterate_cancel (struct GNUNET_PEERINFO_IteratorContext *ic);
219
220/**
221 * Handle for notifications about changes to the set of known peers. 150 * Handle for notifications about changes to the set of known peers.
222 */ 151 */
223struct GNUNET_PEERINFO_NotifyContext; 152struct GNUNET_PEERINFO_NotifyContext;