diff options
Diffstat (limited to 'src/include/gnunet_testing_ng_lib.h')
-rw-r--r-- | src/include/gnunet_testing_ng_lib.h | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/src/include/gnunet_testing_ng_lib.h b/src/include/gnunet_testing_ng_lib.h index 96e9af252..45e58299e 100644 --- a/src/include/gnunet_testing_ng_lib.h +++ b/src/include/gnunet_testing_ng_lib.h | |||
@@ -1046,6 +1046,23 @@ GNUNET_TESTING_make_trait_relative_time ( | |||
1046 | 1046 | ||
1047 | // FIXME: move these commands into a separate libgnunetestingnetjail lib or so! | 1047 | // FIXME: move these commands into a separate libgnunetestingnetjail lib or so! |
1048 | 1048 | ||
1049 | /** | ||
1050 | * Struct to hold information for callbacks. | ||
1051 | * | ||
1052 | */ | ||
1053 | struct LocalPreparedState | ||
1054 | { | ||
1055 | /** | ||
1056 | * Context for our asynchronous completion. | ||
1057 | */ | ||
1058 | struct GNUNET_TESTING_AsyncContext ac; | ||
1059 | |||
1060 | /** | ||
1061 | * Callback to write messages to the master loop. | ||
1062 | * | ||
1063 | */ | ||
1064 | TESTING_CMD_HELPER_write_cb write_message; | ||
1065 | }; | ||
1049 | 1066 | ||
1050 | /** | 1067 | /** |
1051 | * Create command. | 1068 | * Create command. |
@@ -1223,7 +1240,18 @@ GNUNET_TESTING_cmd_local_test_finished ( | |||
1223 | struct GNUNET_TESTING_Command | 1240 | struct GNUNET_TESTING_Command |
1224 | GNUNET_TESTING_cmd_local_test_prepared (const char *label, | 1241 | GNUNET_TESTING_cmd_local_test_prepared (const char *label, |
1225 | TESTING_CMD_HELPER_write_cb | 1242 | TESTING_CMD_HELPER_write_cb |
1226 | write_message, | 1243 | write_message); |
1227 | unsigned int * | 1244 | |
1228 | all_local_tests_prepared); | 1245 | /** |
1246 | * Function to get the trait with the struct LocalPreparedState. | ||
1247 | * | ||
1248 | * @param[out] lfs struct LocalPreparedState. | ||
1249 | * @return #GNUNET_OK if no error occurred, #GNUNET_SYSERR otherwise. | ||
1250 | * | ||
1251 | */ | ||
1252 | enum GNUNET_GenericReturnValue | ||
1253 | GNUNET_TESTING_get_trait_local_prepared_state ( | ||
1254 | const struct GNUNET_TESTING_Command *cmd, | ||
1255 | struct LocalPreparedState **lfs); | ||
1256 | |||
1229 | #endif | 1257 | #endif |