consensus: destroy set handles
[oweals/gnunet.git] / src / psyc / psyc.h
index 21131e7d32e6a3adf82353cf61adb8ed6a01877d..c1ce466a939ee9377b664e296c6ea4f05263dc58 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This file is part of GNUnet
- * (C) 2013 Christian Grothoff (and other contributing authors)
+ * Copyright (C) 2013 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.
  */
 
 /**
@@ -93,12 +93,14 @@ struct SlaveJoinRequest
 
   uint32_t relay_count GNUNET_PACKED;
 
-  struct GNUNET_CRYPTO_EddsaPublicKey channel_key;
+  struct GNUNET_CRYPTO_EddsaPublicKey channel_pub_key;
 
   struct GNUNET_CRYPTO_EcdsaPrivateKey slave_key;
 
   struct GNUNET_PeerIdentity origin;
 
+  uint32_t flags GNUNET_PACKED;
+
   /* Followed by struct GNUNET_PeerIdentity relays[relay_count] */
 
   /* Followed by struct GNUNET_MessageHeader join_msg */
@@ -112,30 +114,39 @@ struct ChannelMembershipStoreRequest
    */
   struct GNUNET_MessageHeader header;
 
-  uint32_t reserved;
+  uint32_t reserved GNUNET_PACKED;
+
+  uint64_t op_id GNUNET_PACKED;
 
-  struct GNUNET_CRYPTO_EcdsaPublicKey slave_key;
+  struct GNUNET_CRYPTO_EcdsaPublicKey slave_pub_key;
 
-  uint64_t announced_at;
+  uint64_t announced_at GNUNET_PACKED;
 
-  uint64_t effective_since;
+  uint64_t effective_since GNUNET_PACKED;
 
   uint8_t did_join;
 };
 
 
-struct StoryRequest
+struct HistoryRequest
 {
   /**
-   * Type: GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_STORY_REQUEST
+   * Type: GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_HISTORY_REQUEST
    */
   struct GNUNET_MessageHeader header;
 
-  uint64_t op_id;
+  uint32_t reserved GNUNET_PACKED;
+
+  /**
+   * ID for this operation.
+   */
+  uint64_t op_id GNUNET_PACKED;
+
+  uint64_t start_message_id GNUNET_PACKED;
 
-  uint64_t start_message_id;
+  uint64_t end_message_id GNUNET_PACKED;
 
-  uint64_t end_message_id;
+  uint64_t message_limit GNUNET_PACKED;
 };
 
 
@@ -148,10 +159,12 @@ struct StateRequest
    */
   struct GNUNET_MessageHeader header;
 
+  uint32_t reserved GNUNET_PACKED;
+
   /**
    * ID for this operation.
    */
-  uint64_t op_id;
+  uint64_t op_id GNUNET_PACKED;
 
   /* Followed by NUL-terminated name. */
 };
@@ -160,62 +173,6 @@ struct StateRequest
 /**** service -> library ****/
 
 
-struct CountersResult
-{
-  /**
-   * Type: GNUNET_MESSAGE_TYPE_PSYC_RESULT_COUNTERS
-   */
-  struct GNUNET_MessageHeader header;
-
-  /**
-   * Status code for the operation.
-   */
-  int32_t result_code GNUNET_PACKED;
-
-  /**
-   * Last message ID sent to the channel.
-   */
-  uint64_t max_message_id;
-};
-
-
-/**
- * Answer from service to client about last operation.
- */
-struct OperationResult
-{
-  /**
-   * Types:
-   * - GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE
-   * - GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_STORY_RESULT
-   * - GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_STATE_RESULT
-   */
-  struct GNUNET_MessageHeader header;
-
-  /**
-   * Operation ID.
-   */
-  uint32_t op_id GNUNET_PACKED;
-
-  /**
-   * Status code for the operation.
-   */
-  int64_t result_code GNUNET_PACKED;
-
-  /* Followed by:
-   * - on error: NUL-terminated error message
-   * - on success: one of the following message types
-   *
-   *   For a STORY_RESULT:
-   *   - GNUNET_MESSAGE_TYPE_PSYC_MESSAGE
-   *
-   *   For a STATE_RESULT, one of:
-   *   - GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MODIFIER
-   *   - GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MOD_CONT
-   *   - GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_END
-   */
-};
-
 GNUNET_NETWORK_STRUCT_END
 
 #endif