From 8eb1702f2a5944ebdccae9d9e37b58e6fec290cc Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Tue, 2 Apr 2013 16:54:35 +0000 Subject: - test case for starting/stopping peer's services --- src/include/gnunet_testbed_service.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/include/gnunet_testbed_service.h') diff --git a/src/include/gnunet_testbed_service.h b/src/include/gnunet_testbed_service.h index 5aa4bd727..522484821 100644 --- a/src/include/gnunet_testbed_service.h +++ b/src/include/gnunet_testbed_service.h @@ -881,6 +881,30 @@ struct GNUNET_TESTBED_Operation * GNUNET_TESTBED_peer_destroy (struct GNUNET_TESTBED_Peer *peer); +/** + * Start or stop given service at a peer. This should not be called to + * start/stop the peer's ARM service. Use GNUNET_TESTBED_peer_start(), + * GNUNET_TESTBED_peer_stop() for starting/stopping peer's ARM service. Success + * or failure of the generated operation is signalled through the controller + * event callback and/or operation completion callback. + * + * @param op_cls the closure for the operation + * @param peer the peer whose service is to be started/stopped + * @param service_name the name of the service + * @param cb the operation completion callback + * @param cb_cls the closure for the operation completion callback + * @param start 1 to start the service; 0 to stop the service + * @return an operation handle; NULL upon error (peer not running) + */ +struct GNUNET_TESTBED_Operation * +GNUNET_TESTBED_peer_manage_service (void *op_cls, + struct GNUNET_TESTBED_Peer *peer, + const char *service_name, + GNUNET_TESTBED_OperationCompletionCallback cb, + void *cb_cls, + unsigned int start); + + /** * Stops and destroys all peers. Is equivalent of calling * GNUNET_TESTBED_peer_stop() and GNUNET_TESTBED_peer_destroy() on all peers, -- cgit v1.2.3