| 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) |
| 6 | extern "C" { |
| 7 | #endif |
| 8 | |
| 9 | // constants |
| 10 | |
| 11 | const LPCWSTR DEPENDENCY_IGNOREDEPENDENCIES = L"IGNOREDEPENDENCIES"; |
| 12 | |
| 13 | |
| 14 | typedef struct _BURN_DEPENDENCIES |
| 15 | { |
| 16 | DEPENDENCY* rgIgnoredDependencies; |
| 17 | UINT cIgnoredDependencies; |
| 18 | LPCWSTR wzActiveParent; |
| 19 | LPCWSTR wzSelfDependent; |
| 20 | BOOL fIgnoreAllDependents; |
| 21 | BOOL fSelfDependent; |
| 22 | BOOL fActiveParent; |
| 23 | } BURN_DEPENDENCIES; |
| 24 | |
| 25 | |
| 26 | // function declarations |
| 27 | |
| 28 | /******************************************************************** |
| 29 | DependencyUninitializeProvider - Frees and zeros memory allocated in |
| 30 | the dependency provider. |
| 31 | |
| 32 | *********************************************************************/ |
| 33 | void DependencyUninitializeProvider( |
| 34 | __in BURN_DEPENDENCY_PROVIDER* pProvider |
| 35 | ); |
| 36 | |
| 37 | /******************************************************************** |
| 38 | DependencyParseProvidersFromXml - Parses dependency information |
| 39 | from the manifest for the specified package. |
| 40 | |
| 41 | *********************************************************************/ |
| 42 | HRESULT DependencyParseProvidersFromXml( |
| 43 | __in BURN_PACKAGE* pPackage, |
| 44 | __in IXMLDOMNode* pixnPackage |
| 45 | ); |
| 46 | |
| 47 | HRESULT DependencyInitialize( |
| 48 | __in BURN_ENGINE_COMMAND* pInternalCommand, |
| 49 | __in BURN_DEPENDENCIES* pDependencies, |
| 50 | __in BURN_REGISTRATION* pRegistration |
| 51 | ); |
| 52 | |
| 53 | void DependencyUninitialize( |
| 54 | __in BURN_DEPENDENCIES* pDependencies |
| 55 | ); |
| 56 | |
| 57 | /******************************************************************** |
| 58 | DependencyDetectProviderKeyBundleId - Detect if the provider key is |
| 59 | registered and if so what bundle is registered. |
| 60 | |
| 61 | Note: Returns E_NOTFOUND if the provider key is not registered. |
| 62 | *********************************************************************/ |
| 63 | HRESULT DependencyDetectProviderKeyBundleId( |
| 64 | __in BURN_REGISTRATION* pRegistration |
| 65 | ); |
| 66 | |
| 67 | /******************************************************************** |
| 68 | DependencyDetect - Detects dependency information. |
| 69 | |
| 70 | *********************************************************************/ |
| 71 | HRESULT DependencyDetectBundle( |
| 72 | __in BURN_DEPENDENCIES* pDependencies, |
| 73 | __in BURN_REGISTRATION* pRegistration |
| 74 | ); |
| 75 | |
| 76 | HRESULT DependencyDetectChainPackage( |
| 77 | __in BURN_PACKAGE* pPackage, |
| 78 | __in BURN_REGISTRATION* pRegistration |
| 79 | ); |
| 80 | |
| 81 | HRESULT DependencyDetectRelatedBundle( |
| 82 | __in BURN_RELATED_BUNDLE* pRelatedBundle, |
| 83 | __in BURN_REGISTRATION* pRegistration |
| 84 | ); |
| 85 | |
| 86 | /******************************************************************** |
| 87 | DependencyPlanInitialize - Initializes the plan. |
| 88 | |
| 89 | *********************************************************************/ |
| 90 | HRESULT DependencyPlanInitialize( |
| 91 | __in BURN_DEPENDENCIES* pDependencies, |
| 92 | __in BURN_PLAN* pPlan |
| 93 | ); |
| 94 | |
| 95 | /******************************************************************** |
| 96 | DependencyAllocIgnoreDependencies - Allocates the dependencies to |
| 97 | ignore as a semicolon-delimited string. |
| 98 | |
| 99 | *********************************************************************/ |
| 100 | HRESULT DependencyAllocIgnoreDependencies( |
| 101 | __in const BURN_PLAN *pPlan, |
| 102 | __out_z LPWSTR* psczIgnoreDependencies |
| 103 | ); |
| 104 | |
| 105 | /******************************************************************** |
| 106 | DependencyAddIgnoreDependencies - Populates the ignore dependency |
| 107 | names. |
| 108 | |
| 109 | *********************************************************************/ |
| 110 | HRESULT DependencyAddIgnoreDependencies( |
| 111 | __in STRINGDICT_HANDLE sdIgnoreDependencies, |
| 112 | __in_z LPCWSTR wzAddIgnoreDependencies |
| 113 | ); |
| 114 | |
| 115 | /******************************************************************** |
| 116 | DependencyPlanPackageBegin - Updates the dependency registration |
| 117 | action depending on the calculated state for the package. |
| 118 | |
| 119 | *********************************************************************/ |
| 120 | HRESULT DependencyPlanPackageBegin( |
| 121 | __in BOOL fPerMachine, |
| 122 | __in BURN_PACKAGE* pPackage, |
| 123 | __in BURN_PLAN* pPlan |
| 124 | ); |
| 125 | |
| 126 | /******************************************************************** |
| 127 | DependencyPlanPackage - adds dependency related actions to the plan |
| 128 | for this package. |
| 129 | |
| 130 | *********************************************************************/ |
| 131 | HRESULT DependencyPlanPackage( |
| 132 | __in_opt DWORD *pdwInsertSequence, |
| 133 | __in const BURN_PACKAGE* pPackage, |
| 134 | __in BURN_PLAN* pPlan |
| 135 | ); |
| 136 | |
| 137 | /******************************************************************** |
| 138 | DependencyPlanPackageComplete - Updates the dependency registration |
| 139 | action depending on the planned action for the package. |
| 140 | |
| 141 | *********************************************************************/ |
| 142 | HRESULT DependencyPlanPackageComplete( |
| 143 | __in BURN_PACKAGE* pPackage, |
| 144 | __in BURN_PLAN* pPlan |
| 145 | ); |
| 146 | |
| 147 | /******************************************************************** |
| 148 | DependencyExecutePackageProviderAction - Registers or unregisters |
| 149 | provider information for the package contained within the action. |
| 150 | |
| 151 | *********************************************************************/ |
| 152 | HRESULT DependencyExecutePackageProviderAction( |
| 153 | __in const BURN_EXECUTE_ACTION* pAction, |
| 154 | __in BOOL fRollback |
| 155 | ); |
| 156 | |
| 157 | /******************************************************************** |
| 158 | DependencyExecutePackageDependencyAction - Registers or unregisters |
| 159 | dependency information for the package contained within the action. |
| 160 | |
| 161 | *********************************************************************/ |
| 162 | HRESULT DependencyExecutePackageDependencyAction( |
| 163 | __in BOOL fPerMachine, |
| 164 | __in const BURN_EXECUTE_ACTION* pAction, |
| 165 | __in BOOL fRollback |
| 166 | ); |
| 167 | |
| 168 | /******************************************************************** |
| 169 | DependencyRegisterBundle - Registers the bundle dependency provider. |
| 170 | |
| 171 | *********************************************************************/ |
| 172 | HRESULT DependencyRegisterBundle( |
| 173 | __in const BURN_REGISTRATION* pRegistration |
| 174 | ); |
| 175 | |
| 176 | /******************************************************************** |
| 177 | DependencyProcessDependentRegistration - Registers or unregisters dependents |
| 178 | on the bundle based on the action. |
| 179 | |
| 180 | *********************************************************************/ |
| 181 | HRESULT DependencyProcessDependentRegistration( |
| 182 | __in const BURN_REGISTRATION* pRegistration, |
| 183 | __in const BURN_DEPENDENT_REGISTRATION_ACTION* pAction |
| 184 | ); |
| 185 | |
| 186 | /******************************************************************** |
| 187 | DependencyUnregisterBundle - Removes the bundle dependency provider. |
| 188 | |
| 189 | Note: Does not check for existing dependents before removing the key. |
| 190 | *********************************************************************/ |
| 191 | void DependencyUnregisterBundle( |
| 192 | __in const BURN_REGISTRATION* pRegistration, |
| 193 | __in const BURN_PACKAGES* pPackages |
| 194 | ); |
| 195 | |
| 196 | HRESULT DependencyDetectCompatibleEntry( |
| 197 | __in BURN_PACKAGE* pPackage, |
| 198 | __in BURN_REGISTRATION* pRegistration |
| 199 | ); |
| 200 | |
| 201 | #if defined(__cplusplus) |
| 202 | } |
| 203 | #endif |