-remove GNUNET_MQ_impl_send_commit, make it part of send_continue, to ensure calling...
[oweals/gnunet.git] / src / include / gnunet_consensus_service.h
index f7f784f6eda90b34d64cd57f9afb46376c414b95..b7085a801294715fc0eb1a127a0020e9b6f5cf43 100644 (file)
@@ -4,7 +4,7 @@
 
       GNUnet is free software; you can redistribute it and/or modify
       it under the terms of the GNU General Public License as published
-      by the Free Software Foundation; either version 2, or (at your
+      by the Free Software Foundation; either version 3, or (at your
       option) any later version.
 
       GNUnet is distributed in the hope that it will be useful, but
@@ -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);
 
 
 
@@ -116,7 +95,7 @@ GNUNET_CONSENSUS_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
  * GNUNET_CONSENSUS_destroy instead.
  *
  * @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,
@@ -132,13 +111,13 @@ typedef void (*GNUNET_CONSENSUS_InsertDoneCallback) (void *cls,
  *
  * @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 
+ * @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'
  */
 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);