#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"
/**
* @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);
* 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,
*
* @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);