From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- Src/Plugins/SDK/burner/obj_isoburner.h | 46 ++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Src/Plugins/SDK/burner/obj_isoburner.h (limited to 'Src/Plugins/SDK/burner/obj_isoburner.h') diff --git a/Src/Plugins/SDK/burner/obj_isoburner.h b/Src/Plugins/SDK/burner/obj_isoburner.h new file mode 100644 index 00000000..477f6671 --- /dev/null +++ b/Src/Plugins/SDK/burner/obj_isoburner.h @@ -0,0 +1,46 @@ +#ifndef NULLSOFT_BURNER_OBJ_ISOBURNER_H +#define NULLSOFT_BURNER_OBJ_ISOBURNER_H + +#include + +class ifc_burner_writecallback; +class obj_isoburner : public Dispatchable +{ +protected: + obj_isoburner(){} + ~obj_isoburner(){} +public: + int Open(); + int Write(wchar_t driveLetter, const wchar_t *isoFile, int flags, unsigned int speed, ifc_burner_writecallback *callback); + void ForceCallback(); // call this (from another thread) to force the Write() function to call your callback ASAP + + DISPATCH_CODES + { + ISOBURNER_OPEN = 0, + ISOBURNER_WRITE = 3, + ISOBURNER_FORCECALLBACK = 4, + }; + +}; + +inline int obj_isoburner::Open() +{ + return _call(ISOBURNER_OPEN, (int)1); +} + +inline int obj_isoburner::Write(wchar_t driveLetter, const wchar_t *isoFile, int flags, unsigned int speed, ifc_burner_writecallback *callback) +{ + return _call(ISOBURNER_OPEN, (int)1, driveLetter, isoFile, flags, speed, callback); +} + +inline void obj_isoburner::ForceCallback() +{ + _voidcall(ISOBURNER_FORCECALLBACK); +} + +// {E3B85A59-E56F-4d2b-8ED2-F02BC4AF8BB5} +static const GUID obj_isoburnerGUID = +{ 0xe3b85a59, 0xe56f, 0x4d2b, { 0x8e, 0xd2, 0xf0, 0x2b, 0xc4, 0xaf, 0x8b, 0xb5 } }; + + +#endif \ No newline at end of file -- cgit