aboutsummaryrefslogtreecommitdiff
path: root/src/rps/gnunet-service-rps_sampler.h
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2015-01-22 00:18:44 +0000
committerJulius Bünger <buenger@mytum.de>2015-01-22 00:18:44 +0000
commit5883a1ad9483eba3871968d9b8c5dfd9c3db12c1 (patch)
tree8a4861b1f8a93e52f3cf60261e9f8e6aca7b2586 /src/rps/gnunet-service-rps_sampler.h
parentebbd29b689e43fe5c4cc83074fb366b71fdcff85 (diff)
downloadgnunet-5883a1ad9483eba3871968d9b8c5dfd9c3db12c1.tar.gz
gnunet-5883a1ad9483eba3871968d9b8c5dfd9c3db12c1.zip
restructured service and sampler
Diffstat (limited to 'src/rps/gnunet-service-rps_sampler.h')
-rw-r--r--src/rps/gnunet-service-rps_sampler.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/rps/gnunet-service-rps_sampler.h b/src/rps/gnunet-service-rps_sampler.h
index 451d3cdb0..a7021b4fe 100644
--- a/src/rps/gnunet-service-rps_sampler.h
+++ b/src/rps/gnunet-service-rps_sampler.h
@@ -89,7 +89,6 @@ RPS_sampler_resize (unsigned int new_size);
89 */ 89 */
90 void 90 void
91RPS_sampler_init (size_t init_size, 91RPS_sampler_init (size_t init_size,
92 const struct GNUNET_PeerIdentity *id,
93 struct GNUNET_TIME_Relative max_round_interval, 92 struct GNUNET_TIME_Relative max_round_interval,
94 RPS_sampler_insert_cb ins_cb, void *ins_cls, 93 RPS_sampler_insert_cb ins_cb, void *ins_cls,
95 RPS_sampler_remove_cb rem_cb, void *rem_cls); 94 RPS_sampler_remove_cb rem_cb, void *rem_cls);
@@ -121,26 +120,16 @@ RPS_sampler_reinitialise_by_value (const struct GNUNET_PeerIdentity *id);
121 * We might want to reinitialise this sampler after giving the 120 * We might want to reinitialise this sampler after giving the
122 * corrsponding peer to the client. 121 * corrsponding peer to the client.
123 * Random with or without consumption? 122 * Random with or without consumption?
124 * Only used internally
125 */
126 const struct GNUNET_PeerIdentity *
127RPS_sampler_get_n_rand_peers_ (uint32_t n);
128
129
130/**
131 * Get n random peers out of the sampled peers.
132 *
133 * We might want to reinitialise this sampler after giving the
134 * corrsponding peer to the client.
135 * Random with or without consumption?
136 * 123 *
137 * @param cb callback that will be called once the ids are ready. 124 * @param cb callback that will be called once the ids are ready.
138 * @param cls closure given to @a cb 125 * @param cls closure given to @a cb
126 * @param for_client #GNUNET_YES if result is used for client,
127 * #GNUNET_NO if used internally
139 * @param num_peers the number of peers requested 128 * @param num_peers the number of peers requested
140 */ 129 */
141 void 130 void
142RPS_sampler_get_n_rand_peers (RPS_sampler_n_rand_peers_ready_cb cb, 131RPS_sampler_get_n_rand_peers (RPS_sampler_n_rand_peers_ready_cb cb,
143 void *cls, uint32_t num_peers); 132 void *cls, uint32_t num_peers, int for_client);
144 133
145 134
146/** 135/**