diff options
Diffstat (limited to 'src/burn/engine/userexperience.h')
-rw-r--r-- | src/burn/engine/userexperience.h | 88 |
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) |
7 | extern "C" { | 5 | extern "C" { |
8 | #endif | 6 | #endif |
@@ -10,47 +8,13 @@ extern "C" { | |||
10 | 8 | ||
11 | // constants | 9 | // constants |
12 | 10 | ||
13 | const DWORD BURN_MB_RETRYTRYAGAIN = 0x10; | ||
14 | |||
15 | 11 | ||
16 | // structs | 12 | // structs |
17 | 13 | ||
18 | typedef 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 | ||
50 | HRESULT UserExperienceParseFromXml( | 17 | #ifdef TODO_DELETE |
51 | __in BURN_USER_EXPERIENCE* pUserExperience, | ||
52 | __in IXMLDOMNode* pixnBundle | ||
53 | ); | ||
54 | void UserExperienceUninitialize( | 18 | void 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 | ); |
66 | HRESULT UserExperienceEnsureWorkingFolder( | ||
67 | __in BURN_CACHE* pCache, | ||
68 | __deref_out_z LPWSTR* psczUserExperienceWorkingFolder | ||
69 | ); | ||
70 | HRESULT UserExperienceRemove( | ||
71 | __in BURN_USER_EXPERIENCE* pUserExperience | ||
72 | ); | ||
73 | int 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 | ); | ||
82 | void UserExperienceActivateEngine( | ||
83 | __in BURN_USER_EXPERIENCE* pUserExperience | ||
84 | ); | ||
85 | void 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 | *********************************************************************/ | ||
93 | HRESULT UserExperienceEnsureEngineInactive( | ||
94 | __in BURN_USER_EXPERIENCE* pUserExperience | ||
95 | ); | ||
96 | void UserExperienceExecuteReset( | ||
97 | __in BURN_USER_EXPERIENCE* pUserExperience | ||
98 | ); | ||
99 | void UserExperienceExecutePhaseComplete( | ||
100 | __in BURN_USER_EXPERIENCE* pUserExperience, | ||
101 | __in HRESULT hrResult | ||
102 | ); | ||
103 | BAAPI UserExperienceOnApplyBegin( | 31 | BAAPI 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 | ); |
607 | int UserExperienceCheckExecuteResult( | 535 | #endif |
608 | __in BURN_USER_EXPERIENCE* pUserExperience, | 536 | |
609 | __in BOOL fRollback, | ||
610 | __in DWORD dwAllowedResults, | ||
611 | __in int nResult | ||
612 | ); | ||
613 | HRESULT 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 |