WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
SPDX-License-Identifier: AGPL3.0-or-later
-*/
+ */
/**
* @file rps/gnunet-service-rps_sampler.h
* @return the size of the sampler
*/
unsigned int
-RPS_sampler_get_size (struct RPS_Sampler *sampler);
+RPS_sampler_get_size(struct RPS_Sampler *sampler);
/**
* @param new_size the new size of the sampler (not 0)
*/
void
-RPS_sampler_resize (struct RPS_Sampler *sampler, unsigned int new_size);
+RPS_sampler_resize(struct RPS_Sampler *sampler, unsigned int new_size);
/**
* @return a handle to a sampler that consists of sampler elements.
*/
struct RPS_Sampler *
-RPS_sampler_init (size_t init_size,
- struct GNUNET_TIME_Relative max_round_interval);
+RPS_sampler_init(size_t init_size,
+ struct GNUNET_TIME_Relative max_round_interval);
/**
* @param sampler the sampler to update.
* @param id the PeerID that is put in the sampler
*/
- void
-RPS_sampler_update (struct RPS_Sampler *sampler,
- const struct GNUNET_PeerIdentity *id);
+void
+RPS_sampler_update(struct RPS_Sampler *sampler,
+ const struct GNUNET_PeerIdentity *id);
/**
* @param sampler the sampler to reinitialise a sampler in.
* @param id the id of the samplers to update.
*/
- void
-RPS_sampler_reinitialise_by_value (struct RPS_Sampler *sampler,
- const struct GNUNET_PeerIdentity *id);
+void
+RPS_sampler_reinitialise_by_value(struct RPS_Sampler *sampler,
+ const struct GNUNET_PeerIdentity *id);
/**
* @param num_peers the number of peers requested
*/
struct RPS_SamplerRequestHandle *
-RPS_sampler_get_n_rand_peers (struct RPS_Sampler *sampler,
- uint32_t num_peers,
- RPS_sampler_n_rand_peers_ready_cb cb,
- void *cls);
+RPS_sampler_get_n_rand_peers(struct RPS_Sampler *sampler,
+ uint32_t num_peers,
+ RPS_sampler_n_rand_peers_ready_cb cb,
+ void *cls);
/**
* Cancle a request issued through #RPS_sampler_n_rand_peers_ready_cb.
* @param req_handle the handle to the request
*/
void
-RPS_sampler_request_cancel (struct RPS_SamplerRequestHandle *req_handle);
+RPS_sampler_request_cancel(struct RPS_SamplerRequestHandle *req_handle);
/**
*
* @return the number of occurrences of id.
*/
- uint32_t
-RPS_sampler_count_id (struct RPS_Sampler *sampler,
- const struct GNUNET_PeerIdentity *id);
+uint32_t
+RPS_sampler_count_id(struct RPS_Sampler *sampler,
+ const struct GNUNET_PeerIdentity *id);
/**
*
* @param sampler the sampler to destroy.
*/
- void
-RPS_sampler_destroy (struct RPS_Sampler *sampler);
+void
+RPS_sampler_destroy(struct RPS_Sampler *sampler);
#endif
/* end of gnunet-service-rps.c */