#ifndef BOOT_MANAGER_CONTROLLER_H
#define BOOT_MANAGER_CONTROLLER_H
#include "WizardController.h"
#include <Message.h>
#include "BootMenu.h"
class BootDrive;
class WizardView;
class WizardPageView;
class BootManagerController : public WizardController {
public:
BootManagerController();
virtual ~BootManagerController();
virtual void Previous(WizardView* wizard);
protected:
virtual int32 InitialState();
virtual int32 NextState(int32 state);
virtual WizardPageView* CreatePage(int32 state, WizardView* wizard);
private:
enum State {
kStateEntry,
kStateErrorEntry,
kStateSaveMBR,
kStateMBRSaved,
kStatePartitions,
kStateDefaultPartitions,
kStateInstallSummary,
kStateInstalled,
kStateUninstall,
kStateUninstalled
};
bool _HasSelectedPartitions();
bool _WriteBootMenu();
bool _SaveMBR();
bool _RestoreMBR();
WizardPageView* _CreateErrorEntryPage();
WizardPageView* _CreateSaveMBRPage(BRect frame);
WizardPageView* _CreateMBRSavedPage();
WizardPageView* _CreateInstallSummaryPage();
WizardPageView* _CreateInstalledPage();
WizardPageView* _CreateUninstallPage(BRect frame);
WizardPageView* _CreateUninstalledPage();
BMessage fSettings;
BootMenuList fBootMenus;
BootDrive* fBootDrive;
BootMenu* fBootMenu;
status_t fCollectPartitionsStatus;
status_t fWriteBootMenuStatus;
status_t fSaveMBRStatus;
status_t fRestoreMBRStatus;
};
#endif