You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

job.h 1020B

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