diff options
Diffstat (limited to 'src/burn/engine/relatedbundle.cpp')
| -rw-r--r-- | src/burn/engine/relatedbundle.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/burn/engine/relatedbundle.cpp b/src/burn/engine/relatedbundle.cpp index 58911711..586446b1 100644 --- a/src/burn/engine/relatedbundle.cpp +++ b/src/burn/engine/relatedbundle.cpp | |||
| @@ -143,6 +143,30 @@ extern "C" void RelatedBundlesSortPlan( | |||
| 143 | qsort_s(pRelatedBundles->rgpPlanSortedRelatedBundles, pRelatedBundles->cRelatedBundles, sizeof(BURN_RELATED_BUNDLE*), CompareRelatedBundlesPlan, NULL); | 143 | qsort_s(pRelatedBundles->rgpPlanSortedRelatedBundles, pRelatedBundles->cRelatedBundles, sizeof(BURN_RELATED_BUNDLE*), CompareRelatedBundlesPlan, NULL); |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | extern "C" BOOTSTRAPPER_RELATION_TYPE RelatedBundleConvertRelationType( | ||
| 147 | __in BUNDLE_RELATION_TYPE relationType | ||
| 148 | ) | ||
| 149 | { | ||
| 150 | switch (relationType) | ||
| 151 | { | ||
| 152 | case BUNDLE_RELATION_DETECT: | ||
| 153 | return BOOTSTRAPPER_RELATION_DETECT; | ||
| 154 | case BUNDLE_RELATION_UPGRADE: | ||
| 155 | return BOOTSTRAPPER_RELATION_UPGRADE; | ||
| 156 | case BUNDLE_RELATION_ADDON: | ||
| 157 | return BOOTSTRAPPER_RELATION_ADDON; | ||
| 158 | case BUNDLE_RELATION_PATCH: | ||
| 159 | return BOOTSTRAPPER_RELATION_PATCH; | ||
| 160 | case BUNDLE_RELATION_DEPENDENT_ADDON: | ||
| 161 | return BOOTSTRAPPER_RELATION_DEPENDENT_ADDON; | ||
| 162 | case BUNDLE_RELATION_DEPENDENT_PATCH: | ||
| 163 | return BOOTSTRAPPER_RELATION_DEPENDENT_PATCH; | ||
| 164 | default: | ||
| 165 | AssertSz(BUNDLE_RELATION_NONE == relationType, "Unknown BUNDLE_RELATION_TYPE"); | ||
| 166 | return BOOTSTRAPPER_RELATION_NONE; | ||
| 167 | } | ||
| 168 | } | ||
| 169 | |||
| 146 | 170 | ||
| 147 | // internal helper functions | 171 | // internal helper functions |
| 148 | 172 | ||
| @@ -248,30 +272,6 @@ LExit: | |||
| 248 | return result; | 272 | return result; |
| 249 | } | 273 | } |
| 250 | 274 | ||
| 251 | static BOOTSTRAPPER_RELATION_TYPE ConvertRelationType( | ||
| 252 | __in BUNDLE_RELATION_TYPE relationType | ||
| 253 | ) | ||
| 254 | { | ||
| 255 | switch (relationType) | ||
| 256 | { | ||
| 257 | case BUNDLE_RELATION_DETECT: | ||
| 258 | return BOOTSTRAPPER_RELATION_DETECT; | ||
| 259 | case BUNDLE_RELATION_UPGRADE: | ||
| 260 | return BOOTSTRAPPER_RELATION_UPGRADE; | ||
| 261 | case BUNDLE_RELATION_ADDON: | ||
| 262 | return BOOTSTRAPPER_RELATION_ADDON; | ||
| 263 | case BUNDLE_RELATION_PATCH: | ||
| 264 | return BOOTSTRAPPER_RELATION_PATCH; | ||
| 265 | case BUNDLE_RELATION_DEPENDENT_ADDON: | ||
| 266 | return BOOTSTRAPPER_RELATION_DEPENDENT_ADDON; | ||
| 267 | case BUNDLE_RELATION_DEPENDENT_PATCH: | ||
| 268 | return BOOTSTRAPPER_RELATION_DEPENDENT_PATCH; | ||
| 269 | default: | ||
| 270 | AssertSz(BUNDLE_RELATION_NONE == relationType, "Unknown BUNDLE_RELATION_TYPE"); | ||
| 271 | return BOOTSTRAPPER_RELATION_NONE; | ||
| 272 | } | ||
| 273 | } | ||
| 274 | |||
| 275 | static HRESULT LoadIfRelatedBundle( | 275 | static HRESULT LoadIfRelatedBundle( |
| 276 | __in const BUNDLE_QUERY_RELATED_BUNDLE_RESULT* pBundle, | 276 | __in const BUNDLE_QUERY_RELATED_BUNDLE_RESULT* pBundle, |
| 277 | __in BURN_REGISTRATION* pRegistration, | 277 | __in BURN_REGISTRATION* pRegistration, |
| @@ -280,7 +280,7 @@ static HRESULT LoadIfRelatedBundle( | |||
| 280 | { | 280 | { |
| 281 | HRESULT hr = S_OK; | 281 | HRESULT hr = S_OK; |
| 282 | BOOL fPerMachine = BUNDLE_INSTALL_CONTEXT_MACHINE == pBundle->installContext; | 282 | BOOL fPerMachine = BUNDLE_INSTALL_CONTEXT_MACHINE == pBundle->installContext; |
| 283 | BOOTSTRAPPER_RELATION_TYPE relationType = ConvertRelationType(pBundle->relationType); | 283 | BOOTSTRAPPER_RELATION_TYPE relationType = RelatedBundleConvertRelationType(pBundle->relationType); |
| 284 | BURN_RELATED_BUNDLE* pRelatedBundle = NULL; | 284 | BURN_RELATED_BUNDLE* pRelatedBundle = NULL; |
| 285 | 285 | ||
| 286 | // If we found our bundle id, it's not a related bundle. | 286 | // If we found our bundle id, it's not a related bundle. |
