diff options
author | harsha <harsha@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-09-05 10:50:56 +0000 |
---|---|---|
committer | harsha <harsha@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-09-05 10:50:56 +0000 |
commit | 14dc53041fdc78c7ac4338303b7174c49d60f901 (patch) | |
tree | 1c65d01fefab939684c58757880987d2a00fd060 /src/testbed/testbed_api_peers.h | |
parent | cbe3b9cd7dff6c6e60af7284194d7c0b6c1ef9e7 (diff) |
changed testbed API to include convenience callbacks
git-svn-id: https://gnunet.org/svn/gnunet@23655 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/testbed/testbed_api_peers.h')
-rw-r--r-- | src/testbed/testbed_api_peers.h | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/src/testbed/testbed_api_peers.h b/src/testbed/testbed_api_peers.h index 21cae976b2..16c4ea42f0 100644 --- a/src/testbed/testbed_api_peers.h +++ b/src/testbed/testbed_api_peers.h @@ -146,37 +146,19 @@ struct PeerInfoData struct GNUNET_TESTBED_Peer *peer; /** - * The type of peer information requested + * The Peer info callback to call when this operation has completed */ - enum GNUNET_TESTBED_PeerInformationType pit; -}; - - -/** - * Data for the OperationType OP_PEER_INFO - */ -struct PeerInfoData2 -{ + GNUNET_TESTBED_PeerInfoCallback cb; + /** - * The type of peer information requested + * The closure for peer info callback */ - enum GNUNET_TESTBED_PeerInformationType pit; + void *cb_cls; /** - * The data from reply + * The type of peer information requested */ - union - { - /** - * Configuration handle - */ - struct GNUNET_CONFIGURATION_Handle *cfg; - - /** - * Peer Identity - */ - struct GNUNET_PeerIdentity *peer_identity; - } details; + enum GNUNET_TESTBED_PeerInformationType pit; }; @@ -195,6 +177,16 @@ struct OverlayConnectData */ struct GNUNET_TESTBED_Peer *p2; + /** + * The operation completion callback to call once this operation is done + */ + GNUNET_TESTBED_OperationCompletionCallback cb; + + /** + * The closure for the above callback + */ + void *cb_cls; + }; |