aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/testbed_api_operations.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/testbed/testbed_api_operations.h')
-rw-r--r--src/testbed/testbed_api_operations.h50
1 files changed, 47 insertions, 3 deletions
diff --git a/src/testbed/testbed_api_operations.h b/src/testbed/testbed_api_operations.h
index 245e9a60e4..a02f397acc 100644
--- a/src/testbed/testbed_api_operations.h
+++ b/src/testbed/testbed_api_operations.h
@@ -38,6 +38,44 @@ struct OperationQueue;
/**
+ * Enumeration of operation types
+ */
+enum OperationType
+ {
+ /**
+ * Peer create operation
+ */
+ OP_PEER_CREATE,
+
+ /**
+ * Peer start operation
+ */
+ OP_PEER_START,
+
+ /**
+ * Peer stop operation
+ */
+ OP_PEER_STOP,
+
+ /**
+ * Peer destroy operation
+ */
+ OP_PEER_DESTROY,
+
+ /**
+ * Get peer information operation
+ */
+ OP_PEER_INFO,
+
+ /**
+ * Overlay connection operation
+ */
+ OP_OVERLAY_CONNECT,
+
+ };
+
+
+/**
* Create an operation queue.
*
* @param max_active maximum number of operations in this
@@ -94,6 +132,8 @@ GNUNET_TESTBED_operation_queue_remove_ (struct OperationQueue *queue,
* Function to call to start an operation once all
* queues the operation is part of declare that the
* operation can be activated.
+ *
+ * @param cls the closure from GNUNET_TESTBED_operation_create_()
*/
typedef void (*OperationStart)(void *cls);
@@ -107,7 +147,9 @@ typedef void (*OperationStart)(void *cls);
* a callback to the 'OperationStart' preceeds the call to
* 'OperationRelease'. Implementations of this function are expected
* to clean up whatever state is in 'cls' and release all resources
- * associated with the operation.
+ * associated with the operation.
+ *
+ * @param cls the closure from GNUNET_TESTBED_operation_create_()
*/
typedef void (*OperationRelease)(void *cls);
@@ -118,14 +160,16 @@ typedef void (*OperationRelease)(void *cls);
* @param cls closure for the callbacks
* @param start function to call to start the operation
* @param release function to call to close down the operation
- * @param ... FIXME
+ * @param type the type of the operation
+ * @param data operation's relavant data
* @return handle to the operation
*/
struct GNUNET_TESTBED_Operation *
GNUNET_TESTBED_operation_create_ (void *cls,
OperationStart start,
OperationRelease release,
- ...);
+ enum OperationType type,
+ void *data);
/**