diff options
Diffstat (limited to 'src/burn/engine/search.h')
| -rw-r--r-- | src/burn/engine/search.h | 163 |
1 files changed, 163 insertions, 0 deletions
diff --git a/src/burn/engine/search.h b/src/burn/engine/search.h new file mode 100644 index 00000000..c699c97c --- /dev/null +++ b/src/burn/engine/search.h | |||
| @@ -0,0 +1,163 @@ | |||
| 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 | |||
| 10 | // constants | ||
| 11 | |||
| 12 | enum BURN_SEARCH_TYPE | ||
| 13 | { | ||
| 14 | BURN_SEARCH_TYPE_NONE, | ||
| 15 | BURN_SEARCH_TYPE_DIRECTORY, | ||
| 16 | BURN_SEARCH_TYPE_FILE, | ||
| 17 | BURN_SEARCH_TYPE_REGISTRY, | ||
| 18 | BURN_SEARCH_TYPE_MSI_COMPONENT, | ||
| 19 | BURN_SEARCH_TYPE_MSI_PRODUCT, | ||
| 20 | BURN_SEARCH_TYPE_MSI_FEATURE, | ||
| 21 | BURN_SEARCH_TYPE_EXTENSION, | ||
| 22 | BURN_SEARCH_TYPE_SET_VARIABLE, | ||
| 23 | }; | ||
| 24 | |||
| 25 | enum BURN_DIRECTORY_SEARCH_TYPE | ||
| 26 | { | ||
| 27 | BURN_DIRECTORY_SEARCH_TYPE_NONE, | ||
| 28 | BURN_DIRECTORY_SEARCH_TYPE_EXISTS, | ||
| 29 | BURN_DIRECTORY_SEARCH_TYPE_PATH, | ||
| 30 | }; | ||
| 31 | |||
| 32 | enum BURN_FILE_SEARCH_TYPE | ||
| 33 | { | ||
| 34 | BURN_FILE_SEARCH_TYPE_NONE, | ||
| 35 | BURN_FILE_SEARCH_TYPE_EXISTS, | ||
| 36 | BURN_FILE_SEARCH_TYPE_VERSION, | ||
| 37 | BURN_FILE_SEARCH_TYPE_PATH, | ||
| 38 | }; | ||
| 39 | |||
| 40 | enum BURN_REGISTRY_SEARCH_TYPE | ||
| 41 | { | ||
| 42 | BURN_REGISTRY_SEARCH_TYPE_NONE, | ||
| 43 | BURN_REGISTRY_SEARCH_TYPE_EXISTS, | ||
| 44 | BURN_REGISTRY_SEARCH_TYPE_VALUE, | ||
| 45 | }; | ||
| 46 | |||
| 47 | enum BURN_MSI_COMPONENT_SEARCH_TYPE | ||
| 48 | { | ||
| 49 | BURN_MSI_COMPONENT_SEARCH_TYPE_NONE, | ||
| 50 | BURN_MSI_COMPONENT_SEARCH_TYPE_KEYPATH, | ||
| 51 | BURN_MSI_COMPONENT_SEARCH_TYPE_STATE, | ||
| 52 | BURN_MSI_COMPONENT_SEARCH_TYPE_DIRECTORY, | ||
| 53 | }; | ||
| 54 | |||
| 55 | enum BURN_MSI_PRODUCT_SEARCH_TYPE | ||
| 56 | { | ||
| 57 | BURN_MSI_PRODUCT_SEARCH_TYPE_NONE, | ||
| 58 | BURN_MSI_PRODUCT_SEARCH_TYPE_VERSION, | ||
| 59 | BURN_MSI_PRODUCT_SEARCH_TYPE_LANGUAGE, | ||
| 60 | BURN_MSI_PRODUCT_SEARCH_TYPE_STATE, | ||
| 61 | BURN_MSI_PRODUCT_SEARCH_TYPE_ASSIGNMENT, | ||
| 62 | }; | ||
| 63 | |||
| 64 | enum BURN_MSI_PRODUCT_SEARCH_GUID_TYPE | ||
| 65 | { | ||
| 66 | BURN_MSI_PRODUCT_SEARCH_GUID_TYPE_NONE, | ||
| 67 | BURN_MSI_PRODUCT_SEARCH_GUID_TYPE_PRODUCTCODE, | ||
| 68 | BURN_MSI_PRODUCT_SEARCH_GUID_TYPE_UPGRADECODE | ||
| 69 | }; | ||
| 70 | |||
| 71 | enum BURN_MSI_FEATURE_SEARCH_TYPE | ||
| 72 | { | ||
| 73 | BURN_MSI_FEATURE_SEARCH_TYPE_NONE, | ||
| 74 | BURN_MSI_FEATURE_SEARCH_TYPE_STATE, | ||
| 75 | }; | ||
| 76 | |||
| 77 | |||
| 78 | // structs | ||
| 79 | |||
| 80 | typedef struct _BURN_SEARCH | ||
| 81 | { | ||
| 82 | LPWSTR sczKey; | ||
| 83 | LPWSTR sczVariable; | ||
| 84 | LPWSTR sczCondition; | ||
| 85 | |||
| 86 | BURN_SEARCH_TYPE Type; | ||
| 87 | union | ||
| 88 | { | ||
| 89 | struct | ||
| 90 | { | ||
| 91 | BURN_DIRECTORY_SEARCH_TYPE Type; | ||
| 92 | LPWSTR sczPath; | ||
| 93 | } DirectorySearch; | ||
| 94 | struct | ||
| 95 | { | ||
| 96 | BURN_FILE_SEARCH_TYPE Type; | ||
| 97 | LPWSTR sczPath; | ||
| 98 | } FileSearch; | ||
| 99 | struct | ||
| 100 | { | ||
| 101 | BURN_REGISTRY_SEARCH_TYPE Type; | ||
| 102 | BURN_VARIANT_TYPE VariableType; | ||
| 103 | HKEY hRoot; | ||
| 104 | LPWSTR sczKey; | ||
| 105 | LPWSTR sczValue; | ||
| 106 | BOOL fWin64; | ||
| 107 | BOOL fExpandEnvironment; | ||
| 108 | } RegistrySearch; | ||
| 109 | struct | ||
| 110 | { | ||
| 111 | BURN_MSI_COMPONENT_SEARCH_TYPE Type; | ||
| 112 | LPWSTR sczProductCode; | ||
| 113 | LPWSTR sczComponentId; | ||
| 114 | } MsiComponentSearch; | ||
| 115 | struct | ||
| 116 | { | ||
| 117 | BURN_MSI_PRODUCT_SEARCH_TYPE Type; | ||
| 118 | BURN_MSI_PRODUCT_SEARCH_GUID_TYPE GuidType; | ||
| 119 | LPWSTR sczGuid; | ||
| 120 | } MsiProductSearch; | ||
| 121 | struct | ||
| 122 | { | ||
| 123 | BURN_MSI_FEATURE_SEARCH_TYPE Type; | ||
| 124 | LPWSTR sczProductCode; | ||
| 125 | LPWSTR sczFeatureId; | ||
| 126 | } MsiFeatureSearch; | ||
| 127 | struct | ||
| 128 | { | ||
| 129 | BURN_EXTENSION* pExtension; | ||
| 130 | } ExtensionSearch; | ||
| 131 | struct | ||
| 132 | { | ||
| 133 | BURN_VARIANT value; | ||
| 134 | } SetVariable; | ||
| 135 | }; | ||
| 136 | } BURN_SEARCH; | ||
| 137 | |||
| 138 | typedef struct _BURN_SEARCHES | ||
| 139 | { | ||
| 140 | BURN_SEARCH* rgSearches; | ||
| 141 | DWORD cSearches; | ||
| 142 | } BURN_SEARCHES; | ||
| 143 | |||
| 144 | |||
| 145 | // function declarations | ||
| 146 | |||
| 147 | HRESULT SearchesParseFromXml( | ||
| 148 | __in BURN_SEARCHES* pSearches, | ||
| 149 | __in BURN_EXTENSIONS* pBurnExtensions, | ||
| 150 | __in IXMLDOMNode* pixnBundle | ||
| 151 | ); | ||
| 152 | HRESULT SearchesExecute( | ||
| 153 | __in BURN_SEARCHES* pSearches, | ||
| 154 | __in BURN_VARIABLES* pVariables | ||
| 155 | ); | ||
| 156 | void SearchesUninitialize( | ||
| 157 | __in BURN_SEARCHES* pSearches | ||
| 158 | ); | ||
| 159 | |||
| 160 | |||
| 161 | #if defined(__cplusplus) | ||
| 162 | } | ||
| 163 | #endif | ||
