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.

98 lines
2.4 KiB

  1. #ifndef _INC_DSKQUOTA_USERBAT_H
  2. #define _INC_DSKQUOTA_USERBAT_H
  3. ///////////////////////////////////////////////////////////////////////////////
  4. /* File: userbat.h
  5. Description: Provides declaration for class DiskQuotaUserBatch.
  6. This class is provided to allow batch updates of quota user information.
  7. Revision History:
  8. Date Description Programmer
  9. -------- --------------------------------------------------- ----------
  10. 06/07/96 Initial creation. BrianAu
  11. 09/03/96 Added exception handling. BrianAu
  12. */
  13. ///////////////////////////////////////////////////////////////////////////////
  14. #ifndef _INC_DSKQUOTA_H
  15. # include "dskquota.h"
  16. #endif
  17. #ifndef _INC_DSKQUOTA_FSOBJECT_H
  18. # include "fsobject.h"
  19. #endif
  20. #ifndef _INC_DSKQUOTA_EXCEPT_H
  21. # include "except.h"
  22. #endif
  23. class DiskQuotaUserBatch : public IDiskQuotaUserBatch
  24. {
  25. private:
  26. LONG m_cRef; // Ref counter.
  27. FSObject *m_pFSObject; // Ptr to file sys object.
  28. CArray<PDISKQUOTA_USER> m_UserList; // List of users to batch process.
  29. HRESULT
  30. RemoveUser(
  31. PDISKQUOTA_USER pUser);
  32. STDMETHODIMP
  33. RemoveAllUsers(VOID);
  34. VOID
  35. Destroy(
  36. VOID);
  37. //
  38. // Prevent copying.
  39. //
  40. DiskQuotaUserBatch(const DiskQuotaUserBatch& );
  41. DiskQuotaUserBatch& operator = (const DiskQuotaUserBatch& );
  42. public:
  43. //
  44. // APPCOMPAT: Find out why compiler doesn't like this exception decl.
  45. //
  46. // DiskQuotaUserBatch(FSObject *pFSObject) throw(OutOfMemory, SyncObjErrorCreate);
  47. DiskQuotaUserBatch(FSObject *pFSObject);
  48. ~DiskQuotaUserBatch(VOID);
  49. //
  50. // IUnknown interface.
  51. //
  52. STDMETHODIMP
  53. QueryInterface(
  54. REFIID,
  55. LPVOID *);
  56. STDMETHODIMP_(ULONG)
  57. AddRef(
  58. VOID);
  59. STDMETHODIMP_(ULONG)
  60. Release(
  61. VOID);
  62. //
  63. // IDiskQuotaUserBatch interface.
  64. //
  65. STDMETHODIMP
  66. Add(
  67. PDISKQUOTA_USER);
  68. STDMETHODIMP
  69. Remove(
  70. PDISKQUOTA_USER);
  71. STDMETHODIMP
  72. RemoveAll(
  73. VOID);
  74. STDMETHODIMP
  75. FlushToDisk(
  76. VOID);
  77. };
  78. #endif // _INC_DSKQUOTA_USERBAT_H