mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-07 14:29:33 +01:00
25 lines
819 B
C
25 lines
819 B
C
|
/* These functions must be supplied by any binary linking with common/param
|
||
|
* so it can fail commands. */
|
||
|
#ifndef LIGHTNING_COMMON_JSON_COMMAND_H
|
||
|
#define LIGHTNING_COMMON_JSON_COMMAND_H
|
||
|
#include "config.h"
|
||
|
#include <ccan/compiler/compiler.h>
|
||
|
#include <stdbool.h>
|
||
|
|
||
|
struct command;
|
||
|
|
||
|
/* Caller supplied this: param assumes it can call it. */
|
||
|
void PRINTF_FMT(3, 4) command_fail(struct command *cmd, int code,
|
||
|
const char *fmt, ...);
|
||
|
|
||
|
/* Also caller supplied: is this invoked simply to get usage? */
|
||
|
bool command_usage_only(const struct command *cmd);
|
||
|
|
||
|
/* If so, this is called. */
|
||
|
void command_set_usage(struct command *cmd, const char *usage);
|
||
|
|
||
|
/* Also caller supplied: is this invoked simply to check parameters? */
|
||
|
bool command_check_only(const struct command *cmd);
|
||
|
|
||
|
#endif /* LIGHTNING_COMMON_JSON_COMMAND_H */
|