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.

133 lines
3.2 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // CClusCfgCredentials.h
  7. //
  8. // Description:
  9. // This file contains the declaration of the CClusCfgCredentials
  10. // class.
  11. //
  12. // The class CClusCfgCredentials is the representation of
  13. // account credentials. It implements the IClusCfgCredentials interface.
  14. //
  15. // Documentation:
  16. //
  17. // Implementation Files:
  18. // CClusCfgCredentials.cpp
  19. //
  20. // Maintained By:
  21. // Galen Barbee (GalenB) 17-May-2000
  22. //
  23. //////////////////////////////////////////////////////////////////////////////
  24. // Make sure that this file is included only once per compile path.
  25. #pragma once
  26. //////////////////////////////////////////////////////////////////////////////
  27. // Include Files
  28. //////////////////////////////////////////////////////////////////////////////
  29. //////////////////////////////////////////////////////////////////////////////
  30. // Constant Declarations
  31. //////////////////////////////////////////////////////////////////////////////
  32. //////////////////////////////////////////////////////////////////////////////
  33. //++
  34. //
  35. // class CClusCfgCredentials
  36. //
  37. // Description:
  38. // The class CClusCfgCredentials is the representation of a
  39. // cluster.
  40. //
  41. // Interfaces:
  42. // IClusCfgCredentials
  43. // IClusCfgInitialize
  44. // IClusCfgSetCredentials
  45. //
  46. //--
  47. //////////////////////////////////////////////////////////////////////////////
  48. class CClusCfgCredentials
  49. : public IClusCfgCredentials
  50. , public IClusCfgInitialize
  51. , public IClusCfgSetCredentials
  52. {
  53. public:
  54. //
  55. // Public constructors and destructors
  56. //
  57. CClusCfgCredentials( void );
  58. virtual ~CClusCfgCredentials( void );
  59. //
  60. // IUnknown Interfaces
  61. //
  62. STDMETHOD( QueryInterface )( REFIID riid, void ** ppvObject );
  63. STDMETHOD_( ULONG, AddRef )( void );
  64. STDMETHOD_( ULONG, Release )( void );
  65. //
  66. // IClusCfgInitialize Interfaces.
  67. //
  68. // Register callbacks, locale id, etc.
  69. STDMETHOD( Initialize )( IUnknown * punkCallbackIn, LCID lcidIn );
  70. //
  71. // IClusCfgCredentials Interfaces.
  72. //
  73. STDMETHOD( SetCredentials )( LPCWSTR pcszUserIn, LPCWSTR pcszDomainIn, LPCWSTR pcszPasswordIn );
  74. STDMETHOD( GetCredentials )( BSTR * pbstrUserOut, BSTR * pbstrDomainOut, BSTR * pbstrPasswordOut );
  75. //
  76. // IClusCfgSetCredentials Interfaces.
  77. //
  78. STDMETHOD( SetDomainCredentials )( LPCWSTR pcszCredentials );
  79. //
  80. // Public, non interface methods.
  81. //
  82. static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
  83. private:
  84. struct AccountInfo
  85. {
  86. BSTR bstrName;
  87. BSTR bstrPassword;
  88. BSTR bstrDomain;
  89. };
  90. //
  91. // Private member functions and data
  92. //
  93. LONG m_cRef;
  94. LCID m_lcid;
  95. IClusCfgCallback * m_picccCallback;
  96. struct AccountInfo m_aiInfo;
  97. // Private copy constructor to prevent copying.
  98. CClusCfgCredentials( const CClusCfgCredentials & nodeSrc );
  99. // Private assignment operator to prevent copying.
  100. const CClusCfgCredentials & operator = ( const CClusCfgCredentials & nodeSrc );
  101. HRESULT HrInit( void );
  102. }; //*** Class CClusCfgCredentials