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.

86 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. vs_sku.h
  5. Abstract:
  6. CVssDLList definition
  7. Author:
  8. Stefan Steiner [ssteiner] 5/01/2001
  9. Revision History:
  10. --*/
  11. #ifndef __VSS_SKU_HXX__
  12. #define __VSS_SKU_HXX__
  13. //
  14. // This class only has static member. No class instances are allowed
  15. //
  16. class CVssSKU
  17. {
  18. public:
  19. enum EVssSKUType
  20. {
  21. VSS_SKU_INVALID = 0x00,
  22. VSS_SKU_CLIENT = 0x01, // XP Personal, XP Professional
  23. VSS_SKU_SERVER = 0x02, // Whistler Server, Advanced Server, Data Center
  24. VSS_SKU_NAS = 0x04 // Whistler NAS (embedded)
  25. };
  26. inline static EVssSKUType GetSKU()
  27. {
  28. if ( !ms_bInitialized )
  29. Initialize();
  30. return ms_eSKU;
  31. };
  32. static BOOL IsClient()
  33. {
  34. if ( !ms_bInitialized )
  35. Initialize();
  36. return ( ms_eSKU == VSS_SKU_CLIENT );
  37. };
  38. static BOOL IsServer()
  39. {
  40. if ( !ms_bInitialized )
  41. Initialize();
  42. return ( ms_eSKU == VSS_SKU_SERVER );
  43. };
  44. static BOOL IsNAS()
  45. {
  46. if ( !ms_bInitialized )
  47. Initialize();
  48. return ( ms_eSKU == VSS_SKU_NAS );
  49. };
  50. static BOOL IsTransportableAllowed()
  51. {
  52. if ( !ms_bInitialized )
  53. Initialize();
  54. return ( ms_bTransportableShadowsAllowed );
  55. };
  56. private:
  57. CVssSKU();
  58. static VOID Initialize();
  59. static BOOL ms_bInitialized;
  60. static EVssSKUType ms_eSKU;
  61. static BOOL ms_bTransportableShadowsAllowed;
  62. };
  63. #endif