aboutsummaryrefslogtreecommitdiff
path: root/blockjob.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-07-23 15:15:47 +0200
committerKevin Wolf <kwolf@redhat.com>2012-10-24 10:26:19 +0200
commita66a2a368383e627b929bf42d1b972822491404b (patch)
treefcec5bb544b797dcb2e7b40929bf304311e0c86a /blockjob.h
parentaeae883baf2377b714a41529f94905046fa058f3 (diff)
downloadqemu-a66a2a368383e627b929bf42d1b972822491404b.zip
qemu-a66a2a368383e627b929bf42d1b972822491404b.tar.gz
qemu-a66a2a368383e627b929bf42d1b972822491404b.tar.bz2
block: introduce BLOCK_JOB_READY event
Even for jobs that need to be manually completed, management may want to take care itself of the completion, not requiring the user to issue a command to terminate the job. In this case we want to avoid that they poll us continuously, waiting for completion to become available. Thus, add a new event that signals the phase switch and the availability of the block-job-complete command. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockjob.h')
-rw-r--r--blockjob.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/blockjob.h b/blockjob.h
index c44e2ea..fb2392e 100644
--- a/blockjob.h
+++ b/blockjob.h
@@ -211,6 +211,22 @@ void block_job_pause(BlockJob *job);
void block_job_resume(BlockJob *job);
/**
+ * qobject_from_block_job:
+ * @job: The job whose information is requested.
+ *
+ * Return a QDict corresponding to @job's query-block-jobs entry.
+ */
+QObject *qobject_from_block_job(BlockJob *job);
+
+/**
+ * block_job_ready:
+ * @job: The job which is now ready to complete.
+ *
+ * Send a BLOCK_JOB_READY event for the specified job.
+ */
+void block_job_ready(BlockJob *job);
+
+/**
* block_job_is_paused:
* @job: The job being queried.
*