| 1947 | } |
| 1948 | |
| 1949 | void plugin_notify_progress(struct command *cmd, |
| 1950 | u32 num_stages, u32 stage, |
| 1951 | u32 num_progress, u32 progress) |
| 1952 | { |
| 1953 | struct json_stream *js = plugin_notify_start(cmd, "progress"); |
| 1954 | |
| 1955 | assert(progress < num_progress); |
| 1956 | json_add_u32(js, "num", progress); |
| 1957 | json_add_u32(js, "total", num_progress); |
| 1958 | if (num_stages > 0) { |
| 1959 | assert(stage < num_stages); |
| 1960 | json_object_start(js, "stage"); |
| 1961 | json_add_u32(js, "num", stage); |
| 1962 | json_add_u32(js, "total", num_stages); |
| 1963 | json_object_end(js); |
| 1964 | } |
| 1965 | plugin_notify_end(cmd, js); |
| 1966 | } |
| 1967 | |
| 1968 | void NORETURN plugin_exit(struct plugin *p, int exitcode) |
| 1969 | { |
nothing calls this directly
no test coverage detected