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 FILE_SECBOOT ( PERMITTED );
12 
13 #include <ipxe/interface.h>
14 
15 /** Job progress */
16 struct job_progress {
17  /** Amount of operation completed so far
18  *
19  * The units for this quantity are arbitrary. @c completed
20  * divded by @total should give something which approximately
21  * represents the progress through the operation. For a
22  * download operation, using byte counts would make sense.
23  */
24  unsigned long completed;
25  /** Total operation size
26  *
27  * See @c completed. A zero value means "total size unknown"
28  * and is explcitly permitted; users should take this into
29  * account before calculating @c completed/total.
30  */
31  unsigned long total;
32  /** Message (optional) */
33  char message[32];
34 };
35 
36 extern int job_progress ( struct interface *intf,
37  struct job_progress *progress );
38 #define job_progress_TYPE( object_type ) \
39  typeof ( int ( object_type, struct job_progress *progress ) )
40 
41 #endif /* _IPXE_JOB_H */
int job_progress(struct interface *intf, struct job_progress *progress)
Get job progress.
Definition: job.c:44
An object interface.
Definition: interface.h:125
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
Object interfaces.
unsigned long total
Total operation size.
Definition: job.h:31
unsigned long completed
Amount of operation completed so far.
Definition: job.h:24
FILE_SECBOOT(PERMITTED)
Job progress.
Definition: job.h:16
char message[32]
Message (optional)
Definition: job.h:33