ifc_burner_writecallback.h 806 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef NULLSOFT_BURNER_IFC_BURNER_WRITECALLBACK_H
  2. #define NULLSOFT_BURNER_IFC_BURNER_WRITECALLBACK_H
  3. #include <bfc/dispatch.h>
  4. #include <bfc/platform/types.h>
  5. class ifc_burner_writecallback : public Dispatchable
  6. {
  7. protected:
  8. ifc_burner_writecallback() {}
  9. ~ifc_burner_writecallback() {}
  10. public:
  11. int OnStatus(uint32_t sectorsWritten, uint32_t totalSectors); // return 1 to abort or 0 to continue
  12. int Finished();
  13. enum
  14. {
  15. BURNER_WRITECALLBACK_ONSTATUS = 0,
  16. BURNER_WRITECALLBACK_FINISHED = 1,
  17. };
  18. };
  19. inline int ifc_burner_writecallback::OnStatus(uint32_t sectorsWritten, uint32_t totalSectors)
  20. {
  21. return _call(BURNER_WRITECALLBACK_ONSTATUS, (int)0, sectorsWritten, totalSectors);
  22. }
  23. inline int ifc_burner_writecallback::Finished()
  24. {
  25. return _call(BURNER_WRITECALLBACK_FINISHED, (int)0);
  26. }
  27. #endif