//////////////////////////////////////////////////////////////////////////////
//
//  Copyright (c) 2000 Microsoft Corporation
//
//  Module Name:
//      CClusDB.h
//
//  Description:
//      Header file for CClusDB class.
//      The CClusDB class performs operations that are common to many
//      configuration tasks of the cluster database.
//
//  Implementation Files:
//      CClusDB.cpp
//
//  Maintained By:
//      Vij Vasu (Vvasu) 03-MAR-2000
//
//////////////////////////////////////////////////////////////////////////////


// Make sure that this file is included only once per compile path.
#pragma once


//////////////////////////////////////////////////////////////////////////
// Include Files
//////////////////////////////////////////////////////////////////////////

// For the CAction base class
#include "CAction.h"

// For SetupInstallFromInfSection
#include <setupapi.h>


//////////////////////////////////////////////////////////////////////////
// Forward declaration
//////////////////////////////////////////////////////////////////////////

class CBaseClusterAction;


//////////////////////////////////////////////////////////////////////////////
//++
//
//  class CClusDB
//
//  Description:
//      The CClusDB class performs operations that are common to many
//      configuration tasks of the cluster database.
//
//      This class is intended to be used as the base class for other cluster
//      database related action classes.
//
//--
//////////////////////////////////////////////////////////////////////////////
class CClusDB : public CAction
{
protected:
    //////////////////////////////////////////////////////////////////////////
    // Protected constructors and destructors
    //////////////////////////////////////////////////////////////////////////

    // Constructor.
    CClusDB(
          CBaseClusterAction * pbcaParentActionIn
        );

    // Default destructor.
    ~CClusDB();


    //////////////////////////////////////////////////////////////////////////
    // Protected methods
    //////////////////////////////////////////////////////////////////////////

    // Cleanup and remove the hive.
    void
        CleanupHive();

    // Create the cluster hive in the registry.
    void
        CreateHive( CBaseClusterAction * pbcaClusterActionIn );

    
    //////////////////////////////////////////////////////////////////////////
    // Protected accessors
    //////////////////////////////////////////////////////////////////////////

    // Get the parent action
    CBaseClusterAction *
        PbcaGetParent() throw()
    {
        return m_pbcaParentAction;
    }


private:
    //////////////////////////////////////////////////////////////////////////
    // Private member functions
    //////////////////////////////////////////////////////////////////////////

    // Copy constructor
    CClusDB( const CClusDB & );

    // Assignment operator
    const CClusDB & operator =( const CClusDB & );


    //////////////////////////////////////////////////////////////////////////
    // Private data
    //////////////////////////////////////////////////////////////////////////

    // Pointer to the base cluster action of which this action is a part.
    CBaseClusterAction *    m_pbcaParentAction;

}; //*** class CClusDB
