diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2022-03-13 23:45:32 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2022-03-14 14:53:29 -0500 |
| commit | 4cd1c4e06145434ca940ac828772dc47b9d9738e (patch) | |
| tree | a754d685039173c63303dc6d0d8b1a2bf3ab506b /src/api/burn/balutil | |
| parent | 89adb2e3cc232b11b28e5bdeccb0c522c8124a29 (diff) | |
| download | wix-4cd1c4e06145434ca940ac828772dc47b9d9738e.tar.gz wix-4cd1c4e06145434ca940ac828772dc47b9d9738e.tar.bz2 wix-4cd1c4e06145434ca940ac828772dc47b9d9738e.zip | |
Allow the BA to override the bundle relation type during plan.
Diffstat (limited to 'src/api/burn/balutil')
6 files changed, 43 insertions, 0 deletions
diff --git a/src/api/burn/balutil/inc/BAFunctions.h b/src/api/burn/balutil/inc/BAFunctions.h index cbef88df..f772eb3f 100644 --- a/src/api/burn/balutil/inc/BAFunctions.h +++ b/src/api/burn/balutil/inc/BAFunctions.h | |||
| @@ -89,6 +89,7 @@ enum BA_FUNCTIONS_MESSAGE | |||
| 89 | BA_FUNCTIONS_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE, | 89 | BA_FUNCTIONS_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE, |
| 90 | BA_FUNCTIONS_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE, | 90 | BA_FUNCTIONS_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE, |
| 91 | BA_FUNCTIONS_MESSAGE_ONPLANRESTORERELATEDBUNDLE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRESTORERELATEDBUNDLE, | 91 | BA_FUNCTIONS_MESSAGE_ONPLANRESTORERELATEDBUNDLE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRESTORERELATEDBUNDLE, |
| 92 | BA_FUNCTIONS_MESSAGE_ONPLANRELATEDBUNDLETYPE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLETYPE, | ||
| 92 | 93 | ||
| 93 | BA_FUNCTIONS_MESSAGE_ONTHEMELOADED = 1024, | 94 | BA_FUNCTIONS_MESSAGE_ONTHEMELOADED = 1024, |
| 94 | BA_FUNCTIONS_MESSAGE_WNDPROC, | 95 | BA_FUNCTIONS_MESSAGE_WNDPROC, |
diff --git a/src/api/burn/balutil/inc/BalBaseBAFunctions.h b/src/api/burn/balutil/inc/BalBaseBAFunctions.h index 60a70e3e..f558828f 100644 --- a/src/api/burn/balutil/inc/BalBaseBAFunctions.h +++ b/src/api/burn/balutil/inc/BalBaseBAFunctions.h | |||
| @@ -859,6 +859,16 @@ public: // IBootstrapperApplication | |||
| 859 | return S_OK; | 859 | return S_OK; |
| 860 | } | 860 | } |
| 861 | 861 | ||
| 862 | virtual STDMETHODIMP OnPlanRelatedBundleType( | ||
| 863 | __in_z LPCWSTR /*wzBundleId*/, | ||
| 864 | __in BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE /*recommendedType*/, | ||
| 865 | __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* /*pRequestedType*/, | ||
| 866 | __inout BOOL* /*pfCancel*/ | ||
| 867 | ) | ||
| 868 | { | ||
| 869 | return S_OK; | ||
| 870 | } | ||
| 871 | |||
| 862 | public: // IBAFunctions | 872 | public: // IBAFunctions |
| 863 | virtual STDMETHODIMP OnPlan( | 873 | virtual STDMETHODIMP OnPlan( |
| 864 | ) | 874 | ) |
diff --git a/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h b/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h index 09cc189e..ede00f28 100644 --- a/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h +++ b/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h | |||
| @@ -160,6 +160,7 @@ static HRESULT WINAPI BalBaseBAFunctionsProc( | |||
| 160 | case BA_FUNCTIONS_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE: | 160 | case BA_FUNCTIONS_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE: |
| 161 | case BA_FUNCTIONS_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE: | 161 | case BA_FUNCTIONS_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE: |
| 162 | case BA_FUNCTIONS_MESSAGE_ONPLANRESTORERELATEDBUNDLE: | 162 | case BA_FUNCTIONS_MESSAGE_ONPLANRESTORERELATEDBUNDLE: |
| 163 | case BA_FUNCTIONS_MESSAGE_ONPLANRELATEDBUNDLETYPE: | ||
| 163 | hr = BalBaseBootstrapperApplicationProc((BOOTSTRAPPER_APPLICATION_MESSAGE)message, pvArgs, pvResults, pvContext); | 164 | hr = BalBaseBootstrapperApplicationProc((BOOTSTRAPPER_APPLICATION_MESSAGE)message, pvArgs, pvResults, pvContext); |
| 164 | break; | 165 | break; |
| 165 | case BA_FUNCTIONS_MESSAGE_ONTHEMELOADED: | 166 | case BA_FUNCTIONS_MESSAGE_ONTHEMELOADED: |
diff --git a/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h b/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h index 7b3cf827..49f4b7ca 100644 --- a/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h +++ b/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h | |||
| @@ -1058,6 +1058,17 @@ public: // IBootstrapperApplication | |||
| 1058 | return S_OK; | 1058 | return S_OK; |
| 1059 | } | 1059 | } |
| 1060 | 1060 | ||
| 1061 | virtual STDMETHODIMP OnPlanRelatedBundleType( | ||
| 1062 | __in_z LPCWSTR /*wzBundleId*/, | ||
| 1063 | __in BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE /*recommendedType*/, | ||
| 1064 | __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* /*pRequestedType*/, | ||
| 1065 | __inout BOOL* pfCancel | ||
| 1066 | ) | ||
| 1067 | { | ||
| 1068 | *pfCancel |= CheckCanceled(); | ||
| 1069 | return S_OK; | ||
| 1070 | } | ||
| 1071 | |||
| 1061 | public: //CBalBaseBootstrapperApplication | 1072 | public: //CBalBaseBootstrapperApplication |
| 1062 | virtual STDMETHODIMP Initialize( | 1073 | virtual STDMETHODIMP Initialize( |
| 1063 | __in const BOOTSTRAPPER_CREATE_ARGS* pCreateArgs | 1074 | __in const BOOTSTRAPPER_CREATE_ARGS* pCreateArgs |
diff --git a/src/api/burn/balutil/inc/BalBaseBootstrapperApplicationProc.h b/src/api/burn/balutil/inc/BalBaseBootstrapperApplicationProc.h index 8c3b8b72..698349f7 100644 --- a/src/api/burn/balutil/inc/BalBaseBootstrapperApplicationProc.h +++ b/src/api/burn/balutil/inc/BalBaseBootstrapperApplicationProc.h | |||
| @@ -729,6 +729,15 @@ static HRESULT BalBaseBAProcOnPlanRestoreRelatedBundle( | |||
| 729 | return pBA->OnPlanRestoreRelatedBundle(pArgs->wzBundleId, pArgs->recommendedState, &pResults->requestedState, &pResults->fCancel); | 729 | return pBA->OnPlanRestoreRelatedBundle(pArgs->wzBundleId, pArgs->recommendedState, &pResults->requestedState, &pResults->fCancel); |
| 730 | } | 730 | } |
| 731 | 731 | ||
| 732 | static HRESULT BalBaseBAProcOnPlanRelatedBundleType( | ||
| 733 | __in IBootstrapperApplication* pBA, | ||
| 734 | __in BA_ONPLANRELATEDBUNDLETYPE_ARGS* pArgs, | ||
| 735 | __inout BA_ONPLANRELATEDBUNDLETYPE_RESULTS* pResults | ||
| 736 | ) | ||
| 737 | { | ||
| 738 | return pBA->OnPlanRelatedBundleType(pArgs->wzBundleId, pArgs->recommendedType, &pResults->requestedType, &pResults->fCancel); | ||
| 739 | } | ||
| 740 | |||
| 732 | /******************************************************************* | 741 | /******************************************************************* |
| 733 | BalBaseBootstrapperApplicationProc - requires pvContext to be of type IBootstrapperApplication. | 742 | BalBaseBootstrapperApplicationProc - requires pvContext to be of type IBootstrapperApplication. |
| 734 | Provides a default mapping between the new message based BA interface and | 743 | Provides a default mapping between the new message based BA interface and |
| @@ -988,6 +997,9 @@ static HRESULT WINAPI BalBaseBootstrapperApplicationProc( | |||
| 988 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRESTORERELATEDBUNDLE: | 997 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRESTORERELATEDBUNDLE: |
| 989 | hr = BalBaseBAProcOnPlanRestoreRelatedBundle(pBA, reinterpret_cast<BA_ONPLANRESTORERELATEDBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANRESTORERELATEDBUNDLE_RESULTS*>(pvResults)); | 998 | hr = BalBaseBAProcOnPlanRestoreRelatedBundle(pBA, reinterpret_cast<BA_ONPLANRESTORERELATEDBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANRESTORERELATEDBUNDLE_RESULTS*>(pvResults)); |
| 990 | break; | 999 | break; |
| 1000 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLETYPE: | ||
| 1001 | hr = BalBaseBAProcOnPlanRelatedBundleType(pBA, reinterpret_cast<BA_ONPLANRELATEDBUNDLETYPE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANRELATEDBUNDLETYPE_RESULTS*>(pvResults)); | ||
| 1002 | break; | ||
| 991 | } | 1003 | } |
| 992 | } | 1004 | } |
| 993 | 1005 | ||
diff --git a/src/api/burn/balutil/inc/IBootstrapperApplication.h b/src/api/burn/balutil/inc/IBootstrapperApplication.h index e916d41e..462df0cc 100644 --- a/src/api/burn/balutil/inc/IBootstrapperApplication.h +++ b/src/api/burn/balutil/inc/IBootstrapperApplication.h | |||
| @@ -699,4 +699,12 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A | |||
| 699 | __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState, | 699 | __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState, |
| 700 | __inout BOOL* pfCancel | 700 | __inout BOOL* pfCancel |
| 701 | ) = 0; | 701 | ) = 0; |
| 702 | |||
| 703 | // OnPlanRelatedBundleType - called when the engine begins planning the related bundle relation type. | ||
| 704 | STDMETHOD(OnPlanRelatedBundleType)( | ||
| 705 | __in_z LPCWSTR wzBundleId, | ||
| 706 | __in BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE recommendedType, | ||
| 707 | __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* pRequestedType, | ||
| 708 | __inout BOOL* pfCancel | ||
| 709 | ) = 0; | ||
| 702 | }; | 710 | }; |
