diff options
author | Wenchao Xia <wenchaoqemu@gmail.com> | 2014-06-18 08:43:47 +0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-06-23 11:12:28 -0400 |
commit | bcada37b19e79329c47a956c4c2dd5c81727e8c8 (patch) | |
tree | dd6891d7cfda07168a47bc27aaffac34e810e7ee /include/block/blockjob.h | |
parent | c120f0fa14cd763d57270933713dbb25de5446fd (diff) |
qapi event: convert other BLOCK_JOB events
Since BLOCK_JOB_COMPLETED, BLOCK_JOB_CANCELLED, BLOCK_JOB_READY are
related, convert them in one patch. The block_job_event_* functions
are used to keep encapsulation of BlockJob structure.
Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'include/block/blockjob.h')
-rw-r--r-- | include/block/blockjob.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/block/blockjob.h b/include/block/blockjob.h index c0a787530b..e443987ea8 100644 --- a/include/block/blockjob.h +++ b/include/block/blockjob.h @@ -217,12 +217,21 @@ void block_job_pause(BlockJob *job); void block_job_resume(BlockJob *job); /** - * qobject_from_block_job: + * block_job_event_cancle: * @job: The job whose information is requested. * - * Return a QDict corresponding to @job's query-block-jobs entry. + * Send a BLOCK_JOB_CANCELLED event for the specified job. */ -QObject *qobject_from_block_job(BlockJob *job); +void block_job_event_cancelled(BlockJob *job); + +/** + * block_job_ready: + * @job: The job which is now ready to complete. + * @msg: Error message. Only present on failure. + * + * Send a BLOCK_JOB_COMPLETED event for the specified job. + */ +void block_job_event_completed(BlockJob *job, const char *msg); /** * block_job_ready: @@ -230,7 +239,7 @@ QObject *qobject_from_block_job(BlockJob *job); * * Send a BLOCK_JOB_READY event for the specified job. */ -void block_job_ready(BlockJob *job); +void block_job_event_ready(BlockJob *job); /** * block_job_is_paused: |