From 11fe2c881d182f9caff28bd9ff08c2e4fe513989 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Mon, 19 Apr 2021 17:35:44 -0500 Subject: Add new caching BA events. #3640 --- src/balutil/inc/BAFunctions.h | 7 ++ src/balutil/inc/BalBaseBAFunctions.h | 101 +++++++++++++++++--- src/balutil/inc/BalBaseBootstrapperApplication.h | 106 ++++++++++++++++++--- .../inc/BalBaseBootstrapperApplicationProc.h | 84 ++++++++++++++++ src/balutil/inc/IBootstrapperApplication.h | 87 +++++++++++++---- 5 files changed, 339 insertions(+), 46 deletions(-) (limited to 'src/balutil') diff --git a/src/balutil/inc/BAFunctions.h b/src/balutil/inc/BAFunctions.h index 07f7a750..2970478f 100644 --- a/src/balutil/inc/BAFunctions.h +++ b/src/balutil/inc/BAFunctions.h @@ -74,6 +74,13 @@ enum BA_FUNCTIONS_MESSAGE 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_ONCACHEVERIFYPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYPROGRESS, + BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYBEGIN, + BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE, + BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS, + BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTBEGIN, + BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTCOMPLETE, + BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTPROGRESS, BA_FUNCTIONS_MESSAGE_ONTHEMELOADED = 1024, BA_FUNCTIONS_MESSAGE_WNDPROC, diff --git a/src/balutil/inc/BalBaseBAFunctions.h b/src/balutil/inc/BalBaseBAFunctions.h index ca727f49..054bfb26 100644 --- a/src/balutil/inc/BalBaseBAFunctions.h +++ b/src/balutil/inc/BalBaseBAFunctions.h @@ -69,6 +69,26 @@ public: // IUnknown } public: // IBootstrapperApplication + virtual STDMETHODIMP_(HRESULT) BAProc( + __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, + __in const LPVOID /*pvArgs*/, + __inout LPVOID /*pvResults*/, + __in_opt LPVOID /*pvContext*/ + ) + { + return E_NOTIMPL; + } + + virtual STDMETHODIMP_(void) BAProcFallback( + __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, + __in const LPVOID /*pvArgs*/, + __inout LPVOID /*pvResults*/, + __inout HRESULT* /*phr*/, + __in_opt LPVOID /*pvContext*/ + ) + { + } + virtual STDMETHODIMP OnStartup() { return S_OK; @@ -439,7 +459,7 @@ public: // IBootstrapperApplication } virtual STDMETHODIMP OnCacheVerifyBegin( - __in_z LPCWSTR /*wzPackageId*/, + __in_z LPCWSTR /*wzPackageOrContainerId*/, __in_z LPCWSTR /*wzPayloadId*/, __inout BOOL* /*pfCancel*/ ) @@ -447,8 +467,21 @@ public: // IBootstrapperApplication return S_OK; } + virtual STDMETHODIMP OnCacheVerifyProgress( + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, + __in_z_opt LPCWSTR /*wzPayloadId*/, + __in DWORD64 /*dw64Progress*/, + __in DWORD64 /*dw64Total*/, + __in DWORD /*dwOverallPercentage*/, + __in BOOTSTRAPPER_CACHE_VERIFY_STEP /*verifyStep*/, + __inout BOOL* /*pfCancel*/ + ) + { + return S_OK; + } + virtual STDMETHODIMP OnCacheVerifyComplete( - __in_z LPCWSTR /*wzPackageId*/, + __in_z LPCWSTR /*wzPackageOrContainerId*/, __in_z LPCWSTR /*wzPayloadId*/, __in HRESULT /*hrStatus*/, __in BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION /*recommendation*/, @@ -684,24 +717,64 @@ public: // IBootstrapperApplication return S_OK; } - virtual STDMETHODIMP_(HRESULT) BAProc( - __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, - __in const LPVOID /*pvArgs*/, - __inout LPVOID /*pvResults*/, - __in_opt LPVOID /*pvContext*/ + virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyBegin( + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, + __in_z_opt LPCWSTR /*wzPayloadId*/, + __inout BOOL* /*pfCancel*/ ) { - return E_NOTIMPL; + return S_OK; } - virtual STDMETHODIMP_(void) BAProcFallback( - __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, - __in const LPVOID /*pvArgs*/, - __inout LPVOID /*pvResults*/, - __inout HRESULT* /*phr*/, - __in_opt LPVOID /*pvContext*/ + virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyProgress( + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, + __in_z_opt LPCWSTR /*wzPayloadId*/, + __in DWORD64 /*dw64Progress*/, + __in DWORD64 /*dw64Total*/, + __in DWORD /*dwOverallPercentage*/, + __inout BOOL* /*pfCancel*/ + ) + { + return S_OK; + } + + virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyComplete( + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, + __in_z_opt LPCWSTR /*wzPayloadId*/, + __in HRESULT /*hrStatus*/ + ) + { + return S_OK; + } + + virtual STDMETHODIMP OnCachePayloadExtractBegin( + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, + __in_z_opt LPCWSTR /*wzPayloadId*/, + __inout BOOL* /*pfCancel*/ ) { + return S_OK; + } + + virtual STDMETHODIMP OnCachePayloadExtractProgress( + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, + __in_z_opt LPCWSTR /*wzPayloadId*/, + __in DWORD64 /*dw64Progress*/, + __in DWORD64 /*dw64Total*/, + __in DWORD /*dwOverallPercentage*/, + __inout BOOL* /*pfCancel*/ + ) + { + return S_OK; + } + + virtual STDMETHODIMP OnCachePayloadExtractComplete( + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, + __in_z_opt LPCWSTR /*wzPayloadId*/, + __in HRESULT /*hrStatus*/ + ) + { + return S_OK; } public: // IBAFunctions diff --git a/src/balutil/inc/BalBaseBootstrapperApplication.h b/src/balutil/inc/BalBaseBootstrapperApplication.h index 3d3e4ffa..812025eb 100644 --- a/src/balutil/inc/BalBaseBootstrapperApplication.h +++ b/src/balutil/inc/BalBaseBootstrapperApplication.h @@ -61,6 +61,26 @@ public: // IUnknown } public: // IBootstrapperApplication + virtual STDMETHODIMP_(HRESULT) BAProc( + __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, + __in const LPVOID /*pvArgs*/, + __inout LPVOID /*pvResults*/, + __in_opt LPVOID /*pvContext*/ + ) + { + return E_NOTIMPL; + } + + virtual STDMETHODIMP_(void) BAProcFallback( + __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, + __in const LPVOID /*pvArgs*/, + __inout LPVOID /*pvResults*/, + __inout HRESULT* /*phr*/, + __in_opt LPVOID /*pvContext*/ + ) + { + } + virtual STDMETHODIMP OnStartup() { return S_OK; @@ -540,7 +560,7 @@ public: // IBootstrapperApplication } virtual STDMETHODIMP OnCacheVerifyBegin( - __in_z LPCWSTR /*wzPackageId*/, + __in_z LPCWSTR /*wzPackageOrContainerId*/, __in_z LPCWSTR /*wzPayloadId*/, __inout BOOL* pfCancel ) @@ -549,8 +569,22 @@ public: // IBootstrapperApplication return S_OK; } + virtual STDMETHODIMP OnCacheVerifyProgress( + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, + __in_z_opt LPCWSTR /*wzPayloadId*/, + __in DWORD64 /*dw64Progress*/, + __in DWORD64 /*dw64Total*/, + __in DWORD /*dwOverallPercentage*/, + __in BOOTSTRAPPER_CACHE_VERIFY_STEP /*verifyStep*/, + __inout BOOL* pfCancel + ) + { + *pfCancel |= CheckCanceled(); + return S_OK; + } + virtual STDMETHODIMP OnCacheVerifyComplete( - __in_z LPCWSTR /*wzPackageId*/, + __in_z LPCWSTR /*wzPackageOrContainerId*/, __in_z LPCWSTR /*wzPayloadId*/, __in HRESULT /*hrStatus*/, __in BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION /*recommendation*/, @@ -870,24 +904,68 @@ public: // IBootstrapperApplication return S_OK; } - virtual STDMETHODIMP_(HRESULT) BAProc( - __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, - __in const LPVOID /*pvArgs*/, - __inout LPVOID /*pvResults*/, - __in_opt LPVOID /*pvContext*/ + virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyBegin( + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, + __in_z_opt LPCWSTR /*wzPayloadId*/, + __inout BOOL* pfCancel ) { - return E_NOTIMPL; + *pfCancel |= CheckCanceled(); + return S_OK; } - virtual STDMETHODIMP_(void) BAProcFallback( - __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, - __in const LPVOID /*pvArgs*/, - __inout LPVOID /*pvResults*/, - __inout HRESULT* /*phr*/, - __in_opt LPVOID /*pvContext*/ + virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyProgress( + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, + __in_z_opt LPCWSTR /*wzPayloadId*/, + __in DWORD64 /*dw64Progress*/, + __in DWORD64 /*dw64Total*/, + __in DWORD /*dwOverallPercentage*/, + __inout BOOL* pfCancel ) { + *pfCancel |= CheckCanceled(); + return S_OK; + } + + virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyComplete( + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, + __in_z_opt LPCWSTR /*wzPayloadId*/, + __in HRESULT /*hrStatus*/ + ) + { + return S_OK; + } + + virtual STDMETHODIMP OnCachePayloadExtractBegin( + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, + __in_z_opt LPCWSTR /*wzPayloadId*/, + __inout BOOL* pfCancel + ) + { + *pfCancel |= CheckCanceled(); + return S_OK; + } + + virtual STDMETHODIMP OnCachePayloadExtractProgress( + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, + __in_z_opt LPCWSTR /*wzPayloadId*/, + __in DWORD64 /*dw64Progress*/, + __in DWORD64 /*dw64Total*/, + __in DWORD /*dwOverallPercentage*/, + __inout BOOL* pfCancel + ) + { + *pfCancel |= CheckCanceled(); + return S_OK; + } + + virtual STDMETHODIMP OnCachePayloadExtractComplete( + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, + __in_z_opt LPCWSTR /*wzPayloadId*/, + __in HRESULT /*hrStatus*/ + ) + { + return S_OK; } protected: diff --git a/src/balutil/inc/BalBaseBootstrapperApplicationProc.h b/src/balutil/inc/BalBaseBootstrapperApplicationProc.h index 42ffeb79..10769529 100644 --- a/src/balutil/inc/BalBaseBootstrapperApplicationProc.h +++ b/src/balutil/inc/BalBaseBootstrapperApplicationProc.h @@ -342,6 +342,15 @@ static HRESULT BalBaseBAProcOnCacheVerifyBegin( return pBA->OnCacheVerifyBegin(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, &pResults->fCancel); } +static HRESULT BalBaseBAProcOnCacheVerifyProgress( + __in IBootstrapperApplication* pBA, + __in BA_ONCACHEVERIFYPROGRESS_ARGS* pArgs, + __inout BA_ONCACHEVERIFYPROGRESS_RESULTS* pResults + ) +{ + return pBA->OnCacheVerifyProgress(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, pArgs->verifyStep, &pResults->fCancel); +} + static HRESULT BalBaseBAProcOnCacheVerifyComplete( __in IBootstrapperApplication* pBA, __in BA_ONCACHEVERIFYCOMPLETE_ARGS* pArgs, @@ -594,6 +603,60 @@ static HRESULT BalBaseBAProcOnPlanForwardCompatibleBundle( return pBA->OnPlanForwardCompatibleBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->fRecommendedIgnoreBundle, &pResults->fCancel, &pResults->fIgnoreBundle); } +static HRESULT BalBaseBAProcOnCacheContainerOrPayloadVerifyBegin( + __in IBootstrapperApplication* pBA, + __in BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_ARGS* pArgs, + __inout BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_RESULTS* pResults + ) +{ + return pBA->OnCacheContainerOrPayloadVerifyBegin(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, &pResults->fCancel); +} + +static HRESULT BalBaseBAProcOnCacheContainerOrPayloadVerifyProgress( + __in IBootstrapperApplication* pBA, + __in BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_ARGS* pArgs, + __inout BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_RESULTS* pResults + ) +{ + return pBA->OnCacheContainerOrPayloadVerifyProgress(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, &pResults->fCancel); +} + +static HRESULT BalBaseBAProcOnCacheContainerOrPayloadVerifyComplete( + __in IBootstrapperApplication* pBA, + __in BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_ARGS* pArgs, + __inout BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_RESULTS* /*pResults*/ + ) +{ + return pBA->OnCacheContainerOrPayloadVerifyComplete(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->hrStatus); +} + +static HRESULT BalBaseBAProcOnCachePayloadExtractBegin( + __in IBootstrapperApplication* pBA, + __in BA_ONCACHEPAYLOADEXTRACTBEGIN_ARGS* pArgs, + __inout BA_ONCACHEPAYLOADEXTRACTBEGIN_RESULTS* pResults + ) +{ + return pBA->OnCachePayloadExtractBegin(pArgs->wzContainerId, pArgs->wzPayloadId, &pResults->fCancel); +} + +static HRESULT BalBaseBAProcOnCachePayloadExtractProgress( + __in IBootstrapperApplication* pBA, + __in BA_ONCACHEPAYLOADEXTRACTPROGRESS_ARGS* pArgs, + __inout BA_ONCACHEPAYLOADEXTRACTPROGRESS_RESULTS* pResults + ) +{ + return pBA->OnCachePayloadExtractProgress(pArgs->wzContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, &pResults->fCancel); +} + +static HRESULT BalBaseBAProcOnCachePayloadExtractComplete( + __in IBootstrapperApplication* pBA, + __in BA_ONCACHEPAYLOADEXTRACTCOMPLETE_ARGS* pArgs, + __inout BA_ONCACHEPAYLOADEXTRACTCOMPLETE_RESULTS* /*pResults*/ + ) +{ + return pBA->OnCachePayloadExtractComplete(pArgs->wzContainerId, pArgs->wzPayloadId, pArgs->hrStatus); +} + /******************************************************************* BalBaseBootstrapperApplicationProc - requires pvContext to be of type IBootstrapperApplication. Provides a default mapping between the new message based BA interface and @@ -722,6 +785,9 @@ static HRESULT WINAPI BalBaseBootstrapperApplicationProc( case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYBEGIN: hr = BalBaseBAProcOnCacheVerifyBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); break; + case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYPROGRESS: + hr = BalBaseBAProcOnCacheVerifyProgress(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); + break; case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYCOMPLETE: hr = BalBaseBAProcOnCacheVerifyComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); break; @@ -808,6 +874,24 @@ static HRESULT WINAPI BalBaseBootstrapperApplicationProc( case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE: hr = BalBaseBAProcOnPlanForwardCompatibleBundle(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); break; + case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYBEGIN: + hr = BalBaseBAProcOnCacheContainerOrPayloadVerifyBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); + break; + case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS: + hr = BalBaseBAProcOnCacheContainerOrPayloadVerifyProgress(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); + break; + case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE: + hr = BalBaseBAProcOnCacheContainerOrPayloadVerifyComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); + break; + case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTBEGIN: + hr = BalBaseBAProcOnCachePayloadExtractBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); + break; + case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTPROGRESS: + hr = BalBaseBAProcOnCachePayloadExtractProgress(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); + break; + case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTCOMPLETE: + hr = BalBaseBAProcOnCachePayloadExtractComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); + break; } } diff --git a/src/balutil/inc/IBootstrapperApplication.h b/src/balutil/inc/IBootstrapperApplication.h index 8fcdd318..7d6a7164 100644 --- a/src/balutil/inc/IBootstrapperApplication.h +++ b/src/balutil/inc/IBootstrapperApplication.h @@ -4,6 +4,26 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-AB06-099D717C67FE") { + // 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)( + __in BOOTSTRAPPER_APPLICATION_MESSAGE message, + __in const LPVOID pvArgs, + __inout LPVOID pvResults, + __in_opt LPVOID pvContext + ) = 0; + + // BAProcFallback - The PFN_BOOTSTRAPPER_APPLICATION_PROC can call this method + // to give the BA the ability to use default behavior + // and then forward the message to extensions. + STDMETHOD_(void, BAProcFallback)( + __in BOOTSTRAPPER_APPLICATION_MESSAGE message, + __in const LPVOID pvArgs, + __inout LPVOID pvResults, + __inout HRESULT* phr, + __in_opt LPVOID pvContext + ) = 0; + // OnStartup - called when the engine is ready for the bootstrapper application to start. // STDMETHOD(OnStartup)() = 0; @@ -297,8 +317,7 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A __inout BOOL* pfCancel ) = 0; - // OnCacheAcquireProgress - called when the engine makes progresss copying - // or downloading a payload to the working folder. + // OnCacheAcquireProgress - called when the engine makes progress acquiring the payload or container. // STDMETHOD(OnCacheAcquireProgress)( __in_z_opt LPCWSTR wzPackageOrContainerId, @@ -359,6 +378,16 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A __inout BOOL* pfCancel ) = 0; + STDMETHOD(OnCacheVerifyProgress)( + __in_z_opt LPCWSTR wzPackageOrContainerId, + __in_z_opt LPCWSTR wzPayloadId, + __in DWORD64 dw64Progress, + __in DWORD64 dw64Total, + __in DWORD dwOverallPercentage, + __in BOOTSTRAPPER_CACHE_VERIFY_STEP verifyStep, + __inout BOOL* pfCancel + ) = 0; + // OnCacheVerifyComplete - called after the engine verifies and copies // a payload or container to the package cache folder. // @@ -570,23 +599,45 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A __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)( - __in BOOTSTRAPPER_APPLICATION_MESSAGE message, - __in const LPVOID pvArgs, - __inout LPVOID pvResults, - __in_opt LPVOID pvContext + STDMETHOD(OnCacheContainerOrPayloadVerifyBegin)( + __in_z_opt LPCWSTR wzPackageOrContainerId, + __in_z_opt LPCWSTR wzPayloadId, + __inout BOOL* pfCancel ) = 0; - // BAProcFallback - The PFN_BOOTSTRAPPER_APPLICATION_PROC can call this method - // to give the BA the ability to use default behavior - // and then forward the message to extensions. - STDMETHOD_(void, BAProcFallback)( - __in BOOTSTRAPPER_APPLICATION_MESSAGE message, - __in const LPVOID pvArgs, - __inout LPVOID pvResults, - __inout HRESULT* phr, - __in_opt LPVOID pvContext + STDMETHOD(OnCacheContainerOrPayloadVerifyProgress)( + __in_z_opt LPCWSTR wzPackageOrContainerId, + __in_z_opt LPCWSTR wzPayloadId, + __in DWORD64 dw64Progress, + __in DWORD64 dw64Total, + __in DWORD dwOverallPercentage, + __inout BOOL* pfCancel + ) = 0; + + STDMETHOD(OnCacheContainerOrPayloadVerifyComplete)( + __in_z_opt LPCWSTR wzPackageOrContainerId, + __in_z_opt LPCWSTR wzPayloadId, + __in HRESULT hrStatus + ) = 0; + + STDMETHOD(OnCachePayloadExtractBegin)( + __in_z_opt LPCWSTR wzContainerId, + __in_z_opt LPCWSTR wzPayloadId, + __inout BOOL* pfCancel + ) = 0; + + STDMETHOD(OnCachePayloadExtractProgress)( + __in_z_opt LPCWSTR wzContainerId, + __in_z_opt LPCWSTR wzPayloadId, + __in DWORD64 dw64Progress, + __in DWORD64 dw64Total, + __in DWORD dwOverallPercentage, + __inout BOOL* pfCancel + ) = 0; + + STDMETHOD(OnCachePayloadExtractComplete)( + __in_z_opt LPCWSTR wzContainerId, + __in_z_opt LPCWSTR wzPayloadId, + __in HRESULT hrStatus ) = 0; }; -- cgit v1.2.3-55-g6feb