aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_rps_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-05 15:09:28 +0200
committerChristian Grothoff <christian@grothoff.org>2019-10-05 15:09:28 +0200
commitc4e9ba925ffd758aaa3feee2ccfc0b76f26fe207 (patch)
treecac3ce030d77b4cbe7c7dc62ed58cfe6d24f73e1 /src/include/gnunet_rps_service.h
parentfbb71d527c7d6babf269a8fefce1db291b9f7068 (diff)
downloadgnunet-c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207.tar.gz
gnunet-c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207.zip
global reindent, now with uncrustify hook enabled
Diffstat (limited to 'src/include/gnunet_rps_service.h')
-rw-r--r--src/include/gnunet_rps_service.h74
1 files changed, 38 insertions, 36 deletions
diff --git a/src/include/gnunet_rps_service.h b/src/include/gnunet_rps_service.h
index a580d1cc2..b6f2e2456 100644
--- a/src/include/gnunet_rps_service.h
+++ b/src/include/gnunet_rps_service.h
@@ -61,9 +61,10 @@ struct GNUNET_RPS_Request_Handle;
61 * @param num_peers the number of peers returned 61 * @param num_peers the number of peers returned
62 * @param peers array with num_peers PeerIDs 62 * @param peers array with num_peers PeerIDs
63 */ 63 */
64typedef void (* GNUNET_RPS_NotifyReadyCB) (void *cls, 64typedef void (*GNUNET_RPS_NotifyReadyCB) (void *cls,
65 uint64_t num_peers, 65 uint64_t num_peers,
66 const struct GNUNET_PeerIdentity *peers); 66 const struct
67 GNUNET_PeerIdentity *peers);
67 68
68 69
69/** 70/**
@@ -75,10 +76,11 @@ typedef void (* GNUNET_RPS_NotifyReadyCB) (void *cls,
75 * @param probability The probability with which all elements have been observed 76 * @param probability The probability with which all elements have been observed
76 * @param num_observed Number of IDs this sampler has observed 77 * @param num_observed Number of IDs this sampler has observed
77 */ 78 */
78typedef void (* GNUNET_RPS_NotifyReadySingleInfoCB) (void *cls, 79typedef void (*GNUNET_RPS_NotifyReadySingleInfoCB) (void *cls,
79 const struct GNUNET_PeerIdentity *peer, 80 const struct
80 double probability, 81 GNUNET_PeerIdentity *peer,
81 uint32_t num_observed); 82 double probability,
83 uint32_t num_observed);
82 84
83 85
84/** 86/**
@@ -88,7 +90,7 @@ typedef void (* GNUNET_RPS_NotifyReadySingleInfoCB) (void *cls,
88 * @return handle to the rps service 90 * @return handle to the rps service
89 */ 91 */
90struct GNUNET_RPS_Handle * 92struct GNUNET_RPS_Handle *
91GNUNET_RPS_connect(const struct GNUNET_CONFIGURATION_Handle *cfg); 93GNUNET_RPS_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
92 94
93 95
94/** 96/**
@@ -98,8 +100,8 @@ GNUNET_RPS_connect(const struct GNUNET_CONFIGURATION_Handle *cfg);
98 * @param shared_value The shared value that defines the members of the sub (-group) 100 * @param shared_value The shared value that defines the members of the sub (-group)
99 */ 101 */
100void 102void
101GNUNET_RPS_sub_start(struct GNUNET_RPS_Handle *h, 103GNUNET_RPS_sub_start (struct GNUNET_RPS_Handle *h,
102 const char *shared_value); 104 const char *shared_value);
103 105
104 106
105/** 107/**
@@ -109,8 +111,8 @@ GNUNET_RPS_sub_start(struct GNUNET_RPS_Handle *h,
109 * @param shared_value The shared value that defines the members of the sub (-group) 111 * @param shared_value The shared value that defines the members of the sub (-group)
110 */ 112 */
111void 113void
112GNUNET_RPS_sub_stop(struct GNUNET_RPS_Handle *h, 114GNUNET_RPS_sub_stop (struct GNUNET_RPS_Handle *h,
113 const char *shared_value); 115 const char *shared_value);
114 116
115 117
116/** 118/**
@@ -128,9 +130,9 @@ GNUNET_RPS_sub_stop(struct GNUNET_RPS_Handle *h,
128 * @return handle to this request 130 * @return handle to this request
129 */ 131 */
130struct GNUNET_RPS_Request_Handle * 132struct GNUNET_RPS_Request_Handle *
131GNUNET_RPS_request_peers(struct GNUNET_RPS_Handle *h, uint32_t n, 133GNUNET_RPS_request_peers (struct GNUNET_RPS_Handle *h, uint32_t n,
132 GNUNET_RPS_NotifyReadyCB ready_cb, 134 GNUNET_RPS_NotifyReadyCB ready_cb,
133 void *cls); 135 void *cls);
134 136
135 137
136/** 138/**
@@ -142,9 +144,9 @@ GNUNET_RPS_request_peers(struct GNUNET_RPS_Handle *h, uint32_t n,
142 * @return a handle to cancel this request 144 * @return a handle to cancel this request
143 */ 145 */
144struct GNUNET_RPS_Request_Handle_Single_Info * 146struct GNUNET_RPS_Request_Handle_Single_Info *
145GNUNET_RPS_request_peer_info(struct GNUNET_RPS_Handle *rps_handle, 147GNUNET_RPS_request_peer_info (struct GNUNET_RPS_Handle *rps_handle,
146 GNUNET_RPS_NotifyReadySingleInfoCB ready_cb, 148 GNUNET_RPS_NotifyReadySingleInfoCB ready_cb,
147 void *cls); 149 void *cls);
148 150
149 151
150/** 152/**
@@ -155,8 +157,8 @@ GNUNET_RPS_request_peer_info(struct GNUNET_RPS_Handle *rps_handle,
155 * @param ids the ids of the peers seeded 157 * @param ids the ids of the peers seeded
156 */ 158 */
157void 159void
158GNUNET_RPS_seed_ids(struct GNUNET_RPS_Handle *h, uint32_t n, 160GNUNET_RPS_seed_ids (struct GNUNET_RPS_Handle *h, uint32_t n,
159 const struct GNUNET_PeerIdentity * ids); 161 const struct GNUNET_PeerIdentity *ids);
160 162
161/** 163/**
162 * Cancle an issued request. 164 * Cancle an issued request.
@@ -164,7 +166,7 @@ GNUNET_RPS_seed_ids(struct GNUNET_RPS_Handle *h, uint32_t n,
164 * @param rh handle of the pending request to be canceled 166 * @param rh handle of the pending request to be canceled
165 */ 167 */
166void 168void
167GNUNET_RPS_request_cancel(struct GNUNET_RPS_Request_Handle *rh); 169GNUNET_RPS_request_cancel (struct GNUNET_RPS_Request_Handle *rh);
168 170
169 171
170/** 172/**
@@ -173,7 +175,7 @@ GNUNET_RPS_request_cancel(struct GNUNET_RPS_Request_Handle *rh);
173 * @param rhs request handle of request to cancle 175 * @param rhs request handle of request to cancle
174 */ 176 */
175void 177void
176GNUNET_RPS_request_single_info_cancel( 178GNUNET_RPS_request_single_info_cancel (
177 struct GNUNET_RPS_Request_Handle_Single_Info *rhs); 179 struct GNUNET_RPS_Request_Handle_Single_Info *rhs);
178 180
179 181
@@ -193,11 +195,11 @@ GNUNET_RPS_request_single_info_cancel(
193 * peer to be isolated from the rest 195 * peer to be isolated from the rest
194 */ 196 */
195void 197void
196GNUNET_RPS_act_malicious(struct GNUNET_RPS_Handle *h, 198GNUNET_RPS_act_malicious (struct GNUNET_RPS_Handle *h,
197 uint32_t type, 199 uint32_t type,
198 uint32_t num_peers, 200 uint32_t num_peers,
199 const struct GNUNET_PeerIdentity *ids, 201 const struct GNUNET_PeerIdentity *ids,
200 const struct GNUNET_PeerIdentity *target_peer); 202 const struct GNUNET_PeerIdentity *target_peer);
201#endif /* ENABLE_MALICIOUS */ 203#endif /* ENABLE_MALICIOUS */
202 204
203/* Get internals for debugging/profiling purposes */ 205/* Get internals for debugging/profiling purposes */
@@ -212,10 +214,10 @@ GNUNET_RPS_act_malicious(struct GNUNET_RPS_Handle *h,
212 * @param ready_cb the callback called when the peers are available 214 * @param ready_cb the callback called when the peers are available
213 */ 215 */
214void 216void
215GNUNET_RPS_view_request(struct GNUNET_RPS_Handle *rps_handle, 217GNUNET_RPS_view_request (struct GNUNET_RPS_Handle *rps_handle,
216 uint32_t num_updates, 218 uint32_t num_updates,
217 GNUNET_RPS_NotifyReadyCB view_update_cb, 219 GNUNET_RPS_NotifyReadyCB view_update_cb,
218 void *cls); 220 void *cls);
219 221
220 222
221/** 223/**
@@ -226,9 +228,9 @@ GNUNET_RPS_view_request(struct GNUNET_RPS_Handle *rps_handle,
226 * @param ready_cb the callback called when the peers are available 228 * @param ready_cb the callback called when the peers are available
227 */ 229 */
228struct GNUNET_RPS_StreamRequestHandle * 230struct GNUNET_RPS_StreamRequestHandle *
229GNUNET_RPS_stream_request(struct GNUNET_RPS_Handle *rps_handle, 231GNUNET_RPS_stream_request (struct GNUNET_RPS_Handle *rps_handle,
230 GNUNET_RPS_NotifyReadyCB stream_input_cb, 232 GNUNET_RPS_NotifyReadyCB stream_input_cb,
231 void *cls); 233 void *cls);
232 234
233 235
234/** 236/**
@@ -237,7 +239,7 @@ GNUNET_RPS_stream_request(struct GNUNET_RPS_Handle *rps_handle,
237 * @param srh The request handle to cancel 239 * @param srh The request handle to cancel
238 */ 240 */
239void 241void
240GNUNET_RPS_stream_cancel(struct GNUNET_RPS_StreamRequestHandle *srh); 242GNUNET_RPS_stream_cancel (struct GNUNET_RPS_StreamRequestHandle *srh);
241 243
242 244
243/** 245/**
@@ -246,7 +248,7 @@ GNUNET_RPS_stream_cancel(struct GNUNET_RPS_StreamRequestHandle *srh);
246 * @param h the handle to the rps service 248 * @param h the handle to the rps service
247 */ 249 */
248void 250void
249GNUNET_RPS_disconnect(struct GNUNET_RPS_Handle *h); 251GNUNET_RPS_disconnect (struct GNUNET_RPS_Handle *h);
250 252
251 253
252#if 0 /* keep Emacsens' auto-indent happy */ 254#if 0 /* keep Emacsens' auto-indent happy */