Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / ipxe / src / include / ipxe / job.h
1 #ifndef _IPXE_JOB_H
2 #define _IPXE_JOB_H
3
4 /** @file
5  *
6  * Job control interfaces
7  *
8  */
9
10 FILE_LICENCE ( GPL2_OR_LATER );
11
12 #include <ipxe/interface.h>
13
14 /** Job progress */
15 struct job_progress {
16         /** Amount of operation completed so far
17          *
18          * The units for this quantity are arbitrary.  @c completed
19          * divded by @total should give something which approximately
20          * represents the progress through the operation.  For a
21          * download operation, using byte counts would make sense.
22          */
23         unsigned long completed;
24         /** Total operation size
25          *
26          * See @c completed.  A zero value means "total size unknown"
27          * and is explcitly permitted; users should take this into
28          * account before calculating @c completed/total.
29          */
30         unsigned long total;
31 };
32
33 extern int job_progress ( struct interface *intf,
34                           struct job_progress *progress );
35 #define job_progress_TYPE( object_type ) \
36         typeof ( int ( object_type, struct job_progress *progress ) )
37
38 #endif /* _IPXE_JOB_H */