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.

114 lines
4.7 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Abstract:
  4. @doc
  5. @module commandverifier.hxx | declaration for the command verifier
  6. @end
  7. Author:
  8. Reuven Lax [reuvenl] 11/20/2001
  9. Revision History:
  10. Name Date Comments
  11. reuvenl 11/20/2001 Created
  12. --*/
  13. #ifndef _COMMANDVERIFIER_H_
  14. #define _COMMANDVERIFIER_H_
  15. #include "versionspecific.h"
  16. class CCommandVerifier {
  17. public:
  18. virtual ~CCommandVerifier()
  19. {}
  20. static CCommandVerifier* Instance();
  21. virtual void CreateSnapshot (long type, LPCWSTR forVolume, VSS_ID idProvider, ULONGLONG autoRetry,
  22. CVssFunctionTracer& ft) = 0;
  23. virtual void ListProviders (CVssFunctionTracer& ft) = 0;
  24. virtual void ListSnapshots (long type, VSS_ID idProvider, LPCWSTR forVolume, VSS_ID idShadow, VSS_ID idSet,
  25. CVssFunctionTracer& ft) = 0;
  26. virtual void ListWriters (CVssFunctionTracer& ft) = 0;
  27. virtual void AddDiffArea (VSS_ID idProvider, LPCWSTR forVolume, LPCWSTR onVolume, ULONGLONG maxSize,
  28. CVssFunctionTracer& ft) = 0;
  29. virtual void ResizeDiffArea (VSS_ID idProvider, LPCWSTR forVolume, LPCWSTR onVolume, ULONGLONG maxSize,
  30. CVssFunctionTracer& ft) = 0;
  31. virtual void DeleteDiffAreas (VSS_ID idProvider, LPCWSTR forVolume, LPCWSTR onVolume, bool quiet,
  32. CVssFunctionTracer& ft) = 0;
  33. virtual void ListDiffAreas (VSS_ID idProvider, LPCWSTR forVolume, LPCWSTR onVolume, CVssFunctionTracer& ft) = 0;
  34. virtual void DeleteSnapshots (long type, LPCWSTR forVolume, bool all, bool oldest, VSS_ID idShadow, bool quiet,
  35. CVssFunctionTracer& ft) = 0;
  36. virtual void ExposeSnapshot (VSS_ID idShadow, LPCWSTR exposeUsing, LPCWSTR sharePath, bool locally,
  37. CVssFunctionTracer& ft) = 0;
  38. virtual void ListVolumes (VSS_ID idProvider, long type, CVssFunctionTracer& ft) = 0;
  39. };
  40. class CInternalVerifier : public CCommandVerifier {
  41. public:
  42. virtual void CreateSnapshot (long type, LPCWSTR forVolume, VSS_ID idProvider, ULONGLONG autoRetry,
  43. CVssFunctionTracer& ft);
  44. virtual void ListProviders (CVssFunctionTracer& ft);
  45. virtual void ListSnapshots (long type, VSS_ID idProvider, LPCWSTR forVolume, VSS_ID idShadow, VSS_ID idSet,
  46. CVssFunctionTracer& ft);
  47. virtual void ListWriters (CVssFunctionTracer& ft);
  48. virtual void AddDiffArea (VSS_ID idProvider, LPCWSTR forVolume, LPCWSTR onVolume, ULONGLONG maxSize,
  49. CVssFunctionTracer& ft);
  50. virtual void ResizeDiffArea (VSS_ID idProvider, LPCWSTR forVolume, LPCWSTR onVolume, ULONGLONG maxSize,
  51. CVssFunctionTracer& ft);
  52. virtual void DeleteDiffAreas (VSS_ID idProvider, LPCWSTR forVolume, LPCWSTR onVolume, bool quiet,
  53. CVssFunctionTracer& ft);
  54. virtual void ListDiffAreas (VSS_ID idProvider, LPCWSTR forVolume, LPCWSTR onVolume, CVssFunctionTracer& ft);
  55. virtual void DeleteSnapshots (long type, LPCWSTR forVolume, bool all, bool oldest, VSS_ID idShadow, bool quiet,
  56. CVssFunctionTracer& ft);
  57. virtual void ExposeSnapshot (VSS_ID idShadow, LPCWSTR exposeUsing, LPCWSTR sharePath, bool locally,
  58. CVssFunctionTracer& ft);
  59. virtual void ListVolumes (VSS_ID idProvider, long type, CVssFunctionTracer& ft);
  60. };
  61. class CExternalVerifier : public CCommandVerifier {
  62. public:
  63. virtual void CreateSnapshot (long type, LPCWSTR forVolume, VSS_ID idProvider, ULONGLONG autoRetry,
  64. CVssFunctionTracer& ft);
  65. virtual void ListProviders (CVssFunctionTracer& ft);
  66. virtual void ListSnapshots (long type, VSS_ID idProvider, LPCWSTR forVolume, VSS_ID idShadow, VSS_ID idSet,
  67. CVssFunctionTracer& ft);
  68. virtual void ListWriters (CVssFunctionTracer& ft);
  69. virtual void AddDiffArea (VSS_ID idProvider, LPCWSTR forVolume, LPCWSTR onVolume, ULONGLONG maxSize,
  70. CVssFunctionTracer& ft);
  71. virtual void ResizeDiffArea (VSS_ID idProvider, LPCWSTR forVolume, LPCWSTR onVolume, ULONGLONG maxSize,
  72. CVssFunctionTracer& ft);
  73. virtual void DeleteDiffAreas (VSS_ID idProvider, LPCWSTR forVolume, LPCWSTR onVolume, bool quiet,
  74. CVssFunctionTracer& ft);
  75. virtual void ListDiffAreas (VSS_ID idProvider, LPCWSTR forVolume, LPCWSTR onVolume,
  76. CVssFunctionTracer& ft);
  77. virtual void DeleteSnapshots (long type, LPCWSTR forVolume, bool all, bool oldest, VSS_ID idShadow, bool quiet,
  78. CVssFunctionTracer& ft);
  79. virtual void ExposeSnapshot (VSS_ID idShadow, LPCWSTR exposeUsing, LPCWSTR sharePath, bool locally,
  80. CVssFunctionTracer& ft);
  81. virtual void ListVolumes (VSS_ID idProvider, long type, CVssFunctionTracer& ft);
  82. };
  83. /////////////////////////////////////////////////////////////////////////////
  84. // Define creation of parameter verifier
  85. inline CCommandVerifier* CCommandVerifier::Instance()
  86. {
  87. switch (dCurrentSKU) {
  88. case SKU_INT:
  89. return new CInternalVerifier();
  90. default:
  91. return new CExternalVerifier();
  92. }
  93. }
  94. #endif