diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Plugins/Library/ml_disc/drives.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/Plugins/Library/ml_disc/drives.h')
-rw-r--r-- | Src/Plugins/Library/ml_disc/drives.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Src/Plugins/Library/ml_disc/drives.h b/Src/Plugins/Library/ml_disc/drives.h new file mode 100644 index 00000000..4984607e --- /dev/null +++ b/Src/Plugins/Library/ml_disc/drives.h @@ -0,0 +1,44 @@ +#ifndef NULLSOFT_DRIVEINFO_HEADER +#define NULLSOFT_DRIVEINFO_HEADER + +#include "../nu/Map.h" +#include ".\discinfo.h" + + +typedef struct +{ + wchar_t letter; + int typeCode; + wchar_t* modelInfo; + int busType; + int *pTypeList; // all supported types + int nTypeList; // number of supported tpyes + DiscInfo *disc; // inserted disc info; +} OPTICAL_DRIVE; + +#define MAX_FORMAT_DRIVE_STRING 512 + +class Drives +{ +public: + Drives(void); + ~Drives(void); + +public: + void AddDrive(wchar_t letter, unsigned int typeCode, wchar_t* description, const wchar_t *extInfo); + void Clear(void); + unsigned int GetCount(void); + const OPTICAL_DRIVE* GetFirst(void); + const OPTICAL_DRIVE* GetNext(void); // if returns NULL - means no more + + static BOOL IsRecorder(const OPTICAL_DRIVE *drive); + + static const wchar_t* GetTypeString(int typeCode); + static const wchar_t* GetBusString(int busCode); + static const wchar_t* GetFormatedString(const OPTICAL_DRIVE *drv, wchar_t *buffer, size_t size, BOOL useFullName = TRUE); +private: + Map<wchar_t, OPTICAL_DRIVE> driveList; + Map<wchar_t, OPTICAL_DRIVE>::const_iterator c_iter; +}; + +#endif //NULLSOFT_DRIVEINFO_HEADER
\ No newline at end of file |