WindowsXP/base/cluster/mgmt/cluscfg/server/cmajoritynodeset.h
2025-04-27 07:49:33 -04:00

150 lines
3.9 KiB
C++

//////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2001 Microsoft Corporation
//
// Module Name:
// CMajorityNodeSet.h
//
// Description:
// This file contains the declaration of the CMajorityNodeSet
// class.
//
// The class CMajorityNodeSet represents a cluster storage
// device. It implements the IClusCfgManagaedResourceInfo interface.
//
// Documentation:
//
// Implementation Files:
// CMajorityNodeSet.cpp
//
// Maintained By:
// Galen Barbee (GalenB) 13-MAR-2001
//
//////////////////////////////////////////////////////////////////////////////
// Make sure that this file is included only once per compile path.
#pragma once
//////////////////////////////////////////////////////////////////////////////
// Include Files
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// Constant Declarations
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//++
//
// class CMajorityNodeSet
//
// Description:
// The class CMajorityNodeSet represents a cluster storage device.
//
// Interfaces:
// IClusCfgManagedResourceInfo
// IClusCfgInitialize
//--
//////////////////////////////////////////////////////////////////////////////
class CMajorityNodeSet
: public IClusCfgManagedResourceInfo
, public IClusCfgInitialize
, public IClusCfgManagedResourceCfg
{
private:
//
// Private member functions and data
//
LONG m_cRef;
LCID m_lcid;
IClusCfgCallback * m_picccCallback;
BOOL m_fIsQuorum:1;
BOOL m_fIsJoinable:1;
BOOL m_fIsManaged:1;
BSTR m_bstrName;
// Private constructors and destructors
CMajorityNodeSet( void );
~CMajorityNodeSet( void );
// Private copy constructor to prevent copying.
CMajorityNodeSet( const CMajorityNodeSet & nodeSrc );
// Private assignment operator to prevent copying.
const CMajorityNodeSet & operator = ( const CMajorityNodeSet & nodeSrc );
HRESULT HrInit( void );
public:
//
// Public, non interface methods.
//
static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
//
// IUnknown Interface
//
STDMETHOD( QueryInterface )( REFIID riid, void ** ppvObject );
STDMETHOD_( ULONG, AddRef )( void );
STDMETHOD_( ULONG, Release )( void );
//
// IClusCfgInitialize Interfaces
//
// Register callbacks, locale id, etc.
STDMETHOD( Initialize )( IUnknown * punkCallbackIn, LCID lcidIn );
//
// IClusCfgManagedResourceInfo Interface
//
STDMETHOD( GetUID )( BSTR * pbstrUIDOut );
STDMETHOD( GetName )( BSTR * pbstrNameOut );
STDMETHOD( SetName )( LPCWSTR pcszNameIn );
STDMETHOD( IsManaged )( void );
STDMETHOD( SetManaged )( BOOL fIsManagedIn );
STDMETHOD( IsQuorumDevice )( void );
STDMETHOD( SetQuorumedDevice )( BOOL fIsQuorumDeviceIn );
STDMETHOD( IsQuorumCapable )( void );
STDMETHOD( GetDriveLetterMappings )( SDriveLetterMapping * pdlmDriveLetterMappingOut );
STDMETHOD( SetDriveLetterMappings )( SDriveLetterMapping dlmDriveLetterMappings );
STDMETHOD( IsDeviceJoinable )( void );
STDMETHOD( SetDeviceJoinable )( BOOL fIsJoinableIn );
//
// IClusCfgManagedResourceCfg
//
STDMETHOD( PreCreate )( IUnknown * punkServicesIn );
STDMETHOD( Create )( IUnknown * punkServicesIn );
STDMETHOD( PostCreate )( IUnknown * punkServicesIn );
STDMETHOD( Evict )( IUnknown * punkServicesIn );
}; //*** Class CMajorityNodeSet