diff options
-rw-r--r-- | src/include/gnunet_rps_service.h | 22 | ||||
-rw-r--r-- | src/rps/rps_api.c | 8 |
2 files changed, 6 insertions, 24 deletions
diff --git a/src/include/gnunet_rps_service.h b/src/include/gnunet_rps_service.h index eda012076..22e944d0f 100644 --- a/src/include/gnunet_rps_service.h +++ b/src/include/gnunet_rps_service.h | |||
@@ -63,24 +63,6 @@ typedef void (* GNUNET_RPS_NotifyReadyCB) (void *cls, | |||
63 | uint64_t num_peers, | 63 | uint64_t num_peers, |
64 | const struct GNUNET_PeerIdentity *peers); | 64 | const struct GNUNET_PeerIdentity *peers); |
65 | 65 | ||
66 | /** | ||
67 | * Callback called when view was updated | ||
68 | * | ||
69 | * @param num_peers the number of peers returned | ||
70 | * @param peers array with num_peers PeerIDs | ||
71 | */ | ||
72 | typedef void (* GNUNET_RPS_ViewUpdateCB) (void *cls, | ||
73 | uint64_t num_peers, | ||
74 | const struct GNUNET_PeerIdentity *peers); | ||
75 | |||
76 | /** | ||
77 | * Callback called when a peer from the biased stream was received | ||
78 | * | ||
79 | * @param peer The received peer | ||
80 | */ | ||
81 | typedef void (* GNUNET_RPS_StreamInputCB) (void *cls, | ||
82 | uint64_t num_peers, | ||
83 | const struct GNUNET_PeerIdentity *peer); | ||
84 | 66 | ||
85 | /** | 67 | /** |
86 | * Connect to the rps service | 68 | * Connect to the rps service |
@@ -167,7 +149,7 @@ GNUNET_RPS_act_malicious (struct GNUNET_RPS_Handle *h, | |||
167 | void | 149 | void |
168 | GNUNET_RPS_view_request (struct GNUNET_RPS_Handle *rps_handle, | 150 | GNUNET_RPS_view_request (struct GNUNET_RPS_Handle *rps_handle, |
169 | uint32_t num_updates, | 151 | uint32_t num_updates, |
170 | GNUNET_RPS_ViewUpdateCB view_update_cb, | 152 | GNUNET_RPS_NotifyReadyCB view_update_cb, |
171 | void *cls); | 153 | void *cls); |
172 | 154 | ||
173 | 155 | ||
@@ -183,7 +165,7 @@ GNUNET_RPS_view_request (struct GNUNET_RPS_Handle *rps_handle, | |||
183 | void | 165 | void |
184 | GNUNET_RPS_stream_request (struct GNUNET_RPS_Handle *rps_handle, | 166 | GNUNET_RPS_stream_request (struct GNUNET_RPS_Handle *rps_handle, |
185 | uint32_t num_updates, | 167 | uint32_t num_updates, |
186 | GNUNET_RPS_StreamInputCB stream_input_cb, | 168 | GNUNET_RPS_NotifyReadyCB stream_input_cb, |
187 | void *cls); | 169 | void *cls); |
188 | 170 | ||
189 | 171 | ||
diff --git a/src/rps/rps_api.c b/src/rps/rps_api.c index 96660ded6..00f817468 100644 --- a/src/rps/rps_api.c +++ b/src/rps/rps_api.c | |||
@@ -58,7 +58,7 @@ struct GNUNET_RPS_Handle | |||
58 | /** | 58 | /** |
59 | * @brief Callback called on each update of the view | 59 | * @brief Callback called on each update of the view |
60 | */ | 60 | */ |
61 | GNUNET_RPS_ViewUpdateCB view_update_cb; | 61 | GNUNET_RPS_NotifyReadyCB view_update_cb; |
62 | 62 | ||
63 | /** | 63 | /** |
64 | * @brief Closure to each requested update of the view | 64 | * @brief Closure to each requested update of the view |
@@ -68,7 +68,7 @@ struct GNUNET_RPS_Handle | |||
68 | /** | 68 | /** |
69 | * @brief Callback called on each peer of the biased input stream | 69 | * @brief Callback called on each peer of the biased input stream |
70 | */ | 70 | */ |
71 | GNUNET_RPS_StreamInputCB stream_input_cb; | 71 | GNUNET_RPS_NotifyReadyCB stream_input_cb; |
72 | 72 | ||
73 | /** | 73 | /** |
74 | * @brief Closure to each requested peer from the biased stream | 74 | * @brief Closure to each requested peer from the biased stream |
@@ -270,7 +270,7 @@ handle_reply (void *cls, | |||
270 | void | 270 | void |
271 | GNUNET_RPS_view_request (struct GNUNET_RPS_Handle *rps_handle, | 271 | GNUNET_RPS_view_request (struct GNUNET_RPS_Handle *rps_handle, |
272 | uint32_t num_updates, | 272 | uint32_t num_updates, |
273 | GNUNET_RPS_ViewUpdateCB view_update_cb, | 273 | GNUNET_RPS_NotifyReadyCB view_update_cb, |
274 | void *cls) | 274 | void *cls) |
275 | { | 275 | { |
276 | struct GNUNET_MQ_Envelope *ev; | 276 | struct GNUNET_MQ_Envelope *ev; |
@@ -300,7 +300,7 @@ GNUNET_RPS_view_request (struct GNUNET_RPS_Handle *rps_handle, | |||
300 | void | 300 | void |
301 | GNUNET_RPS_stream_request (struct GNUNET_RPS_Handle *rps_handle, | 301 | GNUNET_RPS_stream_request (struct GNUNET_RPS_Handle *rps_handle, |
302 | uint32_t num_peers, | 302 | uint32_t num_peers, |
303 | GNUNET_RPS_StreamInputCB stream_input_cb, | 303 | GNUNET_RPS_NotifyReadyCB stream_input_cb, |
304 | void *cls) | 304 | void *cls) |
305 | { | 305 | { |
306 | struct GNUNET_MQ_Envelope *ev; | 306 | struct GNUNET_MQ_Envelope *ev; |