@joebigelow / wix / commits / 11fe2c88

Add new caching BA events.

#3640

Sean Hall committed Apr 19, 2021 at 17:35 UTC 11fe2c881d182f9caff28bd9ff08c2e4fe513989
9 files changed +943 -378
src/WixToolset.Mba.Core/BootstrapperApplication.cs
+184 -11
@@ -154,6 +154,9 @@ namespace WixToolset.Mba.Core
154 /// <inheritdoc/>
155 public event EventHandler<CacheVerifyBeginEventArgs> CacheVerifyBegin;
156
157 + /// <inheritdoc/>
158 + public event EventHandler<CacheVerifyProgressEventArgs> CacheVerifyProgress;
159 +
160 /// <inheritdoc/>
161 public event EventHandler<CacheVerifyCompleteEventArgs> CacheVerifyComplete;
162
@@ -229,6 +232,24 @@ namespace WixToolset.Mba.Core
232 /// <inheritdoc/>
233 public event EventHandler<PlanForwardCompatibleBundleEventArgs> PlanForwardCompatibleBundle;
234
235 + /// <inheritdoc/>
236 + public event EventHandler<CacheContainerOrPayloadVerifyBeginEventArgs> CacheContainerOrPayloadVerifyBegin;
237 +
238 + /// <inheritdoc/>
239 + public event EventHandler<CacheContainerOrPayloadVerifyProgressEventArgs> CacheContainerOrPayloadVerifyProgress;
240 +
241 + /// <inheritdoc/>
242 + public event EventHandler<CacheContainerOrPayloadVerifyCompleteEventArgs> CacheContainerOrPayloadVerifyComplete;
243 +
244 + /// <inheritdoc/>
245 + public event EventHandler<CachePayloadExtractBeginEventArgs> CachePayloadExtractBegin;
246 +
247 + /// <inheritdoc/>
248 + public event EventHandler<CachePayloadExtractProgressEventArgs> CachePayloadExtractProgress;
249 +
250 + /// <inheritdoc/>
251 + public event EventHandler<CachePayloadExtractCompleteEventArgs> CachePayloadExtractComplete;
252 +
253 /// <summary>
254 /// Entry point that is called when the bootstrapper application is ready to run.
255 /// </summary>
@@ -774,6 +795,19 @@ namespace WixToolset.Mba.Core
795 }
796 }
797
798 + /// <summary>
799 + /// Called by the engine, raises the <see cref="CacheVerifyProgress"/> event.
800 + /// </summary>
801 + /// <param name="args"></param>
802 + protected virtual void OnCacheVerifyProgress(CacheVerifyProgressEventArgs args)
803 + {
804 + EventHandler<CacheVerifyProgressEventArgs> handler = this.CacheVerifyProgress;
805 + if (null != handler)
806 + {
807 + handler(this, args);
808 + }
809 + }
810 +
811 /// <summary>
812 /// Called by the engine, raises the <see cref="CacheVerifyComplete"/> event.
813 /// </summary>
@@ -1098,8 +1132,99 @@ namespace WixToolset.Mba.Core
1132 }
1133 }
1134
1135 + /// <summary>
1136 + /// Called by the engine, raises the <see cref="CacheContainerOrPayloadVerifyBegin"/> event.
1137 + /// </summary>
1138 + /// <param name="args"></param>
1139 + protected virtual void OnCacheContainerOrPayloadVerifyBegin(CacheContainerOrPayloadVerifyBeginEventArgs args)
1140 + {
1141 + EventHandler<CacheContainerOrPayloadVerifyBeginEventArgs> handler = this.CacheContainerOrPayloadVerifyBegin;
1142 + if (null != handler)
1143 + {
1144 + handler(this, args);
1145 + }
1146 + }
1147 +
1148 + /// <summary>
1149 + /// Called by the engine, raises the <see cref="CacheContainerOrPayloadVerifyProgress"/> event.
1150 + /// </summary>
1151 + /// <param name="args"></param>
1152 + protected virtual void OnCacheContainerOrPayloadVerifyProgress(CacheContainerOrPayloadVerifyProgressEventArgs args)
1153 + {
1154 + EventHandler<CacheContainerOrPayloadVerifyProgressEventArgs> handler = this.CacheContainerOrPayloadVerifyProgress;
1155 + if (null != handler)
1156 + {
1157 + handler(this, args);
1158 + }
1159 + }
1160 +
1161 + /// <summary>
1162 + /// Called by the engine, raises the <see cref="CacheContainerOrPayloadVerifyComplete"/> event.
1163 + /// </summary>
1164 + /// <param name="args"></param>
1165 + protected virtual void OnCacheContainerOrPayloadVerifyComplete(CacheContainerOrPayloadVerifyCompleteEventArgs args)
1166 + {
1167 + EventHandler<CacheContainerOrPayloadVerifyCompleteEventArgs> handler = this.CacheContainerOrPayloadVerifyComplete;
1168 + if (null != handler)
1169 + {
1170 + handler(this, args);
1171 + }
1172 + }
1173 +
1174 + /// <summary>
1175 + /// Called by the engine, raises the <see cref="CachePayloadExtractBegin"/> event.
1176 + /// </summary>
1177 + /// <param name="args"></param>
1178 + protected virtual void OnCachePayloadExtractBegin(CachePayloadExtractBeginEventArgs args)
1179 + {
1180 + EventHandler<CachePayloadExtractBeginEventArgs> handler = this.CachePayloadExtractBegin;
1181 + if (null != handler)
1182 + {
1183 + handler(this, args);
1184 + }
1185 + }
1186 +
1187 + /// <summary>
1188 + /// Called by the engine, raises the <see cref="CachePayloadExtractProgress"/> event.
1189 + /// </summary>
1190 + /// <param name="args"></param>
1191 + protected virtual void OnCachePayloadExtractProgress(CachePayloadExtractProgressEventArgs args)
1192 + {
1193 + EventHandler<CachePayloadExtractProgressEventArgs> handler = this.CachePayloadExtractProgress;
1194 + if (null != handler)
1195 + {
1196 + handler(this, args);
1197 + }
1198 + }
1199 +
1200 + /// <summary>
1201 + /// Called by the engine, raises the <see cref="CachePayloadExtractComplete"/> event.
1202 + /// </summary>
1203 + /// <param name="args"></param>
1204 + protected virtual void OnCachePayloadExtractComplete(CachePayloadExtractCompleteEventArgs args)
1205 + {
1206 + EventHandler<CachePayloadExtractCompleteEventArgs> handler = this.CachePayloadExtractComplete;
1207 + if (null != handler)
1208 + {
1209 + handler(this, args);
1210 + }
1211 + }
1212 +
1213 #region IBootstrapperApplication Members
1214
1215 + int IBootstrapperApplication.BAProc(int message, IntPtr pvArgs, IntPtr pvResults, IntPtr pvContext)
1216 + {
1217 + switch (message)
1218 + {
1219 + default:
1220 + return NativeMethods.E_NOTIMPL;
1221 + }
1222 + }
1223 +
1224 + void IBootstrapperApplication.BAProcFallback(int message, IntPtr pvArgs, IntPtr pvResults, ref int phr, IntPtr pvContext)
1225 + {
1226 + }
1227 +
1228 int IBootstrapperApplication.OnStartup()
1229 {
1230 StartupEventArgs args = new StartupEventArgs();
@@ -1439,18 +1564,27 @@ namespace WixToolset.Mba.Core
1564 return args.HResult;
1565 }
1566
1442 - int IBootstrapperApplication.OnCacheVerifyBegin(string wzPackageId, string wzPayloadId, ref bool fCancel)
1567 + int IBootstrapperApplication.OnCacheVerifyBegin(string wzPackageOrContainerId, string wzPayloadId, ref bool fCancel)
1568 {
1444 - CacheVerifyBeginEventArgs args = new CacheVerifyBeginEventArgs(wzPackageId, wzPayloadId, fCancel);
1569 + CacheVerifyBeginEventArgs args = new CacheVerifyBeginEventArgs(wzPackageOrContainerId, wzPayloadId, fCancel);
1570 this.OnCacheVerifyBegin(args);
1571
1572 fCancel = args.Cancel;
1573 return args.HResult;
1574 }
1575
1451 - int IBootstrapperApplication.OnCacheVerifyComplete(string wzPackageId, string wzPayloadId, int hrStatus, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action)
1576 + int IBootstrapperApplication.OnCacheVerifyProgress(string wzPackageOrContainerId, string wzPayloadId, long dw64Progress, long dw64Total, int dwOverallPercentage, CacheVerifyStep verifyStep, ref bool fCancel)
1577 + {
1578 + CacheVerifyProgressEventArgs args = new CacheVerifyProgressEventArgs(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, verifyStep, fCancel);
1579 + this.OnCacheVerifyProgress(args);
1580 +
1581 + fCancel = args.Cancel;
1582 + return args.HResult;
1583 + }
1584 +
1585 + int IBootstrapperApplication.OnCacheVerifyComplete(string wzPackageOrContainerId, string wzPayloadId, int hrStatus, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action)
1586 {
1453 - CacheVerifyCompleteEventArgs args = new CacheVerifyCompleteEventArgs(wzPackageId, wzPayloadId, hrStatus, recommendation, action);
1587 + CacheVerifyCompleteEventArgs args = new CacheVerifyCompleteEventArgs(wzPackageOrContainerId, wzPayloadId, hrStatus, recommendation, action);
1588 this.OnCacheVerifyComplete(args);
1589
1590 action = args.Action;
@@ -1682,17 +1816,56 @@ namespace WixToolset.Mba.Core
1816 return args.HResult;
1817 }
1818
1685 - int IBootstrapperApplication.BAProc(int message, IntPtr pvArgs, IntPtr pvResults, IntPtr pvContext)
1819 + int IBootstrapperApplication.OnCacheContainerOrPayloadVerifyBegin(string wzPackageOrContainerId, string wzPayloadId, ref bool fCancel)
1820 {
1687 - switch (message)
1688 - {
1689 - default:
1690 - return NativeMethods.E_NOTIMPL;
1691 - }
1821 + CacheContainerOrPayloadVerifyBeginEventArgs args = new CacheContainerOrPayloadVerifyBeginEventArgs(wzPackageOrContainerId, wzPayloadId, fCancel);
1822 + this.OnCacheContainerOrPayloadVerifyBegin(args);
1823 +
1824 + fCancel = args.Cancel;
1825 + return args.HResult;
1826 }
1827
1694 - void IBootstrapperApplication.BAProcFallback(int message, IntPtr pvArgs, IntPtr pvResults, ref int phr, IntPtr pvContext)
1828 + int IBootstrapperApplication.OnCacheContainerOrPayloadVerifyProgress(string wzPackageOrContainerId, string wzPayloadId, long dw64Progress, long dw64Total, int dwOverallPercentage, ref bool fCancel)
1829 + {
1830 + CacheContainerOrPayloadVerifyProgressEventArgs args = new CacheContainerOrPayloadVerifyProgressEventArgs(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, fCancel);
1831 + this.OnCacheContainerOrPayloadVerifyProgress(args);
1832 +
1833 + fCancel = args.Cancel;
1834 + return args.HResult;
1835 + }
1836 +
1837 + int IBootstrapperApplication.OnCacheContainerOrPayloadVerifyComplete(string wzPackageOrContainerId, string wzPayloadId, int hrStatus)
1838 + {
1839 + CacheContainerOrPayloadVerifyCompleteEventArgs args = new CacheContainerOrPayloadVerifyCompleteEventArgs(wzPackageOrContainerId, wzPayloadId, hrStatus);
1840 + this.OnCacheContainerOrPayloadVerifyComplete(args);
1841 +
1842 + return args.HResult;
1843 + }
1844 +
1845 + int IBootstrapperApplication.OnCachePayloadExtractBegin(string wzContainerId, string wzPayloadId, ref bool fCancel)
1846 + {
1847 + CachePayloadExtractBeginEventArgs args = new CachePayloadExtractBeginEventArgs(wzContainerId, wzPayloadId, fCancel);
1848 + this.OnCachePayloadExtractBegin(args);
1849 +
1850 + fCancel = args.Cancel;
1851 + return args.HResult;
1852 + }
1853 +
1854 + int IBootstrapperApplication.OnCachePayloadExtractProgress(string wzContainerId, string wzPayloadId, long dw64Progress, long dw64Total, int dwOverallPercentage, ref bool fCancel)
1855 {
1856 + CachePayloadExtractProgressEventArgs args = new CachePayloadExtractProgressEventArgs(wzContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, fCancel);
1857 + this.OnCachePayloadExtractProgress(args);
1858 +
1859 + fCancel = args.Cancel;
1860 + return args.HResult;
1861 + }
1862 +
1863 + int IBootstrapperApplication.OnCachePayloadExtractComplete(string wzContainerId, string wzPayloadId, int hrStatus)
1864 + {
1865 + CachePayloadExtractCompleteEventArgs args = new CachePayloadExtractCompleteEventArgs(wzContainerId, wzPayloadId, hrStatus);
1866 + this.OnCachePayloadExtractComplete(args);
1867 +
1868 + return args.HResult;
1869 }
1870
1871 #endregion
src/WixToolset.Mba.Core/EventArgs.cs
+257 -279
@@ -51,11 +51,7 @@ namespace WixToolset.Mba.Core
51 [Serializable]
52 public abstract class ResultEventArgs : HResultEventArgs
53 {
54 - /// <summary>
55 - /// Creates a new instance of the <see cref="ResultEventArgs"/> class.
56 - /// </summary>
57 - /// <param name="recommendation">Recommended result from engine.</param>
58 - /// <param name="result">The result to return to the engine.</param>
54 + /// <summary />
55 public ResultEventArgs(Result recommendation, Result result)
56 {
57 this.Recommendation = recommendation;
@@ -99,11 +95,7 @@ namespace WixToolset.Mba.Core
95 /// </summary>
96 public abstract class ActionEventArgs<T> : StatusEventArgs
97 {
102 - /// <summary>
103 - /// </summary>
104 - /// <param name="hrStatus">The return code of the operation.</param>
105 - /// <param name="recommendation">Recommended action from engine.</param>
106 - /// <param name="action">The action to perform.</param>
98 + /// <summary />
99 public ActionEventArgs(int hrStatus, T recommendation, T action)
100 : base(hrStatus)
101 {
@@ -147,6 +139,49 @@ namespace WixToolset.Mba.Core
139 public T Action { get; set; }
140 }
141
142 + /// <summary>
143 + /// Base class for cache progress events.
144 + /// </summary>
145 + [Serializable]
146 + public abstract class CacheProgressBaseEventArgs : CancellableHResultEventArgs
147 + {
148 + /// <summary />
149 + public CacheProgressBaseEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation)
150 + : base(cancelRecommendation)
151 + {
152 + this.PackageOrContainerId = packageOrContainerId;
153 + this.PayloadId = payloadId;
154 + this.Progress = progress;
155 + this.Total = total;
156 + this.OverallPercentage = overallPercentage;
157 + }
158 +
159 + /// <summary>
160 + /// Gets the identifier of the container or package.
161 + /// </summary>
162 + public string PackageOrContainerId { get; private set; }
163 +
164 + /// <summary>
165 + /// Gets the identifier of the payload.
166 + /// </summary>
167 + public string PayloadId { get; private set; }
168 +
169 + /// <summary>
170 + /// Gets the number of bytes cached thus far.
171 + /// </summary>
172 + public long Progress { get; private set; }
173 +
174 + /// <summary>
175 + /// Gets the total bytes to cache.
176 + /// </summary>
177 + public long Total { get; private set; }
178 +
179 + /// <summary>
180 + /// Gets the overall percentage of progress of caching.
181 + /// </summary>
182 + public int OverallPercentage { get; private set; }
183 + }
184 +
185 /// <summary>
186 /// Additional arguments used when startup has begun.
187 /// </summary>
@@ -182,25 +217,12 @@ namespace WixToolset.Mba.Core
217 }
218
219 /// <summary>
185 - /// Additional arguments used when the system is shutting down or the user is logging off.
220 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.SystemShutdown"/>
221 /// </summary>
187 - /// <remarks>
188 - /// <para>To prevent shutting down or logging off, set <see cref="CancellableHResultEventArgs.Cancel"/> to
189 - /// true; otherwise, set it to false.</para>
190 - /// <para>By default setup will prevent shutting down or logging off between
191 - /// <see cref="IDefaultBootstrapperApplication.ApplyBegin"/> and <see cref="IDefaultBootstrapperApplication.ApplyComplete"/>.</para>
192 - /// <para>If <see cref="SystemShutdownEventArgs.Reasons"/> contains <see cref="EndSessionReasons.Critical"/>
193 - /// the bootstrapper cannot prevent the shutdown and only has a few seconds to save state or perform any other
194 - /// critical operations before being closed by the operating system.</para>
195 - /// </remarks>
222 [Serializable]
223 public class SystemShutdownEventArgs : CancellableHResultEventArgs
224 {
199 - /// <summary>
200 - /// Creates a new instance of the <see cref="SystemShutdownEventArgs"/> class.
201 - /// </summary>
202 - /// <param name="reasons">The reason the application is requested to close or being closed.</param>
203 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
225 + /// <summary />
226 public SystemShutdownEventArgs(EndSessionReasons reasons, bool cancelRecommendation)
227 : base(cancelRecommendation)
228 {
@@ -301,17 +323,12 @@ namespace WixToolset.Mba.Core
323 }
324
325 /// <summary>
304 - /// Additional arguments used when the detection for an update has begun.
326 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectUpdateBegin"/>
327 /// </summary>
328 [Serializable]
329 public class DetectUpdateBeginEventArgs : CancellableHResultEventArgs
330 {
309 - /// <summary>
310 - /// Creates a new instance of the <see cref="DetectUpdateBeginEventArgs"/> class.
311 - /// </summary>
312 - /// <param name="updateLocation">The location to check for an updated bundle.</param>
313 - /// <param name="cancelRecommendation">The cancel recommendation from the engine.</param>
314 - /// <param name="skipRecommendation">The skip recommendation from the engine.</param>
331 + /// <summary />
332 public DetectUpdateBeginEventArgs(string updateLocation, bool cancelRecommendation, bool skipRecommendation)
333 : base(cancelRecommendation)
334 {
@@ -331,23 +348,12 @@ namespace WixToolset.Mba.Core
348 }
349
350 /// <summary>
334 - /// Additional arguments used when the detection for an update has begun.
351 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectUpdate"/>
352 /// </summary>
353 [Serializable]
354 public class DetectUpdateEventArgs : CancellableHResultEventArgs
355 {
339 - /// <summary>
340 - /// Creates a new instance of the <see cref="DetectUpdateBeginEventArgs"/> class.
341 - /// </summary>
342 - /// <param name="updateLocation">The location to check for an updated bundle.</param>
343 - /// <param name="size">The expected size of the updated bundle.</param>
344 - /// <param name="version">The expected version of the updated bundle.</param>
345 - /// <param name="title">The title of the updated bundle.</param>
346 - /// <param name="summary">The summary of the updated bundle.</param>
347 - /// <param name="contentType">The content type of the content of the updated bundle.</param>
348 - /// <param name="content">The content of the updated bundle.</param>
349 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
350 - /// <param name="stopRecommendation">The recommendation from the engine.</param>
356 + /// <summary />
357 public DetectUpdateEventArgs(string updateLocation, long size, string version, string title, string summary, string contentType, string content, bool cancelRecommendation, bool stopRecommendation)
358 : base(cancelRecommendation)
359 {
@@ -403,16 +409,12 @@ namespace WixToolset.Mba.Core
409 }
410
411 /// <summary>
406 - /// Additional arguments used when the detection for an update has completed.
412 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectUpdateComplete"/>
413 /// </summary>
414 [Serializable]
415 public class DetectUpdateCompleteEventArgs : StatusEventArgs
416 {
411 - /// <summary>
412 - /// Creates a new instance of the <see cref="DetectUpdateCompleteEventArgs"/> class.
413 - /// </summary>
414 - /// <param name="hrStatus">The return code of the operation.</param>
415 - /// <param name="ignoreRecommendation">The recommendation from the engine.</param>
417 + /// <summary />
418 public DetectUpdateCompleteEventArgs(int hrStatus, bool ignoreRecommendation)
419 : base(hrStatus)
420 {
@@ -481,16 +483,12 @@ namespace WixToolset.Mba.Core
483 }
484
485 /// <summary>
484 - /// Additional arguments used when the detection for a specific package has begun.
486 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectPackageBegin"/>
487 /// </summary>
488 [Serializable]
489 public class DetectPackageBeginEventArgs : CancellableHResultEventArgs
490 {
489 - /// <summary>
490 - /// Creates a new instance of the <see cref="DetectPackageBeginEventArgs"/> class.
491 - /// </summary>
492 - /// <param name="packageId">The identity of the package to detect.</param>
493 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
491 + /// <summary />
492 public DetectPackageBeginEventArgs(string packageId, bool cancelRecommendation)
493 : base(cancelRecommendation)
494 {
@@ -504,21 +502,12 @@ namespace WixToolset.Mba.Core
502 }
503
504 /// <summary>
507 - /// Additional arguments used when a related MSI package has been detected for a package.
505 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectRelatedMsiPackage"/>
506 /// </summary>
507 [Serializable]
508 public class DetectRelatedMsiPackageEventArgs : CancellableHResultEventArgs
509 {
512 - /// <summary>
513 - /// Creates a new instance of the <see cref="DetectRelatedMsiPackageEventArgs"/> class.
514 - /// </summary>
515 - /// <param name="packageId">The identity of the package detecting.</param>
516 - /// <param name="upgradeCode">The upgrade code of the related package detected.</param>
517 - /// <param name="productCode">The identity of the related package detected.</param>
518 - /// <param name="perMachine">Whether the detected package is per machine.</param>
519 - /// <param name="version">The version of the related package detected.</param>
520 - /// <param name="operation">The operation that will be taken on the detected package.</param>
521 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
510 + /// <summary />
511 public DetectRelatedMsiPackageEventArgs(string packageId, string upgradeCode, string productCode, bool perMachine, string version, RelatedOperation operation, bool cancelRecommendation)
512 : base(cancelRecommendation)
513 {
@@ -598,17 +587,11 @@ namespace WixToolset.Mba.Core
587 }
588
589 /// <summary>
601 - /// Additional arguments used when a feature in an MSI package has been detected.
590 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectMsiFeature"/>
591 /// </summary>
592 public class DetectMsiFeatureEventArgs : CancellableHResultEventArgs
593 {
605 - /// <summary>
606 - /// Creates a new instance of the <see cref="DetectMsiFeatureEventArgs"/> class.
607 - /// </summary>
608 - /// <param name="packageId">Detected package identifier.</param>
609 - /// <param name="featureId">Detected feature identifier.</param>
610 - /// <param name="state">Feature state detected.</param>
611 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
594 + /// <summary />
595 public DetectMsiFeatureEventArgs(string packageId, string featureId, FeatureState state, bool cancelRecommendation)
596 : base(cancelRecommendation)
597 {
@@ -687,16 +670,12 @@ namespace WixToolset.Mba.Core
670 }
671
672 /// <summary>
690 - /// Additional arguments used when the engine has begun planning the installation.
673 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlanBegin"/>
674 /// </summary>
675 [Serializable]
676 public class PlanBeginEventArgs : CancellableHResultEventArgs
677 {
695 - /// <summary>
696 - /// Creates a new instance of the <see cref="PlanBeginEventArgs"/> class.
697 - /// </summary>
698 - /// <param name="packageCount">The number of packages to plan for.</param>
699 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
678 + /// <summary />
679 public PlanBeginEventArgs(int packageCount, bool cancelRecommendation)
680 : base(cancelRecommendation)
681 {
@@ -710,18 +689,12 @@ namespace WixToolset.Mba.Core
689 }
690
691 /// <summary>
713 - /// Additional arguments used when the engine has begun planning for a related bundle.
692 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlanRelatedBundle"/>
693 /// </summary>
694 [Serializable]
695 public class PlanRelatedBundleEventArgs : CancellableHResultEventArgs
696 {
718 - /// <summary>
719 - /// Creates a new instance of the <see cref="PlanRelatedBundleEventArgs"/> class.
720 - /// </summary>
721 - /// <param name="bundleId">The identity of the bundle to plan for.</param>
722 - /// <param name="recommendedState">The recommended requested state for the bundle.</param>
723 - /// <param name="state">The requested state for the bundle.</param>
724 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
697 + /// <summary />
698 public PlanRelatedBundleEventArgs(string bundleId, RequestState recommendedState, RequestState state, bool cancelRecommendation)
699 : base(cancelRecommendation)
700 {
@@ -842,19 +815,12 @@ namespace WixToolset.Mba.Core
815 }
816
817 /// <summary>
845 - /// Additional arguments used when engine is about to plan a feature in an MSI package.
818 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlanMsiFeature"/>
819 /// </summary>
820 [Serializable]
821 public class PlanMsiFeatureEventArgs : CancellableHResultEventArgs
822 {
850 - /// <summary>
851 - /// Creates a new instance of the <see cref="PlanMsiFeatureEventArgs"/> class.
852 - /// </summary>
853 - /// <param name="packageId">Package identifier being planned.</param>
854 - /// <param name="featureId">Feature identifier being planned.</param>
855 - /// <param name="recommendedState">Recommended feature state being planned.</param>
856 - /// <param name="state">Feature state being planned.</param>
857 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
823 + /// <summary />
824 public PlanMsiFeatureEventArgs(string packageId, string featureId, FeatureState recommendedState, FeatureState state, bool cancelRecommendation)
825 : base(cancelRecommendation)
826 {
@@ -886,21 +852,12 @@ namespace WixToolset.Mba.Core
852 }
853
854 /// <summary>
889 - /// Additional arguments used when the engine is planning an MSI or MSP package.
855 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlanMsiPackage"/>
856 /// </summary>
857 [Serializable]
858 public class PlanMsiPackageEventArgs : CancellableHResultEventArgs
859 {
894 - /// <summary>
895 - /// Creates a new instance of the <see cref="PlanMsiPackageEventArgs"/> class.
896 - /// </summary>
897 - /// <param name="packageId">The identity of the package planned for.</param>
898 - /// <param name="shouldExecute">Whether the package is planned to execute or roll back.</param>
899 - /// <param name="action">The action planned for the package.</param>
900 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
901 - /// <param name="actionMsiProperty">The requested MSI property to add.</param>
902 - /// <param name="uiLevel">The requested internal UI level.</param>
903 - /// <param name="disableExternalUiHandler">Whether Burn is requested to set up an external UI handler.</param>
860 + /// <summary />
861 public PlanMsiPackageEventArgs(string packageId, bool shouldExecute, ActionState action, bool cancelRecommendation, BURN_MSI_PROPERTY actionMsiProperty, INSTALLUILEVEL uiLevel, bool disableExternalUiHandler)
862 : base(cancelRecommendation)
863 {
@@ -1080,16 +1037,12 @@ namespace WixToolset.Mba.Core
1037 }
1038
1039 /// <summary>
1083 - /// Additional arguments used when the engine has begun installing the bundle.
1040 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.ApplyBegin"/>
1041 /// </summary>
1042 [Serializable]
1043 public class ApplyBeginEventArgs : CancellableHResultEventArgs
1044 {
1088 - /// <summary>
1089 - /// Creates a new instance of the <see cref="ApplyBeginEventArgs"/> class.
1090 - /// </summary>
1091 - /// <param name="phaseCount">The number of phases during apply.</param>
1092 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
1045 + /// <summary />
1046 public ApplyBeginEventArgs(int phaseCount, bool cancelRecommendation)
1047 : base(cancelRecommendation)
1048 {
@@ -1104,15 +1057,12 @@ namespace WixToolset.Mba.Core
1057 }
1058
1059 /// <summary>
1107 - /// Additional arguments used when the engine is about to start the elevated process.
1060 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.ElevateBegin"/>
1061 /// </summary>
1062 [Serializable]
1063 public class ElevateBeginEventArgs : CancellableHResultEventArgs
1064 {
1112 - /// <summary>
1113 - /// Creates a new instance of the <see cref="ElevateBeginEventArgs"/> class.
1114 - /// </summary>
1115 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
1065 + /// <summary />
1066 public ElevateBeginEventArgs(bool cancelRecommendation)
1067 : base(cancelRecommendation)
1068 {
@@ -1136,17 +1086,12 @@ namespace WixToolset.Mba.Core
1086 }
1087
1088 /// <summary>
1139 - /// Additional arguments used when the engine has changed progress for the bundle installation.
1089 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.Progress"/>
1090 /// </summary>
1091 [Serializable]
1092 public class ProgressEventArgs : CancellableHResultEventArgs
1093 {
1144 - /// <summary>
1145 - /// Creates an new instance of the <see cref="ProgressEventArgs"/> class.
1146 - /// </summary>
1147 - /// <param name="progressPercentage">The percentage from 0 to 100 completed for a package.</param>
1148 - /// <param name="overallPercentage">The percentage from 0 to 100 completed for the bundle.</param>
1149 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
1094 + /// <summary />
1095 public ProgressEventArgs(int progressPercentage, int overallPercentage, bool cancelRecommendation)
1096 : base(cancelRecommendation)
1097 {
@@ -1166,22 +1111,12 @@ namespace WixToolset.Mba.Core
1111 }
1112
1113 /// <summary>
1169 - /// Additional arguments used when the engine has encountered an error.
1114 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.Error"/>
1115 /// </summary>
1116 [Serializable]
1117 public class ErrorEventArgs : ResultEventArgs
1118 {
1174 - /// <summary>
1175 - /// Creates a new instance of the <see cref="ErrorEventArgs"/> class.
1176 - /// </summary>
1177 - /// <param name="errorType">The error type.</param>
1178 - /// <param name="packageId">The identity of the package that yielded the error.</param>
1179 - /// <param name="errorCode">The error code.</param>
1180 - /// <param name="errorMessage">The error message.</param>
1181 - /// <param name="dwUIHint">Recommended display flags for an error dialog.</param>
1182 - /// <param name="data">The exteded data for the error.</param>
1183 - /// <param name="recommendation">Recommended result from engine.</param>
1184 - /// <param name="result">The result to return to the engine.</param>
1119 + /// <summary />
1120 public ErrorEventArgs(ErrorType errorType, string packageId, int errorCode, string errorMessage, int dwUIHint, string[] data, Result recommendation, Result result)
1121 : base(recommendation, result)
1122 {
@@ -1225,15 +1160,12 @@ namespace WixToolset.Mba.Core
1160 }
1161
1162 /// <summary>
1228 - /// Additional arguments used when the engine has begun registering the location and visibility of the bundle.
1163 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.RegisterBegin"/>
1164 /// </summary>
1165 [Serializable]
1166 public class RegisterBeginEventArgs : CancellableHResultEventArgs
1167 {
1233 - /// <summary>
1234 - /// Creates a new instance of the <see cref="RegisterBeginEventArgs"/> class.
1235 - /// </summary>
1236 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
1168 + /// <summary />
1169 public RegisterBeginEventArgs(bool cancelRecommendation)
1170 : base(cancelRecommendation)
1171 {
@@ -1301,15 +1233,12 @@ namespace WixToolset.Mba.Core
1233 }
1234
1235 /// <summary>
1304 - /// Additional arguments used when the engine has begun caching the installation sources.
1236 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.CacheBegin"/>
1237 /// </summary>
1238 [Serializable]
1239 public class CacheBeginEventArgs : CancellableHResultEventArgs
1240 {
1309 - /// <summary>
1310 - /// Creates a new instance of the <see cref="CacheBeginEventArgs"/> class.
1311 - /// </summary>
1312 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
1241 + /// <summary />
1242 public CacheBeginEventArgs(bool cancelRecommendation)
1243 : base(cancelRecommendation)
1244 {
@@ -1363,43 +1292,13 @@ namespace WixToolset.Mba.Core
1292 /// EventArgs for <see cref="IDefaultBootstrapperApplication.CacheAcquireProgress"/>.
1293 /// </summary>
1294 [Serializable]
1366 - public class CacheAcquireProgressEventArgs : CancellableHResultEventArgs
1295 + public class CacheAcquireProgressEventArgs : CacheProgressBaseEventArgs
1296 {
1297 /// <summary />
1298 public CacheAcquireProgressEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation)
1370 - : base(cancelRecommendation)
1299 + : base(packageOrContainerId, payloadId, progress, total, overallPercentage, cancelRecommendation)
1300 {
1372 - this.PackageOrContainerId = packageOrContainerId;
1373 - this.PayloadId = payloadId;
1374 - this.Progress = progress;
1375 - this.Total = total;
1376 - this.OverallPercentage = overallPercentage;
1301 }
1378 -
1379 - /// <summary>
1380 - /// Gets the identifier of the container or package.
1381 - /// </summary>
1382 - public string PackageOrContainerId { get; private set; }
1383 -
1384 - /// <summary>
1385 - /// Gets the identifier of the payload (if acquiring a payload).
1386 - /// </summary>
1387 - public string PayloadId { get; private set; }
1388 -
1389 - /// <summary>
1390 - /// Gets the number of bytes cached thus far.
1391 - /// </summary>
1392 - public long Progress { get; private set; }
1393 -
1394 - /// <summary>
1395 - /// Gets the total bytes to cache.
1396 - /// </summary>
1397 - public long Total { get; private set; }
1398 -
1399 - /// <summary>
1400 - /// Gets the overall percentage of progress of caching.
1401 - /// </summary>
1402 - public int OverallPercentage { get; private set; }
1302 }
1303
1304 /// <summary>
@@ -1428,25 +1327,23 @@ namespace WixToolset.Mba.Core
1327 }
1328
1329 /// <summary>
1431 - /// Additional arguments used when the engine starts the verification of a payload.
1330 + /// EventArgs for <see cref="IDefaultBootstrapperApplication.CacheVerifyBegin"/>.
1331 /// </summary>
1332 [Serializable]
1333 public class CacheVerifyBeginEventArgs : CancellableHResultEventArgs
1334 {
1436 - /// <summary>
1437 - /// Creates a new instance of the <see cref="CacheVerifyBeginEventArgs"/> class.
1438 - /// </summary>
1439 - public CacheVerifyBeginEventArgs(string packageId, string payloadId, bool cancelRecommendation)
1335 + /// <summary />
1336 + public CacheVerifyBeginEventArgs(string packageOrContainerId, string payloadId, bool cancelRecommendation)
1337 : base(cancelRecommendation)
1338 {
1442 - this.PackageId = packageId;
1339 + this.PackageOrContainerId = packageOrContainerId;
1340 this.PayloadId = payloadId;
1341 }
1342
1343 /// <summary>
1447 - /// Gets the identifier of the package.
1344 + /// Gets the identifier of the container or package.
1345 /// </summary>
1449 - public string PackageId { get; private set; }
1346 + public string PackageOrContainerId { get; private set; }
1347
1348 /// <summary>
1349 /// Gets the identifier of the payload.
@@ -1455,25 +1352,42 @@ namespace WixToolset.Mba.Core
1352 }
1353
1354 /// <summary>
1458 - /// Additional arguments used when the engine completes the verification of a payload.
1355 + /// EventArgs for <see cref="IDefaultBootstrapperApplication.CacheVerifyProgress"/>.
1356 /// </summary>
1357 [Serializable]
1461 - public class CacheVerifyCompleteEventArgs : ActionEventArgs<BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION>
1358 + public class CacheVerifyProgressEventArgs : CacheProgressBaseEventArgs
1359 {
1360 + /// <summary />
1361 + public CacheVerifyProgressEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, CacheVerifyStep verifyStep, bool cancelRecommendation)
1362 + : base(packageOrContainerId, payloadId, progress, total, overallPercentage, cancelRecommendation)
1363 + {
1364 + this.Step = verifyStep;
1365 + }
1366 +
1367 /// <summary>
1464 - /// Creates a new instance of the <see cref="CacheVerifyCompleteEventArgs"/> class.
1368 + /// Gets the current verification step.
1369 /// </summary>
1466 - public CacheVerifyCompleteEventArgs(string packageId, string payloadId, int hrStatus, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action)
1370 + public CacheVerifyStep Step { get; private set; }
1371 + }
1372 +
1373 + /// <summary>
1374 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.CacheVerifyComplete"/>
1375 + /// </summary>
1376 + [Serializable]
1377 + public class CacheVerifyCompleteEventArgs : ActionEventArgs<BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION>
1378 + {
1379 + /// <summary />
1380 + public CacheVerifyCompleteEventArgs(string packageOrContainerId, string payloadId, int hrStatus, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action)
1381 : base(hrStatus, recommendation, action)
1382 {
1469 - this.PackageId = packageId;
1383 + this.PackageOrContainerId = packageOrContainerId;
1384 this.PayloadId = payloadId;
1385 }
1386
1387 /// <summary>
1474 - /// Gets the identifier of the package.
1388 + /// Gets the identifier of the container or package.
1389 /// </summary>
1476 - public string PackageId { get; private set; }
1390 + public string PackageOrContainerId { get; private set; }
1391
1392 /// <summary>
1393 /// Gets the identifier of the payload.
@@ -1498,16 +1412,12 @@ namespace WixToolset.Mba.Core
1412 }
1413
1414 /// <summary>
1501 - /// Additional arguments used when the engine has begun installing packages.
1415 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.ExecuteBegin"/>
1416 /// </summary>
1417 [Serializable]
1418 public class ExecuteBeginEventArgs : CancellableHResultEventArgs
1419 {
1506 - /// <summary>
1507 - /// Creates a new instance of the <see cref="ExecuteBeginEventArgs"/> class.
1508 - /// </summary>
1509 - /// <param name="packageCount">The number of packages to act on.</param>
1510 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
1420 + /// <summary />
1421 public ExecuteBeginEventArgs(int packageCount, bool cancelRecommendation)
1422 : base(cancelRecommendation)
1423 {
@@ -1521,20 +1431,12 @@ namespace WixToolset.Mba.Core
1431 }
1432
1433 /// <summary>
1524 - /// Additional arguments used when the engine has begun installing a specific package.
1434 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.ExecutePackageBegin"/>
1435 /// </summary>
1436 [Serializable]
1437 public class ExecutePackageBeginEventArgs : CancellableHResultEventArgs
1438 {
1529 - /// <summary>
1530 - /// Creates a new instance of the <see cref="ExecutePackageBeginEventArgs"/> class.
1531 - /// </summary>
1532 - /// <param name="packageId">The identity of the package to act on.</param>
1533 - /// <param name="shouldExecute">Whether the package is being executed or rolled back.</param>
1534 - /// <param name="action">The action about to be executed.</param>
1535 - /// <param name="uiLevel">The internal UI level (if this is an MSI or MSP package).</param>
1536 - /// <param name="disableExternalUiHandler">Whether Burn will set up an external UI handler (if this is an MSI or MSP package).</param>
1537 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
1439 + /// <summary />
1440 public ExecutePackageBeginEventArgs(string packageId, bool shouldExecute, ActionState action, INSTALLUILEVEL uiLevel, bool disableExternalUiHandler, bool cancelRecommendation)
1441 : base(cancelRecommendation)
1442 {
@@ -1572,17 +1474,12 @@ namespace WixToolset.Mba.Core
1474 }
1475
1476 /// <summary>
1575 - /// Additional arguments used when the engine executes one or more patches targeting a product.
1477 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.ExecutePatchTarget"/>
1478 /// </summary>
1479 [Serializable]
1480 public class ExecutePatchTargetEventArgs : CancellableHResultEventArgs
1481 {
1580 - /// <summary>
1581 - /// Creates a new instance of the <see cref="ExecutePatchTargetEventArgs"/> class.
1582 - /// </summary>
1583 - /// <param name="packageId">The identity of the package to act on.</param>
1584 - /// <param name="targetProductCode">The product code of the target of the patch.</param>
1585 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
1482 + /// <summary />
1483 public ExecutePatchTargetEventArgs(string packageId, string targetProductCode, bool cancelRecommendation)
1484 : base(cancelRecommendation)
1485 {
@@ -1602,21 +1499,12 @@ namespace WixToolset.Mba.Core
1499 }
1500
1501 /// <summary>
1605 - /// Additional arguments used when Windows Installer sends an installation message.
1502 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.ExecuteMsiMessage"/>
1503 /// </summary>
1504 [Serializable]
1505 public class ExecuteMsiMessageEventArgs : ResultEventArgs
1506 {
1610 - /// <summary>
1611 - /// Creates a new instance of the <see cref="ExecuteMsiMessageEventArgs"/> class.
1612 - /// </summary>
1613 - /// <param name="packageId">The identity of the package that yielded this message.</param>
1614 - /// <param name="messageType">The type of this message.</param>
1615 - /// <param name="dwUIHint">Recommended display flags for this message.</param>
1616 - /// <param name="message">The message.</param>
1617 - /// <param name="data">The extended data for the message.</param>
1618 - /// <param name="recommendation">Recommended result from engine.</param>
1619 - /// <param name="result">The result to return to the engine.</param>
1507 + /// <summary />
1508 public ExecuteMsiMessageEventArgs(string packageId, InstallMessage messageType, int dwUIHint, string message, string[] data, Result recommendation, Result result)
1509 : base(recommendation, result)
1510 {
@@ -1654,18 +1542,12 @@ namespace WixToolset.Mba.Core
1542 }
1543
1544 /// <summary>
1657 - /// Additional arugments used for file in use installation messages.
1545 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.ExecuteFilesInUse"/>
1546 /// </summary>
1547 [Serializable]
1548 public class ExecuteFilesInUseEventArgs : ResultEventArgs
1549 {
1662 - /// <summary>
1663 - /// Creates a new instance of the <see cref="ExecuteFilesInUseEventArgs"/> class.
1664 - /// </summary>
1665 - /// <param name="packageId">The identity of the package that yielded the files in use message.</param>
1666 - /// <param name="files">The list of files in use.</param>
1667 - /// <param name="recommendation">Recommended result from engine.</param>
1668 - /// <param name="result">The result to return to the engine.</param>
1550 + /// <summary />
1551 public ExecuteFilesInUseEventArgs(string packageId, string[] files, Result recommendation, Result result)
1552 : base(recommendation, result)
1553 {
@@ -1685,19 +1567,13 @@ namespace WixToolset.Mba.Core
1567 }
1568
1569 /// <summary>
1570 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.ExecutePackageComplete"/>
1571 /// Additional arguments used when the engine has completed installing a specific package.
1572 /// </summary>
1573 [Serializable]
1574 public class ExecutePackageCompleteEventArgs : ActionEventArgs<BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION>
1575 {
1693 - /// <summary>
1694 - /// Creates a new instance of the <see cref="ExecutePackageCompleteEventArgs"/> class.
1695 - /// </summary>
1696 - /// <param name="packageId">The identity of the package that was acted on.</param>
1697 - /// <param name="hrStatus">The return code of the operation.</param>
1698 - /// <param name="restart">Whether a restart is required.</param>
1699 - /// <param name="recommendation">Recommended action from engine.</param>
1700 - /// <param name="action">The action to perform.</param>
1576 + /// <summary />
1577 public ExecutePackageCompleteEventArgs(string packageId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation, BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION action)
1578 : base(hrStatus, recommendation, action)
1579 {
@@ -1733,18 +1609,12 @@ namespace WixToolset.Mba.Core
1609 }
1610
1611 /// <summary>
1736 - /// Additional arguments used when the engine has completed installing the bundle.
1612 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.ApplyComplete"/>
1613 /// </summary>
1614 [Serializable]
1615 public class ApplyCompleteEventArgs : ActionEventArgs<BOOTSTRAPPER_APPLYCOMPLETE_ACTION>
1616 {
1741 - /// <summary>
1742 - /// Creates a new instance of the <see cref="ApplyCompleteEventArgs"/> clas.
1743 - /// </summary>
1744 - /// <param name="hrStatus">The return code of the operation.</param>
1745 - /// <param name="restart">Whether a restart is required.</param>
1746 - /// <param name="recommendation">Recommended action from engine.</param>
1747 - /// <param name="action">The action to perform.</param>
1617 + /// <summary />
1618 public ApplyCompleteEventArgs(int hrStatus, ApplyRestart restart, BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation, BOOTSTRAPPER_APPLYCOMPLETE_ACTION action)
1619 : base(hrStatus, recommendation, action)
1620 {
@@ -1819,18 +1689,12 @@ namespace WixToolset.Mba.Core
1689 }
1690
1691 /// <summary>
1822 - /// Additional arguments used by the engine when it has begun caching a specific package.
1692 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.CachePackageBegin"/>
1693 /// </summary>
1694 [Serializable]
1695 public class CachePackageBeginEventArgs : CancellableHResultEventArgs
1696 {
1827 - /// <summary>
1828 - /// Creates a new instance of the <see cref="CachePackageBeginEventArgs"/> class.
1829 - /// </summary>
1830 - /// <param name="packageId">The identity of the package that is being cached.</param>
1831 - /// <param name="cachePayloads">Number of payloads to be cached.</param>
1832 - /// <param name="packageCacheSize">The size on disk required by the specific package.</param>
1833 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
1697 + /// <summary />
1698 public CachePackageBeginEventArgs(string packageId, int cachePayloads, long packageCacheSize, bool cancelRecommendation)
1699 : base(cancelRecommendation)
1700 {
@@ -1856,18 +1720,12 @@ namespace WixToolset.Mba.Core
1720 }
1721
1722 /// <summary>
1859 - /// Additional arguments passed by the engine when it has completed caching a specific package.
1723 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.CachePackageComplete"/>
1724 /// </summary>
1725 [Serializable]
1726 public class CachePackageCompleteEventArgs : ActionEventArgs<BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION>
1727 {
1864 - /// <summary>
1865 - /// Creates a new instance of the <see cref="CachePackageCompleteEventArgs"/> class.
1866 - /// </summary>
1867 - /// <param name="packageId">The identity of the package that was cached.</param>
1868 - /// <param name="hrStatus">The return code of the operation.</param>
1869 - /// <param name="recommendation">Recommended action from engine.</param>
1870 - /// <param name="action">The action to perform.</param>
1728 + /// <summary />
1729 public CachePackageCompleteEventArgs(string packageId, int hrStatus, BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION recommendation, BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION action)
1730 : base(hrStatus, recommendation, action)
1731 {
@@ -1881,18 +1739,12 @@ namespace WixToolset.Mba.Core
1739 }
1740
1741 /// <summary>
1884 - /// Additional arguments passed by the engine while executing on payload.
1742 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.ExecuteProgress"/>
1743 /// </summary>
1744 [Serializable]
1745 public class ExecuteProgressEventArgs : CancellableHResultEventArgs
1746 {
1889 - /// <summary>
1890 - /// Creates a new instance of the <see cref="ExecuteProgressEventArgs"/> class.
1891 - /// </summary>
1892 - /// <param name="packageId">The identifier of the package being executed.</param>
1893 - /// <param name="progressPercentage">The percentage from 0 to 100 of the execution progress for a single payload.</param>
1894 - /// <param name="overallPercentage">The percentage from 0 to 100 of the execution progress for all payload.</param>
1895 - /// <param name="cancelRecommendation">The recommendation from the engine.</param>
1747 + /// <summary />
1748 public ExecuteProgressEventArgs(string packageId, int progressPercentage, int overallPercentage, bool cancelRecommendation)
1749 : base(cancelRecommendation)
1750 {
@@ -2187,4 +2039,130 @@ namespace WixToolset.Mba.Core
2039 {
2040 }
2041 }
2042 +
2043 + /// <summary>
2044 + /// EventArgs for <see cref="IDefaultBootstrapperApplication.CacheContainerOrPayloadVerifyBegin"/>.
2045 + /// </summary>
2046 + [Serializable]
2047 + public class CacheContainerOrPayloadVerifyBeginEventArgs : CancellableHResultEventArgs
2048 + {
2049 + /// <summary />
2050 + public CacheContainerOrPayloadVerifyBeginEventArgs(string packageOrContainerId, string payloadId, bool cancelRecommendation)
2051 + : base(cancelRecommendation)
2052 + {
2053 + this.PackageOrContainerId = packageOrContainerId;
2054 + this.PayloadId = payloadId;
2055 + }
2056 +
2057 + /// <summary>
2058 + /// Gets the identifier of the container or package.
2059 + /// </summary>
2060 + public string PackageOrContainerId { get; private set; }
2061 +
2062 + /// <summary>
2063 + /// Gets the identifier of the payload.
2064 + /// </summary>
2065 + public string PayloadId { get; private set; }
2066 + }
2067 +
2068 + /// <summary>
2069 + /// EventArgs for <see cref="IDefaultBootstrapperApplication.CacheContainerOrPayloadVerifyProgress"/>.
2070 + /// </summary>
2071 + [Serializable]
2072 + public class CacheContainerOrPayloadVerifyProgressEventArgs : CacheProgressBaseEventArgs
2073 + {
2074 + /// <summary />
2075 + public CacheContainerOrPayloadVerifyProgressEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation)
2076 + : base(packageOrContainerId, payloadId, progress, total, overallPercentage, cancelRecommendation)
2077 + {
2078 + }
2079 + }
2080 +
2081 + /// <summary>
2082 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.CacheContainerOrPayloadVerifyComplete"/>
2083 + /// </summary>
2084 + [Serializable]
2085 + public class CacheContainerOrPayloadVerifyCompleteEventArgs : StatusEventArgs
2086 + {
2087 + /// <summary />
2088 + public CacheContainerOrPayloadVerifyCompleteEventArgs(string packageOrContainerId, string payloadId, int hrStatus)
2089 + : base(hrStatus)
2090 + {
2091 + this.PackageOrContainerId = packageOrContainerId;
2092 + this.PayloadId = payloadId;
2093 + }
2094 +
2095 + /// <summary>
2096 + /// Gets the identifier of the container or package.
2097 + /// </summary>
2098 + public string PackageOrContainerId { get; private set; }
2099 +
2100 + /// <summary>
2101 + /// Gets the identifier of the payload.
2102 + /// </summary>
2103 + public string PayloadId { get; private set; }
2104 + }
2105 +
2106 + /// <summary>
2107 + /// EventArgs for <see cref="IDefaultBootstrapperApplication.CachePayloadExtractBegin"/>.
2108 + /// </summary>
2109 + [Serializable]
2110 + public class CachePayloadExtractBeginEventArgs : CancellableHResultEventArgs
2111 + {
2112 + /// <summary />
2113 + public CachePayloadExtractBeginEventArgs(string containerId, string payloadId, bool cancelRecommendation)
2114 + : base(cancelRecommendation)
2115 + {
2116 + this.ContainerId = containerId;
2117 + this.PayloadId = payloadId;
2118 + }
2119 +
2120 + /// <summary>
2121 + /// Gets the identifier of the container.
2122 + /// </summary>
2123 + public string ContainerId { get; private set; }
2124 +
2125 + /// <summary>
2126 + /// Gets the identifier of the payload.
2127 + /// </summary>
2128 + public string PayloadId { get; private set; }
2129 + }
2130 +
2131 + /// <summary>
2132 + /// EventArgs for <see cref="IDefaultBootstrapperApplication.CachePayloadExtractProgress"/>.
2133 + /// </summary>
2134 + [Serializable]
2135 + public class CachePayloadExtractProgressEventArgs : CacheProgressBaseEventArgs
2136 + {
2137 + /// <summary />
2138 + public CachePayloadExtractProgressEventArgs(string containerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation)
2139 + : base(containerId, payloadId, progress, total, overallPercentage, cancelRecommendation)
2140 + {
2141 + }
2142 + }
2143 +
2144 + /// <summary>
2145 + /// Event arguments for <see cref="IDefaultBootstrapperApplication.CachePayloadExtractComplete"/>
2146 + /// </summary>
2147 + [Serializable]
2148 + public class CachePayloadExtractCompleteEventArgs : StatusEventArgs
2149 + {
2150 + /// <summary />
2151 + public CachePayloadExtractCompleteEventArgs(string containerId, string payloadId, int hrStatus)
2152 + : base(hrStatus)
2153 + {
2154 + this.ContainerId = containerId;
2155 + this.PayloadId = payloadId;
2156 + }
2157 +
2158 + /// <summary>
2159 + /// Gets the identifier of the container.
2160 + /// </summary>
2161 + public string ContainerId { get; private set; }
2162 +
2163 + /// <summary>
2164 + /// Gets the identifier of the payload.
2165 + /// </summary>
2166 + public string PayloadId { get; private set; }
2167 + }
2168 }
src/WixToolset.Mba.Core/IBootstrapperApplication.cs
+123 -37
@@ -3,7 +3,6 @@
3 namespace WixToolset.Mba.Core
4 {
5 using System;
6 - using System.CodeDom.Compiler;
6 using System.Runtime.InteropServices;
7
8 /// <summary>
@@ -14,6 +13,29 @@ namespace WixToolset.Mba.Core
13 [Guid("53C31D56-49C0-426B-AB06-099D717C67FE")]
14 public interface IBootstrapperApplication
15 {
16 + /// <summary>
17 + /// Low level method that is called directly from the engine.
18 + /// </summary>
19 + [PreserveSig]
20 + [return: MarshalAs(UnmanagedType.I4)]
21 + int BAProc(
22 + int message,
23 + IntPtr pvArgs,
24 + IntPtr pvResults,
25 + IntPtr pvContext
26 + );
27 +
28 + /// <summary>
29 + /// Low level method that is called directly from the engine.
30 + /// </summary>
31 + void BAProcFallback(
32 + int message,
33 + IntPtr pvArgs,
34 + IntPtr pvResults,
35 + ref int phr,
36 + IntPtr pvContext
37 + );
38 +
39 /// <summary>
40 /// See <see cref="IDefaultBootstrapperApplication.Startup"/>.
41 /// </summary>
@@ -600,31 +622,36 @@ namespace WixToolset.Mba.Core
622 /// <summary>
623 /// See <see cref="IDefaultBootstrapperApplication.CacheVerifyBegin"/>.
624 /// </summary>
603 - /// <param name="wzPackageId"></param>
604 - /// <param name="wzPayloadId"></param>
605 - /// <param name="fCancel"></param>
606 - /// <returns></returns>
625 [PreserveSig]
626 [return: MarshalAs(UnmanagedType.I4)]
627 int OnCacheVerifyBegin(
610 - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId,
628 + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId,
629 [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId,
630 [MarshalAs(UnmanagedType.Bool)] ref bool fCancel
631 );
632
633 + /// <summary>
634 + /// See <see cref="IDefaultBootstrapperApplication.CacheVerifyProgress"/>.
635 + /// </summary>
636 + [PreserveSig]
637 + [return: MarshalAs(UnmanagedType.I4)]
638 + int OnCacheVerifyProgress(
639 + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId,
640 + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId,
641 + [MarshalAs(UnmanagedType.U8)] long dw64Progress,
642 + [MarshalAs(UnmanagedType.U8)] long dw64Total,
643 + [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage,
644 + [MarshalAs(UnmanagedType.I4)] CacheVerifyStep verifyStep,
645 + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel
646 + );
647 +
648 /// <summary>
649 /// See <see cref="IDefaultBootstrapperApplication.CacheVerifyComplete"/>.
650 /// </summary>
618 - /// <param name="wzPackageId"></param>
619 - /// <param name="wzPayloadId"></param>
620 - /// <param name="hrStatus"></param>
621 - /// <param name="recommendation"></param>
622 - /// <param name="action"></param>
623 - /// <returns></returns>
651 [PreserveSig]
652 [return: MarshalAs(UnmanagedType.I4)]
653 int OnCacheVerifyComplete(
627 - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId,
654 + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId,
655 [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId,
656 int hrStatus,
657 BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation,
@@ -1006,36 +1033,75 @@ namespace WixToolset.Mba.Core
1033 );
1034
1035 /// <summary>
1009 - /// Low level method that is called directly from the engine.
1036 + /// See <see cref="IDefaultBootstrapperApplication.CacheContainerOrPayloadVerifyBegin"/>.
1037 /// </summary>
1011 - /// <param name="message"></param>
1012 - /// <param name="pvArgs"></param>
1013 - /// <param name="pvResults"></param>
1014 - /// <param name="pvContext"></param>
1015 - /// <returns></returns>
1038 [PreserveSig]
1039 [return: MarshalAs(UnmanagedType.I4)]
1018 - int BAProc(
1019 - int message,
1020 - IntPtr pvArgs,
1021 - IntPtr pvResults,
1022 - IntPtr pvContext
1040 + int OnCacheContainerOrPayloadVerifyBegin(
1041 + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId,
1042 + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId,
1043 + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel
1044 );
1045
1046 /// <summary>
1026 - /// Low level method that is called directly from the engine.
1047 + /// See <see cref="IDefaultBootstrapperApplication.CacheContainerOrPayloadVerifyProgress"/>.
1048 /// </summary>
1028 - /// <param name="message"></param>
1029 - /// <param name="pvArgs"></param>
1030 - /// <param name="pvResults"></param>
1031 - /// <param name="phr"></param>
1032 - /// <param name="pvContext"></param>
1033 - void BAProcFallback(
1034 - int message,
1035 - IntPtr pvArgs,
1036 - IntPtr pvResults,
1037 - ref int phr,
1038 - IntPtr pvContext
1049 + [PreserveSig]
1050 + [return: MarshalAs(UnmanagedType.I4)]
1051 + int OnCacheContainerOrPayloadVerifyProgress(
1052 + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId,
1053 + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId,
1054 + [MarshalAs(UnmanagedType.U8)] long dw64Progress,
1055 + [MarshalAs(UnmanagedType.U8)] long dw64Total,
1056 + [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage,
1057 + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel
1058 + );
1059 +
1060 + /// <summary>
1061 + /// See <see cref="IDefaultBootstrapperApplication.CacheContainerOrPayloadVerifyComplete"/>.
1062 + /// </summary>
1063 + [PreserveSig]
1064 + [return: MarshalAs(UnmanagedType.I4)]
1065 + int OnCacheContainerOrPayloadVerifyComplete(
1066 + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId,
1067 + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId,
1068 + int hrStatus
1069 + );
1070 +
1071 + /// <summary>
1072 + /// See <see cref="IDefaultBootstrapperApplication.CachePayloadExtractBegin"/>.
1073 + /// </summary>
1074 + [PreserveSig]
1075 + [return: MarshalAs(UnmanagedType.I4)]
1076 + int OnCachePayloadExtractBegin(
1077 + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId,
1078 + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId,
1079 + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel
1080 + );
1081 +
1082 + /// <summary>
1083 + /// See <see cref="IDefaultBootstrapperApplication.CachePayloadExtractProgress"/>.
1084 + /// </summary>
1085 + [PreserveSig]
1086 + [return: MarshalAs(UnmanagedType.I4)]
1087 + int OnCachePayloadExtractProgress(
1088 + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId,
1089 + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId,
1090 + [MarshalAs(UnmanagedType.U8)] long dw64Progress,
1091 + [MarshalAs(UnmanagedType.U8)] long dw64Total,
1092 + [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage,
1093 + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel
1094 + );
1095 +
1096 + /// <summary>
1097 + /// See <see cref="IDefaultBootstrapperApplication.CachePayloadExtractComplete"/>.
1098 + /// </summary>
1099 + [PreserveSig]
1100 + [return: MarshalAs(UnmanagedType.I4)]
1101 + int OnCachePayloadExtractComplete(
1102 + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId,
1103 + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId,
1104 + int hrStatus
1105 );
1106 }
1107
@@ -1448,6 +1514,26 @@ namespace WixToolset.Mba.Core
1514 Retry,
1515 }
1516
1517 + /// <summary>
1518 + /// The current step when verifying a container or payload.
1519 + /// </summary>
1520 + public enum CacheVerifyStep
1521 + {
1522 + /// <summary>
1523 + /// Copying or moving the file from the working path to the unverified path.
1524 + /// Not used during Layout.
1525 + /// </summary>
1526 + Stage,
1527 + /// <summary>
1528 + /// Hashing the file.
1529 + /// </summary>
1530 + Hash,
1531 + /// <summary>
1532 + /// Copying or moving the file to the final location.
1533 + /// </summary>
1534 + Finalize,
1535 + }
1536 +
1537 /// <summary>
1538 /// The restart state after a package or all packages were applied.
1539 /// </summary>
@@ -1566,7 +1652,7 @@ namespace WixToolset.Mba.Core
1652 None,
1653
1654 /// <summary>
1569 - /// Instructs the engine to try the acquisition of the package again.
1655 + /// Instructs the engine to try the acquisition of the payload again.
1656 /// Ignored if hrStatus is a success.
1657 /// </summary>
1658 Retry,
src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs
+40 -5
@@ -44,7 +44,7 @@ namespace WixToolset.Mba.Core
44 event EventHandler<CacheAcquireCompleteEventArgs> CacheAcquireComplete;
45
46 /// <summary>
47 - /// Fired when the engine has progress acquiring the installation sources.
47 + /// Fired when the engine has progress acquiring the payload or container.
48 /// </summary>
49 event EventHandler<CacheAcquireProgressEventArgs> CacheAcquireProgress;
50
@@ -63,6 +63,21 @@ namespace WixToolset.Mba.Core
63 /// </summary>
64 event EventHandler<CacheCompleteEventArgs> CacheComplete;
65
66 + /// <summary>
67 + /// Fired when the engine begins the verification of the payload or container that was already in the package cache.
68 + /// </summary>
69 + event EventHandler<CacheContainerOrPayloadVerifyBeginEventArgs> CacheContainerOrPayloadVerifyBegin;
70 +
71 + /// <summary>
72 + /// Fired when the engine has completed the verification of the payload or container that was already in the package cache.
73 + /// </summary>
74 + event EventHandler<CacheContainerOrPayloadVerifyCompleteEventArgs> CacheContainerOrPayloadVerifyComplete;
75 +
76 + /// <summary>
77 + /// Fired when the engine has progress verifying the payload or container that was already in the package cache.
78 + /// </summary>
79 + event EventHandler<CacheContainerOrPayloadVerifyProgressEventArgs> CacheContainerOrPayloadVerifyProgress;
80 +
81 /// <summary>
82 /// Fired when the engine has begun caching a specific package.
83 /// </summary>
@@ -74,15 +89,35 @@ namespace WixToolset.Mba.Core
89 event EventHandler<CachePackageCompleteEventArgs> CachePackageComplete;
90
91 /// <summary>
77 - /// Fired when the engine begins the verification of the acquired installation sources.
92 + /// Fired when the engine begins the extraction of the payload from the container.
93 + /// </summary>
94 + event EventHandler<CachePayloadExtractBeginEventArgs> CachePayloadExtractBegin;
95 +
96 + /// <summary>
97 + /// Fired when the engine has completed the extraction of the payload from the container.
98 + /// </summary>
99 + event EventHandler<CachePayloadExtractCompleteEventArgs> CachePayloadExtractComplete;
100 +
101 + /// <summary>
102 + /// Fired when the engine has progress extracting the payload from the container.
103 + /// </summary>
104 + event EventHandler<CachePayloadExtractProgressEventArgs> CachePayloadExtractProgress;
105 +
106 + /// <summary>
107 + /// Fired when the engine begins the verification of the acquired payload or container.
108 /// </summary>
109 event EventHandler<CacheVerifyBeginEventArgs> CacheVerifyBegin;
110
111 /// <summary>
82 - /// Fired when the engine complete the verification of the acquired installation sources.
112 + /// Fired when the engine has completed the verification of the acquired payload or container.
113 /// </summary>
114 event EventHandler<CacheVerifyCompleteEventArgs> CacheVerifyComplete;
115
116 + /// <summary>
117 + /// Fired when the engine has progress verifying the payload or container.
118 + /// </summary>
119 + event EventHandler<CacheVerifyProgressEventArgs> CacheVerifyProgress;
120 +
121 /// <summary>
122 /// Fired when the engine is about to commit an MSI transaction.
123 /// </summary>
@@ -179,7 +214,7 @@ namespace WixToolset.Mba.Core
214 event EventHandler<ExecuteCompleteEventArgs> ExecuteComplete;
215
216 /// <summary>
182 - /// Fired when Windows Installer sends a files in use installation message.
217 + /// Fired when a package sends a files in use installation message.
218 /// </summary>
219 event EventHandler<ExecuteFilesInUseEventArgs> ExecuteFilesInUse;
220
@@ -204,7 +239,7 @@ namespace WixToolset.Mba.Core
239 event EventHandler<ExecutePatchTargetEventArgs> ExecutePatchTarget;
240
241 /// <summary>
207 - /// Fired by the engine while executing on payload.
242 + /// Fired by the engine while executing a package.
243 /// </summary>
244 event EventHandler<ExecuteProgressEventArgs> ExecuteProgress;
245
src/balutil/inc/BAFunctions.h
+7
@@ -74,6 +74,13 @@ enum BA_FUNCTIONS_MESSAGE
74 BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE,
75 BA_FUNCTIONS_MESSAGE_ONPLANNEDPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDPACKAGE,
76 BA_FUNCTIONS_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE,
77 + BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYPROGRESS,
78 + BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYBEGIN,
79 + BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE,
80 + BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS,
81 + BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTBEGIN,
82 + BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTCOMPLETE,
83 + BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTPROGRESS,
84
85 BA_FUNCTIONS_MESSAGE_ONTHEMELOADED = 1024,
86 BA_FUNCTIONS_MESSAGE_WNDPROC,
src/balutil/inc/BalBaseBAFunctions.h
+87 -14
@@ -69,6 +69,26 @@ public: // IUnknown
69 }
70
71 public: // IBootstrapperApplication
72 + virtual STDMETHODIMP_(HRESULT) BAProc(
73 + __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/,
74 + __in const LPVOID /*pvArgs*/,
75 + __inout LPVOID /*pvResults*/,
76 + __in_opt LPVOID /*pvContext*/
77 + )
78 + {
79 + return E_NOTIMPL;
80 + }
81 +
82 + virtual STDMETHODIMP_(void) BAProcFallback(
83 + __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/,
84 + __in const LPVOID /*pvArgs*/,
85 + __inout LPVOID /*pvResults*/,
86 + __inout HRESULT* /*phr*/,
87 + __in_opt LPVOID /*pvContext*/
88 + )
89 + {
90 + }
91 +
92 virtual STDMETHODIMP OnStartup()
93 {
94 return S_OK;
@@ -439,7 +459,7 @@ public: // IBootstrapperApplication
459 }
460
461 virtual STDMETHODIMP OnCacheVerifyBegin(
442 - __in_z LPCWSTR /*wzPackageId*/,
462 + __in_z LPCWSTR /*wzPackageOrContainerId*/,
463 __in_z LPCWSTR /*wzPayloadId*/,
464 __inout BOOL* /*pfCancel*/
465 )
@@ -447,8 +467,21 @@ public: // IBootstrapperApplication
467 return S_OK;
468 }
469
470 + virtual STDMETHODIMP OnCacheVerifyProgress(
471 + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/,
472 + __in_z_opt LPCWSTR /*wzPayloadId*/,
473 + __in DWORD64 /*dw64Progress*/,
474 + __in DWORD64 /*dw64Total*/,
475 + __in DWORD /*dwOverallPercentage*/,
476 + __in BOOTSTRAPPER_CACHE_VERIFY_STEP /*verifyStep*/,
477 + __inout BOOL* /*pfCancel*/
478 + )
479 + {
480 + return S_OK;
481 + }
482 +
483 virtual STDMETHODIMP OnCacheVerifyComplete(
451 - __in_z LPCWSTR /*wzPackageId*/,
484 + __in_z LPCWSTR /*wzPackageOrContainerId*/,
485 __in_z LPCWSTR /*wzPayloadId*/,
486 __in HRESULT /*hrStatus*/,
487 __in BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION /*recommendation*/,
@@ -684,24 +717,64 @@ public: // IBootstrapperApplication
717 return S_OK;
718 }
719
687 - virtual STDMETHODIMP_(HRESULT) BAProc(
688 - __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/,
689 - __in const LPVOID /*pvArgs*/,
690 - __inout LPVOID /*pvResults*/,
691 - __in_opt LPVOID /*pvContext*/
720 + virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyBegin(
721 + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/,
722 + __in_z_opt LPCWSTR /*wzPayloadId*/,
723 + __inout BOOL* /*pfCancel*/
724 )
725 {
694 - return E_NOTIMPL;
726 + return S_OK;
727 }
728
697 - virtual STDMETHODIMP_(void) BAProcFallback(
698 - __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/,
699 - __in const LPVOID /*pvArgs*/,
700 - __inout LPVOID /*pvResults*/,
701 - __inout HRESULT* /*phr*/,
702 - __in_opt LPVOID /*pvContext*/
729 + virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyProgress(
730 + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/,
731 + __in_z_opt LPCWSTR /*wzPayloadId*/,
732 + __in DWORD64 /*dw64Progress*/,
733 + __in DWORD64 /*dw64Total*/,
734 + __in DWORD /*dwOverallPercentage*/,
735 + __inout BOOL* /*pfCancel*/
736 + )
737 + {
738 + return S_OK;
739 + }
740 +
741 + virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyComplete(
742 + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/,
743 + __in_z_opt LPCWSTR /*wzPayloadId*/,
744 + __in HRESULT /*hrStatus*/
745 + )
746 + {
747 + return S_OK;
748 + }
749 +
750 + virtual STDMETHODIMP OnCachePayloadExtractBegin(
751 + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/,
752 + __in_z_opt LPCWSTR /*wzPayloadId*/,
753 + __inout BOOL* /*pfCancel*/
754 )
755 {
756 + return S_OK;
757 + }
758 +
759 + virtual STDMETHODIMP OnCachePayloadExtractProgress(
760 + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/,
761 + __in_z_opt LPCWSTR /*wzPayloadId*/,
762 + __in DWORD64 /*dw64Progress*/,
763 + __in DWORD64 /*dw64Total*/,
764 + __in DWORD /*dwOverallPercentage*/,
765 + __inout BOOL* /*pfCancel*/
766 + )
767 + {
768 + return S_OK;
769 + }
770 +
771 + virtual STDMETHODIMP OnCachePayloadExtractComplete(
772 + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/,
773 + __in_z_opt LPCWSTR /*wzPayloadId*/,
774 + __in HRESULT /*hrStatus*/
775 + )
776 + {
777 + return S_OK;
778 }
779
780 public: // IBAFunctions
src/balutil/inc/BalBaseBootstrapperApplication.h
+92 -14
@@ -61,6 +61,26 @@ public: // IUnknown
61 }
62
63 public: // IBootstrapperApplication
64 + virtual STDMETHODIMP_(HRESULT) BAProc(
65 + __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/,
66 + __in const LPVOID /*pvArgs*/,
67 + __inout LPVOID /*pvResults*/,
68 + __in_opt LPVOID /*pvContext*/
69 + )
70 + {
71 + return E_NOTIMPL;
72 + }
73 +
74 + virtual STDMETHODIMP_(void) BAProcFallback(
75 + __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/,
76 + __in const LPVOID /*pvArgs*/,
77 + __inout LPVOID /*pvResults*/,
78 + __inout HRESULT* /*phr*/,
79 + __in_opt LPVOID /*pvContext*/
80 + )
81 + {
82 + }
83 +
84 virtual STDMETHODIMP OnStartup()
85 {
86 return S_OK;
@@ -540,7 +560,7 @@ public: // IBootstrapperApplication
560 }
561
562 virtual STDMETHODIMP OnCacheVerifyBegin(
543 - __in_z LPCWSTR /*wzPackageId*/,
563 + __in_z LPCWSTR /*wzPackageOrContainerId*/,
564 __in_z LPCWSTR /*wzPayloadId*/,
565 __inout BOOL* pfCancel
566 )
@@ -549,8 +569,22 @@ public: // IBootstrapperApplication
569 return S_OK;
570 }
571
572 + virtual STDMETHODIMP OnCacheVerifyProgress(
573 + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/,
574 + __in_z_opt LPCWSTR /*wzPayloadId*/,
575 + __in DWORD64 /*dw64Progress*/,
576 + __in DWORD64 /*dw64Total*/,
577 + __in DWORD /*dwOverallPercentage*/,
578 + __in BOOTSTRAPPER_CACHE_VERIFY_STEP /*verifyStep*/,
579 + __inout BOOL* pfCancel
580 + )
581 + {
582 + *pfCancel |= CheckCanceled();
583 + return S_OK;
584 + }
585 +
586 virtual STDMETHODIMP OnCacheVerifyComplete(
553 - __in_z LPCWSTR /*wzPackageId*/,
587 + __in_z LPCWSTR /*wzPackageOrContainerId*/,
588 __in_z LPCWSTR /*wzPayloadId*/,
589 __in HRESULT /*hrStatus*/,
590 __in BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION /*recommendation*/,
@@ -870,24 +904,68 @@ public: // IBootstrapperApplication
904 return S_OK;
905 }
906
873 - virtual STDMETHODIMP_(HRESULT) BAProc(
874 - __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/,
875 - __in const LPVOID /*pvArgs*/,
876 - __inout LPVOID /*pvResults*/,
877 - __in_opt LPVOID /*pvContext*/
907 + virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyBegin(
908 + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/,
909 + __in_z_opt LPCWSTR /*wzPayloadId*/,
910 + __inout BOOL* pfCancel
911 )
912 {
880 - return E_NOTIMPL;
913 + *pfCancel |= CheckCanceled();
914 + return S_OK;
915 }
916
883 - virtual STDMETHODIMP_(void) BAProcFallback(
884 - __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/,
885 - __in const LPVOID /*pvArgs*/,
886 - __inout LPVOID /*pvResults*/,
887 - __inout HRESULT* /*phr*/,
888 - __in_opt LPVOID /*pvContext*/
917 + virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyProgress(
918 + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/,
919 + __in_z_opt LPCWSTR /*wzPayloadId*/,
920 + __in DWORD64 /*dw64Progress*/,
921 + __in DWORD64 /*dw64Total*/,
922 + __in DWORD /*dwOverallPercentage*/,
923 + __inout BOOL* pfCancel
924 )
925 {
926 + *pfCancel |= CheckCanceled();
927 + return S_OK;
928 + }
929 +
930 + virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyComplete(
931 + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/,
932 + __in_z_opt LPCWSTR /*wzPayloadId*/,
933 + __in HRESULT /*hrStatus*/
934 + )
935 + {
936 + return S_OK;
937 + }
938 +
939 + virtual STDMETHODIMP OnCachePayloadExtractBegin(
940 + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/,
941 + __in_z_opt LPCWSTR /*wzPayloadId*/,
942 + __inout BOOL* pfCancel
943 + )
944 + {
945 + *pfCancel |= CheckCanceled();
946 + return S_OK;
947 + }
948 +
949 + virtual STDMETHODIMP OnCachePayloadExtractProgress(
950 + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/,
951 + __in_z_opt LPCWSTR /*wzPayloadId*/,
952 + __in DWORD64 /*dw64Progress*/,
953 + __in DWORD64 /*dw64Total*/,
954 + __in DWORD /*dwOverallPercentage*/,
955 + __inout BOOL* pfCancel
956 + )
957 + {
958 + *pfCancel |= CheckCanceled();
959 + return S_OK;
960 + }
961 +
962 + virtual STDMETHODIMP OnCachePayloadExtractComplete(
963 + __in_z_opt LPCWSTR /*wzPackageOrContainerId*/,
964 + __in_z_opt LPCWSTR /*wzPayloadId*/,
965 + __in HRESULT /*hrStatus*/
966 + )
967 + {
968 + return S_OK;
969 }
970
971 protected:
src/balutil/inc/BalBaseBootstrapperApplicationProc.h
+84
@@ -342,6 +342,15 @@ static HRESULT BalBaseBAProcOnCacheVerifyBegin(
342 return pBA->OnCacheVerifyBegin(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, &pResults->fCancel);
343 }
344
345 +static HRESULT BalBaseBAProcOnCacheVerifyProgress(
346 + __in IBootstrapperApplication* pBA,
347 + __in BA_ONCACHEVERIFYPROGRESS_ARGS* pArgs,
348 + __inout BA_ONCACHEVERIFYPROGRESS_RESULTS* pResults
349 + )
350 +{
351 + return pBA->OnCacheVerifyProgress(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, pArgs->verifyStep, &pResults->fCancel);
352 +}
353 +
354 static HRESULT BalBaseBAProcOnCacheVerifyComplete(
355 __in IBootstrapperApplication* pBA,
356 __in BA_ONCACHEVERIFYCOMPLETE_ARGS* pArgs,
@@ -594,6 +603,60 @@ static HRESULT BalBaseBAProcOnPlanForwardCompatibleBundle(
603 return pBA->OnPlanForwardCompatibleBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->fRecommendedIgnoreBundle, &pResults->fCancel, &pResults->fIgnoreBundle);
604 }
605
606 +static HRESULT BalBaseBAProcOnCacheContainerOrPayloadVerifyBegin(
607 + __in IBootstrapperApplication* pBA,
608 + __in BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_ARGS* pArgs,
609 + __inout BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_RESULTS* pResults
610 + )
611 +{
612 + return pBA->OnCacheContainerOrPayloadVerifyBegin(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, &pResults->fCancel);
613 +}
614 +
615 +static HRESULT BalBaseBAProcOnCacheContainerOrPayloadVerifyProgress(
616 + __in IBootstrapperApplication* pBA,
617 + __in BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_ARGS* pArgs,
618 + __inout BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_RESULTS* pResults
619 + )
620 +{
621 + return pBA->OnCacheContainerOrPayloadVerifyProgress(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, &pResults->fCancel);
622 +}
623 +
624 +static HRESULT BalBaseBAProcOnCacheContainerOrPayloadVerifyComplete(
625 + __in IBootstrapperApplication* pBA,
626 + __in BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_ARGS* pArgs,
627 + __inout BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_RESULTS* /*pResults*/
628 + )
629 +{
630 + return pBA->OnCacheContainerOrPayloadVerifyComplete(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->hrStatus);
631 +}
632 +
633 +static HRESULT BalBaseBAProcOnCachePayloadExtractBegin(
634 + __in IBootstrapperApplication* pBA,
635 + __in BA_ONCACHEPAYLOADEXTRACTBEGIN_ARGS* pArgs,
636 + __inout BA_ONCACHEPAYLOADEXTRACTBEGIN_RESULTS* pResults
637 + )
638 +{
639 + return pBA->OnCachePayloadExtractBegin(pArgs->wzContainerId, pArgs->wzPayloadId, &pResults->fCancel);
640 +}
641 +
642 +static HRESULT BalBaseBAProcOnCachePayloadExtractProgress(
643 + __in IBootstrapperApplication* pBA,
644 + __in BA_ONCACHEPAYLOADEXTRACTPROGRESS_ARGS* pArgs,
645 + __inout BA_ONCACHEPAYLOADEXTRACTPROGRESS_RESULTS* pResults
646 + )
647 +{
648 + return pBA->OnCachePayloadExtractProgress(pArgs->wzContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, &pResults->fCancel);
649 +}
650 +
651 +static HRESULT BalBaseBAProcOnCachePayloadExtractComplete(
652 + __in IBootstrapperApplication* pBA,
653 + __in BA_ONCACHEPAYLOADEXTRACTCOMPLETE_ARGS* pArgs,
654 + __inout BA_ONCACHEPAYLOADEXTRACTCOMPLETE_RESULTS* /*pResults*/
655 + )
656 +{
657 + return pBA->OnCachePayloadExtractComplete(pArgs->wzContainerId, pArgs->wzPayloadId, pArgs->hrStatus);
658 +}
659 +
660 /*******************************************************************
661 BalBaseBootstrapperApplicationProc - requires pvContext to be of type IBootstrapperApplication.
662 Provides a default mapping between the new message based BA interface and
@@ -722,6 +785,9 @@ static HRESULT WINAPI BalBaseBootstrapperApplicationProc(
785 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYBEGIN:
786 hr = BalBaseBAProcOnCacheVerifyBegin(pBA, reinterpret_cast<BA_ONCACHEVERIFYBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEVERIFYBEGIN_RESULTS*>(pvResults));
787 break;
788 + case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYPROGRESS:
789 + hr = BalBaseBAProcOnCacheVerifyProgress(pBA, reinterpret_cast<BA_ONCACHEVERIFYPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEVERIFYPROGRESS_RESULTS*>(pvResults));
790 + break;
791 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYCOMPLETE:
792 hr = BalBaseBAProcOnCacheVerifyComplete(pBA, reinterpret_cast<BA_ONCACHEVERIFYCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEVERIFYCOMPLETE_RESULTS*>(pvResults));
793 break;
@@ -808,6 +874,24 @@ static HRESULT WINAPI BalBaseBootstrapperApplicationProc(
874 case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE:
875 hr = BalBaseBAProcOnPlanForwardCompatibleBundle(pBA, reinterpret_cast<BA_ONPLANFORWARDCOMPATIBLEBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANFORWARDCOMPATIBLEBUNDLE_RESULTS*>(pvResults));
876 break;
877 + case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYBEGIN:
878 + hr = BalBaseBAProcOnCacheContainerOrPayloadVerifyBegin(pBA, reinterpret_cast<BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_RESULTS*>(pvResults));
879 + break;
880 + case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS:
881 + hr = BalBaseBAProcOnCacheContainerOrPayloadVerifyProgress(pBA, reinterpret_cast<BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_RESULTS*>(pvResults));
882 + break;
883 + case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE:
884 + hr = BalBaseBAProcOnCacheContainerOrPayloadVerifyComplete(pBA, reinterpret_cast<BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_RESULTS*>(pvResults));
885 + break;
886 + case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTBEGIN:
887 + hr = BalBaseBAProcOnCachePayloadExtractBegin(pBA, reinterpret_cast<BA_ONCACHEPAYLOADEXTRACTBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEPAYLOADEXTRACTBEGIN_RESULTS*>(pvResults));
888 + break;
889 + case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTPROGRESS:
890 + hr = BalBaseBAProcOnCachePayloadExtractProgress(pBA, reinterpret_cast<BA_ONCACHEPAYLOADEXTRACTPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEPAYLOADEXTRACTPROGRESS_RESULTS*>(pvResults));
891 + break;
892 + case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTCOMPLETE:
893 + hr = BalBaseBAProcOnCachePayloadExtractComplete(pBA, reinterpret_cast<BA_ONCACHEPAYLOADEXTRACTCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEPAYLOADEXTRACTCOMPLETE_RESULTS*>(pvResults));
894 + break;
895 }
896 }
897
src/balutil/inc/IBootstrapperApplication.h
+69 -18
@@ -4,6 +4,26 @@
4
5 DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-AB06-099D717C67FE")
6 {
7 + // BAProc - The PFN_BOOTSTRAPPER_APPLICATION_PROC can call this method to give the BA raw access to the callback from the engine.
8 + // This might be used to help the BA support more than one version of the engine.
9 + STDMETHOD(BAProc)(
10 + __in BOOTSTRAPPER_APPLICATION_MESSAGE message,
11 + __in const LPVOID pvArgs,
12 + __inout LPVOID pvResults,
13 + __in_opt LPVOID pvContext
14 + ) = 0;
15 +
16 + // BAProcFallback - The PFN_BOOTSTRAPPER_APPLICATION_PROC can call this method
17 + // to give the BA the ability to use default behavior
18 + // and then forward the message to extensions.
19 + STDMETHOD_(void, BAProcFallback)(
20 + __in BOOTSTRAPPER_APPLICATION_MESSAGE message,
21 + __in const LPVOID pvArgs,
22 + __inout LPVOID pvResults,
23 + __inout HRESULT* phr,
24 + __in_opt LPVOID pvContext
25 + ) = 0;
26 +
27 // OnStartup - called when the engine is ready for the bootstrapper application to start.
28 //
29 STDMETHOD(OnStartup)() = 0;
@@ -297,8 +317,7 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A
317 __inout BOOL* pfCancel
318 ) = 0;
319
300 - // OnCacheAcquireProgress - called when the engine makes progresss copying
301 - // or downloading a payload to the working folder.
320 + // OnCacheAcquireProgress - called when the engine makes progress acquiring the payload or container.
321 //
322 STDMETHOD(OnCacheAcquireProgress)(
323 __in_z_opt LPCWSTR wzPackageOrContainerId,
@@ -359,6 +378,16 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A
378 __inout BOOL* pfCancel
379 ) = 0;
380
381 + STDMETHOD(OnCacheVerifyProgress)(
382 + __in_z_opt LPCWSTR wzPackageOrContainerId,
383 + __in_z_opt LPCWSTR wzPayloadId,
384 + __in DWORD64 dw64Progress,
385 + __in DWORD64 dw64Total,
386 + __in DWORD dwOverallPercentage,
387 + __in BOOTSTRAPPER_CACHE_VERIFY_STEP verifyStep,
388 + __inout BOOL* pfCancel
389 + ) = 0;
390 +
391 // OnCacheVerifyComplete - called after the engine verifies and copies
392 // a payload or container to the package cache folder.
393 //
@@ -570,23 +599,45 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A
599 __inout BOOL* pfIgnoreBundle
600 ) = 0;
601
573 - // BAProc - The PFN_BOOTSTRAPPER_APPLICATION_PROC can call this method to give the BA raw access to the callback from the engine.
574 - // This might be used to help the BA support more than one version of the engine.
575 - STDMETHOD(BAProc)(
576 - __in BOOTSTRAPPER_APPLICATION_MESSAGE message,
577 - __in const LPVOID pvArgs,
578 - __inout LPVOID pvResults,
579 - __in_opt LPVOID pvContext
602 + STDMETHOD(OnCacheContainerOrPayloadVerifyBegin)(
603 + __in_z_opt LPCWSTR wzPackageOrContainerId,
604 + __in_z_opt LPCWSTR wzPayloadId,
605 + __inout BOOL* pfCancel
606 ) = 0;
607
582 - // BAProcFallback - The PFN_BOOTSTRAPPER_APPLICATION_PROC can call this method
583 - // to give the BA the ability to use default behavior
584 - // and then forward the message to extensions.
585 - STDMETHOD_(void, BAProcFallback)(
586 - __in BOOTSTRAPPER_APPLICATION_MESSAGE message,
587 - __in const LPVOID pvArgs,
588 - __inout LPVOID pvResults,
589 - __inout HRESULT* phr,
590 - __in_opt LPVOID pvContext
608 + STDMETHOD(OnCacheContainerOrPayloadVerifyProgress)(
609 + __in_z_opt LPCWSTR wzPackageOrContainerId,
610 + __in_z_opt LPCWSTR wzPayloadId,
611 + __in DWORD64 dw64Progress,
612 + __in DWORD64 dw64Total,
613 + __in DWORD dwOverallPercentage,
614 + __inout BOOL* pfCancel
615 + ) = 0;
616 +
617 + STDMETHOD(OnCacheContainerOrPayloadVerifyComplete)(
618 + __in_z_opt LPCWSTR wzPackageOrContainerId,
619 + __in_z_opt LPCWSTR wzPayloadId,
620 + __in HRESULT hrStatus
621 + ) = 0;
622 +
623 + STDMETHOD(OnCachePayloadExtractBegin)(
624 + __in_z_opt LPCWSTR wzContainerId,
625 + __in_z_opt LPCWSTR wzPayloadId,
626 + __inout BOOL* pfCancel
627 + ) = 0;
628 +
629 + STDMETHOD(OnCachePayloadExtractProgress)(
630 + __in_z_opt LPCWSTR wzContainerId,
631 + __in_z_opt LPCWSTR wzPayloadId,
632 + __in DWORD64 dw64Progress,
633 + __in DWORD64 dw64Total,
634 + __in DWORD dwOverallPercentage,
635 + __inout BOOL* pfCancel
636 + ) = 0;
637 +
638 + STDMETHOD(OnCachePayloadExtractComplete)(
639 + __in_z_opt LPCWSTR wzContainerId,
640 + __in_z_opt LPCWSTR wzPayloadId,
641 + __in HRESULT hrStatus
642 ) = 0;
643 };