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
10FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11FILE_SECBOOT ( PERMITTED );
12
13#include <ipxe/interface.h>
14
15/** 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
36extern 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 */
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
Object interfaces.
int job_progress(struct interface *intf, struct job_progress *progress)
Get job progress.
Definition job.c:44
An object interface.
Definition interface.h:125
Job progress.
Definition job.h:16
unsigned long total
Total operation size.
Definition job.h:31
char message[32]
Message (optional)
Definition job.h:33
unsigned long completed
Amount of operation completed so far.
Definition job.h:24