Leaked source code of windows server 2003
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.

188 lines
4.5 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2002-2004 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // Quota.h
  7. //
  8. // Implementation File:
  9. // Quota.cpp
  10. //
  11. // Description:
  12. // Definition of the VDS WMI Provider quota classes.
  13. //
  14. // Author: Jim Benton (jbenton) 25-Mar-2002
  15. //
  16. // Notes:
  17. //
  18. //////////////////////////////////////////////////////////////////////////////
  19. #pragma once
  20. #include "ProvBase.h"
  21. #include "dskquota.h"
  22. //////////////////////////////////////////////////////////////////////////////
  23. //++
  24. //
  25. // class CVolumeQuota
  26. //
  27. // Description:
  28. // Provider Implementation for Volume
  29. //
  30. //--
  31. //////////////////////////////////////////////////////////////////////////////
  32. class CVolumeQuota : public CProvBase
  33. {
  34. //
  35. // constructor
  36. //
  37. public:
  38. CVolumeQuota(
  39. LPCWSTR pwszNameIn,
  40. CWbemServices * pNamespaceIn
  41. );
  42. ~CVolumeQuota(){ }
  43. //
  44. // methods
  45. //
  46. public:
  47. virtual HRESULT EnumInstance(
  48. long lFlagsIn,
  49. IWbemContext* pCtxIn,
  50. IWbemObjectSink* pHandlerIn
  51. );
  52. virtual HRESULT GetObject(
  53. CObjPath& rObjPathIn,
  54. long lFlagsIn,
  55. IWbemContext* pCtxIn,
  56. IWbemObjectSink* pHandlerIn
  57. ) { return WBEM_E_NOT_SUPPORTED; };
  58. virtual HRESULT ExecuteMethod(
  59. BSTR bstrObjPathIn,
  60. WCHAR* pwszMethodNameIn,
  61. long lFlagIn,
  62. IWbemClassObject* pParamsIn,
  63. IWbemObjectSink* pHandlerIn
  64. ) { return WBEM_E_NOT_SUPPORTED; };
  65. virtual HRESULT PutInstance(
  66. CWbemClassObject& rInstToPutIn,
  67. long lFlagIn,
  68. IWbemContext* pCtxIn,
  69. IWbemObjectSink* pHandlerIn
  70. ) { return WBEM_E_NOT_SUPPORTED; };
  71. virtual HRESULT DeleteInstance(
  72. CObjPath& rObjPathIn,
  73. long lFlagIn,
  74. IWbemContext* pCtxIn,
  75. IWbemObjectSink* pHandlerIn
  76. ) { return WBEM_E_NOT_SUPPORTED; };
  77. static CProvBase * S_CreateThis(
  78. LPCWSTR pwszNameIn,
  79. CWbemServices* pNamespaceIn
  80. );
  81. HRESULT Initialize();
  82. private:
  83. void LoadInstance(
  84. IN WCHAR* pwszVolume,
  85. IN WCHAR* pwszDirectory,
  86. IN OUT IWbemClassObject* pObject);
  87. }; // class CVolumeQuota
  88. //////////////////////////////////////////////////////////////////////////////
  89. //++
  90. //
  91. // class CVolumeUserQuota
  92. //
  93. // Description:
  94. // Provider Implementation for Volume
  95. //
  96. //--
  97. //////////////////////////////////////////////////////////////////////////////
  98. class CVolumeUserQuota : public CProvBase
  99. {
  100. //
  101. // constructor
  102. //
  103. public:
  104. CVolumeUserQuota(
  105. LPCWSTR pwszNameIn,
  106. CWbemServices * pNamespaceIn
  107. );
  108. ~CVolumeUserQuota(){ }
  109. //
  110. // methods
  111. //
  112. public:
  113. virtual HRESULT EnumInstance(
  114. long lFlagsIn,
  115. IWbemContext* pCtxIn,
  116. IWbemObjectSink* pHandlerIn
  117. );
  118. virtual HRESULT GetObject(
  119. CObjPath& rObjPathIn,
  120. long lFlagsIn,
  121. IWbemContext* pCtxIn,
  122. IWbemObjectSink* pHandlerIn
  123. );
  124. virtual HRESULT ExecuteMethod(
  125. BSTR bstrObjPathIn,
  126. WCHAR* pwszMethodNameIn,
  127. long lFlagIn,
  128. IWbemClassObject* pParamsIn,
  129. IWbemObjectSink* pHandlerIn
  130. ) { return WBEM_E_NOT_SUPPORTED; };
  131. virtual HRESULT PutInstance(
  132. CWbemClassObject& rInstToPutIn,
  133. long lFlagIn,
  134. IWbemContext* pCtxIn,
  135. IWbemObjectSink* pHandlerIn
  136. );
  137. virtual HRESULT DeleteInstance(
  138. CObjPath& rObjPathIn,
  139. long lFlagIn,
  140. IWbemContext* pCtxIn,
  141. IWbemObjectSink* pHandlerIn
  142. );
  143. static CProvBase * S_CreateThis(
  144. LPCWSTR pwszNameIn,
  145. CWbemServices* pNamespaceIn
  146. );
  147. HRESULT Initialize();
  148. private:
  149. void LoadInstance(
  150. IN WCHAR* pwszVolume,
  151. IN IDiskQuotaUser* pIDQUser,
  152. IN OUT IWbemClassObject* pObject);
  153. HRESULT Create(
  154. IN _bstr_t bstrDomainName,
  155. IN _bstr_t bstrUserName,
  156. IN IDiskQuotaControl* pIDQC,
  157. OUT IDiskQuotaUser** ppIQuotaUser);
  158. }; // class CVolumeUserQuota