Create an array of these, one for each --option you support. */
| 38 | |
| 39 | /* Create an array of these, one for each --option you support. */ |
| 40 | struct plugin_option { |
| 41 | const char *name; |
| 42 | const char *type; |
| 43 | const char *description; |
| 44 | /* Handle an option. If dynamic, check_only may be set to check |
| 45 | * for validity (but must not make any changes!) */ |
| 46 | char *(*handle)(struct command *cmd, const char *str, bool check_only, |
| 47 | void *arg); |
| 48 | /* Print an option (used to show the default value, if returns true) */ |
| 49 | bool (*jsonfmt)(struct command *cmd, struct json_stream *js, const char *fieldname, |
| 50 | void *arg); |
| 51 | /* Arg for handle and jsonfmt */ |
| 52 | void *arg; |
| 53 | /* If true, this option requires --developer to be enabled */ |
| 54 | bool dev_only; |
| 55 | /* If it's deprecated from a particular release (or NULL) */ |
| 56 | const char *depr_start, *depr_end; |
| 57 | /* If true, allow setting after plugin has initialized */ |
| 58 | bool dynamic; |
| 59 | /* If true, allow multiple settings. */ |
| 60 | bool multi; |
| 61 | }; |
| 62 | |
| 63 | struct plugin { |
| 64 | /* lightningd interaction */ |