| 1322 | } |
| 1323 | |
| 1324 | void plugin_notify_progress(struct command *cmd, |
| 1325 | u32 num_stages, u32 stage, |
| 1326 | u32 num_progress, u32 progress) |
| 1327 | { |
| 1328 | struct json_stream *js = plugin_notify_start(cmd, "progress"); |
| 1329 | |
| 1330 | assert(progress < num_progress); |
| 1331 | json_add_u32(js, "num", progress); |
| 1332 | json_add_u32(js, "total", num_progress); |
| 1333 | if (num_stages > 0) { |
| 1334 | assert(stage < num_stages); |
| 1335 | json_object_start(js, "stage"); |
| 1336 | json_add_u32(js, "num", stage); |
| 1337 | json_add_u32(js, "total", num_stages); |
| 1338 | json_object_end(js); |
| 1339 | } |
| 1340 | plugin_notify_end(cmd, js); |
| 1341 | } |
| 1342 | |
| 1343 | void NORETURN plugin_exit(struct plugin *p, int exitcode) |
| 1344 | { |
nothing calls this directly
no test coverage detected