aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/testbed_api_operations.h
diff options
context:
space:
mode:
authorharsha <harsha@140774ce-b5e7-0310-ab8b-a85725594a96>2012-07-29 11:24:08 +0000
committerharsha <harsha@140774ce-b5e7-0310-ab8b-a85725594a96>2012-07-29 11:24:08 +0000
commit4d5a70518ed22479ca716c6943384e4381c936af (patch)
treee09e73d77cb1b137346defe393a86882b779712d /src/testbed/testbed_api_operations.h
parent9b26a66b1f86029e899f982171a6bc75ae81c498 (diff)
testbed operations
git-svn-id: https://gnunet.org/svn/gnunet@22953 140774ce-b5e7-0310-ab8b-a85725594a96
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);
/**