gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r27150 - in gnunet/src: include set


From: gnunet
Subject: [GNUnet-SVN] r27150 - in gnunet/src: include set
Date: Wed, 15 May 2013 15:39:46 +0200

Author: grothoff
Date: 2013-05-15 15:39:46 +0200 (Wed, 15 May 2013)
New Revision: 27150

Modified:
   gnunet/src/include/gnunet_set_service.h
   gnunet/src/set/mq.h
   gnunet/src/set/set.h
   gnunet/src/set/test_set.conf
Log:
-comments for Florian

Modified: gnunet/src/include/gnunet_set_service.h
===================================================================
--- gnunet/src/include/gnunet_set_service.h     2013-05-15 12:52:16 UTC (rev 
27149)
+++ gnunet/src/include/gnunet_set_service.h     2013-05-15 13:39:46 UTC (rev 
27150)
@@ -86,18 +86,27 @@
    * Everything went ok.
    */
   GNUNET_SET_STATUS_OK,
+
   /**
    * There was a timeout.
    */
   GNUNET_SET_STATUS_TIMEOUT,
+
   /**
    * The other peer refused to to the operation with us,
    * or something went wrong.
    */
   GNUNET_SET_STATUS_FAILURE,
+
   /**
-   * Success, all elements have been sent.
+   * Success, all elements have been returned (but the other
+   * peer might still be receiving some from us, so we are not done).
    */
+  GNUNET_SET_STATUS_HALF_DONE,
+
+  /**
+   * Success, all elements have been sent (and received).
+   */
   GNUNET_SET_STATUS_DONE
 };
 
@@ -140,7 +149,7 @@
   /**
    * Actual data of the element
    */
-  void *data;
+  const void *data;
 };
 
 
@@ -161,7 +170,7 @@
  * @param status see enum GNUNET_SET_Status
  */
 typedef void (*GNUNET_SET_ResultIterator) (void *cls,
-                                           struct GNUNET_SET_Element *element,
+                                           const struct GNUNET_SET_Element 
*element,
                                            enum GNUNET_SET_Status status);
 
 
@@ -258,7 +267,7 @@
  *        fail due to hash collisions, using a different salt for each 
operation
  *        makes it harder for an attacker to exploit this
  * @param timeout result_cb will be called with GNUNET_SET_STATUS_TIMEOUT
- *        if the operation is not done after the specified time
+ *        if the operation is not done after the specified time; @deprecated
  * @param result_mode specified how results will be returned,
  *        see 'GNUNET_SET_ResultMode'.
  * @param result_cb called on error or success
@@ -313,7 +322,7 @@
  *
  * @param request request to accept
  * @param set set used for the requested operation 
- * @param timeout timeout for the set operation
+ * @param timeout timeout for the set operation, @deprecated
  * @param result_mode specified how results will be returned,
  *        see 'GNUNET_SET_ResultMode'.
  * @param result_cb callback for the results

Modified: gnunet/src/set/mq.h
===================================================================
--- gnunet/src/set/mq.h 2013-05-15 12:52:16 UTC (rev 27149)
+++ gnunet/src/set/mq.h 2013-05-15 13:39:46 UTC (rev 27150)
@@ -276,7 +276,6 @@
 GNUNET_MQ_queue_for_server_client (struct GNUNET_SERVER_Client *client);
 
 
-
 /**
  * Create a message queue for a GNUNET_STREAM_Socket.
  * If handlers are specfied, receive messages from the stream socket.
@@ -285,12 +284,14 @@
  * @param handlers handlers for receiving messages
  * @param cls closure for the handlers
  * @return the message queue
+ * @deprecated - GNUNET_MQ_queue_create_with_callbacks
  */
 struct GNUNET_MQ_MessageQueue *
 GNUNET_MQ_queue_for_stream_socket (struct GNUNET_STREAM_Socket *socket,
                                    const struct GNUNET_MQ_Handler *handlers,
                                    void *cls);
 
+
 /**
  * Replace the handlers of a message queue with new handlers.
  * Takes effect immediately, even for messages that already have been 
received, but for
@@ -306,7 +307,6 @@
                             void *cls);
 
 
-
 /**
  * Call a callback once the message has been sent, that is, the message
  * can not be canceled anymore.
@@ -321,6 +321,7 @@
                        GNUNET_MQ_NotifyCallback cb,
                        void *cls);
 
+
 /**
  * Call a callback once all messages queued have been sent,
  * i.e. the message queue is empty.
@@ -328,6 +329,7 @@
  * @param mqm the message queue to send the notification for
  * @param cb the callback to call on an empty queue
  * @param cls closure for cb
+ * @deprecated
  */
 void
 GNUNET_MQ_notify_empty (struct GNUNET_MQ_MessageQueue *mqm,
@@ -341,6 +343,7 @@
  * @param mqm the message queue to send the notification for
  * @param cb the callback to call on a read error
  * @param cls closure for cb
+ * @deprecated, integrate with queue creation
  */
 void
 GNUNET_MQ_notify_read_error (struct GNUNET_MQ_MessageQueue *mqm,

Modified: gnunet/src/set/set.h
===================================================================
--- gnunet/src/set/set.h        2013-05-15 12:52:16 UTC (rev 27149)
+++ gnunet/src/set/set.h        2013-05-15 13:39:46 UTC (rev 27150)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2012 Christian Grothoff (and other contributing authors)
+     (C) 2012, 2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -49,6 +49,7 @@
   /**
    * Operation type, values of enum GNUNET_SET_OperationType
    */
+  // FIXME: use 32_t for 'enum'.
   uint16_t operation GNUNET_PACKED;
 };
 
@@ -61,14 +62,15 @@
   struct GNUNET_MessageHeader header;
 
   /**
+   * Operation type, values of enum GNUNET_SET_OperationType
+   */
+  uint16_t operation GNUNET_PACKED;
+
+  /**
    * application id
    */
   struct GNUNET_HashCode app_id;
 
-  /**
-   * Operation type, values of enum GNUNET_SET_OperationType
-   */
-  uint16_t operation GNUNET_PACKED;
 };
 
 
@@ -105,16 +107,16 @@
   struct GNUNET_MessageHeader header;
 
   /**
-   * Identity of the requesting peer.
-   */
-  struct GNUNET_PeerIdentity peer_id;
-
-  /**
    * ID of the request we want to accept,
    * chosen by the service.
    */
   uint32_t accept_id GNUNET_PACKED;
 
+  /**
+   * Identity of the requesting peer.
+   */
+  struct GNUNET_PeerIdentity peer_id;
+
   /* rest: nested context message */
 };
 
@@ -127,6 +129,11 @@
   struct GNUNET_MessageHeader header;
 
   /**
+   * id of our evaluate, chosen by the client
+   */
+  uint32_t request_id GNUNET_PACKED;
+
+  /**
    * Peer to evaluate the operation with
    */
   struct GNUNET_PeerIdentity peer;
@@ -137,11 +144,6 @@
   struct GNUNET_HashCode app_id;
 
   /**
-   * id of our evaluate, chosen by the client
-   */
-  uint32_t request_id GNUNET_PACKED;
-
-  /**
    * Salt to use for the operation
    */
   uint16_t salt GNUNET_PACKED;

Modified: gnunet/src/set/test_set.conf
===================================================================
--- gnunet/src/set/test_set.conf        2013-05-15 12:52:16 UTC (rev 27149)
+++ gnunet/src/set/test_set.conf        2013-05-15 13:39:46 UTC (rev 27150)
@@ -1,3 +1,7 @@
+# @INLINE@ test_set_defaults.conf
+[PATHS]
+SERVICEHOME = /tmp/test-gnunet-set/
+
 [set]
 AUTOSTART = YES
 PORT = 2106




reply via email to

[Prev in Thread] Current Thread [Next in Thread]