X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/d0f01ef61a0b9ffe7f7252e08917ed284e2f0b9e..6961095b797229842e1465ff3670625d11e95167:/clients/disorder.c diff --git a/clients/disorder.c b/clients/disorder.c index 5d47bb1..b401c62 100644 --- a/clients/disorder.c +++ b/clients/disorder.c @@ -505,9 +505,15 @@ static void cf_setup_guest(char **argv) { exit(EXIT_FAILURE); } +/** @brief A scheduled event read from the server */ struct scheduled_event { + /** @brief When event should occur */ time_t when; + + /** @brief Details of action */ struct kvp *actiondata; + + /** @brief Event ID */ char *id; }; @@ -669,12 +675,28 @@ static void cf_playlist_set(char **argv) { exit(EXIT_FAILURE); } -static const struct command { +/** @brief Command-line client's definition of a command */ +static const struct client_command { + /** @brief Command name */ const char *name; - int min, max; + + /** @brief Minimum number of argument */ + int min; + + /** @brief Maximum number of argument */ + int max; + + /** @brief Pointer to function implementing command */ void (*fn)(char **); + + /** @brief Function to recognize a valid argument, or NULL */ int (*isarg)(const char *); - const char *argstr, *desc; + + /** @brief Summary of arguments */ + const char *argstr; + + /** @brief Description */ + const char *desc; } commands[] = { { "adduser", 2, 3, cf_adduser, isarg_rights, "USERNAME PASSWORD [RIGHTS]", "Create a new user" },