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 | |
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')
11 files changed, 192 insertions, 2 deletions
diff --git a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h b/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h index 9a5fb8f8..b507b167 100644 --- a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h +++ b/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h | |||
@@ -103,10 +103,22 @@ enum BOOTSTRAPPER_RELATION_TYPE | |||
103 | BOOTSTRAPPER_RELATION_UPGRADE, | 103 | BOOTSTRAPPER_RELATION_UPGRADE, |
104 | BOOTSTRAPPER_RELATION_ADDON, | 104 | BOOTSTRAPPER_RELATION_ADDON, |
105 | BOOTSTRAPPER_RELATION_PATCH, | 105 | BOOTSTRAPPER_RELATION_PATCH, |
106 | BOOTSTRAPPER_RELATION_DEPENDENT, | 106 | BOOTSTRAPPER_RELATION_DEPENDENT_ADDON, |
107 | BOOTSTRAPPER_RELATION_DEPENDENT_PATCH, | ||
107 | BOOTSTRAPPER_RELATION_UPDATE, | 108 | BOOTSTRAPPER_RELATION_UPDATE, |
108 | }; | 109 | }; |
109 | 110 | ||
111 | enum BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE | ||
112 | { | ||
113 | BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_NONE, | ||
114 | BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_DOWNGRADE, | ||
115 | BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_UPGRADE, | ||
116 | BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_ADDON, | ||
117 | BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_PATCH, | ||
118 | BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_DEPENDENT_ADDON, | ||
119 | BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_DEPENDENT_PATCH, | ||
120 | }; | ||
121 | |||
110 | enum BOOTSTRAPPER_CACHE_TYPE | 122 | enum BOOTSTRAPPER_CACHE_TYPE |
111 | { | 123 | { |
112 | BOOTSTRAPPER_CACHE_TYPE_REMOVE, | 124 | BOOTSTRAPPER_CACHE_TYPE_REMOVE, |
@@ -210,6 +222,7 @@ enum BOOTSTRAPPER_APPLICATION_MESSAGE | |||
210 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE, | 222 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE, |
211 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE, | 223 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE, |
212 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRESTORERELATEDBUNDLE, | 224 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRESTORERELATEDBUNDLE, |
225 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLETYPE, | ||
213 | }; | 226 | }; |
214 | 227 | ||
215 | enum BOOTSTRAPPER_APPLYCOMPLETE_ACTION | 228 | enum BOOTSTRAPPER_APPLYCOMPLETE_ACTION |
@@ -1209,6 +1222,20 @@ struct BA_ONPLANRELATEDBUNDLE_RESULTS | |||
1209 | BOOTSTRAPPER_REQUEST_STATE requestedState; | 1222 | BOOTSTRAPPER_REQUEST_STATE requestedState; |
1210 | }; | 1223 | }; |
1211 | 1224 | ||
1225 | struct BA_ONPLANRELATEDBUNDLETYPE_ARGS | ||
1226 | { | ||
1227 | DWORD cbSize; | ||
1228 | LPCWSTR wzBundleId; | ||
1229 | BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE recommendedType; | ||
1230 | }; | ||
1231 | |||
1232 | struct BA_ONPLANRELATEDBUNDLETYPE_RESULTS | ||
1233 | { | ||
1234 | DWORD cbSize; | ||
1235 | BOOL fCancel; | ||
1236 | BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE requestedType; | ||
1237 | }; | ||
1238 | |||
1212 | struct BA_ONPLANRESTORERELATEDBUNDLE_ARGS | 1239 | struct BA_ONPLANRESTORERELATEDBUNDLE_ARGS |
1213 | { | 1240 | { |
1214 | DWORD cbSize; | 1241 | DWORD cbSize; |
diff --git a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs index 1df992be..fd36cf26 100644 --- a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs +++ b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs | |||
@@ -89,6 +89,9 @@ namespace WixToolset.Mba.Core | |||
89 | public event EventHandler<PlanRelatedBundleEventArgs> PlanRelatedBundle; | 89 | public event EventHandler<PlanRelatedBundleEventArgs> PlanRelatedBundle; |
90 | 90 | ||
91 | /// <inheritdoc/> | 91 | /// <inheritdoc/> |
92 | public event EventHandler<PlanRelatedBundleTypeEventArgs> PlanRelatedBundleType; | ||
93 | |||
94 | /// <inheritdoc/> | ||
92 | public event EventHandler<PlanRollbackBoundaryEventArgs> PlanRollbackBoundary; | 95 | public event EventHandler<PlanRollbackBoundaryEventArgs> PlanRollbackBoundary; |
93 | 96 | ||
94 | /// <inheritdoc/> | 97 | /// <inheritdoc/> |
@@ -534,6 +537,19 @@ namespace WixToolset.Mba.Core | |||
534 | } | 537 | } |
535 | 538 | ||
536 | /// <summary> | 539 | /// <summary> |
540 | /// Called by the engine, raises the <see cref="PlanRelatedBundleType"/> event. | ||
541 | /// </summary> | ||
542 | /// <param name="args">Additional arguments for this event.</param> | ||
543 | protected virtual void OnPlanRelatedBundleType(PlanRelatedBundleTypeEventArgs args) | ||
544 | { | ||
545 | EventHandler<PlanRelatedBundleTypeEventArgs> handler = this.PlanRelatedBundleType; | ||
546 | if (null != handler) | ||
547 | { | ||
548 | handler(this, args); | ||
549 | } | ||
550 | } | ||
551 | |||
552 | /// <summary> | ||
537 | /// Called by the engine, raises the <see cref="PlanRollbackBoundary"/> event. | 553 | /// Called by the engine, raises the <see cref="PlanRollbackBoundary"/> event. |
538 | /// </summary> | 554 | /// </summary> |
539 | protected virtual void OnPlanRollbackBoundary(PlanRollbackBoundaryEventArgs args) | 555 | protected virtual void OnPlanRollbackBoundary(PlanRollbackBoundaryEventArgs args) |
@@ -1514,6 +1530,16 @@ namespace WixToolset.Mba.Core | |||
1514 | return args.HResult; | 1530 | return args.HResult; |
1515 | } | 1531 | } |
1516 | 1532 | ||
1533 | int IBootstrapperApplication.OnPlanRelatedBundleType(string wzBundleId, RelatedBundlePlanType recommendedType, ref RelatedBundlePlanType pRequestedType, ref bool fCancel) | ||
1534 | { | ||
1535 | PlanRelatedBundleTypeEventArgs args = new PlanRelatedBundleTypeEventArgs(wzBundleId, recommendedType, pRequestedType, fCancel); | ||
1536 | this.OnPlanRelatedBundleType(args); | ||
1537 | |||
1538 | pRequestedType = args.Type; | ||
1539 | fCancel = args.Cancel; | ||
1540 | return args.HResult; | ||
1541 | } | ||
1542 | |||
1517 | int IBootstrapperApplication.OnPlanRollbackBoundary(string wzRollbackBoundaryId, bool fRecommendedTransaction, ref bool fTransaction, ref bool fCancel) | 1543 | int IBootstrapperApplication.OnPlanRollbackBoundary(string wzRollbackBoundaryId, bool fRecommendedTransaction, ref bool fTransaction, ref bool fCancel) |
1518 | { | 1544 | { |
1519 | PlanRollbackBoundaryEventArgs args = new PlanRollbackBoundaryEventArgs(wzRollbackBoundaryId, fRecommendedTransaction, fTransaction, fCancel); | 1545 | PlanRollbackBoundaryEventArgs args = new PlanRollbackBoundaryEventArgs(wzRollbackBoundaryId, fRecommendedTransaction, fTransaction, fCancel); |
diff --git a/src/api/burn/WixToolset.Mba.Core/EventArgs.cs b/src/api/burn/WixToolset.Mba.Core/EventArgs.cs index 816757cc..d8ec7998 100644 --- a/src/api/burn/WixToolset.Mba.Core/EventArgs.cs +++ b/src/api/burn/WixToolset.Mba.Core/EventArgs.cs | |||
@@ -746,6 +746,37 @@ namespace WixToolset.Mba.Core | |||
746 | } | 746 | } |
747 | 747 | ||
748 | /// <summary> | 748 | /// <summary> |
749 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlanRelatedBundleType"/> | ||
750 | /// </summary> | ||
751 | [Serializable] | ||
752 | public class PlanRelatedBundleTypeEventArgs : CancellableHResultEventArgs | ||
753 | { | ||
754 | /// <summary /> | ||
755 | public PlanRelatedBundleTypeEventArgs(string bundleId, RelatedBundlePlanType recommendedType, RelatedBundlePlanType type, bool cancelRecommendation) | ||
756 | : base(cancelRecommendation) | ||
757 | { | ||
758 | this.BundleId = bundleId; | ||
759 | this.RecommendedType = recommendedType; | ||
760 | this.Type = type; | ||
761 | } | ||
762 | |||
763 | /// <summary> | ||
764 | /// Gets the identity of the bundle to plan for. | ||
765 | /// </summary> | ||
766 | public string BundleId { get; private set; } | ||
767 | |||
768 | /// <summary> | ||
769 | /// Gets the recommended plan type for the bundle. | ||
770 | /// </summary> | ||
771 | public RelatedBundlePlanType RecommendedType { get; private set; } | ||
772 | |||
773 | /// <summary> | ||
774 | /// Gets or sets the plan type for the bundle. | ||
775 | /// </summary> | ||
776 | public RelatedBundlePlanType Type { get; set; } | ||
777 | } | ||
778 | |||
779 | /// <summary> | ||
749 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlanPackageBegin"/> | 780 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlanPackageBegin"/> |
750 | /// </summary> | 781 | /// </summary> |
751 | [Serializable] | 782 | [Serializable] |
diff --git a/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs index 489e3b6d..4ab0f8d9 100644 --- a/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs +++ b/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs | |||
@@ -1148,6 +1148,18 @@ namespace WixToolset.Mba.Core | |||
1148 | [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, | 1148 | [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, |
1149 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | 1149 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel |
1150 | ); | 1150 | ); |
1151 | |||
1152 | /// <summary> | ||
1153 | /// See <see cref="IDefaultBootstrapperApplication.PlanRelatedBundleType"/>. | ||
1154 | /// </summary> | ||
1155 | [PreserveSig] | ||
1156 | [return: MarshalAs(UnmanagedType.I4)] | ||
1157 | int OnPlanRelatedBundleType( | ||
1158 | [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, | ||
1159 | [MarshalAs(UnmanagedType.U4)] RelatedBundlePlanType recommendedType, | ||
1160 | [MarshalAs(UnmanagedType.U4)] ref RelatedBundlePlanType pRequestedType, | ||
1161 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
1162 | ); | ||
1151 | } | 1163 | } |
1152 | 1164 | ||
1153 | /// <summary> | 1165 | /// <summary> |
@@ -1669,7 +1681,12 @@ namespace WixToolset.Mba.Core | |||
1669 | /// <summary> | 1681 | /// <summary> |
1670 | /// | 1682 | /// |
1671 | /// </summary> | 1683 | /// </summary> |
1672 | Dependent, | 1684 | DependentAddon, |
1685 | |||
1686 | /// <summary> | ||
1687 | /// | ||
1688 | /// </summary> | ||
1689 | DependentPatch, | ||
1673 | 1690 | ||
1674 | /// <summary> | 1691 | /// <summary> |
1675 | /// | 1692 | /// |
@@ -1678,6 +1695,47 @@ namespace WixToolset.Mba.Core | |||
1678 | } | 1695 | } |
1679 | 1696 | ||
1680 | /// <summary> | 1697 | /// <summary> |
1698 | /// The planned relation type for related bundles. | ||
1699 | /// </summary> | ||
1700 | public enum RelatedBundlePlanType | ||
1701 | { | ||
1702 | /// <summary> | ||
1703 | /// | ||
1704 | /// </summary> | ||
1705 | None, | ||
1706 | |||
1707 | /// <summary> | ||
1708 | /// | ||
1709 | /// </summary> | ||
1710 | Downgrade, | ||
1711 | |||
1712 | /// <summary> | ||
1713 | /// | ||
1714 | /// </summary> | ||
1715 | Upgrade, | ||
1716 | |||
1717 | /// <summary> | ||
1718 | /// | ||
1719 | /// </summary> | ||
1720 | Addon, | ||
1721 | |||
1722 | /// <summary> | ||
1723 | /// | ||
1724 | /// </summary> | ||
1725 | Patch, | ||
1726 | |||
1727 | /// <summary> | ||
1728 | /// | ||
1729 | /// </summary> | ||
1730 | DependentAddon, | ||
1731 | |||
1732 | /// <summary> | ||
1733 | /// | ||
1734 | /// </summary> | ||
1735 | DependentPatch, | ||
1736 | } | ||
1737 | |||
1738 | /// <summary> | ||
1681 | /// One or more reasons why the application is requested to be closed or is being closed. | 1739 | /// One or more reasons why the application is requested to be closed or is being closed. |
1682 | /// </summary> | 1740 | /// </summary> |
1683 | [Flags] | 1741 | [Flags] |
diff --git a/src/api/burn/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs index c237cb9d..ebd1580b 100644 --- a/src/api/burn/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs +++ b/src/api/burn/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs | |||
@@ -334,6 +334,11 @@ namespace WixToolset.Mba.Core | |||
334 | event EventHandler<PlanRelatedBundleEventArgs> PlanRelatedBundle; | 334 | event EventHandler<PlanRelatedBundleEventArgs> PlanRelatedBundle; |
335 | 335 | ||
336 | /// <summary> | 336 | /// <summary> |
337 | /// Fired when the engine has begun planning the related bundle relation type. | ||
338 | /// </summary> | ||
339 | event EventHandler<PlanRelatedBundleTypeEventArgs> PlanRelatedBundleType; | ||
340 | |||
341 | /// <summary> | ||
337 | /// Fired when the engine has begun planning an upgrade related bundle for restoring in case of failure. | 342 | /// Fired when the engine has begun planning an upgrade related bundle for restoring in case of failure. |
338 | /// </summary> | 343 | /// </summary> |
339 | event EventHandler<PlanRestoreRelatedBundleEventArgs> PlanRestoreRelatedBundle; | 344 | event EventHandler<PlanRestoreRelatedBundleEventArgs> PlanRestoreRelatedBundle; |
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 | }; |