aboutsummaryrefslogtreecommitdiff
path: root/src/engine/logging.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/engine/logging.h144
1 files changed, 144 insertions, 0 deletions
diff --git a/src/engine/logging.h b/src/engine/logging.h
new file mode 100644
index 00000000..cea4d31d
--- /dev/null
+++ b/src/engine/logging.h
@@ -0,0 +1,144 @@
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.
3
4
5#if defined(__cplusplus)
6extern "C" {
7#endif
8
9
10// constants
11
12enum BURN_LOGGING_STATE
13{
14 BURN_LOGGING_STATE_CLOSED,
15 BURN_LOGGING_STATE_OPEN,
16 BURN_LOGGING_STATE_DISABLED,
17};
18
19enum BURN_LOGGING_ATTRIBUTE
20{
21 BURN_LOGGING_ATTRIBUTE_APPEND = 0x1,
22 BURN_LOGGING_ATTRIBUTE_VERBOSE = 0x2,
23 BURN_LOGGING_ATTRIBUTE_EXTRADEBUG = 0x4,
24};
25
26
27// structs
28
29typedef struct _BURN_LOGGING
30{
31 BURN_LOGGING_STATE state;
32 LPWSTR sczPathVariable;
33
34 DWORD dwAttributes;
35 LPWSTR sczPath;
36 LPWSTR sczPrefix;
37 LPWSTR sczExtension;
38} BURN_LOGGING;
39
40
41
42// function declarations
43
44HRESULT LoggingOpen(
45 __in BURN_LOGGING* pLog,
46 __in BURN_VARIABLES* pVariables,
47 __in BOOTSTRAPPER_DISPLAY display,
48 __in_z LPCWSTR wzBundleName
49 );
50
51void LoggingOpenFailed();
52
53void LoggingIncrementPackageSequence();
54
55HRESULT LoggingSetPackageVariable(
56 __in BURN_PACKAGE* pPackage,
57 __in_z_opt LPCWSTR wzSuffix,
58 __in BOOL fRollback,
59 __in BURN_LOGGING* pLog,
60 __in BURN_VARIABLES* pVariables,
61 __out_opt LPWSTR* psczLogPath
62 );
63
64LPCSTR LoggingBurnActionToString(
65 __in BOOTSTRAPPER_ACTION action
66 );
67
68LPCSTR LoggingActionStateToString(
69 __in BOOTSTRAPPER_ACTION_STATE actionState
70 );
71
72LPCSTR LoggingDependencyActionToString(
73 BURN_DEPENDENCY_ACTION action
74 );
75
76LPCSTR LoggingBoolToString(
77 __in BOOL f
78 );
79
80LPCSTR LoggingTrueFalseToString(
81 __in BOOL f
82 );
83
84LPCSTR LoggingPackageStateToString(
85 __in BOOTSTRAPPER_PACKAGE_STATE packageState
86 );
87
88LPCSTR LoggingCacheStateToString(
89 __in BURN_CACHE_STATE cacheState
90 );
91
92LPCSTR LoggingMsiFeatureStateToString(
93 __in BOOTSTRAPPER_FEATURE_STATE featureState
94 );
95
96LPCSTR LoggingMsiFeatureActionToString(
97 __in BOOTSTRAPPER_FEATURE_ACTION featureAction
98 );
99
100LPCSTR LoggingMsiInstallContext(
101 __in MSIINSTALLCONTEXT context
102 );
103
104LPCSTR LoggingPerMachineToString(
105 __in BOOL fPerMachine
106 );
107
108LPCSTR LoggingRestartToString(
109 __in BOOTSTRAPPER_APPLY_RESTART restart
110 );
111
112LPCSTR LoggingResumeModeToString(
113 __in BURN_RESUME_MODE resumeMode
114 );
115
116LPCSTR LoggingRelationTypeToString(
117 __in BOOTSTRAPPER_RELATION_TYPE type
118 );
119
120LPCSTR LoggingRelatedOperationToString(
121 __in BOOTSTRAPPER_RELATED_OPERATION operation
122 );
123
124LPCSTR LoggingRequestStateToString(
125 __in BOOTSTRAPPER_REQUEST_STATE requestState
126 );
127
128LPCSTR LoggingRollbackOrExecute(
129 __in BOOL fRollback
130 );
131
132LPWSTR LoggingStringOrUnknownIfNull(
133 __in LPCWSTR wz
134 );
135
136// Note: this function is not thread safe.
137LPCSTR LoggingVersionToString(
138 __in DWORD64 dw64Version
139 );
140
141
142#if defined(__cplusplus)
143}
144#endif