-remove trailing whitespace
[oweals/gnunet.git] / src / include / gnunet_consensus_service.h
index 66d48e0e200a4a87950fd9777b8bee817744a21c..6d8d23a1740459ec6702edfad0291fda1ee622cb 100644 (file)
@@ -39,28 +39,7 @@ extern "C"
 #include "gnunet_common.h"
 #include "gnunet_time_lib.h"
 #include "gnunet_configuration_lib.h"
-
-
-/**
- * An element of the consensus set.
- */
-struct GNUNET_CONSENSUS_Element
-{
-  /**
-   * The actual data of the element.
-   */
-   const void *data;
-
-   /**
-    * Size of the element's data.
-    */
-   uint16_t size;
-
-   /**
-    * Application specific element type
-    */
-   uint16_t type;
-};
+#include "gnunet_set_service.h"
 
 
 /**
@@ -73,7 +52,7 @@ struct GNUNET_CONSENSUS_Element
  * @param element new element, NULL on error
  */
 typedef void (*GNUNET_CONSENSUS_ElementCallback) (void *cls,
-                                                 const struct GNUNET_CONSENSUS_Element *element);
+                                                  const struct GNUNET_SET_Element *element);
 
 
 
@@ -85,8 +64,7 @@ struct GNUNET_CONSENSUS_Handle;
 
 /**
  * Create a consensus session.  The set being reconciled is initially
- * empty.  Only reconcile with other peers after
- * GNUNET_CONSENSUS_reconcile has been called.
+ * empty.
  *
  * @param cfg
  * @param num_peers
@@ -109,14 +87,14 @@ GNUNET_CONSENSUS_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
 
 
 /**
- * Called when an insertion (transmission to consensus service,
- * which does not imply fully consensus on this element with
- * all other peers) was successful.
- * May not call GNUNET_CONSENSUS_destroy; schedule a task to call
- * GNUNET_CONSENSUS_destroy instead.
+ * Called when an insertion (transmission to consensus service, which
+ * does not imply fully consensus on this element with all other
+ * peers) was successful.  May not call GNUNET_CONSENSUS_destroy();
+ * schedule a task to call GNUNET_CONSENSUS_destroy() instead (if
+ * needed).
  *
  * @param cls
- * @param success GNUNET_OK on success, GNUNET_SYSERR if 
+ * @param success #GNUNET_OK on success, #GNUNET_SYSERR if
  *        the insertion and thus the consensus failed for good
  */
 typedef void (*GNUNET_CONSENSUS_InsertDoneCallback) (void *cls,
@@ -125,20 +103,20 @@ typedef void (*GNUNET_CONSENSUS_InsertDoneCallback) (void *cls,
 
 /**
  * Insert an element in the set being reconsiled.  Only transmit changes to
- * other peers if "GNUNET_CONSENSUS_begin" has been called.
- * Must not be called after "GNUNET_CONSENSUS_conclude".
- * May not call GNUNET_CONSENSUS_destroy; schedule a task to call
- * GNUNET_CONSENSUS_destroy instead.
+ * other peers if GNUNET_CONSENSUS_begin() has been called.
+ * Must not be called after GNUNET_CONSENSUS_conclude().
+ * May not call GNUNET_CONSENSUS_destroy(); schedule a task to call
+ * GNUNET_CONSENSUS_destroy() instead (if needed).
  *
  * @param consensus handle for the consensus session
  * @param element the element to be inserted
- * @param idc function called when we are done with this element and it 
- *            is thus allowed to call GNUNET_CONSENSUS_insert again
- * @param idc_cls closure for 'idc'
+ * @param idc function called when we are done with this element and it
+ *            is thus allowed to call GNUNET_CONSENSUS_insert() again
+ * @param idc_cls closure for @a idc
  */
 void
 GNUNET_CONSENSUS_insert (struct GNUNET_CONSENSUS_Handle *consensus,
-                         const struct GNUNET_CONSENSUS_Element *element,
+                         const struct GNUNET_SET_Element *element,
                          GNUNET_CONSENSUS_InsertDoneCallback idc,
                          void *idc_cls);