uncrustify as demanded.
[oweals/gnunet.git] / src / testbed / testbed_api.h
index a9c2a0b711a40cc333a34999ec455573681e221f..c79c35a5ebb9b7d8acd2c0db0454e96bd4644954 100644 (file)
@@ -11,7 +11,7 @@
       WITHOUT ANY WARRANTY; without even the implied warranty of
       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       Affero General Public License for more details.
-     
+
       You should have received a copy of the GNU Affero General Public License
       along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 /**
  * Enumeration of operations
  */
-enum OperationType
-{
-    /**
-     * Peer create operation
-     */
+enum OperationType {
+  /**
+   * Peer create operation
+   */
   OP_PEER_CREATE,
 
-    /**
-     * Peer start operation
-     */
+  /**
+   * Peer start operation
+   */
   OP_PEER_START,
 
-    /**
-     * Peer stop operation
-     */
+  /**
+   * Peer stop operation
+   */
   OP_PEER_STOP,
 
-    /**
-     * Peer destroy operation
-     */
+  /**
+   * Peer destroy operation
+   */
   OP_PEER_DESTROY,
 
-    /**
-     * Get peer information operation
-     */
+  /**
+   * Get peer information operation
+   */
   OP_PEER_INFO,
 
   /**
@@ -73,19 +72,19 @@ enum OperationType
    */
   OP_PEER_RECONFIGURE,
 
-    /**
-     * Overlay connection operation
-     */
+  /**
+   * Overlay connection operation
+   */
   OP_OVERLAY_CONNECT,
 
-    /**
-     * Forwarded operation
-     */
+  /**
+   * Forwarded operation
+   */
   OP_FORWARDED,
 
-    /**
-     * Link controllers operation
-     */
+  /**
+   * Link controllers operation
+   */
   OP_LINK_CONTROLLERS,
 
   /**
@@ -109,8 +108,7 @@ enum OperationType
 /**
  * Enumeration of states of OperationContext
  */
-enum OperationContextState
-{
+enum OperationContextState {
   /**
    * The initial state where the associated operation has just been created
    * and is waiting in the operation queues to be started
@@ -134,8 +132,7 @@ enum OperationContextState
 /**
  * Context information for GNUNET_TESTBED_Operation
  */
-struct OperationContext
-{
+struct OperationContext {
   /**
    * The controller to which this operation context belongs to
    */
@@ -191,8 +188,7 @@ typedef void
  * controllers can interact with each other (in a P2P fashion); those
  * links are established via TCP/IP on the controller's service port.
  */
-struct GNUNET_TESTBED_Controller
-{
+struct GNUNET_TESTBED_Controller {
   /**
    * The host where the controller is running
    */
@@ -269,15 +265,13 @@ struct GNUNET_TESTBED_Controller
    * The operation id counter. use current value and increment
    */
   uint32_t operation_counter;
-
 };
 
 
 /**
  * Handle for barrier
  */
-struct GNUNET_TESTBED_Barrier
-{
+struct GNUNET_TESTBED_Barrier {
   /**
    * hashcode identifying this barrier in the hashmap
    */
@@ -319,8 +313,8 @@ struct GNUNET_TESTBED_Barrier
  * @deprecated
  */
 void
-GNUNET_TESTBED_queue_message_ (struct GNUNET_TESTBED_Controller *controller,
-                               struct GNUNET_MessageHeader *msg);
+GNUNET_TESTBED_queue_message_(struct GNUNET_TESTBED_Controller *controller,
+                              struct GNUNET_MessageHeader *msg);
 
 
 /**
@@ -332,8 +326,8 @@ GNUNET_TESTBED_queue_message_ (struct GNUNET_TESTBED_Controller *controller,
  * @param opc the operation context to be inserted
  */
 void
-GNUNET_TESTBED_insert_opc_ (struct GNUNET_TESTBED_Controller *c,
-                            struct OperationContext *opc);
+GNUNET_TESTBED_insert_opc_(struct GNUNET_TESTBED_Controller *c,
+                           struct OperationContext *opc);
 
 
 /**
@@ -344,8 +338,8 @@ GNUNET_TESTBED_insert_opc_ (struct GNUNET_TESTBED_Controller *c,
  * @param opc the operation context to remove
  */
 void
-GNUNET_TESTBED_remove_opc_ (const struct GNUNET_TESTBED_Controller *c,
-                            struct OperationContext *opc);
+GNUNET_TESTBED_remove_opc_(const struct GNUNET_TESTBED_Controller *c,
+                           struct OperationContext *opc);
 
 
 /**
@@ -358,9 +352,9 @@ GNUNET_TESTBED_remove_opc_ (const struct GNUNET_TESTBED_Controller *c,
  * @return the size of the xconfig
  */
 size_t
-GNUNET_TESTBED_compress_config_ (const char *config,
-                                 size_t size,
-                                 char **xconfig);
+GNUNET_TESTBED_compress_config_(const char *config,
+                                size_t size,
+                                char **xconfig);
 
 
 /**
@@ -373,9 +367,9 @@ GNUNET_TESTBED_compress_config_ (const char *config,
  * @return the serialized and compressed configuration
  */
 char *
-GNUNET_TESTBED_compress_cfg_ (const struct GNUNET_CONFIGURATION_Handle *cfg,
-                              size_t *size,
-                              size_t *xsize);
+GNUNET_TESTBED_compress_cfg_(const struct GNUNET_CONFIGURATION_Handle *cfg,
+                             size_t *size,
+                             size_t *xsize);
 
 
 /**
@@ -392,9 +386,9 @@ GNUNET_TESTBED_compress_cfg_ (const struct GNUNET_CONFIGURATION_Handle *cfg,
  * @return the initialization message
  */
 struct GNUNET_TESTBED_HelperInit *
-GNUNET_TESTBED_create_helper_init_msg_ (const char *cname,
-                                        const char *hostname,
-                                        const struct GNUNET_CONFIGURATION_Handle *cfg);
+GNUNET_TESTBED_create_helper_init_msg_(const char *cname,
+                                       const char *hostname,
+                                       const struct GNUNET_CONFIGURATION_Handle *cfg);
 
 
 /**
@@ -412,11 +406,11 @@ GNUNET_TESTBED_create_helper_init_msg_ (const char *cname,
  *           operation
  */
 struct OperationContext *
-GNUNET_TESTBED_forward_operation_msg_ (struct GNUNET_TESTBED_Controller *controller,
-                                       uint64_t operation_id,
-                                       const struct GNUNET_MessageHeader *msg,
-                                       GNUNET_MQ_MessageCallback cc,
-                                       void *cc_cls);
+GNUNET_TESTBED_forward_operation_msg_(struct GNUNET_TESTBED_Controller *controller,
+                                      uint64_t operation_id,
+                                      const struct GNUNET_MessageHeader *msg,
+                                      GNUNET_MQ_MessageCallback cc,
+                                      void *cc_cls);
 
 /**
  * Function to cancel an operation created by simply forwarding an operation
@@ -425,7 +419,7 @@ GNUNET_TESTBED_forward_operation_msg_ (struct GNUNET_TESTBED_Controller *control
  * @param opc the operation context from GNUNET_TESTBED_forward_operation_msg_()
  */
 void
-GNUNET_TESTBED_forward_operation_msg_cancel_ (struct OperationContext *opc);
+GNUNET_TESTBED_forward_operation_msg_cancel_(struct OperationContext *opc);
 
 
 /**
@@ -438,7 +432,7 @@ GNUNET_TESTBED_forward_operation_msg_cancel_ (struct OperationContext *opc);
  * @return handle to the parsed configuration
  */
 struct GNUNET_CONFIGURATION_Handle *
-GNUNET_TESTBED_extract_config_ (const struct GNUNET_MessageHeader *msg);
+GNUNET_TESTBED_extract_config_(const struct GNUNET_MessageHeader *msg);
 
 
 /**
@@ -449,7 +443,7 @@ GNUNET_TESTBED_extract_config_ (const struct GNUNET_MessageHeader *msg);
  * @return the error message
  */
 const char *
-GNUNET_TESTBED_parse_error_string_ (const struct GNUNET_TESTBED_OperationFailureEventMessage *msg);
+GNUNET_TESTBED_parse_error_string_(const struct GNUNET_TESTBED_OperationFailureEventMessage *msg);
 
 
 /**
@@ -460,7 +454,7 @@ GNUNET_TESTBED_parse_error_string_ (const struct GNUNET_TESTBED_OperationFailure
  * @return the incremented operation id.
  */
 uint64_t
-GNUNET_TESTBED_get_next_op_id (struct GNUNET_TESTBED_Controller *controller);
+GNUNET_TESTBED_get_next_op_id(struct GNUNET_TESTBED_Controller *controller);
 
 
 /**
@@ -476,9 +470,9 @@ GNUNET_TESTBED_get_next_op_id (struct GNUNET_TESTBED_Controller *controller);
  * @return the operation handle;
  */
 struct GNUNET_TESTBED_Operation *
-GNUNET_TESTBED_get_slave_config_ (void *op_cls,
-                                  struct GNUNET_TESTBED_Controller *master,
-                                  uint32_t slave_host_id);
+GNUNET_TESTBED_get_slave_config_(void *op_cls,
+                                 struct GNUNET_TESTBED_Controller *master,
+                                 uint32_t slave_host_id);
 
 
 
@@ -499,12 +493,12 @@ GNUNET_TESTBED_get_slave_config_ (void *op_cls,
  * @return barrier handle; NULL upon error
  */
 struct GNUNET_TESTBED_Barrier *
-GNUNET_TESTBED_barrier_init_ (struct GNUNET_TESTBED_Controller *controller,
-                              const char *name,
-                              unsigned int quorum,
-                              GNUNET_TESTBED_barrier_status_cb cb,
-                              void *cls,
-                              int echo);
+GNUNET_TESTBED_barrier_init_(struct GNUNET_TESTBED_Controller *controller,
+                             const char *name,
+                             unsigned int quorum,
+                             GNUNET_TESTBED_barrier_status_cb cb,
+                             void *cls,
+                             int echo);
 
 
 /**
@@ -514,7 +508,7 @@ GNUNET_TESTBED_barrier_init_ (struct GNUNET_TESTBED_Controller *controller,
  * @param barrier the barrier to remove
  */
 void
-GNUNET_TESTBED_barrier_remove_ (struct GNUNET_TESTBED_Barrier *barrier);
+GNUNET_TESTBED_barrier_remove_(struct GNUNET_TESTBED_Barrier *barrier);