- docs
[oweals/gnunet.git] / src / testbed / testbed_api_hosts.h
index 2d25fd596f337cb90f39b6ee8e305bcc8d56a2f8..6c305c34068e732a8abe6787c16064a51e317d40 100644 (file)
@@ -1,6 +1,6 @@
 /*
       This file is part of GNUnet
-      (C) 2008--2012 Christian Grothoff (and other contributing authors)
+      (C) 2008--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
@@ -27,8 +27,9 @@
 #ifndef NEW_TESTING_API_HOSTS_H
 #define NEW_TESTING_API_HOSTS_H
 
-#include "gnunet_testbed_service.h"
-#include "testbed_helper.h"
+//#include "gnunet_testbed_service.h"
+//#include "testbed_helper.h"
+#include "testbed.h"
 
 
 /**
@@ -101,6 +102,17 @@ const struct GNUNET_CONFIGURATION_Handle *
 GNUNET_TESTBED_host_get_cfg_ (const struct GNUNET_TESTBED_Host *host);
 
 
+/**
+ * Function to replace host's configuration
+ *
+ * @param host the host handle
+ * @param new_cfg the new configuration to replace the old one
+ */
+void
+GNUNET_TESTBED_host_replace_cfg_ (struct GNUNET_TESTBED_Host *host,
+                                  const struct GNUNET_CONFIGURATION_Handle *new_cfg);
+
+
 /**
  * Marks a host as registered with a controller
  *
@@ -113,6 +125,18 @@ GNUNET_TESTBED_mark_host_registered_at_ (struct GNUNET_TESTBED_Host *host,
                                          *controller);
 
 
+/**
+ * Unmarks a host registered at a controller
+ *
+ * @param host the host to unmark
+ * @param controller the controller at which this host has to be unmarked
+ */
+void
+GNUNET_TESTBED_deregister_host_at_ (struct GNUNET_TESTBED_Host *host,
+                                    const struct GNUNET_TESTBED_Controller
+                                    *const controller);
+
+
 /**
  * Checks whether a host has been registered with the given controller
  *
@@ -193,5 +217,50 @@ void
 GNUNET_TESTBED_host_queue_oc_ (struct GNUNET_TESTBED_Host *h, 
                                struct GNUNET_TESTBED_Operation *op);
 
+
+/**
+ * Handler for GNUNET_MESSAGE_TYPE_TESTBED_ADDHOSTCONFIRM message from
+ * controller (testbed service)
+ *
+ * @param c the controller handler
+ * @param msg message received
+ * @return GNUNET_YES if we can continue receiving from service; GNUNET_NO if
+ *           not
+ */
+int
+GNUNET_TESTBED_host_handle_addhostconfirm_ (struct GNUNET_TESTBED_Controller *c,
+                                            const struct
+                                            GNUNET_TESTBED_HostConfirmedMessage
+                                            *msg);
+
+
+/**
+ * Sends termination signal to the controller's helper process
+ *
+ * @param cproc the handle to the controller's helper process
+ */
+void
+GNUNET_TESTBED_controller_kill_ (struct GNUNET_TESTBED_ControllerProc *cproc);
+
+
+/**
+ * Cleans-up the controller's helper process handle
+ *
+ * @param cproc the handle to the controller's helper process
+ */
+void
+GNUNET_TESTBED_controller_destroy_ (struct GNUNET_TESTBED_ControllerProc
+                                    *cproc);
+
+
+/**
+ * Resolves the hostname of the host to an ip address
+ *
+ * @param host the host whose hostname is to be resolved
+ */
+void
+GNUNET_TESTBED_host_resolve_ (struct GNUNET_TESTBED_Host *host);
+
+
 #endif
 /* end of testbed_api_hosts.h */