1
0

drives.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef NULLSOFT_DRIVEINFO_HEADER
  2. #define NULLSOFT_DRIVEINFO_HEADER
  3. #include "../nu/Map.h"
  4. #include ".\discinfo.h"
  5. typedef struct
  6. {
  7. wchar_t letter;
  8. int typeCode;
  9. wchar_t* modelInfo;
  10. int busType;
  11. int *pTypeList; // all supported types
  12. int nTypeList; // number of supported tpyes
  13. DiscInfo *disc; // inserted disc info;
  14. } OPTICAL_DRIVE;
  15. #define MAX_FORMAT_DRIVE_STRING 512
  16. class Drives
  17. {
  18. public:
  19. Drives(void);
  20. ~Drives(void);
  21. public:
  22. void AddDrive(wchar_t letter, unsigned int typeCode, wchar_t* description, const wchar_t *extInfo);
  23. void Clear(void);
  24. unsigned int GetCount(void);
  25. const OPTICAL_DRIVE* GetFirst(void);
  26. const OPTICAL_DRIVE* GetNext(void); // if returns NULL - means no more
  27. static BOOL IsRecorder(const OPTICAL_DRIVE *drive);
  28. static const wchar_t* GetTypeString(int typeCode);
  29. static const wchar_t* GetBusString(int busCode);
  30. static const wchar_t* GetFormatedString(const OPTICAL_DRIVE *drv, wchar_t *buffer, size_t size, BOOL useFullName = TRUE);
  31. private:
  32. Map<wchar_t, OPTICAL_DRIVE> driveList;
  33. Map<wchar_t, OPTICAL_DRIVE>::const_iterator c_iter;
  34. };
  35. #endif //NULLSOFT_DRIVEINFO_HEADER