diff options
author | Julius Bünger <buenger@mytum.de> | 2018-09-26 17:40:17 +0200 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2018-09-26 17:44:25 +0200 |
commit | a611b66e1c0ec87c7f3dfb72da1e223379d735f9 (patch) | |
tree | ea824bc8de851b61d94e3d4dd30d2631109e037e /src/rps/gnunet-service-rps_sampler.h | |
parent | ed6b45c02fabd040f25c6ea3e7c5d1e03c9725e8 (diff) | |
download | gnunet-a611b66e1c0ec87c7f3dfb72da1e223379d735f9.tar.gz gnunet-a611b66e1c0ec87c7f3dfb72da1e223379d735f9.zip |
Split sampler into common, sampler and client part
Now there is rps-sampler_client.{c|h} and
gnunet-service-rps_sampler.{c|h} to better reflect which parts are
really in the implementation of brahms (only the service) and which are
used in the client.
The parts both samplers share are now in rps-sampler_common.{c|h}.
Diffstat (limited to 'src/rps/gnunet-service-rps_sampler.h')
-rw-r--r-- | src/rps/gnunet-service-rps_sampler.h | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/rps/gnunet-service-rps_sampler.h b/src/rps/gnunet-service-rps_sampler.h index f33aa6eb1..ab4a6bbbb 100644 --- a/src/rps/gnunet-service-rps_sampler.h +++ b/src/rps/gnunet-service-rps_sampler.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #ifndef RPS_SAMPLER_H | 25 | #ifndef RPS_SAMPLER_H |
26 | #define RPS_SAMPLER_H | 26 | #define RPS_SAMPLER_H |
27 | #include <inttypes.h> | 27 | #include <inttypes.h> |
28 | #include "rps-sampler_common.h" | ||
28 | 29 | ||
29 | 30 | ||
30 | /** | 31 | /** |
@@ -39,19 +40,6 @@ struct RPS_SamplerRequestHandle; | |||
39 | 40 | ||
40 | 41 | ||
41 | /** | 42 | /** |
42 | * Callback that is called from _get_n_rand_peers() when the PeerIDs are ready. | ||
43 | * | ||
44 | * @param cls the closure given alongside this function. | ||
45 | * @param ids the PeerIDs that were returned | ||
46 | * to be freed | ||
47 | */ | ||
48 | typedef void | ||
49 | (*RPS_sampler_n_rand_peers_ready_cb) (const struct GNUNET_PeerIdentity *ids, | ||
50 | uint32_t num_peers, | ||
51 | void *cls); | ||
52 | |||
53 | |||
54 | /** | ||
55 | * Get the size of the sampler. | 43 | * Get the size of the sampler. |
56 | * | 44 | * |
57 | * @param sampler the sampler to return the size of. | 45 | * @param sampler the sampler to return the size of. |
@@ -84,18 +72,6 @@ RPS_sampler_init (size_t init_size, | |||
84 | 72 | ||
85 | 73 | ||
86 | /** | 74 | /** |
87 | * Initialise a modified tuple of sampler elements. | ||
88 | * | ||
89 | * @param init_size the size the sampler is initialised with | ||
90 | * @param max_round_interval maximum time a round takes | ||
91 | * @return a handle to a sampler that consists of sampler elements. | ||
92 | */ | ||
93 | struct RPS_Sampler * | ||
94 | RPS_sampler_mod_init (size_t init_size, | ||
95 | struct GNUNET_TIME_Relative max_round_interval); | ||
96 | |||
97 | |||
98 | /** | ||
99 | * Update every sampler element of this sampler with given peer | 75 | * Update every sampler element of this sampler with given peer |
100 | * | 76 | * |
101 | * @param sampler the sampler to update. | 77 | * @param sampler the sampler to update. |