obj_isoburner.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef NULLSOFT_BURNER_OBJ_ISOBURNER_H
  2. #define NULLSOFT_BURNER_OBJ_ISOBURNER_H
  3. #include <bfc/dispatch.h>
  4. class ifc_burner_writecallback;
  5. class obj_isoburner : public Dispatchable
  6. {
  7. protected:
  8. obj_isoburner(){}
  9. ~obj_isoburner(){}
  10. public:
  11. int Open();
  12. int Write(wchar_t driveLetter, const wchar_t *isoFile, int flags, unsigned int speed, ifc_burner_writecallback *callback);
  13. void ForceCallback(); // call this (from another thread) to force the Write() function to call your callback ASAP
  14. DISPATCH_CODES
  15. {
  16. ISOBURNER_OPEN = 0,
  17. ISOBURNER_WRITE = 3,
  18. ISOBURNER_FORCECALLBACK = 4,
  19. };
  20. };
  21. inline int obj_isoburner::Open()
  22. {
  23. return _call(ISOBURNER_OPEN, (int)1);
  24. }
  25. inline int obj_isoburner::Write(wchar_t driveLetter, const wchar_t *isoFile, int flags, unsigned int speed, ifc_burner_writecallback *callback)
  26. {
  27. return _call(ISOBURNER_OPEN, (int)1, driveLetter, isoFile, flags, speed, callback);
  28. }
  29. inline void obj_isoburner::ForceCallback()
  30. {
  31. _voidcall(ISOBURNER_FORCECALLBACK);
  32. }
  33. // {E3B85A59-E56F-4d2b-8ED2-F02BC4AF8BB5}
  34. static const GUID obj_isoburnerGUID =
  35. { 0xe3b85a59, 0xe56f, 0x4d2b, { 0x8e, 0xd2, 0xf0, 0x2b, 0xc4, 0xaf, 0x8b, 0xb5 } };
  36. #endif