use new connecT API
[oweals/gnunet.git] / src / consensus / consensus.h
index f1049e1cd20c7c4c11da081bf8a5978ce0a48a34..60e4396559930c10642cd00be9cce639aa26c50f 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2012 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2012 GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -14,8 +14,8 @@
 
      You should have received a copy of the GNU General Public License
      along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-     Boston, MA 02111-1307, USA.
+     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+     Boston, MA 02110-1301, USA.
 */
 
 /**
@@ -41,27 +41,28 @@ struct GNUNET_CONSENSUS_JoinMessage
    */
   struct GNUNET_MessageHeader header;
 
+  /**
+   * Number of peers (at the end of this message) that want to
+   * participate in the consensus.
+   */
   uint32_t num_peers GNUNET_PACKED;
 
+  /**
+   * Session id of the consensus.
+   */
   struct GNUNET_HashCode session_id;
 
-  /* GNUNET_PeerIdentity[num_peers] */
-};
-
-
-struct GNUNET_CONSENSUS_ConcludeMessage
-{
   /**
-   * Type: GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_CONCLUDE
+   * Start time for the consensus.
    */
-  struct GNUNET_MessageHeader header;
-
-  // uint32_t reserved GNUNET_PACKED; // FIXME...
+  struct GNUNET_TIME_AbsoluteNBO start;
 
   /**
-   * Timeout for conclude
+   * Deadline for conclude.
    */
-  struct GNUNET_TIME_RelativeNBO timeout;
+  struct GNUNET_TIME_AbsoluteNBO deadline;
+
+  /* GNUNET_PeerIdentity[num_peers] */
 };
 
 
@@ -86,20 +87,6 @@ struct GNUNET_CONSENSUS_ElementMessage
   /* rest: element data */
 };
 
-struct GNUNET_CONSENSUS_AckMessage
-{
-  /**
-   * Type: GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_ACK
-   */
-  struct GNUNET_MessageHeader header;
-
-  /**
-   * Do we want to keep and propagate the element?
-   */
-  uint8_t keep; /* FIXME: alignment!? => (u)int32_t */
-
-  /* FIXME: add message hash? */
-};
 
 GNUNET_NETWORK_STRUCT_END