diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-07-20 12:02:27 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-07-20 12:02:27 +0000 |
commit | 15f4d07a0a03d4c2358c92976cca4708fcca7ff4 (patch) | |
tree | 16b30b28c0e2564447d72725c758c47b14698129 /src/testbed/testbed_api_peers.h | |
parent | a5d6aecaeb8fac43d885d5e8cfad3d33b8f271b4 (diff) | |
download | gnunet-15f4d07a0a03d4c2358c92976cca4708fcca7ff4.tar.gz gnunet-15f4d07a0a03d4c2358c92976cca4708fcca7ff4.zip |
peer create callback
Diffstat (limited to 'src/testbed/testbed_api_peers.h')
-rw-r--r-- | src/testbed/testbed_api_peers.h | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/src/testbed/testbed_api_peers.h b/src/testbed/testbed_api_peers.h index ee5ec3bd9..83d2d890f 100644 --- a/src/testbed/testbed_api_peers.h +++ b/src/testbed/testbed_api_peers.h | |||
@@ -79,6 +79,29 @@ struct GNUNET_TESTBED_Peer | |||
79 | 79 | ||
80 | 80 | ||
81 | /** | 81 | /** |
82 | * Data for the OperationType OP_PEER_CREATE | ||
83 | */ | ||
84 | struct PeerCreateData | ||
85 | { | ||
86 | /** | ||
87 | * THe call back to call when we receive peer create success message | ||
88 | */ | ||
89 | GNUNET_TESTBED_PeerCreateCallback cb; | ||
90 | |||
91 | /** | ||
92 | * The closure for the above callback | ||
93 | */ | ||
94 | void *cls; | ||
95 | |||
96 | /** | ||
97 | * The peer structure to return when we get success message | ||
98 | */ | ||
99 | struct GNUNET_TESTBED_Peer *peer; | ||
100 | |||
101 | }; | ||
102 | |||
103 | |||
104 | /** | ||
82 | * Data for the OperationType OP_PEER_DESTROY; | 105 | * Data for the OperationType OP_PEER_DESTROY; |
83 | */ | 106 | */ |
84 | struct PeerDestroyData | 107 | struct PeerDestroyData |
@@ -119,13 +142,17 @@ struct PeerDestroyData | |||
119 | * @param controller controller process to use | 142 | * @param controller controller process to use |
120 | * @param host host to run the peer on | 143 | * @param host host to run the peer on |
121 | * @param cfg configuration to use for the peer | 144 | * @param cfg configuration to use for the peer |
122 | * @return handle to the peer (actual startup will happen asynchronously) | 145 | * @param cb the callback to call when the peer has been created |
146 | * @param cls the closure to the above callback | ||
147 | * @return the operation handle | ||
123 | */ | 148 | */ |
124 | struct GNUNET_TESTBED_Peer * | 149 | struct GNUNET_TESTBED_Operation * |
125 | GNUNET_TESTBED_peer_create_with_id_ (uint32_t unique_id, | 150 | GNUNET_TESTBED_peer_create_with_id_ (uint32_t unique_id, |
126 | struct GNUNET_TESTBED_Controller *controller, | 151 | struct GNUNET_TESTBED_Controller *controller, |
127 | struct GNUNET_TESTBED_Host *host, | 152 | struct GNUNET_TESTBED_Host *host, |
128 | const struct GNUNET_CONFIGURATION_Handle *cfg); | 153 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
154 | GNUNET_TESTBED_PeerCreateCallback cb, | ||
155 | void *cls); | ||
129 | 156 | ||
130 | 157 | ||
131 | 158 | ||