plugin datastore mysql
[oweals/gnunet.git] / src / rps / gnunet-service-rps_sampler.h
index 83705b013722256f9e49ffe472e01912b10710f1..f33e7430c3095a591424da7a5325369654f6f7cc 100644 (file)
  */
 struct RPS_Sampler;
 
+/**
+ * A handle to cancel a request.
+ */
+struct RPS_SamplerRequestHandle;
+
 
 /**
  * Callback that is called from _get_n_rand_peers() when the PeerIDs are ready.
@@ -130,11 +135,19 @@ RPS_sampler_reinitialise_by_value (struct RPS_Sampler *sampler,
  *                   #GNUNET_NO if used internally
  * @param num_peers the number of peers requested
  */
-    void
+struct RPS_SamplerRequestHandle *
 RPS_sampler_get_n_rand_peers (struct RPS_Sampler *sampler,
                               RPS_sampler_n_rand_peers_ready_cb cb,
                               void *cls, uint32_t num_peers);
 
+/**
+ * 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);
+
 
 /**
  * Counts how many Samplers currently hold a given PeerID.