aboutsummaryrefslogtreecommitdiff
path: root/src/burn/engine/userexperience.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/burn/engine/userexperience.h')
-rw-r--r--src/burn/engine/userexperience.h88
1 files changed, 3 insertions, 85 deletions
diff --git a/src/burn/engine/userexperience.h b/src/burn/engine/userexperience.h
index 4f15c5d7..23068e3e 100644
--- a/src/burn/engine/userexperience.h
+++ b/src/burn/engine/userexperience.h
@@ -1,8 +1,6 @@
1#pragma once 1#pragma once
2// 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// 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.
3 3
4#define BAAPI HRESULT __stdcall
5
6#if defined(__cplusplus) 4#if defined(__cplusplus)
7extern "C" { 5extern "C" {
8#endif 6#endif
@@ -10,47 +8,13 @@ extern "C" {
10 8
11// constants 9// constants
12 10
13const DWORD BURN_MB_RETRYTRYAGAIN = 0x10;
14
15 11
16// structs 12// structs
17 13
18typedef struct _BURN_USER_EXPERIENCE
19{
20 BURN_PAYLOADS payloads;
21
22 HMODULE hUXModule;
23 PFN_BOOTSTRAPPER_APPLICATION_PROC pfnBAProc;
24 LPVOID pvBAProcContext;
25 LPWSTR sczTempDirectory;
26
27 CRITICAL_SECTION csEngineActive; // Changing the engine active state in the user experience must be
28 // syncronized through this critical section.
29 // Note: The engine must never do a UX callback while in this critical section.
30
31 BOOL fEngineActive; // Indicates that the engine is currently active with one of the execution
32 // steps (detect, plan, apply), and cannot accept requests from the UX.
33 // This flag should be cleared by the engine prior to UX callbacks that
34 // allows altering of the engine state.
35
36 HRESULT hrApplyError; // Tracks is an error occurs during apply that requires the cache or
37 // execute threads to bail.
38
39 HWND hwndApply; // The window handle provided at the beginning of Apply(). Only valid
40 // during apply.
41
42 HWND hwndDetect; // The window handle provided at the beginning of Detect(). Only valid
43 // during Detect.
44
45 DWORD dwExitCode; // Exit code returned by the user experience for the engine overall.
46} BURN_USER_EXPERIENCE;
47 14
48// functions 15// functions
49 16
50HRESULT UserExperienceParseFromXml( 17#ifdef TODO_DELETE
51 __in BURN_USER_EXPERIENCE* pUserExperience,
52 __in IXMLDOMNode* pixnBundle
53 );
54void UserExperienceUninitialize( 18void UserExperienceUninitialize(
55 __in BURN_USER_EXPERIENCE* pUserExperience 19 __in BURN_USER_EXPERIENCE* pUserExperience
56 ); 20 );
@@ -63,43 +27,7 @@ HRESULT UserExperienceUnload(
63 __in BURN_USER_EXPERIENCE* pUserExperience, 27 __in BURN_USER_EXPERIENCE* pUserExperience,
64 __in BOOL fReload 28 __in BOOL fReload
65 ); 29 );
66HRESULT UserExperienceEnsureWorkingFolder(
67 __in BURN_CACHE* pCache,
68 __deref_out_z LPWSTR* psczUserExperienceWorkingFolder
69 );
70HRESULT UserExperienceRemove(
71 __in BURN_USER_EXPERIENCE* pUserExperience
72 );
73int UserExperienceSendError(
74 __in BURN_USER_EXPERIENCE* pUserExperience,
75 __in BOOTSTRAPPER_ERROR_TYPE errorType,
76 __in_z_opt LPCWSTR wzPackageId,
77 __in HRESULT hrCode,
78 __in_z_opt LPCWSTR wzError,
79 __in DWORD uiFlags,
80 __in int nRecommendation
81 );
82void UserExperienceActivateEngine(
83 __in BURN_USER_EXPERIENCE* pUserExperience
84 );
85void UserExperienceDeactivateEngine(
86 __in BURN_USER_EXPERIENCE* pUserExperience
87 );
88/********************************************************************
89 UserExperienceEnsureEngineInactive - Verifies the engine is inactive.
90 The caller MUST enter the csActive critical section before calling.
91 30
92*********************************************************************/
93HRESULT UserExperienceEnsureEngineInactive(
94 __in BURN_USER_EXPERIENCE* pUserExperience
95 );
96void UserExperienceExecuteReset(
97 __in BURN_USER_EXPERIENCE* pUserExperience
98 );
99void UserExperienceExecutePhaseComplete(
100 __in BURN_USER_EXPERIENCE* pUserExperience,
101 __in HRESULT hrResult
102 );
103BAAPI UserExperienceOnApplyBegin( 31BAAPI UserExperienceOnApplyBegin(
104 __in BURN_USER_EXPERIENCE* pUserExperience, 32 __in BURN_USER_EXPERIENCE* pUserExperience,
105 __in DWORD dwPhaseCount 33 __in DWORD dwPhaseCount
@@ -604,18 +532,8 @@ BAAPI UserExperienceOnUnregisterComplete(
604 __in BURN_USER_EXPERIENCE* pUserExperience, 532 __in BURN_USER_EXPERIENCE* pUserExperience,
605 __in HRESULT hrStatus 533 __in HRESULT hrStatus
606 ); 534 );
607int UserExperienceCheckExecuteResult( 535#endif
608 __in BURN_USER_EXPERIENCE* pUserExperience, 536
609 __in BOOL fRollback,
610 __in DWORD dwAllowedResults,
611 __in int nResult
612 );
613HRESULT UserExperienceInterpretExecuteResult(
614 __in BURN_USER_EXPERIENCE* pUserExperience,
615 __in BOOL fRollback,
616 __in DWORD dwAllowedResults,
617 __in int nResult
618 );
619#if defined(__cplusplus) 537#if defined(__cplusplus)
620} 538}
621#endif 539#endif