iPXE
job.h
Go to the documentation of this file.
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_OR_UBDL );
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  /** Message (optional) */
32  char message[32];
33 };
34 
35 extern int job_progress ( struct interface *intf,
36  struct job_progress *progress );
37 #define job_progress_TYPE( object_type ) \
38  typeof ( int ( object_type, struct job_progress *progress ) )
39 
40 #endif /* _IPXE_JOB_H */
int job_progress(struct interface *intf, struct job_progress *progress)
Get job progress.
Definition: job.c:43
An object interface.
Definition: interface.h:124
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
Object interfaces.
unsigned long total
Total operation size.
Definition: job.h:30
unsigned long completed
Amount of operation completed so far.
Definition: job.h:23
Job progress.
Definition: job.h:15
char message[32]
Message (optional)
Definition: job.h:32