| 1659 | AUTODATA(json_command, &check_command); |
| 1660 | |
| 1661 | static struct command_result *json_notifications(struct command *cmd, |
| 1662 | const char *buffer, |
| 1663 | const jsmntok_t *obj UNNEEDED, |
| 1664 | const jsmntok_t *params) |
| 1665 | { |
| 1666 | bool *enable; |
| 1667 | |
| 1668 | if (!param(cmd, buffer, params, |
| 1669 | p_req("enable", param_bool, &enable), |
| 1670 | NULL)) |
| 1671 | return command_param_failed(); |
| 1672 | |
| 1673 | /* Catch the case where they sent this command then hung up. */ |
| 1674 | if (cmd->jcon) |
| 1675 | cmd->jcon->notifications_enabled = *enable; |
| 1676 | return command_success(cmd, json_stream_success(cmd)); |
| 1677 | } |
| 1678 | |
| 1679 | static const struct json_command notifications_command = { |
| 1680 | "notifications", |
nothing calls this directly
no test coverage detected