Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.9 KiB

  1. #ifndef __VOLUME_H
  2. #define __VOLUME_H
  3. ///////////////////////////////////////////////////////////////////////////////
  4. /* File: volume.h
  5. Description: The CVolume class maintains information about a particular
  6. disk volume. During initialization, the object determines if the
  7. associated volume supports quotas. The object's client can then query
  8. it for volume-specific quota information. Objects of this class are used
  9. in the CStatistics class to store information about a user/volume
  10. pair.
  11. CVolume
  12. Revision History:
  13. Date Description Programmer
  14. -------- --------------------------------------------------- ----------
  15. 07/01/97 Initial creation. BrianAu
  16. */
  17. ///////////////////////////////////////////////////////////////////////////////
  18. #ifndef _WINDOWS_
  19. # include <windows.h>
  20. #endif
  21. class CVolume
  22. {
  23. public:
  24. CVolume(TCHAR chLetter, LPCTSTR pszDisplayName);
  25. ~CVolume(VOID);
  26. BOOL operator == (const CVolume& rhs) const
  27. { return m_dwSerialNo == rhs.m_dwSerialNo; }
  28. TCHAR GetLetter(VOID) const
  29. { return m_chLetter; }
  30. VOID GetDisplayName(CString& strOut) const
  31. { strOut = m_strDisplayName; }
  32. LPCTSTR GetDisplayName(VOID) const
  33. { return (LPCTSTR)m_strDisplayName; }
  34. BOOL SupportsQuotas(VOID) const
  35. { return m_bSupportsQuotas; }
  36. private:
  37. TCHAR m_chLetter; // Driver letter
  38. DWORD m_dwSerialNo; // Drive serial number (unique ID)
  39. CString m_strDisplayName; // Display name from shell.
  40. BOOL m_bSupportsQuotas; // Does volume support quotas?
  41. //
  42. // Prevent copy.
  43. //
  44. CVolume(const CVolume& rhs);
  45. CVolume& operator = (const CVolume& rhs);
  46. };
  47. #endif // __VOLUME_H