26#ifndef MESSENGER_TESTING_CMDS_H
27#define MESSENGER_TESTING_CMDS_H
36 const char *peer_label,
37 const char *system_label,
40 unsigned int peer_index);
45 const char *service_label);
49 const char *service_label,
56#define GNUNET_MESSENGER_MAKE_DECL_SIMPLE_TRAIT(name,type) \
57 enum GNUNET_GenericReturnValue \
58 GNUNET_MESSENGER_get_trait_ ## name ( \
59 const struct GNUNET_TESTING_Command *cmd, \
61 struct GNUNET_TESTING_Trait \
62 GNUNET_MESSENGER_make_trait_ ## name ( \
70#define GNUNET_MESSENGER_MAKE_IMPL_SIMPLE_TRAIT(name,type) \
71 enum GNUNET_GenericReturnValue \
72 GNUNET_MESSENGER_get_trait_ ## name ( \
73 const struct GNUNET_TESTING_Command *cmd, \
76 if (NULL == cmd->traits) return GNUNET_SYSERR; \
77 return cmd->traits (cmd->cls, \
78 (const void **) ret, \
82 struct GNUNET_TESTING_Trait \
83 GNUNET_MESSENGER_make_trait_ ## name ( \
86 struct GNUNET_TESTING_Trait ret = { \
87 .trait_name = GNUNET_S (name), \
88 .ptr = (const void *) value \
97#define GNUNET_MESSENGER_SIMPLE_TRAITS(op) \
98 op (state, struct GNUNET_MESSENGER_StartServiceState)
#define GNUNET_MESSENGER_MAKE_DECL_SIMPLE_TRAIT(name, type)
Create headers for a trait with name name for statically allocated data of type type.
struct GNUNET_TESTING_Command GNUNET_MESSENGER_cmd_join_room(const char *label, const char *service_label, const char *room_key)
struct GNUNET_TESTING_Command GNUNET_MESSENGER_cmd_stop_service(const char *label, const char *service_label)
struct GNUNET_TESTING_Command GNUNET_MESSENGER_cmd_start_service(const char *label, const char *peer_label, const char *system_label, struct GNUNET_MESSENGER_TestStageTopology *topology, unsigned int peer_index)
#define GNUNET_MESSENGER_SIMPLE_TRAITS(op)
Call op on all simple traits.
testing lib for messenger service
A command to be run by the interpreter.
struct GNUNET_TESTING_CommandLabel label
Label for the command.