1/* AUTOMATICALLY GENERATED, DO NOT MODIFY */
2
3/*
4 * Schema-defined QAPI types
5 *
6 * Copyright IBM, Corp. 2011
7 * Copyright (c) 2013-2018 Red Hat Inc.
8 *
9 * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
10 * See the COPYING.LIB file in the top-level directory.
11 */
12
13#ifndef QAPI_TYPES_JOB_H
14#define QAPI_TYPES_JOB_H
15
16#include "qapi/qapi-builtin-types.h"
17
18typedef enum JobType {
19 JOB_TYPE_COMMIT,
20 JOB_TYPE_STREAM,
21 JOB_TYPE_MIRROR,
22 JOB_TYPE_BACKUP,
23 JOB_TYPE_CREATE,
24 JOB_TYPE__MAX,
25} JobType;
26
27#define JobType_str(val) \
28 qapi_enum_lookup(&JobType_lookup, (val))
29
30extern const QEnumLookup JobType_lookup;
31
32typedef enum JobStatus {
33 JOB_STATUS_UNDEFINED,
34 JOB_STATUS_CREATED,
35 JOB_STATUS_RUNNING,
36 JOB_STATUS_PAUSED,
37 JOB_STATUS_READY,
38 JOB_STATUS_STANDBY,
39 JOB_STATUS_WAITING,
40 JOB_STATUS_PENDING,
41 JOB_STATUS_ABORTING,
42 JOB_STATUS_CONCLUDED,
43 JOB_STATUS_NULL,
44 JOB_STATUS__MAX,
45} JobStatus;
46
47#define JobStatus_str(val) \
48 qapi_enum_lookup(&JobStatus_lookup, (val))
49
50extern const QEnumLookup JobStatus_lookup;
51
52typedef enum JobVerb {
53 JOB_VERB_CANCEL,
54 JOB_VERB_PAUSE,
55 JOB_VERB_RESUME,
56 JOB_VERB_SET_SPEED,
57 JOB_VERB_COMPLETE,
58 JOB_VERB_DISMISS,
59 JOB_VERB_FINALIZE,
60 JOB_VERB__MAX,
61} JobVerb;
62
63#define JobVerb_str(val) \
64 qapi_enum_lookup(&JobVerb_lookup, (val))
65
66extern const QEnumLookup JobVerb_lookup;
67
68typedef struct q_obj_JOB_STATUS_CHANGE_arg q_obj_JOB_STATUS_CHANGE_arg;
69
70typedef struct q_obj_job_pause_arg q_obj_job_pause_arg;
71
72typedef struct q_obj_job_resume_arg q_obj_job_resume_arg;
73
74typedef struct q_obj_job_cancel_arg q_obj_job_cancel_arg;
75
76typedef struct q_obj_job_complete_arg q_obj_job_complete_arg;
77
78typedef struct q_obj_job_dismiss_arg q_obj_job_dismiss_arg;
79
80typedef struct q_obj_job_finalize_arg q_obj_job_finalize_arg;
81
82typedef struct JobInfo JobInfo;
83
84typedef struct JobInfoList JobInfoList;
85
86struct q_obj_JOB_STATUS_CHANGE_arg {
87 char *id;
88 JobStatus status;
89};
90
91struct q_obj_job_pause_arg {
92 char *id;
93};
94
95struct q_obj_job_resume_arg {
96 char *id;
97};
98
99struct q_obj_job_cancel_arg {
100 char *id;
101};
102
103struct q_obj_job_complete_arg {
104 char *id;
105};
106
107struct q_obj_job_dismiss_arg {
108 char *id;
109};
110
111struct q_obj_job_finalize_arg {
112 char *id;
113};
114
115struct JobInfo {
116 char *id;
117 JobType type;
118 JobStatus status;
119 int64_t current_progress;
120 int64_t total_progress;
121 bool has_error;
122 char *error;
123};
124
125void qapi_free_JobInfo(JobInfo *obj);
126
127struct JobInfoList {
128 JobInfoList *next;
129 JobInfo *value;
130};
131
132void qapi_free_JobInfoList(JobInfoList *obj);
133
134#endif /* QAPI_TYPES_JOB_H */
135