// 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.
namespace WixToolset.Mba.Core
{
using System;
using System.CodeDom.Compiler;
using System.Runtime.InteropServices;
using System.Text;
///
/// Allows calls into the bootstrapper engine.
///
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("6480D616-27A0-44D7-905B-81512C29C2FB")]
[GeneratedCodeAttribute("WixToolset.Bootstrapper.InteropCodeGenerator", "1.0.0.0")]
public interface IBootstrapperEngine
{
///
/// See .
///
///
void GetPackageCount(
[MarshalAs(UnmanagedType.U4)] out int pcPackages
);
///
/// See .
///
///
///
///
[PreserveSig]
int GetVariableNumeric(
[MarshalAs(UnmanagedType.LPWStr)] string wzVariable,
out long pllValue
);
///
/// See .
///
[PreserveSig]
int GetVariableString(
[MarshalAs(UnmanagedType.LPWStr)] string wzVariable,
IntPtr wzValue,
ref IntPtr pcchValue
);
///
/// See .
///
[PreserveSig]
int GetVariableVersion(
[MarshalAs(UnmanagedType.LPWStr)] string wzVariable,
IntPtr wzValue,
ref IntPtr pcchValue
);
///
/// See .
///
[PreserveSig]
int FormatString(
[MarshalAs(UnmanagedType.LPWStr)] string wzIn,
[MarshalAs(UnmanagedType.LPWStr), Out] StringBuilder wzOut,
ref IntPtr pcchOut
);
///
/// See .
///
[PreserveSig]
int EscapeString(
[MarshalAs(UnmanagedType.LPWStr)] string wzIn,
[MarshalAs(UnmanagedType.LPWStr), Out] StringBuilder wzOut,
ref IntPtr pcchOut
);
///
/// See .
///
///
///
void EvaluateCondition(
[MarshalAs(UnmanagedType.LPWStr)] string wzCondition,
[MarshalAs(UnmanagedType.Bool)] out bool pf
);
///
/// See .
///
///
///
void Log(
[MarshalAs(UnmanagedType.U4)] LogLevel level,
[MarshalAs(UnmanagedType.LPWStr)] string wzMessage
);
///
/// See .
///
///
///
///
///
void SendEmbeddedError(
[MarshalAs(UnmanagedType.U4)] int dwErrorCode,
[MarshalAs(UnmanagedType.LPWStr)] string wzMessage,
[MarshalAs(UnmanagedType.U4)] int dwUIHint,
[MarshalAs(UnmanagedType.I4)] out int pnResult
);
///
/// See .
///
///
///
///
void SendEmbeddedProgress(
[MarshalAs(UnmanagedType.U4)] int dwProgressPercentage,
[MarshalAs(UnmanagedType.U4)] int dwOverallProgressPercentage,
[MarshalAs(UnmanagedType.I4)] out int pnResult
);
///
/// See .
///
///
///
///
///
///
///
void SetUpdate(
[MarshalAs(UnmanagedType.LPWStr)] string wzLocalSource,
[MarshalAs(UnmanagedType.LPWStr)] string wzDownloadSource,
[MarshalAs(UnmanagedType.U8)] long qwValue,
[MarshalAs(UnmanagedType.U4)] UpdateHashType hashType,
[MarshalAs(UnmanagedType.LPArray, SizeParamIndex=4)] byte[] rgbHash,
[MarshalAs(UnmanagedType.U4)] int cbHash
);
///
/// See .
///
///
///
///
void SetLocalSource(
[MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId,
[MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId,
[MarshalAs(UnmanagedType.LPWStr)] string wzPath
);
///
/// See .
///
///
///
///
///
///
void SetDownloadSource(
[MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId,
[MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId,
[MarshalAs(UnmanagedType.LPWStr)] string wzUrl,
[MarshalAs(UnmanagedType.LPWStr)] string wzUser,
[MarshalAs(UnmanagedType.LPWStr)] string wzPassword
);
///
/// See .
///
///
///
void SetVariableNumeric(
[MarshalAs(UnmanagedType.LPWStr)] string wzVariable,
long llValue
);
///
/// See .
///
///
///
///
void SetVariableString(
[MarshalAs(UnmanagedType.LPWStr)] string wzVariable,
IntPtr wzValue,
[MarshalAs(UnmanagedType.Bool)] bool fFormatted
);
///
/// See .
///
///
///
void SetVariableVersion(
[MarshalAs(UnmanagedType.LPWStr)] string wzVariable,
IntPtr wzValue
);
///
/// See .
///
void CloseSplashScreen();
///
/// See .
///
///
void Detect(
IntPtr hwndParent
);
///
/// See .
///
///
void Plan(
[MarshalAs(UnmanagedType.U4)] LaunchAction action
);
///
/// See .
///
///
///
[PreserveSig]
int Elevate(
IntPtr hwndParent
);
///
/// See .
///
///
void Apply(
IntPtr hwndParent
);
///
/// See .
///
///
void Quit(
[MarshalAs(UnmanagedType.U4)] int dwExitCode
);
///
/// See .
///
///
///
///
///
void LaunchApprovedExe(
IntPtr hwndParent,
[MarshalAs(UnmanagedType.LPWStr)] string wzApprovedExeForElevationId,
[MarshalAs(UnmanagedType.LPWStr)] string wzArguments,
[MarshalAs(UnmanagedType.U4)] int dwWaitForInputIdleTimeout
);
///
/// Sets the URL to the update feed.
///
/// URL of the update feed.
void SetUpdateSource(
[MarshalAs(UnmanagedType.LPWStr)] string url
);
///
/// See .
///
///
///
///
void CompareVersions(
[MarshalAs(UnmanagedType.LPWStr)] string wzVersion1,
[MarshalAs(UnmanagedType.LPWStr)] string wzVersion2,
[MarshalAs(UnmanagedType.I4)] out int pnResult
);
}
///
/// The installation action for the bundle or current package.
///
public enum ActionState
{
///
///
///
None,
///
///
///
Uninstall,
///
///
///
Install,
///
///
///
Modify,
///
///
///
Repair,
///
///
///
MinorUpgrade,
}
///
/// The action for the BA to perform.
///
public enum LaunchAction
{
///
///
///
Unknown,
///
///
///
Help,
///
///
///
Layout,
///
///
///
UnsafeUninstall,
///
///
///
Uninstall,
///
///
///
Cache,
///
///
///
Install,
///
///
///
Modify,
///
///
///
Repair,
///
///
///
UpdateReplace,
///
///
///
UpdateReplaceEmbedded,
}
///
/// The message log level.
///
public enum LogLevel
{
///
/// No logging level (generic).
///
None,
///
/// User messages.
///
Standard,
///
/// Verbose messages.
///
Verbose,
///
/// Messages for debugging.
///
Debug,
///
/// Error messages.
///
Error,
}
///
/// Type of hash used for update bundle.
///
public enum UpdateHashType
{
///
/// No hash provided.
///
None,
///
/// SHA-1 based hash provided.
///
Sha1,
}
///
/// Describes the state of an installation package.
///
public enum PackageState
{
///
///
///
Unknown,
///
///
///
Obsolete,
///
///
///
Absent,
///
///
///
Cached,
///
///
///
Present,
///
///
///
Superseded,
}
///
/// Indicates the state desired for an installation package.
///
public enum RequestState
{
///
///
///
None,
///
/// /
///
ForceAbsent,
///
///
///
Absent,
///
///
///
Cache,
///
///
///
Present,
///
///
///
ForcePresent,
///
///
///
Repair,
}
///
/// Indicates the state of a feature.
///
public enum FeatureState
{
///
///
///
Unknown,
///
///
///
Absent,
///
///
///
Advertised,
///
///
///
Local,
///
///
///
Source,
}
}