job: Add job_dismiss()

This moves block_job_dismiss() to the Job layer.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
Kevin Wolf 2018-04-24 17:10:12 +02:00
parent 198c49cc8d
commit 5f9a6a08e8
6 changed files with 28 additions and 30 deletions

View file

@ -487,6 +487,12 @@ int job_complete_sync(Job *job, Error **errp);
*/
void job_finalize(Job *job, Error **errp);
/**
* Remove the concluded @job from the query list and resets the passed pointer
* to %NULL. Returns an error if the job is not actually concluded.
*/
void job_dismiss(Job **job, Error **errp);
typedef void JobDeferToMainLoopFn(Job *job, void *opaque);
/**
@ -515,6 +521,5 @@ int job_finish_sync(Job *job, void (*finish)(Job *, Error **errp), Error **errp)
/* TODO To be removed from the public interface */
void job_state_transition(Job *job, JobStatus s1);
void job_do_dismiss(Job *job);
#endif