mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
job: Add job_event_*()
Go through the Job layer in order to send QMP events. For the moment, these functions only call a notifier in the BlockJob layer that sends the existing commands. This uses notifiers rather than JobDriver callbacks because internal users of jobs won't receive QMP events, but might still be interested in getting notified for the events. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
5d4f376998
commit
139a9f020d
4 changed files with 73 additions and 14 deletions
|
@ -82,6 +82,15 @@ typedef struct BlockJob {
|
|||
/** Block other operations when block job is running */
|
||||
Error *blocker;
|
||||
|
||||
/** Called when a cancelled job is finalised. */
|
||||
Notifier finalize_cancelled_notifier;
|
||||
|
||||
/** Called when a successfully completed job is finalised. */
|
||||
Notifier finalize_completed_notifier;
|
||||
|
||||
/** Called when the job transitions to PENDING */
|
||||
Notifier pending_notifier;
|
||||
|
||||
/** BlockDriverStates that are involved in this block job */
|
||||
GSList *nodes;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue