session time out for http client/server
[oweals/gnunet.git] / src / set / set.h
index 7ec3e6cb256ecbf6ae3d75f49ddee1f922e54ae7..09d1120f07a03b95780df5bda10410cd0d3a37ae 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
@@ -59,7 +59,7 @@ struct GNUNET_SET_ListenMessage
   /**
    * Operation type, values of enum GNUNET_SET_OperationType
    */
-  uint16_t operation GNUNET_PACKED;
+  uint32_t operation GNUNET_PACKED;
 
   /**
    * application id
@@ -87,6 +87,12 @@ struct GNUNET_SET_AcceptRejectMessage
    * must be 0 if we don't accept the request.
    */
   uint32_t request_id GNUNET_PACKED;
+
+  /**
+   * How should results be sent to us?
+   * See enum GNUNET_SET_ResultMode.
+   */
+  uint16_t result_mode GNUNET_PACKED;
 };
 
 
@@ -143,9 +149,10 @@ struct GNUNET_SET_EvaluateMessage
   uint16_t salt GNUNET_PACKED;
 
   /**
-   * Padding
+   * How should results be sent to us?
+   * See enum GNUNET_SET_ResultMode.
    */
-  uint16_t reserved GNUNET_PACKED;
+  uint16_t result_mode GNUNET_PACKED;
 
   /* rest: inner message */
 };
@@ -194,6 +201,52 @@ struct GNUNET_SET_ElementMessage
 };
 
 
+/**
+ * Sent to the service by the client
+ * in order to cancel a set operation.
+ */
+struct GNUNET_SET_CancelMessage
+{
+  /**
+   * Type: GNUNET_MESSAGE_TYPE_SET_CANCEL
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * ID of the request we want to cancel.
+   */
+  uint32_t request_id GNUNET_PACKED;
+};
+
+struct GNUNET_SET_IterResponseMessage
+{
+  /**
+   * Type: GNUNET_MESSAGE_TYPE_SET_ITER_RESPONSE
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * Type of the element attachted to the message,
+   * if any.
+   */
+  uint16_t element_type GNUNET_PACKED;
+
+  /* rest: element */
+};
+
+struct GNUNET_SET_IterAckMessage
+{
+  /**
+   * Type: GNUNET_MESSAGE_TYPE_SET_ITER_ACK
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * Non-zero if the service should continue sending elements.
+   */
+  uint32_t send_more;
+};
+
 GNUNET_NETWORK_STRUCT_END
 
 #endif