From b036b878a6b477158a22e508ee3a9e8f569f5bf4 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 11 Mar 2021 19:57:12 -0600 Subject: Integrate ForwardCompatible and RelatedBundle changes in Burn headers. --- src/balutil/balutil.vcxproj | 4 ++-- src/balutil/inc/BAFunctions.h | 1 + src/balutil/inc/BalBaseBAFunctions.h | 19 +++++++++++++++++-- src/balutil/inc/BalBaseBAFunctionsProc.h | 1 + src/balutil/inc/BalBaseBootstrapperApplication.h | 20 ++++++++++++++++++-- src/balutil/inc/BalBaseBootstrapperApplicationProc.h | 16 ++++++++++++++-- src/balutil/inc/IBootstrapperApplication.h | 16 ++++++++++++++-- src/balutil/packages.config | 2 +- 8 files changed, 68 insertions(+), 11 deletions(-) (limited to 'src/balutil') diff --git a/src/balutil/balutil.vcxproj b/src/balutil/balutil.vcxproj index 1c9a2372..2510b966 100644 --- a/src/balutil/balutil.vcxproj +++ b/src/balutil/balutil.vcxproj @@ -2,7 +2,7 @@ - + @@ -98,7 +98,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + diff --git a/src/balutil/inc/BAFunctions.h b/src/balutil/inc/BAFunctions.h index 6d36ad8c..66852efa 100644 --- a/src/balutil/inc/BAFunctions.h +++ b/src/balutil/inc/BAFunctions.h @@ -73,6 +73,7 @@ enum BA_FUNCTIONS_MESSAGE BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN, BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE, BA_FUNCTIONS_MESSAGE_ONPLANNEDPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDPACKAGE, + BA_FUNCTIONS_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE, BA_FUNCTIONS_MESSAGE_ONTHEMELOADED = 1024, BA_FUNCTIONS_MESSAGE_WNDPROC, diff --git a/src/balutil/inc/BalBaseBAFunctions.h b/src/balutil/inc/BalBaseBAFunctions.h index 55ed8cbe..0164269c 100644 --- a/src/balutil/inc/BalBaseBAFunctions.h +++ b/src/balutil/inc/BalBaseBAFunctions.h @@ -104,8 +104,8 @@ public: // IBootstrapperApplication __in_z LPCWSTR /*wzBundleTag*/, __in BOOL /*fPerMachine*/, __in LPCWSTR /*wzVersion*/, - __inout BOOL* /*pfCancel*/, - __inout BOOL* /*pfIgnoreBundle*/ + __in BOOL /*fMissingFromCache*/, + __inout BOOL* /*pfCancel*/ ) { return S_OK; @@ -150,6 +150,7 @@ public: // IBootstrapperApplication __in BOOL /*fPerMachine*/, __in LPCWSTR /*wzVersion*/, __in BOOTSTRAPPER_RELATED_OPERATION /*operation*/, + __in BOOL /*fMissingFromCache*/, __inout BOOL* /*pfCancel*/ ) { @@ -660,6 +661,20 @@ public: // IBootstrapperApplication return S_OK; } + virtual STDMETHODIMP OnPlanForwardCompatibleBundle( + __in_z LPCWSTR /*wzBundleId*/, + __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, + __in_z LPCWSTR /*wzBundleTag*/, + __in BOOL /*fPerMachine*/, + __in LPCWSTR /*wzVersion*/, + __in BOOL /*fRecommendedIgnoreBundle*/, + __inout BOOL* /*pfCancel*/, + __inout BOOL* /*pfIgnoreBundle*/ + ) + { + return S_OK; + } + virtual STDMETHODIMP_(HRESULT) BAProc( __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, __in const LPVOID /*pvArgs*/, diff --git a/src/balutil/inc/BalBaseBAFunctionsProc.h b/src/balutil/inc/BalBaseBAFunctionsProc.h index 1b11c300..e1de800a 100644 --- a/src/balutil/inc/BalBaseBAFunctionsProc.h +++ b/src/balutil/inc/BalBaseBAFunctionsProc.h @@ -108,6 +108,7 @@ static HRESULT WINAPI BalBaseBAFunctionsProc( case BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN: case BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE: case BA_FUNCTIONS_MESSAGE_ONPLANNEDPACKAGE: + case BA_FUNCTIONS_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE: hr = BalBaseBootstrapperApplicationProc((BOOTSTRAPPER_APPLICATION_MESSAGE)message, pvArgs, pvResults, pvContext); break; case BA_FUNCTIONS_MESSAGE_ONTHEMELOADED: diff --git a/src/balutil/inc/BalBaseBootstrapperApplication.h b/src/balutil/inc/BalBaseBootstrapperApplication.h index ff1d07fd..c9211e0f 100644 --- a/src/balutil/inc/BalBaseBootstrapperApplication.h +++ b/src/balutil/inc/BalBaseBootstrapperApplication.h @@ -102,8 +102,8 @@ public: // IBootstrapperApplication __in_z LPCWSTR /*wzBundleTag*/, __in BOOL /*fPerMachine*/, __in LPCWSTR /*wzVersion*/, - __inout BOOL* pfCancel, - __inout BOOL* /*pfIgnoreBundle*/ + __in BOOL /*fMissingFromCache*/, + __inout BOOL* pfCancel ) { *pfCancel |= CheckCanceled(); @@ -151,6 +151,7 @@ public: // IBootstrapperApplication __in BOOL /*fPerMachine*/, __in LPCWSTR /*wzVersion*/, __in BOOTSTRAPPER_RELATED_OPERATION /*operation*/, + __in BOOL /*fMissingFromCache*/, __inout BOOL* pfCancel ) { @@ -845,6 +846,21 @@ public: // IBootstrapperApplication return S_OK; } + virtual STDMETHODIMP OnPlanForwardCompatibleBundle( + __in_z LPCWSTR /*wzBundleId*/, + __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, + __in_z LPCWSTR /*wzBundleTag*/, + __in BOOL /*fPerMachine*/, + __in LPCWSTR /*wzVersion*/, + __in BOOL /*fRecommendedIgnoreBundle*/, + __inout BOOL* pfCancel, + __inout BOOL* /*pfIgnoreBundle*/ + ) + { + *pfCancel |= CheckCanceled(); + return S_OK; + } + virtual STDMETHODIMP_(HRESULT) BAProc( __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, __in const LPVOID /*pvArgs*/, diff --git a/src/balutil/inc/BalBaseBootstrapperApplicationProc.h b/src/balutil/inc/BalBaseBootstrapperApplicationProc.h index d971a2eb..d8a6590b 100644 --- a/src/balutil/inc/BalBaseBootstrapperApplicationProc.h +++ b/src/balutil/inc/BalBaseBootstrapperApplicationProc.h @@ -78,7 +78,7 @@ static HRESULT BalBaseBAProcOnDetectForwardCompatibleBundle( __inout BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS* pResults ) { - return pBA->OnDetectForwardCompatibleBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, &pResults->fCancel, &pResults->fIgnoreBundle); + return pBA->OnDetectForwardCompatibleBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->fMissingFromCache, &pResults->fCancel); } static HRESULT BalBaseBAProcOnDetectUpdateBegin( @@ -114,7 +114,7 @@ static HRESULT BalBaseBAProcOnDetectRelatedBundle( __inout BA_ONDETECTRELATEDBUNDLE_RESULTS* pResults ) { - return pBA->OnDetectRelatedBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->operation, &pResults->fCancel); + return pBA->OnDetectRelatedBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->operation, pArgs->fMissingFromCache, &pResults->fCancel); } static HRESULT BalBaseBAProcOnDetectPackageBegin( @@ -585,6 +585,15 @@ static HRESULT BalBaseBAProcOnSystemRestorePointComplete( return pBA->OnSystemRestorePointComplete(pArgs->hrStatus); } +static HRESULT BalBaseBAProcOnPlanForwardCompatibleBundle( + __in IBootstrapperApplication* pBA, + __in BA_ONPLANFORWARDCOMPATIBLEBUNDLE_ARGS* pArgs, + __inout BA_ONPLANFORWARDCOMPATIBLEBUNDLE_RESULTS* pResults + ) +{ + return pBA->OnPlanForwardCompatibleBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->fRecommendedIgnoreBundle, &pResults->fCancel, &pResults->fIgnoreBundle); +} + /******************************************************************* BalBaseBootstrapperApplicationProc - requires pvContext to be of type IBootstrapperApplication. Provides a default mapping between the new message based BA interface and @@ -796,6 +805,9 @@ static HRESULT WINAPI BalBaseBootstrapperApplicationProc( case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDPACKAGE: hr = BalBaseBAProcOnPlannedPackage(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); break; + case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE: + hr = BalBaseBAProcOnPlanForwardCompatibleBundle(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); + break; } } diff --git a/src/balutil/inc/IBootstrapperApplication.h b/src/balutil/inc/IBootstrapperApplication.h index 01d0bb8a..ed70d8fe 100644 --- a/src/balutil/inc/IBootstrapperApplication.h +++ b/src/balutil/inc/IBootstrapperApplication.h @@ -33,8 +33,8 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A __in_z LPCWSTR wzBundleTag, __in BOOL fPerMachine, __in_z LPCWSTR wzVersion, - __inout BOOL* pfCancel, - __inout BOOL* pfIgnoreBundle + __in BOOL fMissingFromCache, + __inout BOOL* pfCancel ) = 0; // OnDetectUpdateBegin - called when the engine begins detection for bundle update. @@ -71,6 +71,7 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A __in BOOL fPerMachine, __in_z LPCWSTR wzVersion, __in BOOTSTRAPPER_RELATED_OPERATION operation, + __in BOOL fMissingFromCache, __inout BOOL* pfCancel ) = 0; @@ -540,6 +541,17 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A __in HRESULT hrStatus ) = 0; + STDMETHOD(OnPlanForwardCompatibleBundle)( + __in_z LPCWSTR wzBundleId, + __in BOOTSTRAPPER_RELATION_TYPE relationType, + __in_z LPCWSTR wzBundleTag, + __in BOOL fPerMachine, + __in_z LPCWSTR wzVersion, + __in BOOL fRecommendedIgnoreBundle, + __inout BOOL* pfCancel, + __inout BOOL* pfIgnoreBundle + ) = 0; + // BAProc - The PFN_BOOTSTRAPPER_APPLICATION_PROC can call this method to give the BA raw access to the callback from the engine. // This might be used to help the BA support more than one version of the engine. STDMETHOD(BAProc)( diff --git a/src/balutil/packages.config b/src/balutil/packages.config index 1ac5d2ac..76baf58e 100644 --- a/src/balutil/packages.config +++ b/src/balutil/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file -- cgit v1.2.3-55-g6feb