aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_testbed_service.h
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2012-07-20 12:02:27 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2012-07-20 12:02:27 +0000
commit15f4d07a0a03d4c2358c92976cca4708fcca7ff4 (patch)
tree16b30b28c0e2564447d72725c758c47b14698129 /src/include/gnunet_testbed_service.h
parenta5d6aecaeb8fac43d885d5e8cfad3d33b8f271b4 (diff)
downloadgnunet-15f4d07a0a03d4c2358c92976cca4708fcca7ff4.tar.gz
gnunet-15f4d07a0a03d4c2358c92976cca4708fcca7ff4.zip
peer create callback
Diffstat (limited to 'src/include/gnunet_testbed_service.h')
-rw-r--r--src/include/gnunet_testbed_service.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/include/gnunet_testbed_service.h b/src/include/gnunet_testbed_service.h
index d6c4354fe..19928623f 100644
--- a/src/include/gnunet_testbed_service.h
+++ b/src/include/gnunet_testbed_service.h
@@ -612,7 +612,21 @@ GNUNET_TESTBED_controller_link_2 (struct GNUNET_TESTBED_Controller *master,
612 const char *sxcfg, 612 const char *sxcfg,
613 size_t sxcfg_size, 613 size_t sxcfg_size,
614 size_t scfg_size, 614 size_t scfg_size,
615 int is_subordinate); 615 int is_subordinate);
616
617
618/**
619 * Functions of this signature are called when a peer has been successfully
620 * created
621 *
622 * @param cls the closure from GNUNET_TESTBED_peer_create()
623 * @param peer the handle for the created peer; NULL on any error during
624 * creation
625 * @param emsg NULL if peer is not NULL; else MAY contain the error description
626 */
627typedef void (*GNUNET_TESTBED_PeerCreateCallback) (void *cls,
628 struct GNUNET_TESTBED_Peer *peer,
629 const char *emsg);
616 630
617 631
618/** 632/**
@@ -639,12 +653,16 @@ GNUNET_TESTBED_controller_link_2 (struct GNUNET_TESTBED_Controller *master,
639 * @param controller controller process to use 653 * @param controller controller process to use
640 * @param host host to run the peer on 654 * @param host host to run the peer on
641 * @param cfg configuration to use for the peer 655 * @param cfg configuration to use for the peer
642 * @return handle to the peer (actual startup will happen asynchronously) 656 * @param cb the callback to call when the peer has been created
657 * @param cls the closure to the above callback
658 * @return the operation handle
643 */ 659 */
644struct GNUNET_TESTBED_Peer * 660struct GNUNET_TESTBED_Operation *
645GNUNET_TESTBED_peer_create (struct GNUNET_TESTBED_Controller *controller, 661GNUNET_TESTBED_peer_create (struct GNUNET_TESTBED_Controller *controller,
646 struct GNUNET_TESTBED_Host *host, 662 struct GNUNET_TESTBED_Host *host,
647 const struct GNUNET_CONFIGURATION_Handle *cfg); 663 const struct GNUNET_CONFIGURATION_Handle *cfg,
664 GNUNET_TESTBED_PeerCreateCallback cb,
665 void *cls);
648 666
649 667
650/** 668/**