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.
169 lines
4.5 KiB
169 lines
4.5 KiB
//////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Copyright (c) 2001-2002 Microsoft Corporation
|
|
//
|
|
// Module Name:
|
|
// CUnknownQuorum.h
|
|
//
|
|
// Description:
|
|
// This file contains the declaration of the CUnknownQuorum
|
|
// class.
|
|
//
|
|
// The class CUnknownQuorum represents a cluster quorum
|
|
// device. It implements the IClusCfgManagaedResourceInfo interface.
|
|
//
|
|
// Documentation:
|
|
//
|
|
// Implementation Files:
|
|
// CUnknownQuorum.cpp
|
|
//
|
|
// Maintained By:
|
|
// Galen Barbee (GalenB) 18-DEC-2000
|
|
//
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
// Make sure that this file is included only once per compile path.
|
|
#pragma once
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
// Include Files
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
// Constant Declarations
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//++
|
|
//
|
|
// class CUnknownQuorum
|
|
//
|
|
// Description:
|
|
// The class CUnknownQuorum represents a cluster quorum
|
|
// device.
|
|
//
|
|
// Interfaces:
|
|
// IClusCfgManagedResourceInfo
|
|
// IClusCfgInitialize
|
|
//--
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
class CUnknownQuorum
|
|
: public IClusCfgManagedResourceInfo
|
|
, public IClusCfgInitialize
|
|
, public IClusCfgManagedResourceCfg
|
|
, public IClusCfgVerifyQuorum
|
|
{
|
|
private:
|
|
|
|
//
|
|
// Private member functions and data
|
|
//
|
|
|
|
LONG m_cRef;
|
|
LCID m_lcid;
|
|
IClusCfgCallback * m_picccCallback;
|
|
BOOL m_fIsQuorum;
|
|
BOOL m_fIsMultiNodeCapable;
|
|
BOOL m_fIsManaged;
|
|
BOOL m_fIsManagedByDefault;
|
|
BSTR m_bstrName;
|
|
BOOL m_fIsQuorumCapable; // Is this resource quorum capable
|
|
|
|
// Private constructors and destructors
|
|
CUnknownQuorum( void );
|
|
~CUnknownQuorum( void );
|
|
|
|
// Private copy constructor to prevent copying.
|
|
CUnknownQuorum( const CUnknownQuorum & nodeSrc );
|
|
|
|
// Private assignment operator to prevent copying.
|
|
const CUnknownQuorum & operator = ( const CUnknownQuorum & nodeSrc );
|
|
|
|
HRESULT HrInit( LPCWSTR pcszNameIn, BOOL fMakeQuorumIn = FALSE );
|
|
|
|
public:
|
|
|
|
//
|
|
// Public, non interface methods.
|
|
//
|
|
|
|
static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
|
|
|
|
static HRESULT S_HrCreateInstance( LPCWSTR pcszNameIn, BOOL fMakeQuorumIn, 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( IsQuorumResource )( void );
|
|
|
|
STDMETHOD( SetQuorumResource )( BOOL fIsQuorumResourceIn );
|
|
|
|
STDMETHOD( IsQuorumCapable )( void );
|
|
|
|
STDMETHOD( SetQuorumCapable )( BOOL fIsQuorumCapableIn );
|
|
|
|
STDMETHOD( GetDriveLetterMappings )( SDriveLetterMapping * pdlmDriveLetterMappingOut );
|
|
|
|
STDMETHOD( SetDriveLetterMappings )( SDriveLetterMapping dlmDriveLetterMappings );
|
|
|
|
STDMETHOD( IsManagedByDefault )( void );
|
|
|
|
STDMETHOD( SetManagedByDefault )( BOOL fIsManagedByDefaultIn );
|
|
|
|
//
|
|
// IClusCfgManagedResourceCfg
|
|
//
|
|
|
|
STDMETHOD( PreCreate )( IUnknown * punkServicesIn );
|
|
|
|
STDMETHOD( Create )( IUnknown * punkServicesIn );
|
|
|
|
STDMETHOD( PostCreate )( IUnknown * punkServicesIn );
|
|
|
|
STDMETHOD( Evict )( IUnknown * punkServicesIn );
|
|
|
|
//
|
|
// IClusCfgVerifyQuorum
|
|
//
|
|
|
|
STDMETHOD( PrepareToHostQuorumResource )( void );
|
|
|
|
STDMETHOD( Cleanup )( EClusCfgCleanupReason cccrReasonIn );
|
|
|
|
STDMETHOD( IsMultiNodeCapable )( void );
|
|
|
|
STDMETHOD( SetMultiNodeCapable )( BOOL fMultiNodeCapableIn );
|
|
|
|
}; //*** Class CUnknownQuorum
|