26#ifndef MESSENGER_TESTING_CMDS_H 
   27#define MESSENGER_TESTING_CMDS_H 
   30#include "messenger-testing.h" 
   34                                    const char *peer_label,
 
   35                                    const char *system_label,
 
   38                                    unsigned int peer_index);
 
   43                                   const char *service_label);
 
   47                                const char *service_label,
 
   54#define GNUNET_MESSENGER_MAKE_DECL_SIMPLE_TRAIT(name,type) \ 
   55        enum GNUNET_GenericReturnValue                     \ 
   56        GNUNET_MESSENGER_get_trait_ ## name (              \ 
   57          const struct GNUNET_TESTING_Command *cmd,        \ 
   59        struct GNUNET_TESTING_Trait                        \ 
   60        GNUNET_MESSENGER_make_trait_ ## name (             \ 
 
   68#define GNUNET_MESSENGER_MAKE_IMPL_SIMPLE_TRAIT(name,type) \ 
   69        enum GNUNET_GenericReturnValue                     \ 
   70        GNUNET_MESSENGER_get_trait_ ## name (              \ 
   71          const struct GNUNET_TESTING_Command *cmd,        \ 
   74          if (NULL == cmd->traits) return GNUNET_SYSERR;   \ 
   75          return cmd->traits (cmd->cls,                    \ 
   76                              (const void **) ret,         \ 
   80        struct GNUNET_TESTING_Trait                        \ 
   81        GNUNET_MESSENGER_make_trait_ ## name (             \ 
   84          struct GNUNET_TESTING_Trait ret = {              \ 
   85            .trait_name = GNUNET_S (name),                 \ 
   86            .ptr = (const void *) value                    \ 
 
   95#define GNUNET_MESSENGER_SIMPLE_TRAITS(op) \ 
   96        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.
 
A command to be run by the interpreter.
 
struct GNUNET_TESTING_CommandLabel label
Label for the command.