aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_testing_ng_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2023-08-15 21:41:31 +0200
committerChristian Grothoff <grothoff@gnunet.org>2023-08-15 21:42:52 +0200
commitecfbd79c029090dfbc657194adae2d229273fb9d (patch)
treeecf018cabed401aad699e7cfeaf1e6f9050dd95e /src/include/gnunet_testing_ng_lib.h
parent3c5eb7a406b3b0d2b47c00eabbff7a3984ce3429 (diff)
downloadgnunet-ecfbd79c029090dfbc657194adae2d229273fb9d.tar.gz
gnunet-ecfbd79c029090dfbc657194adae2d229273fb9d.zip
-minor bugfixes, adding FIXMEs
Diffstat (limited to 'src/include/gnunet_testing_ng_lib.h')
-rw-r--r--src/include/gnunet_testing_ng_lib.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/include/gnunet_testing_ng_lib.h b/src/include/gnunet_testing_ng_lib.h
index 71d352643..5c9079fdf 100644
--- a/src/include/gnunet_testing_ng_lib.h
+++ b/src/include/gnunet_testing_ng_lib.h
@@ -70,7 +70,7 @@ struct GNUNET_TESTING_AsyncContext
70 /** 70 /**
71 * Interpreter we are part of. 71 * Interpreter we are part of.
72 */ 72 */
73 struct GNUNET_TESTING_Interpreter *is; 73 struct GNUNET_TESTING_Interpreter *is; // Why needed? When available?
74 74
75 /** 75 /**
76 * Function to call when done. 76 * Function to call when done.
@@ -90,14 +90,17 @@ struct GNUNET_TESTING_AsyncContext
90 enum GNUNET_GenericReturnValue finished; 90 enum GNUNET_GenericReturnValue finished;
91}; 91};
92 92
93
93typedef void 94typedef void
94(*GNUNET_TESTING_CommandRunRoutine)(void *cls, 95(*GNUNET_TESTING_CommandRunRoutine)(void *cls,
95 struct GNUNET_TESTING_Interpreter *is); 96 struct GNUNET_TESTING_Interpreter *is);
96 97
98
97typedef void 99typedef void
98(*GNUNET_TESTING_CommandCleanupRoutine)(void *cls); 100(*GNUNET_TESTING_CommandCleanupRoutine)(void *cls);
99 101
100typedef enum GNUNET_GenericReturnValue 102
103typedef enum GNUNET_GenericReturnValue
101(*GNUNET_TESTING_CommandGetTraits) (void *cls, 104(*GNUNET_TESTING_CommandGetTraits) (void *cls,
102 const void **ret, 105 const void **ret,
103 const char *trait, 106 const char *trait,
@@ -240,6 +243,7 @@ struct GNUNET_TESTING_Command
240 * @param label label of the command to lookup. 243 * @param label label of the command to lookup.
241 * @return the command, if it is found, or NULL. 244 * @return the command, if it is found, or NULL.
242 */ 245 */
246// FIXME: think harder about whether this is actually needed, likely not.
243const struct GNUNET_TESTING_Command * 247const struct GNUNET_TESTING_Command *
244GNUNET_TESTING_interpreter_lookup_future_command ( 248GNUNET_TESTING_interpreter_lookup_future_command (
245 struct GNUNET_TESTING_Interpreter *is, 249 struct GNUNET_TESTING_Interpreter *is,
@@ -321,10 +325,13 @@ GNUNET_TESTING_cmd_end (void);
321 325
322 326
323/** 327/**
324 * Turn asynchronous command into non blocking command by setting asynchronous_finish to true. 328 * Turn asynchronous command into non blocking command by setting
325 * FIXME: what is this API doing? Is it returning a new cmd which is unblocking? 329 * asynchronous_finish to true. Modifies (and then returns) @a cmd simply
326 * Is it modifying cmd? 330 * setting the bit. By default, most commands are blocking, and by wrapping
327 * Looking at the code, it both modifying cmd AND returning a copy oO 331 * the command construction in this function a blocking command can be turned
332 * into an asynchronous command where the interpreter continues after
333 * initiating the asynchronous action. Does nothing if the command is
334 * fundamentally synchronous.
328 * 335 *
329 * @param cmd command to make synchronous. 336 * @param cmd command to make synchronous.
330 * @return a finish-command. 337 * @return a finish-command.