aboutsummaryrefslogtreecommitdiff
path: root/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h')
-rw-r--r--src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h b/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h
index 393987ba..53fa369b 100644
--- a/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h
+++ b/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h
@@ -9,6 +9,7 @@
9#include "IBootstrapperApplication.h" 9#include "IBootstrapperApplication.h"
10 10
11#include "balutil.h" 11#include "balutil.h"
12#include "balinfo.h"
12#include "balretry.h" 13#include "balretry.h"
13 14
14class CBalBaseBootstrapperApplication : public IBootstrapperApplication 15class CBalBaseBootstrapperApplication : public IBootstrapperApplication
@@ -794,7 +795,7 @@ public: // IBootstrapperApplication
794 { 795 {
795 HRESULT hr = S_OK; 796 HRESULT hr = S_OK;
796 BOOL fRestartRequired = BOOTSTRAPPER_APPLY_RESTART_REQUIRED == restart; 797 BOOL fRestartRequired = BOOTSTRAPPER_APPLY_RESTART_REQUIRED == restart;
797 BOOL fShouldBlockRestart = BOOTSTRAPPER_DISPLAY_FULL <= m_display && BOOTSTRAPPER_RESTART_PROMPT >= m_restart; 798 BOOL fShouldBlockRestart = BOOTSTRAPPER_DISPLAY_FULL <= m_display && BAL_INFO_RESTART_PROMPT >= m_BalInfoCommand.restart;
798 799
799 if (fRestartRequired && !fShouldBlockRestart) 800 if (fRestartRequired && !fShouldBlockRestart)
800 { 801 {
@@ -976,6 +977,22 @@ public: // IBootstrapperApplication
976 return S_OK; 977 return S_OK;
977 } 978 }
978 979
980public: //CBalBaseBootstrapperApplication
981 virtual STDMETHODIMP Initialize(
982 __in const BOOTSTRAPPER_CREATE_ARGS* pCreateArgs
983 )
984 {
985 HRESULT hr = S_OK;
986
987 m_display = pCreateArgs->pCommand->display;
988
989 hr = BalInfoParseCommandLine(&m_BalInfoCommand, pCreateArgs->pCommand);
990 BalExitOnFailure(hr, "Failed to parse command line with balutil.");
991
992 LExit:
993 return hr;
994 }
995
979protected: 996protected:
980 // 997 //
981 // PromptCancel - prompts the user to close (if not forced). 998 // PromptCancel - prompts the user to close (if not forced).
@@ -1029,20 +1046,19 @@ protected:
1029 1046
1030 CBalBaseBootstrapperApplication( 1047 CBalBaseBootstrapperApplication(
1031 __in IBootstrapperEngine* pEngine, 1048 __in IBootstrapperEngine* pEngine,
1032 __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
1033 __in DWORD dwRetryCount = 0, 1049 __in DWORD dwRetryCount = 0,
1034 __in DWORD dwRetryTimeout = 1000 1050 __in DWORD dwRetryTimeout = 1000
1035 ) 1051 )
1036 { 1052 {
1037 m_cReferences = 1; 1053 m_cReferences = 1;
1038 m_display = pArgs->pCommand->display; 1054 m_display = BOOTSTRAPPER_DISPLAY_UNKNOWN;
1039 m_restart = pArgs->pCommand->restart;
1040 1055
1041 pEngine->AddRef(); 1056 pEngine->AddRef();
1042 m_pEngine = pEngine; 1057 m_pEngine = pEngine;
1043 1058
1044 ::InitializeCriticalSection(&m_csCanceled); 1059 ::InitializeCriticalSection(&m_csCanceled);
1045 m_fCanceled = FALSE; 1060 m_fCanceled = FALSE;
1061 m_BalInfoCommand = { };
1046 m_fApplying = FALSE; 1062 m_fApplying = FALSE;
1047 m_fRollingBack = FALSE; 1063 m_fRollingBack = FALSE;
1048 1064
@@ -1054,6 +1070,7 @@ protected:
1054 1070
1055 virtual ~CBalBaseBootstrapperApplication() 1071 virtual ~CBalBaseBootstrapperApplication()
1056 { 1072 {
1073 BalInfoUninitializeCommandLine(&m_BalInfoCommand);
1057 BalRetryUninitialize(); 1074 BalRetryUninitialize();
1058 ::DeleteCriticalSection(&m_csCanceled); 1075 ::DeleteCriticalSection(&m_csCanceled);
1059 1076
@@ -1064,10 +1081,11 @@ protected:
1064 CRITICAL_SECTION m_csCanceled; 1081 CRITICAL_SECTION m_csCanceled;
1065 BOOL m_fCanceled; 1082 BOOL m_fCanceled;
1066 1083
1084 BAL_INFO_COMMAND m_BalInfoCommand;
1085
1067private: 1086private:
1068 long m_cReferences; 1087 long m_cReferences;
1069 BOOTSTRAPPER_DISPLAY m_display; 1088 BOOTSTRAPPER_DISPLAY m_display;
1070 BOOTSTRAPPER_RESTART m_restart;
1071 IBootstrapperEngine* m_pEngine; 1089 IBootstrapperEngine* m_pEngine;
1072 1090
1073 BOOL m_fApplying; 1091 BOOL m_fApplying;