diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-12-10 11:42:44 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-12-11 20:03:13 -0600 |
commit | fc30db9fa3aa1d25a6ef078452864673caa67ec5 (patch) | |
tree | e3415a5a1329a867b2934a038243e95098214ec3 /src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs | |
parent | 1d58b3333d1d694d08b68f6c87223aa504bfe773 (diff) | |
download | wix-fc30db9fa3aa1d25a6ef078452864673caa67ec5.tar.gz wix-fc30db9fa3aa1d25a6ef078452864673caa67ec5.tar.bz2 wix-fc30db9fa3aa1d25a6ef078452864673caa67ec5.zip |
Add BA events for setting the update bundle.
Fixes #6410
Diffstat (limited to 'src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs')
-rw-r--r-- | src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs index 0520463f..a78bf43f 100644 --- a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs +++ b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs | |||
@@ -253,6 +253,12 @@ namespace WixToolset.Mba.Core | |||
253 | /// <inheritdoc/> | 253 | /// <inheritdoc/> |
254 | public event EventHandler<CachePayloadExtractCompleteEventArgs> CachePayloadExtractComplete; | 254 | public event EventHandler<CachePayloadExtractCompleteEventArgs> CachePayloadExtractComplete; |
255 | 255 | ||
256 | /// <inheritdoc/> | ||
257 | public event EventHandler<SetUpdateBeginEventArgs> SetUpdateBegin; | ||
258 | |||
259 | /// <inheritdoc/> | ||
260 | public event EventHandler<SetUpdateCompleteEventArgs> SetUpdateComplete; | ||
261 | |||
256 | /// <summary> | 262 | /// <summary> |
257 | /// Entry point that is called when the bootstrapper application is ready to run. | 263 | /// Entry point that is called when the bootstrapper application is ready to run. |
258 | /// </summary> | 264 | /// </summary> |
@@ -1225,6 +1231,32 @@ namespace WixToolset.Mba.Core | |||
1225 | } | 1231 | } |
1226 | } | 1232 | } |
1227 | 1233 | ||
1234 | /// <summary> | ||
1235 | /// Called by the engine, raises the <see cref="SetUpdateBegin"/> event. | ||
1236 | /// </summary> | ||
1237 | /// <param name="args"></param> | ||
1238 | protected virtual void OnSetUpdateBegin(SetUpdateBeginEventArgs args) | ||
1239 | { | ||
1240 | EventHandler<SetUpdateBeginEventArgs> handler = this.SetUpdateBegin; | ||
1241 | if (null != handler) | ||
1242 | { | ||
1243 | handler(this, args); | ||
1244 | } | ||
1245 | } | ||
1246 | |||
1247 | /// <summary> | ||
1248 | /// Called by the engine, raises the <see cref="SetUpdateComplete"/> event. | ||
1249 | /// </summary> | ||
1250 | /// <param name="args"></param> | ||
1251 | protected virtual void OnSetUpdateComplete(SetUpdateCompleteEventArgs args) | ||
1252 | { | ||
1253 | EventHandler<SetUpdateCompleteEventArgs> handler = this.SetUpdateComplete; | ||
1254 | if (null != handler) | ||
1255 | { | ||
1256 | handler(this, args); | ||
1257 | } | ||
1258 | } | ||
1259 | |||
1228 | #region IBootstrapperApplication Members | 1260 | #region IBootstrapperApplication Members |
1229 | 1261 | ||
1230 | int IBootstrapperApplication.BAProc(int message, IntPtr pvArgs, IntPtr pvResults, IntPtr pvContext) | 1262 | int IBootstrapperApplication.BAProc(int message, IntPtr pvArgs, IntPtr pvResults, IntPtr pvContext) |
@@ -1895,6 +1927,22 @@ namespace WixToolset.Mba.Core | |||
1895 | return args.HResult; | 1927 | return args.HResult; |
1896 | } | 1928 | } |
1897 | 1929 | ||
1930 | int IBootstrapperApplication.OnSetUpdateBegin() | ||
1931 | { | ||
1932 | SetUpdateBeginEventArgs args = new SetUpdateBeginEventArgs(); | ||
1933 | this.OnSetUpdateBegin(args); | ||
1934 | |||
1935 | return args.HResult; | ||
1936 | } | ||
1937 | |||
1938 | int IBootstrapperApplication.OnSetUpdateComplete(int hrStatus, string wzPreviousPackageId, string wzNewPackageId) | ||
1939 | { | ||
1940 | SetUpdateCompleteEventArgs args = new SetUpdateCompleteEventArgs(hrStatus, wzPreviousPackageId, wzNewPackageId); | ||
1941 | this.OnSetUpdateComplete(args); | ||
1942 | |||
1943 | return args.HResult; | ||
1944 | } | ||
1945 | |||
1898 | #endregion | 1946 | #endregion |
1899 | } | 1947 | } |
1900 | } | 1948 | } |