fix type error and test cases
[oweals/gnunet.git] / src / set / gnunet-service-set.h
index f8a2d88ba1f6a244f1cb07759ef0f3dc61d2e27f..68d8fe81f60a6a75fcffdaa7247765fca3a1ffc8 100644 (file)
@@ -1,6 +1,6 @@
 /*
       This file is part of GNUnet
-      Copyright (C) 2013, 2014 Christian Grothoff (and other contributing authors)
+      Copyright (C) 2013, 2014 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
@@ -119,6 +119,30 @@ struct OperationSpecification
    * When are elements sent to the client, and which elements are sent?
    */
   enum GNUNET_SET_ResultMode result_mode;
+
+  /**
+   * Always use delta operation instead of sending full sets,
+   * even it it's less efficient.
+   */
+  int force_delta;
+
+  /**
+   * Always send full sets, even if delta operations would
+   * be more efficient.
+   */
+  int force_full;
+
+  /**
+   * #GNUNET_YES to fail operations where Byzantine faults
+   * are suspected
+   */
+  int byzantine;
+
+  /**
+   * Lower bound for the set size, used only when
+   * byzantine mode is enabled.
+   */
+  int byzantine_lower_bound;
 };
 
 
@@ -336,6 +360,9 @@ struct ElementEntry
 };
 
 
+struct Listener;
+
+
 /**
  * Operation context used to execute a set operation.
  */
@@ -353,6 +380,11 @@ struct Operation
    */
   struct GNUNET_CADET_Channel *channel;
 
+  /**
+   * Port this operation runs on.
+   */
+  struct Listener *listener;
+
   /**
    * Message queue for the channel.
    */
@@ -485,8 +517,8 @@ struct PendingMutation
 
   /**
    * Message that describes the desired mutation.
-   * May only be a GNUNET_MESSAGE_TYPE_SET_ADD or
-   * GNUNET_MESSAGE_TYPE_SET_REMOVE.
+   * May only be a #GNUNET_MESSAGE_TYPE_SET_ADD or
+   * #GNUNET_MESSAGE_TYPE_SET_REMOVE.
    */
   struct GNUNET_MessageHeader *mutation_message;
 };
@@ -512,7 +544,7 @@ struct Set
    * Client that owns the set.  Only one client may own a set,
    * and there can only be one set per client.
    */
-  struct GNUNET_SERVER_Client *client;
+  struct GNUNET_SERVICE_Client *client;
 
   /**
    * Message queue for the client.