aboutsummaryrefslogtreecommitdiff
path: root/src/dtf/WixToolset.Dtf.WindowsInstaller/IEmbeddedUI.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/dtf/WixToolset.Dtf.WindowsInstaller/IEmbeddedUI.cs')
-rw-r--r--src/dtf/WixToolset.Dtf.WindowsInstaller/IEmbeddedUI.cs67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/dtf/WixToolset.Dtf.WindowsInstaller/IEmbeddedUI.cs b/src/dtf/WixToolset.Dtf.WindowsInstaller/IEmbeddedUI.cs
new file mode 100644
index 00000000..d77c82a9
--- /dev/null
+++ b/src/dtf/WixToolset.Dtf.WindowsInstaller/IEmbeddedUI.cs
@@ -0,0 +1,67 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3namespace WixToolset.Dtf.WindowsInstaller
4{
5 using System.Diagnostics.CodeAnalysis;
6
7 /// <summary>
8 /// [MSI 4.5] Interface for an embedded external user interface for an installation.
9 /// </summary>
10 /// <remarks>
11 /// Classes which implement this interface must have a public constructor that takes no parameters.
12 /// </remarks>
13 public interface IEmbeddedUI
14 {
15 /// <summary>
16 /// Initializes the embedded UI.
17 /// </summary>
18 /// <param name="session">Handle to the installer which can be used to get and set properties.
19 /// The handle is only valid for the duration of this method call.</param>
20 /// <param name="resourcePath">Path to the directory that contains all the files from the MsiEmbeddedUI table.</param>
21 /// <param name="internalUILevel">On entry, contains the current UI level for the installation. After this
22 /// method returns, the installer resets the UI level to the returned value of this parameter.</param>
23 /// <returns>True if the embedded UI was successfully initialized; false if the installation
24 /// should continue without the embedded UI.</returns>
25 /// <exception cref="InstallCanceledException">The installation was canceled by the user.</exception>
26 /// <exception cref="InstallerException">The embedded UI failed to initialize and
27 /// causes the installation to fail.</exception>
28 /// <remarks><p>
29 /// Win32 MSI API:
30 /// <a href="http://msdn.microsoft.com/library/en-us/msi/setup/initializeembeddedui.asp">InitializeEmbeddedUI</a>
31 /// </p></remarks>
32 [SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference")]
33 bool Initialize(Session session, string resourcePath, ref InstallUIOptions internalUILevel);
34
35 /// <summary>
36 /// Processes information and progress messages sent to the user interface.
37 /// </summary>
38 /// <param name="messageType">Message type.</param>
39 /// <param name="messageRecord">Record that contains message data.</param>
40 /// <param name="buttons">Message buttons.</param>
41 /// <param name="icon">Message box icon.</param>
42 /// <param name="defaultButton">Message box default button.</param>
43 /// <returns>Result of processing the message.</returns>
44 /// <remarks><p>
45 /// Win32 MSI API:
46 /// <a href="http://msdn.microsoft.com/library/en-us/msi/setup/embeddeduihandler.asp">EmbeddedUIHandler</a>
47 /// </p></remarks>
48 MessageResult ProcessMessage(
49 InstallMessage messageType,
50 Record messageRecord,
51 MessageButtons buttons,
52 MessageIcon icon,
53 MessageDefaultButton defaultButton);
54
55 /// <summary>
56 /// Shuts down the embedded UI at the end of the installation.
57 /// </summary>
58 /// <remarks>
59 /// If the installation was canceled during initialization, this method will not be called.
60 /// If the installation was canceled or failed at any later point, this method will be called at the end.
61 /// <p>
62 /// Win32 MSI API:
63 /// <a href="http://msdn.microsoft.com/library/en-us/msi/setup/shutdownembeddedui.asp">ShutdownEmbeddedUI</a>
64 /// </p></remarks>
65 void Shutdown();
66 }
67}