aboutsummaryrefslogtreecommitdiff
path: root/Src/burnlib/uiEraseMedium.h
diff options
context:
space:
mode:
authorJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
committerJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
commit20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/burnlib/uiEraseMedium.h
parent537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff)
downloadwinamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz
Initial community commit
Diffstat (limited to 'Src/burnlib/uiEraseMedium.h')
-rw-r--r--Src/burnlib/uiEraseMedium.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/Src/burnlib/uiEraseMedium.h b/Src/burnlib/uiEraseMedium.h
new file mode 100644
index 00000000..bc5220e3
--- /dev/null
+++ b/Src/burnlib/uiEraseMedium.h
@@ -0,0 +1,51 @@
+#pragma once
+
+#include "./main.h"
+#include "./eraseMedium.h"
+
+#define ERASEMEDIUMUI_OK 0x000
+#define ERASEMEDIUMUI_ERROR 0x001
+#define ERASEMEDIUMUI_CANCELED 0x002
+
+#define ERASEMEDIUMUI_PRIMOSDKERROR 0x101
+#define ERASEMEDIUMUI_UNABLETOCREATEDIALOG 0x102
+#define ERASEMEDIUMUI_MESSAGEPUMPERROR 0x103
+#define ERASEMEDIUMUI_DRIVENOTSET 0x104
+#define ERASEMEDIUMUI_PRIMOSDKNOTSET 0x105
+#define ERASEMEDIUMUI_UNABLETOCREATEOBJECT 0x106
+
+class EraseMediumUI
+{
+public:
+ BURNLIB_API EraseMediumUI(void);
+ BURNLIB_API ~EraseMediumUI(void);
+public:
+ BURNLIB_API DWORD Erase(DWORD drive, BOOL discCheck, HWND ownerWnd);
+ BURNLIB_API DWORD SetEject(int ejectmode);
+
+protected:
+ static LRESULT CALLBACK PrepareWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+ static LRESULT CALLBACK EraseWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+ void OnPrepareInit(HWND hwndDlg);
+ void OnPrepareOk();
+ void OnEraseInit(HWND hwndDlg);
+ void OnEraseTimerClock(void);
+ void OnEraseClose(DWORD exitCode);
+ static DWORD CALLBACK OnEraseNotify(void *sender, void *param, DWORD eraseCode, DWORD primoCode);
+
+
+
+protected:
+
+ DWORD drive;
+ HWND prepareWnd;
+ HWND eraseWnd;
+ EraseMedium *eraseMedium;
+ DWORD eraseMode;
+ DWORD startTick;
+ unsigned int actualTime;
+ unsigned int estimateTime;
+ DWORD eraseCode;
+ DWORD primoCode;
+ BOOL discCheck;
+};