aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Mba.Core/IEngine.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/WixToolset.Mba.Core/IEngine.cs95
1 files changed, 68 insertions, 27 deletions
diff --git a/src/WixToolset.Mba.Core/IEngine.cs b/src/WixToolset.Mba.Core/IEngine.cs
index 5ddc4176..84d93bb0 100644
--- a/src/WixToolset.Mba.Core/IEngine.cs
+++ b/src/WixToolset.Mba.Core/IEngine.cs
@@ -9,38 +9,11 @@ namespace WixToolset.Mba.Core
9 public interface IEngine 9 public interface IEngine
10 { 10 {
11 /// <summary> 11 /// <summary>
12 /// Gets or sets numeric variables for the engine.
13 /// </summary>
14 IVariables<long> NumericVariables { get; }
15
16 /// <summary>
17 /// Gets the number of packages in the bundle. 12 /// Gets the number of packages in the bundle.
18 /// </summary> 13 /// </summary>
19 int PackageCount { get; } 14 int PackageCount { get; }
20 15
21 /// <summary> 16 /// <summary>
22 /// Gets or sets string variables for the engine using SecureStrings.
23 /// </summary>
24 IVariables<SecureString> SecureStringVariables { get; }
25
26 /// <summary>
27 /// Gets or sets string variables for the engine.
28 /// </summary>
29 IVariables<string> StringVariables { get; }
30
31 /// <summary>
32 /// Gets or sets <see cref="Version"/> variables for the engine.
33 ///
34 /// The <see cref="Version"/> class can keep track of when the build and revision fields are undefined, but the engine can't.
35 /// Therefore, the build and revision fields must be defined when setting a <see cref="Version"/> variable.
36 /// Use the NormalizeVersion method to make sure the engine can accept the Version.
37 ///
38 /// To keep track of versions without build or revision fields, use StringVariables instead.
39 /// </summary>
40 /// <exception cref="OverflowException">The given <see cref="Version"/> was invalid.</exception>
41 IVariables<Version> VersionVariables { get; }
42
43 /// <summary>
44 /// Install the packages. 17 /// Install the packages.
45 /// </summary> 18 /// </summary>
46 /// <param name="hwndParent">The parent window for the installation user interface.</param> 19 /// <param name="hwndParent">The parent window for the installation user interface.</param>
@@ -53,6 +26,13 @@ namespace WixToolset.Mba.Core
53 void CloseSplashScreen(); 26 void CloseSplashScreen();
54 27
55 /// <summary> 28 /// <summary>
29 /// Checks if a variable exists in the engine.
30 /// </summary>
31 /// <param name="name">The name of the variable.</param>
32 /// <returns>Whether the variable exists.</returns>
33 bool ContainsVariable(string name);
34
35 /// <summary>
56 /// Determine if all installation conditions are fulfilled. 36 /// Determine if all installation conditions are fulfilled.
57 /// </summary> 37 /// </summary>
58 void Detect(); 38 void Detect();
@@ -95,6 +75,30 @@ namespace WixToolset.Mba.Core
95 string FormatString(string format); 75 string FormatString(string format);
96 76
97 /// <summary> 77 /// <summary>
78 /// Gets numeric variables for the engine.
79 /// </summary>
80 /// <param name="name">The name of the variable.</param>
81 long GetVariableNumeric(string name);
82
83 /// <summary>
84 /// Gets string variables for the engine using SecureStrings.
85 /// </summary>
86 /// <param name="name">The name of the variable.</param>
87 SecureString GetVariableSecureString(string name);
88
89 /// <summary>
90 /// Gets string variables for the engine.
91 /// </summary>
92 /// <param name="name">The name of the variable.</param>
93 string GetVariableString(string name);
94
95 /// <summary>
96 /// Gets <see cref="Version"/> variables for the engine.
97 /// </summary>
98 /// <param name="name">The name of the variable.</param>
99 Version GetVariableVersion(string name);
100
101 /// <summary>
98 /// Launches a preapproved executable elevated. As long as the engine already elevated, there will be no UAC prompt. 102 /// Launches a preapproved executable elevated. As long as the engine already elevated, there will be no UAC prompt.
99 /// </summary> 103 /// </summary>
100 /// <param name="hwndParent">The parent window of the elevation dialog (if the engine hasn't elevated yet).</param> 104 /// <param name="hwndParent">The parent window of the elevation dialog (if the engine hasn't elevated yet).</param>
@@ -153,6 +157,43 @@ namespace WixToolset.Mba.Core
153 void SetDownloadSource(string packageOrContainerId, string payloadId, string url, string user, string password); 157 void SetDownloadSource(string packageOrContainerId, string payloadId, string url, string user, string password);
154 158
155 /// <summary> 159 /// <summary>
160 /// Sets numeric variables for the engine.
161 /// </summary>
162 /// <param name="name">The name of the variable.</param>
163 /// <param name="value">The value to set.</param>
164 void SetVariable(string name, long value);
165
166 /// <summary>
167 /// Sets string variables for the engine using SecureStrings.
168 /// </summary>
169 /// <param name="name">The name of the variable.</param>
170 /// <param name="value">The value to set.</param>
171 /// <param name="formatted">False if the value is a literal string.</param>
172 void SetVariable(string name, SecureString value, bool formatted);
173
174 /// <summary>
175 /// Sets string variables for the engine.
176 /// </summary>
177 /// <param name="name">The name of the variable.</param>
178 /// <param name="value">The value to set.</param>
179 /// <param name="formatted">False if the value is a literal string.</param>
180 void SetVariable(string name, string value, bool formatted);
181
182 /// <summary>
183 /// Sets <see cref="Version"/> variables for the engine.
184 ///
185 /// The <see cref="Version"/> class can keep track of when the build and revision fields are undefined, but the engine can't.
186 /// Therefore, the build and revision fields must be defined when setting a <see cref="Version"/> variable.
187 /// Use the NormalizeVersion method to make sure the engine can accept the Version.
188 ///
189 /// To keep track of versions without build or revision fields, use StringVariables instead.
190 /// </summary>
191 /// <param name="name">The name of the variable.</param>
192 /// <param name="value">The value to set.</param>
193 /// <exception cref="OverflowException">The given <see cref="Version"/> was invalid.</exception>
194 void SetVariable(string name, Version value);
195
196 /// <summary>
156 /// Sends error message when embedded. 197 /// Sends error message when embedded.
157 /// </summary> 198 /// </summary>
158 /// <param name="errorCode">Error code.</param> 199 /// <param name="errorCode">Error code.</param>