aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Mba.Core
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Mba.Core')
-rw-r--r--src/WixToolset.Mba.Core/BootstrapperApplication.cs60
-rw-r--r--src/WixToolset.Mba.Core/EventArgs.cs126
-rw-r--r--src/WixToolset.Mba.Core/IBootstrapperApplication.cs31
-rw-r--r--src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs27
4 files changed, 157 insertions, 87 deletions
diff --git a/src/WixToolset.Mba.Core/BootstrapperApplication.cs b/src/WixToolset.Mba.Core/BootstrapperApplication.cs
index 9f4f6330..43e69e81 100644
--- a/src/WixToolset.Mba.Core/BootstrapperApplication.cs
+++ b/src/WixToolset.Mba.Core/BootstrapperApplication.cs
@@ -68,7 +68,7 @@ namespace WixToolset.Mba.Core
68 public event EventHandler<DetectRelatedMsiPackageEventArgs> DetectRelatedMsiPackage; 68 public event EventHandler<DetectRelatedMsiPackageEventArgs> DetectRelatedMsiPackage;
69 69
70 /// <inheritdoc/> 70 /// <inheritdoc/>
71 public event EventHandler<DetectTargetMsiPackageEventArgs> DetectTargetMsiPackage; 71 public event EventHandler<DetectPatchTargetEventArgs> DetectPatchTarget;
72 72
73 /// <inheritdoc/> 73 /// <inheritdoc/>
74 public event EventHandler<DetectMsiFeatureEventArgs> DetectMsiFeature; 74 public event EventHandler<DetectMsiFeatureEventArgs> DetectMsiFeature;
@@ -89,7 +89,7 @@ namespace WixToolset.Mba.Core
89 public event EventHandler<PlanPackageBeginEventArgs> PlanPackageBegin; 89 public event EventHandler<PlanPackageBeginEventArgs> PlanPackageBegin;
90 90
91 /// <inheritdoc/> 91 /// <inheritdoc/>
92 public event EventHandler<PlanTargetMsiPackageEventArgs> PlanTargetMsiPackage; 92 public event EventHandler<PlanPatchTargetEventArgs> PlanPatchTarget;
93 93
94 /// <inheritdoc/> 94 /// <inheritdoc/>
95 public event EventHandler<PlanMsiFeatureEventArgs> PlanMsiFeature; 95 public event EventHandler<PlanMsiFeatureEventArgs> PlanMsiFeature;
@@ -101,6 +101,9 @@ namespace WixToolset.Mba.Core
101 public event EventHandler<PlanPackageCompleteEventArgs> PlanPackageComplete; 101 public event EventHandler<PlanPackageCompleteEventArgs> PlanPackageComplete;
102 102
103 /// <inheritdoc/> 103 /// <inheritdoc/>
104 public event EventHandler<PlannedPackageEventArgs> PlannedPackage;
105
106 /// <inheritdoc/>
104 public event EventHandler<PlanCompleteEventArgs> PlanComplete; 107 public event EventHandler<PlanCompleteEventArgs> PlanComplete;
105 108
106 /// <inheritdoc/> 109 /// <inheritdoc/>
@@ -392,12 +395,12 @@ namespace WixToolset.Mba.Core
392 } 395 }
393 396
394 /// <summary> 397 /// <summary>
395 /// Called by the engine, raises the <see cref="DetectTargetMsiPackage"/> event. 398 /// Called by the engine, raises the <see cref="DetectPatchTarget"/> event.
396 /// </summary> 399 /// </summary>
397 /// <param name="args">Additional arguments for this event.</param> 400 /// <param name="args">Additional arguments for this event.</param>
398 protected virtual void OnDetectTargetMsiPackage(DetectTargetMsiPackageEventArgs args) 401 protected virtual void OnDetectPatchTarget(DetectPatchTargetEventArgs args)
399 { 402 {
400 EventHandler<DetectTargetMsiPackageEventArgs> handler = this.DetectTargetMsiPackage; 403 EventHandler<DetectPatchTargetEventArgs> handler = this.DetectPatchTarget;
401 if (null != handler) 404 if (null != handler)
402 { 405 {
403 handler(this, args); 406 handler(this, args);
@@ -483,12 +486,12 @@ namespace WixToolset.Mba.Core
483 } 486 }
484 487
485 /// <summary> 488 /// <summary>
486 /// Called by the engine, raises the <see cref="PlanTargetMsiPackage"/> event. 489 /// Called by the engine, raises the <see cref="PlanPatchTarget"/> event.
487 /// </summary> 490 /// </summary>
488 /// <param name="args">Additional arguments for this event.</param> 491 /// <param name="args">Additional arguments for this event.</param>
489 protected virtual void OnPlanTargetMsiPackage(PlanTargetMsiPackageEventArgs args) 492 protected virtual void OnPlanPatchTarget(PlanPatchTargetEventArgs args)
490 { 493 {
491 EventHandler<PlanTargetMsiPackageEventArgs> handler = this.PlanTargetMsiPackage; 494 EventHandler<PlanPatchTargetEventArgs> handler = this.PlanPatchTarget;
492 if (null != handler) 495 if (null != handler)
493 { 496 {
494 handler(this, args); 497 handler(this, args);
@@ -535,6 +538,19 @@ namespace WixToolset.Mba.Core
535 } 538 }
536 539
537 /// <summary> 540 /// <summary>
541 /// Called by the engine, raises the <see cref="PlannedPackage"/> event.
542 /// </summary>
543 /// <param name="args">Additional arguments for this event.</param>
544 protected virtual void OnPlannedPackage(PlannedPackageEventArgs args)
545 {
546 EventHandler<PlannedPackageEventArgs> handler = this.PlannedPackage;
547 if (null != handler)
548 {
549 handler(this, args);
550 }
551 }
552
553 /// <summary>
538 /// Called by the engine, raises the <see cref="PlanComplete"/> event. 554 /// Called by the engine, raises the <see cref="PlanComplete"/> event.
539 /// </summary> 555 /// </summary>
540 /// <param name="args">Additional arguments for this event.</param> 556 /// <param name="args">Additional arguments for this event.</param>
@@ -1170,10 +1186,10 @@ namespace WixToolset.Mba.Core
1170 return args.HResult; 1186 return args.HResult;
1171 } 1187 }
1172 1188
1173 int IBootstrapperApplication.OnDetectTargetMsiPackage(string wzPackageId, string wzProductCode, PackageState patchState, ref bool fCancel) 1189 int IBootstrapperApplication.OnDetectPatchTarget(string wzPackageId, string wzProductCode, PackageState patchState, ref bool fCancel)
1174 { 1190 {
1175 DetectTargetMsiPackageEventArgs args = new DetectTargetMsiPackageEventArgs(wzPackageId, wzProductCode, patchState, fCancel); 1191 DetectPatchTargetEventArgs args = new DetectPatchTargetEventArgs(wzPackageId, wzProductCode, patchState, fCancel);
1176 this.OnDetectTargetMsiPackage(args); 1192 this.OnDetectPatchTarget(args);
1177 1193
1178 fCancel = args.Cancel; 1194 fCancel = args.Cancel;
1179 return args.HResult; 1195 return args.HResult;
@@ -1223,9 +1239,9 @@ namespace WixToolset.Mba.Core
1223 return args.HResult; 1239 return args.HResult;
1224 } 1240 }
1225 1241
1226 int IBootstrapperApplication.OnPlanPackageBegin(string wzPackageId, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel) 1242 int IBootstrapperApplication.OnPlanPackageBegin(string wzPackageId, PackageState state, bool fInstallCondition, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel)
1227 { 1243 {
1228 PlanPackageBeginEventArgs args = new PlanPackageBeginEventArgs(wzPackageId, recommendedState, pRequestedState, fCancel); 1244 PlanPackageBeginEventArgs args = new PlanPackageBeginEventArgs(wzPackageId, state, fInstallCondition, recommendedState, pRequestedState, fCancel);
1229 this.OnPlanPackageBegin(args); 1245 this.OnPlanPackageBegin(args);
1230 1246
1231 pRequestedState = args.State; 1247 pRequestedState = args.State;
@@ -1233,10 +1249,10 @@ namespace WixToolset.Mba.Core
1233 return args.HResult; 1249 return args.HResult;
1234 } 1250 }
1235 1251
1236 int IBootstrapperApplication.OnPlanTargetMsiPackage(string wzPackageId, string wzProductCode, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel) 1252 int IBootstrapperApplication.OnPlanPatchTarget(string wzPackageId, string wzProductCode, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel)
1237 { 1253 {
1238 PlanTargetMsiPackageEventArgs args = new PlanTargetMsiPackageEventArgs(wzPackageId, wzProductCode, recommendedState, pRequestedState, fCancel); 1254 PlanPatchTargetEventArgs args = new PlanPatchTargetEventArgs(wzPackageId, wzProductCode, recommendedState, pRequestedState, fCancel);
1239 this.OnPlanTargetMsiPackage(args); 1255 this.OnPlanPatchTarget(args);
1240 1256
1241 pRequestedState = args.State; 1257 pRequestedState = args.State;
1242 fCancel = args.Cancel; 1258 fCancel = args.Cancel;
@@ -1265,14 +1281,22 @@ namespace WixToolset.Mba.Core
1265 return args.HResult; 1281 return args.HResult;
1266 } 1282 }
1267 1283
1268 int IBootstrapperApplication.OnPlanPackageComplete(string wzPackageId, int hrStatus, PackageState state, RequestState requested, ActionState execute, ActionState rollback) 1284 int IBootstrapperApplication.OnPlanPackageComplete(string wzPackageId, int hrStatus, RequestState requested)
1269 { 1285 {
1270 var args = new PlanPackageCompleteEventArgs(wzPackageId, hrStatus, state, requested, execute, rollback); 1286 var args = new PlanPackageCompleteEventArgs(wzPackageId, hrStatus, requested);
1271 this.OnPlanPackageComplete(args); 1287 this.OnPlanPackageComplete(args);
1272 1288
1273 return args.HResult; 1289 return args.HResult;
1274 } 1290 }
1275 1291
1292 int IBootstrapperApplication.OnPlannedPackage(string wzPackageId, ActionState execute, ActionState rollback)
1293 {
1294 var args = new PlannedPackageEventArgs(wzPackageId, execute, rollback);
1295 this.OnPlannedPackage(args);
1296
1297 return args.HResult;
1298 }
1299
1276 int IBootstrapperApplication.OnPlanComplete(int hrStatus) 1300 int IBootstrapperApplication.OnPlanComplete(int hrStatus)
1277 { 1301 {
1278 PlanCompleteEventArgs args = new PlanCompleteEventArgs(hrStatus); 1302 PlanCompleteEventArgs args = new PlanCompleteEventArgs(hrStatus);
diff --git a/src/WixToolset.Mba.Core/EventArgs.cs b/src/WixToolset.Mba.Core/EventArgs.cs
index 2f21b50e..953e31ee 100644
--- a/src/WixToolset.Mba.Core/EventArgs.cs
+++ b/src/WixToolset.Mba.Core/EventArgs.cs
@@ -547,18 +547,18 @@ namespace WixToolset.Mba.Core
547 } 547 }
548 548
549 /// <summary> 549 /// <summary>
550 /// Additional arguments used when a target MSI package has been detected. 550 /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectPatchTarget"/>
551 /// </summary> 551 /// </summary>
552 public class DetectTargetMsiPackageEventArgs : CancellableHResultEventArgs 552 public class DetectPatchTargetEventArgs : CancellableHResultEventArgs
553 { 553 {
554 /// <summary> 554 /// <summary>
555 /// Creates a new instance of the <see cref="DetectMsiFeatureEventArgs"/> class. 555 ///
556 /// </summary> 556 /// </summary>
557 /// <param name="packageId">Detected package identifier.</param> 557 /// <param name="packageId"></param>
558 /// <param name="productCode">Detected product code.</param> 558 /// <param name="productCode"></param>
559 /// <param name="state">Package state detected.</param> 559 /// <param name="state"></param>
560 /// <param name="cancelRecommendation">The recommendation from the engine.</param> 560 /// <param name="cancelRecommendation"></param>
561 public DetectTargetMsiPackageEventArgs(string packageId, string productCode, PackageState state, bool cancelRecommendation) 561 public DetectPatchTargetEventArgs(string packageId, string productCode, PackageState state, bool cancelRecommendation)
562 : base(cancelRecommendation) 562 : base(cancelRecommendation)
563 { 563 {
564 this.PackageId = packageId; 564 this.PackageId = packageId;
@@ -567,17 +567,17 @@ namespace WixToolset.Mba.Core
567 } 567 }
568 568
569 /// <summary> 569 /// <summary>
570 /// Gets the identity of the target's package detected. 570 /// Gets the identity of the patch's package.
571 /// </summary> 571 /// </summary>
572 public string PackageId { get; private set; } 572 public string PackageId { get; private set; }
573 573
574 /// <summary> 574 /// <summary>
575 /// Gets the product code of the target MSI detected. 575 /// Gets the product code of the target.
576 /// </summary> 576 /// </summary>
577 public string ProductCode { get; private set; } 577 public string ProductCode { get; private set; }
578 578
579 /// <summary> 579 /// <summary>
580 /// Gets the detected patch package state. 580 /// Gets the detected patch state for the target.
581 /// </summary> 581 /// </summary>
582 public PackageState State { get; private set; } 582 public PackageState State { get; private set; }
583 } 583 }
@@ -732,22 +732,26 @@ namespace WixToolset.Mba.Core
732 } 732 }
733 733
734 /// <summary> 734 /// <summary>
735 /// Additional arguments used when the engine has begun planning the installation of a specific package. 735 /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlanPackageBegin"/>
736 /// </summary> 736 /// </summary>
737 [Serializable] 737 [Serializable]
738 public class PlanPackageBeginEventArgs : CancellableHResultEventArgs 738 public class PlanPackageBeginEventArgs : CancellableHResultEventArgs
739 { 739 {
740 /// <summary> 740 /// <summary>
741 /// Creates a new instance of the <see cref="PlanPackageBeginEventArgs"/> class. 741 ///
742 /// </summary> 742 /// </summary>
743 /// <param name="packageId">The identity of the package to plan for.</param> 743 /// <param name="packageId"></param>
744 /// <param name="recommendedState">The recommended requested state for the package.</param> 744 /// <param name="currentState"></param>
745 /// <param name="state">The requested state for the package.</param> 745 /// <param name="installCondition"></param>
746 /// <param name="cancelRecommendation">The recommendation from the engine.</param> 746 /// <param name="recommendedState"></param>
747 public PlanPackageBeginEventArgs(string packageId, RequestState recommendedState, RequestState state, bool cancelRecommendation) 747 /// <param name="state"></param>
748 /// <param name="cancelRecommendation"></param>
749 public PlanPackageBeginEventArgs(string packageId, PackageState currentState, bool installCondition, RequestState recommendedState, RequestState state, bool cancelRecommendation)
748 : base(cancelRecommendation) 750 : base(cancelRecommendation)
749 { 751 {
750 this.PackageId = packageId; 752 this.PackageId = packageId;
753 this.CurrentState = currentState;
754 this.InstallCondition = installCondition;
751 this.RecommendedState = recommendedState; 755 this.RecommendedState = recommendedState;
752 this.State = state; 756 this.State = state;
753 } 757 }
@@ -758,6 +762,16 @@ namespace WixToolset.Mba.Core
758 public string PackageId { get; private set; } 762 public string PackageId { get; private set; }
759 763
760 /// <summary> 764 /// <summary>
765 /// Gets the current state of the package.
766 /// </summary>
767 public PackageState CurrentState { get; private set; }
768
769 /// <summary>
770 /// Gets the evaluated result of the package's install condition.
771 /// </summary>
772 public bool InstallCondition { get; private set; }
773
774 /// <summary>
761 /// Gets the recommended requested state for the package. 775 /// Gets the recommended requested state for the package.
762 /// </summary> 776 /// </summary>
763 public RequestState RecommendedState { get; private set; } 777 public RequestState RecommendedState { get; private set; }
@@ -769,20 +783,20 @@ namespace WixToolset.Mba.Core
769 } 783 }
770 784
771 /// <summary> 785 /// <summary>
772 /// Additional arguments used when engine is about to plan a MSP applied to a target MSI package. 786 /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlanPatchTarget"/>
773 /// </summary> 787 /// </summary>
774 [Serializable] 788 [Serializable]
775 public class PlanTargetMsiPackageEventArgs : CancellableHResultEventArgs 789 public class PlanPatchTargetEventArgs : CancellableHResultEventArgs
776 { 790 {
777 /// <summary> 791 /// <summary>
778 /// Creates a new instance of the <see cref="PlanMsiFeatureEventArgs"/> class. 792 ///
779 /// </summary> 793 /// </summary>
780 /// <param name="packageId">Package identifier of the patch being planned.</param> 794 /// <param name="packageId"></param>
781 /// <param name="productCode">Product code identifier being planned.</param> 795 /// <param name="productCode"></param>
782 /// <param name="recommendedState">Recommended package state of the patch being planned.</param> 796 /// <param name="recommendedState"></param>
783 /// <param name="state">Package state of the patch being planned.</param> 797 /// <param name="state"></param>
784 /// <param name="cancelRecommendation">The recommendation from the engine.</param> 798 /// <param name="cancelRecommendation"></param>
785 public PlanTargetMsiPackageEventArgs(string packageId, string productCode, RequestState recommendedState, RequestState state, bool cancelRecommendation) 799 public PlanPatchTargetEventArgs(string packageId, string productCode, RequestState recommendedState, RequestState state, bool cancelRecommendation)
786 : base(cancelRecommendation) 800 : base(cancelRecommendation)
787 { 801 {
788 this.PackageId = packageId; 802 this.PackageId = packageId;
@@ -792,22 +806,22 @@ namespace WixToolset.Mba.Core
792 } 806 }
793 807
794 /// <summary> 808 /// <summary>
795 /// Gets the identity of the patch package to plan. 809 /// Gets the identity of the patch's package.
796 /// </summary> 810 /// </summary>
797 public string PackageId { get; private set; } 811 public string PackageId { get; private set; }
798 812
799 /// <summary> 813 /// <summary>
800 /// Gets the identity of the patch's target MSI to plan. 814 /// Gets the product code of the target.
801 /// </summary> 815 /// </summary>
802 public string ProductCode { get; private set; } 816 public string ProductCode { get; private set; }
803 817
804 /// <summary> 818 /// <summary>
805 /// Gets the recommended state of the patch to use by planning. 819 /// Gets the recommended state of the patch to use by planning for the target.
806 /// </summary> 820 /// </summary>
807 public RequestState RecommendedState { get; private set; } 821 public RequestState RecommendedState { get; private set; }
808 822
809 /// <summary> 823 /// <summary>
810 /// Gets or sets the state of the patch to use by planning. 824 /// Gets or sets the state of the patch to use by planning for the target.
811 /// </summary> 825 /// </summary>
812 public RequestState State { get; set; } 826 public RequestState State { get; set; }
813 } 827 }
@@ -915,28 +929,22 @@ namespace WixToolset.Mba.Core
915 } 929 }
916 930
917 /// <summary> 931 /// <summary>
918 /// Additional arguments used when then engine has completed planning the installation of a specific package. 932 /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlanPackageComplete"/>
919 /// </summary> 933 /// </summary>
920 [Serializable] 934 [Serializable]
921 public class PlanPackageCompleteEventArgs : StatusEventArgs 935 public class PlanPackageCompleteEventArgs : StatusEventArgs
922 { 936 {
923 /// <summary> 937 /// <summary>
924 /// Creates a new instance of the <see cref="PlanPackageCompleteEventArgs"/> class. 938 ///
925 /// </summary> 939 /// </summary>
926 /// <param name="packageId">The identity of the package planned for.</param> 940 /// <param name="packageId"></param>
927 /// <param name="hrStatus">The return code of the operation.</param> 941 /// <param name="hrStatus"></param>
928 /// <param name="state">The current state of the package.</param> 942 /// <param name="requested"></param>
929 /// <param name="requested">The requested state for the package</param> 943 public PlanPackageCompleteEventArgs(string packageId, int hrStatus, RequestState requested)
930 /// <param name="execute">The execution action to take.</param>
931 /// <param name="rollback">The rollback action to take.</param>
932 public PlanPackageCompleteEventArgs(string packageId, int hrStatus, PackageState state, RequestState requested, ActionState execute, ActionState rollback)
933 : base(hrStatus) 944 : base(hrStatus)
934 { 945 {
935 this.PackageId = packageId; 946 this.PackageId = packageId;
936 this.State = state;
937 this.Requested = requested; 947 this.Requested = requested;
938 this.Execute = execute;
939 this.Rollback = rollback;
940 } 948 }
941 949
942 /// <summary> 950 /// <summary>
@@ -945,22 +953,42 @@ namespace WixToolset.Mba.Core
945 public string PackageId { get; private set; } 953 public string PackageId { get; private set; }
946 954
947 /// <summary> 955 /// <summary>
948 /// Gets the current state of the package. 956 /// Gets the requested state for the package.
949 /// </summary> 957 /// </summary>
950 public PackageState State { get; private set; } 958 public RequestState Requested { get; private set; }
959 }
951 960
961 /// <summary>
962 /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlannedPackage"/>
963 /// </summary>
964 [Serializable]
965 public class PlannedPackageEventArgs : HResultEventArgs
966 {
952 /// <summary> 967 /// <summary>
953 /// Gets the requested state for the package. 968 ///
954 /// </summary> 969 /// </summary>
955 public RequestState Requested { get; private set; } 970 /// <param name="packageId"></param>
971 /// <param name="execute"></param>
972 /// <param name="rollback"></param>
973 public PlannedPackageEventArgs(string packageId, ActionState execute, ActionState rollback)
974 {
975 this.PackageId = packageId;
976 this.Execute = execute;
977 this.Rollback = rollback;
978 }
979
980 /// <summary>
981 /// Gets the identity of the package planned for.
982 /// </summary>
983 public string PackageId { get; private set; }
956 984
957 /// <summary> 985 /// <summary>
958 /// Gets the execution action to take. 986 /// Gets the planned execution action.
959 /// </summary> 987 /// </summary>
960 public ActionState Execute { get; private set; } 988 public ActionState Execute { get; private set; }
961 989
962 /// <summary> 990 /// <summary>
963 /// Gets the rollback action to take. 991 /// Gets the planned rollback action.
964 /// </summary> 992 /// </summary>
965 public ActionState Rollback { get; private set; } 993 public ActionState Rollback { get; private set; }
966 } 994 }
diff --git a/src/WixToolset.Mba.Core/IBootstrapperApplication.cs b/src/WixToolset.Mba.Core/IBootstrapperApplication.cs
index c1a32ed4..7ff243d2 100644
--- a/src/WixToolset.Mba.Core/IBootstrapperApplication.cs
+++ b/src/WixToolset.Mba.Core/IBootstrapperApplication.cs
@@ -194,7 +194,7 @@ namespace WixToolset.Mba.Core
194 ); 194 );
195 195
196 /// <summary> 196 /// <summary>
197 /// See <see cref="IDefaultBootstrapperApplication.DetectTargetMsiPackage"/>. 197 /// See <see cref="IDefaultBootstrapperApplication.DetectPatchTarget"/>.
198 /// </summary> 198 /// </summary>
199 /// <param name="wzPackageId"></param> 199 /// <param name="wzPackageId"></param>
200 /// <param name="wzProductCode"></param> 200 /// <param name="wzProductCode"></param>
@@ -203,7 +203,7 @@ namespace WixToolset.Mba.Core
203 /// <returns></returns> 203 /// <returns></returns>
204 [PreserveSig] 204 [PreserveSig]
205 [return: MarshalAs(UnmanagedType.I4)] 205 [return: MarshalAs(UnmanagedType.I4)]
206 int OnDetectTargetMsiPackage( 206 int OnDetectPatchTarget(
207 [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, 207 [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId,
208 [MarshalAs(UnmanagedType.LPWStr)] string wzProductCode, 208 [MarshalAs(UnmanagedType.LPWStr)] string wzProductCode,
209 [MarshalAs(UnmanagedType.U4)] PackageState patchState, 209 [MarshalAs(UnmanagedType.U4)] PackageState patchState,
@@ -289,6 +289,8 @@ namespace WixToolset.Mba.Core
289 /// See <see cref="IDefaultBootstrapperApplication.PlanPackageBegin"/>. 289 /// See <see cref="IDefaultBootstrapperApplication.PlanPackageBegin"/>.
290 /// </summary> 290 /// </summary>
291 /// <param name="wzPackageId"></param> 291 /// <param name="wzPackageId"></param>
292 /// <param name="state"></param>
293 /// <param name="fInstallCondition"></param>
292 /// <param name="recommendedState"></param> 294 /// <param name="recommendedState"></param>
293 /// <param name="pRequestedState"></param> 295 /// <param name="pRequestedState"></param>
294 /// <param name="fCancel"></param> 296 /// <param name="fCancel"></param>
@@ -297,13 +299,15 @@ namespace WixToolset.Mba.Core
297 [return: MarshalAs(UnmanagedType.I4)] 299 [return: MarshalAs(UnmanagedType.I4)]
298 int OnPlanPackageBegin( 300 int OnPlanPackageBegin(
299 [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, 301 [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId,
302 [MarshalAs(UnmanagedType.U4)] PackageState state,
303 [MarshalAs(UnmanagedType.Bool)] bool fInstallCondition,
300 [MarshalAs(UnmanagedType.U4)] RequestState recommendedState, 304 [MarshalAs(UnmanagedType.U4)] RequestState recommendedState,
301 [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, 305 [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState,
302 [MarshalAs(UnmanagedType.Bool)] ref bool fCancel 306 [MarshalAs(UnmanagedType.Bool)] ref bool fCancel
303 ); 307 );
304 308
305 /// <summary> 309 /// <summary>
306 /// See <see cref="IDefaultBootstrapperApplication.PlanTargetMsiPackage"/>. 310 /// See <see cref="IDefaultBootstrapperApplication.PlanPatchTarget"/>.
307 /// </summary> 311 /// </summary>
308 /// <param name="wzPackageId"></param> 312 /// <param name="wzPackageId"></param>
309 /// <param name="wzProductCode"></param> 313 /// <param name="wzProductCode"></param>
@@ -313,7 +317,7 @@ namespace WixToolset.Mba.Core
313 /// <returns></returns> 317 /// <returns></returns>
314 [PreserveSig] 318 [PreserveSig]
315 [return: MarshalAs(UnmanagedType.I4)] 319 [return: MarshalAs(UnmanagedType.I4)]
316 int OnPlanTargetMsiPackage( 320 int OnPlanPatchTarget(
317 [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, 321 [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId,
318 [MarshalAs(UnmanagedType.LPWStr)] string wzProductCode, 322 [MarshalAs(UnmanagedType.LPWStr)] string wzProductCode,
319 [MarshalAs(UnmanagedType.U4)] RequestState recommendedState, 323 [MarshalAs(UnmanagedType.U4)] RequestState recommendedState,
@@ -368,18 +372,27 @@ namespace WixToolset.Mba.Core
368 /// </summary> 372 /// </summary>
369 /// <param name="wzPackageId"></param> 373 /// <param name="wzPackageId"></param>
370 /// <param name="hrStatus"></param> 374 /// <param name="hrStatus"></param>
371 /// <param name="state"></param>
372 /// <param name="requested"></param> 375 /// <param name="requested"></param>
373 /// <param name="execute"></param>
374 /// <param name="rollback"></param>
375 /// <returns></returns> 376 /// <returns></returns>
376 [PreserveSig] 377 [PreserveSig]
377 [return: MarshalAs(UnmanagedType.I4)] 378 [return: MarshalAs(UnmanagedType.I4)]
378 int OnPlanPackageComplete( 379 int OnPlanPackageComplete(
379 [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, 380 [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId,
380 int hrStatus, 381 int hrStatus,
381 [MarshalAs(UnmanagedType.U4)] PackageState state, 382 [MarshalAs(UnmanagedType.U4)] RequestState requested
382 [MarshalAs(UnmanagedType.U4)] RequestState requested, 383 );
384
385 /// <summary>
386 /// See <see cref="IDefaultBootstrapperApplication.PlannedPackage"/>.
387 /// </summary>
388 /// <param name="wzPackageId"></param>
389 /// <param name="execute"></param>
390 /// <param name="rollback"></param>
391 /// <returns></returns>
392 [PreserveSig]
393 [return: MarshalAs(UnmanagedType.I4)]
394 int OnPlannedPackage(
395 [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId,
383 [MarshalAs(UnmanagedType.U4)] ActionState execute, 396 [MarshalAs(UnmanagedType.U4)] ActionState execute,
384 [MarshalAs(UnmanagedType.U4)] ActionState rollback 397 [MarshalAs(UnmanagedType.U4)] ActionState rollback
385 ); 398 );
diff --git a/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs b/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs
index 9970dc3e..d0518049 100644
--- a/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs
+++ b/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs
@@ -115,6 +115,11 @@ namespace WixToolset.Mba.Core
115 event EventHandler<DetectPackageCompleteEventArgs> DetectPackageComplete; 115 event EventHandler<DetectPackageCompleteEventArgs> DetectPackageComplete;
116 116
117 /// <summary> 117 /// <summary>
118 /// Fired when the engine detects a target product for an MSP package.
119 /// </summary>
120 event EventHandler<DetectPatchTargetEventArgs> DetectPatchTarget;
121
122 /// <summary>
118 /// Fired when a related bundle has been detected for a bundle. 123 /// Fired when a related bundle has been detected for a bundle.
119 /// </summary> 124 /// </summary>
120 event EventHandler<DetectRelatedBundleEventArgs> DetectRelatedBundle; 125 event EventHandler<DetectRelatedBundleEventArgs> DetectRelatedBundle;
@@ -125,11 +130,6 @@ namespace WixToolset.Mba.Core
125 event EventHandler<DetectRelatedMsiPackageEventArgs> DetectRelatedMsiPackage; 130 event EventHandler<DetectRelatedMsiPackageEventArgs> DetectRelatedMsiPackage;
126 131
127 /// <summary> 132 /// <summary>
128 /// Fired when an MSP package detects a target MSI has been detected.
129 /// </summary>
130 event EventHandler<DetectTargetMsiPackageEventArgs> DetectTargetMsiPackage;
131
132 /// <summary>
133 /// Fired when the update detection has found a potential update candidate. 133 /// Fired when the update detection has found a potential update candidate.
134 /// </summary> 134 /// </summary>
135 event EventHandler<DetectUpdateEventArgs> DetectUpdate; 135 event EventHandler<DetectUpdateEventArgs> DetectUpdate;
@@ -230,6 +230,11 @@ namespace WixToolset.Mba.Core
230 event EventHandler<PlanCompleteEventArgs> PlanComplete; 230 event EventHandler<PlanCompleteEventArgs> PlanComplete;
231 231
232 /// <summary> 232 /// <summary>
233 /// Fired when the engine has completed planning a package.
234 /// </summary>
235 event EventHandler<PlannedPackageEventArgs> PlannedPackage;
236
237 /// <summary>
233 /// Fired when the engine is about to plan a feature in an MSI package. 238 /// Fired when the engine is about to plan a feature in an MSI package.
234 /// </summary> 239 /// </summary>
235 event EventHandler<PlanMsiFeatureEventArgs> PlanMsiFeature; 240 event EventHandler<PlanMsiFeatureEventArgs> PlanMsiFeature;
@@ -240,24 +245,24 @@ namespace WixToolset.Mba.Core
240 event EventHandler<PlanMsiPackageEventArgs> PlanMsiPackage; 245 event EventHandler<PlanMsiPackageEventArgs> PlanMsiPackage;
241 246
242 /// <summary> 247 /// <summary>
243 /// Fired when the engine has begun planning the installation of a specific package. 248 /// Fired when the engine has begun getting the BA's input for planning a package.
244 /// </summary> 249 /// </summary>
245 event EventHandler<PlanPackageBeginEventArgs> PlanPackageBegin; 250 event EventHandler<PlanPackageBeginEventArgs> PlanPackageBegin;
246 251
247 /// <summary> 252 /// <summary>
248 /// Fired when the engine has completed planning the installation of a specific package. 253 /// Fired when the engine has completed getting the BA's input for planning a package.
249 /// </summary> 254 /// </summary>
250 event EventHandler<PlanPackageCompleteEventArgs> PlanPackageComplete; 255 event EventHandler<PlanPackageCompleteEventArgs> PlanPackageComplete;
251 256
252 /// <summary> 257 /// <summary>
253 /// Fired when the engine has begun planning for a related bundle. 258 /// Fired when the engine is about to plan a target of an MSP package.
254 /// </summary> 259 /// </summary>
255 event EventHandler<PlanRelatedBundleEventArgs> PlanRelatedBundle; 260 event EventHandler<PlanPatchTargetEventArgs> PlanPatchTarget;
256 261
257 /// <summary> 262 /// <summary>
258 /// Fired when the engine is about to plan the target MSI of a MSP package. 263 /// Fired when the engine has begun planning for a related bundle.
259 /// </summary> 264 /// </summary>
260 event EventHandler<PlanTargetMsiPackageEventArgs> PlanTargetMsiPackage; 265 event EventHandler<PlanRelatedBundleEventArgs> PlanRelatedBundle;
261 266
262 /// <summary> 267 /// <summary>
263 /// Fired when the engine has changed progress for the bundle installation. 268 /// Fired when the engine has changed progress for the bundle installation.