aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_testing_plugin.h
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-12-09 12:07:26 +0900
committerMartin Schanzenbach <schanzen@gnunet.org>2022-12-09 12:07:26 +0900
commit4f46e2f2e72a07871b14c0a9aed70438616c4dd5 (patch)
treef4b904d75ec9fc977aa662d6c8ed0a4d71a22097 /src/include/gnunet_testing_plugin.h
parent1b3f6f366fc62e5519bb73fefe8c21c2eed20edf (diff)
downloadgnunet-4f46e2f2e72a07871b14c0a9aed70438616c4dd5.tar.gz
gnunet-4f46e2f2e72a07871b14c0a9aed70438616c4dd5.zip
TESTING: Fix TESTING-NG API to follow naming conventions
Rename structs and functions to follow GNUnet naming conventions. Some structs may actually also be private, a review is necessary. The barrier API was modified in order to untangle Barriers and lists of Barriers. This is a rough draft, it needs fixes wrt memory leaks.
Diffstat (limited to 'src/include/gnunet_testing_plugin.h')
-rw-r--r--src/include/gnunet_testing_plugin.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/include/gnunet_testing_plugin.h b/src/include/gnunet_testing_plugin.h
index 312a7bfe5..d986fabcd 100644
--- a/src/include/gnunet_testing_plugin.h
+++ b/src/include/gnunet_testing_plugin.h
@@ -38,18 +38,21 @@ extern "C"
38#endif 38#endif
39#endif 39#endif
40 40
41struct GNUNET_TESTING_Barrier;
42
43//FIXME documentation for both functions
41typedef void 44typedef void
42(*TESTING_CMD_HELPER_write_cb) (struct GNUNET_MessageHeader *message, 45(*GNUNET_TESTING_cmd_helper_write_cb) (struct GNUNET_MessageHeader *message,
43 size_t msg_length); 46 size_t msg_length);
44 47
45typedef void 48typedef void
46(*TESTING_CMD_HELPER_finish_cb) (); 49(*GNUNET_TESTING_cmd_helper_finish_cb) ();
47 50
48// FIXME documentation 51// FIXME documentation
49// FIXME: Why are n, m, local_m strings? 52// FIXME: Why are n, m, local_m strings?
50// FIXME: Why is topology_data a string and not a GNUNET_TESTING_NetworkTopology?? 53// FIXME: Why is topology_data a string and not a GNUNET_TESTING_NetworkTopology??
51typedef void 54typedef void
52(*GNUNET_TESTING_PLUGIN_StartTestCase) (TESTING_CMD_HELPER_write_cb 55(*GNUNET_TESTING_PLUGIN_StartTestCase) (GNUNET_TESTING_cmd_helper_write_cb
53 write_message, 56 write_message,
54 const char *router_ip, 57 const char *router_ip,
55 const char *node_ip, 58 const char *node_ip,
@@ -58,7 +61,7 @@ typedef void
58 const char *local_m, 61 const char *local_m,
59 const char *topology_data, 62 const char *topology_data,
60 unsigned int *read_file, 63 unsigned int *read_file,
61 TESTING_CMD_HELPER_finish_cb finish_cb); 64 GNUNET_TESTING_cmd_helper_finish_cb finish_cb);
62 65
63 66
64typedef void 67typedef void
@@ -71,8 +74,8 @@ typedef void
71typedef void 74typedef void
72(*GNUNET_TESTING_PLUGIN_BARRIER_ADVANCED) (const char *barrier_name); 75(*GNUNET_TESTING_PLUGIN_BARRIER_ADVANCED) (const char *barrier_name);
73 76
74typedef struct GNUNET_TESTING_Barrier * 77typedef struct GNUNET_TESTING_BarrierList*
75(*GNUNET_TESTING_PLUGIN_GET_WAITING_FOR_BARRIERS) (); 78(*GNUNET_TESTING_PLUGIN_GET_WAITING_FOR_BARRIERS) (void);
76 79
77 80
78// FIXME documentation 81// FIXME documentation