Bring back ext2 code from branch
[reactos.git] / reactos / dll / win32 / msi / msiserver.idl
1 /*
2 * Copyright (C) 2007 Mike McCormack
3 * Copyright (C) 2007 Misha Koshelev
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20 #include "msiserver_dispids.h"
21 import "unknwn.idl";
22 import "wtypes.idl";
23 import "objidl.idl";
24 import "oaidl.idl";
25
26 cpp_quote("#if 0")
27 typedef unsigned long MSIHANDLE;
28 typedef int INSTALLMESSAGE;
29 typedef int MSICONDITION;
30 typedef int MSIRUNMODE;
31 typedef int INSTALLSTATE;
32 typedef WORD LANGID;
33 cpp_quote("#endif")
34
35 [
36 uuid(7BDE2046-D03B-4ffc-B84C-A098F38CFF0B),
37 oleautomation,
38 object
39 ]
40 interface IWineMsiRemoteDatabase : IUnknown
41 {
42 HRESULT IsTablePersistent( [in] BSTR table, [out] MSICONDITION *persistent );
43 HRESULT GetPrimaryKeys( [in] BSTR table, [out] MSIHANDLE *keys );
44 HRESULT GetSummaryInformation( [in] UINT updatecount, [out] MSIHANDLE *suminfo );
45 HRESULT OpenView( [in] BSTR query, [out] MSIHANDLE *view );
46 HRESULT SetMsiHandle( [in] MSIHANDLE handle );
47 }
48
49 [
50 uuid(902B3592-9D08-4dfd-A593-D07C52546421),
51 oleautomation,
52 object
53 ]
54 interface IWineMsiRemotePackage : IUnknown
55 {
56 HRESULT SetMsiHandle( [in] MSIHANDLE handle );
57 HRESULT GetActiveDatabase( [out] MSIHANDLE *handle );
58 HRESULT GetProperty( [in] BSTR property, [out] BSTR *value, [out] DWORD *size );
59 HRESULT SetProperty( [in] BSTR property, [in] BSTR value );
60 HRESULT ProcessMessage( [in] INSTALLMESSAGE message, [in] MSIHANDLE record );
61 HRESULT DoAction( [in] BSTR action );
62 HRESULT Sequence( [in] BSTR table, [in] int sequence );
63 HRESULT GetTargetPath( [in] BSTR folder, [out] BSTR *value, [out] DWORD *size );
64 HRESULT SetTargetPath( [in] BSTR folder, [in] BSTR value );
65 HRESULT GetSourcePath( [in] BSTR folder, [out] BSTR *value, [out] DWORD *size );
66 HRESULT GetMode( [in] MSIRUNMODE mode, [out] BOOL *ret );
67 HRESULT GetFeatureState( [in] BSTR feature, [out] INSTALLSTATE *installed, [out] INSTALLSTATE *action );
68 HRESULT SetFeatureState( [in] BSTR feature, [in] INSTALLSTATE state );
69 HRESULT GetComponentState( [in] BSTR component, [out] INSTALLSTATE *installed, [out] INSTALLSTATE *action );
70 HRESULT SetComponentState( [in] BSTR component, [in] INSTALLSTATE state );
71 HRESULT GetLanguage( [out] LANGID *language );
72 HRESULT SetInstallLevel( [in] int level );
73 HRESULT FormatRecord( [in] MSIHANDLE record, [out] BSTR value, [out] DWORD *size );
74 HRESULT EvaluateCondition( [in] BSTR condition );
75 }
76
77 [
78 uuid(56D58B64-8780-4c22-A8BC-8B0B29E4A9F8),
79 oleautomation,
80 object
81 ]
82 interface IWineMsiRemoteCustomAction : IUnknown
83 {
84 HRESULT GetActionInfo( [in] LPCGUID guid, [out] INT *type, [out] MSIHANDLE *handle, [out] BSTR *dllname,
85 [out] BSTR *function, [out] IWineMsiRemotePackage **package );
86 }
87
88 [ uuid(000C1092-0000-0000-C000-000000000046), version(1.0) ]
89 library WindowsInstaller
90 {
91 dispinterface Installer;
92 dispinterface Record;
93 dispinterface Session;
94 dispinterface Database;
95 dispinterface SummaryInfo;
96 dispinterface View;
97 dispinterface UIPreview;
98 dispinterface FeatureInfo;
99 dispinterface RecordList;
100 dispinterface StringList;
101 dispinterface Product;
102 dispinterface Patch;
103
104 typedef enum {
105 msiInstallStateNotUsed = -7,
106 msiInstallStateBadConfig = -6,
107 msiInstallStateIncomplete = -5,
108 msiInstallStateSourceAbsent = -4,
109 msiInstallStateInvalidArg = -2,
110 msiInstallStateUnknown = -1,
111 msiInstallStateBroken = 0,
112 msiInstallStateAdvertised = 1,
113 msiInstallStateRemoved = 1,
114 msiInstallStateAbsent = 2,
115 msiInstallStateLocal = 3,
116 msiInstallStateSource = 4,
117 msiInstallStateDefault = 5
118 } MsiInstallState;
119
120 typedef enum {
121 msiOpenDatabaseModeReadOnly = 0,
122 msiOpenDatabaseModeTransact = 1,
123 msiOpenDatabaseModeDirect = 2,
124 msiOpenDatabaseModeCreate = 3,
125 msiOpenDatabaseModeCreateDirect = 4,
126 msiOpenDatabaseModePatchFile = 32
127 } MsiOpenDatabaseMode;
128
129 [ uuid(000C1090-0000-0000-C000-000000000046) ]
130 dispinterface Installer
131 {
132 properties:
133 methods:
134 [id(DISPID_INSTALLER_CREATERECORD)]
135 Record *CreateRecord([in] long Count);
136 [id(DISPID_INSTALLER_OPENPACKAGE)]
137 Session* OpenPackage(
138 [in] VARIANT PackagePath,
139 [in, optional, defaultvalue(0)] long Options);
140 [id(DISPID_INSTALLER_OPENDATABASE)]
141 Database *OpenDatabase(
142 [in] BSTR DatabasePath,
143 [in] VARIANT OpenMode);
144 [id(DISPID_INSTALLER_INSTALLPRODUCT)]
145 void InstallProduct(
146 [in] BSTR PackagePath,
147 [in, optional, defaultvalue("0")] BSTR PropertyValues);
148 [id(DISPID_INSTALLER_VERSION)]
149 BSTR Version();
150 [id(DISPID_INSTALLER_REGISTRYVALUE), propget]
151 BSTR RegistryValue(
152 [in] VARIANT Root,
153 [in] BSTR Key,
154 [in, optional] VARIANT Value);
155 [id(DISPID_INSTALLER_PRODUCTSTATE), propget]
156 MsiInstallState ProductState(
157 [in] BSTR Product);
158 [id(DISPID_INSTALLER_PRODUCTINFO), propget]
159 BSTR ProductInfo(
160 [in] BSTR Product,
161 [in] BSTR Attribute);
162 [id(DISPID_INSTALLER_PRODUCTS), propget]
163 StringList *Products();
164 [id(DISPID_INSTALLER_RELATEDPRODUCTS), propget]
165 StringList *RelatedProducts(
166 [in] BSTR UpgradeCode);
167 }
168
169 [ uuid(000C1093-0000-0000-C000-000000000046) ]
170 dispinterface Record
171 {
172 properties:
173 methods:
174 [id(DISPID_RECORD_STRINGDATA), propget]
175 BSTR StringData([in] long Field);
176 [id(DISPID_RECORD_STRINGDATA), propput]
177 void StringData(
178 [in] long Field,
179 [in] BSTR rhs);
180 [id(DISPID_RECORD_INTEGERDATA), propget]
181 long IntegerData([in] long Field);
182 [id(DISPID_RECORD_INTEGERDATA), propput]
183 void IntegerData(
184 [in] long Field,
185 [in] long rhs);
186 [id(DISPID_RECORD_FIELDCOUNT), propget]
187 long FieldCount();
188 }
189
190 [ uuid(000C1095-0000-0000-C000-000000000046) ]
191 dispinterface StringList
192 {
193 properties:
194 methods:
195 [id(DISPID_LIST__NEWENUM)]
196 IUnknown _NewEnum();
197 [id(DISPID_LIST_ITEM), propget]
198 BSTR Item(long Index);
199 [id(DISPID_LIST_COUNT), propget]
200 long Count();
201 }
202
203 [ uuid(000C1096-0000-0000-C000-000000000046) ]
204 dispinterface RecordList
205 {
206 properties:
207 methods:
208 }
209
210 [ uuid(000C109A-0000-0000-C000-000000000046) ]
211 dispinterface UIPreview
212 {
213 properties:
214 methods:
215 }
216
217 [ uuid(000C109B-0000-0000-C000-000000000046) ]
218 dispinterface SummaryInfo
219 {
220 properties:
221 methods:
222 [id(DISPID_SUMMARYINFO_PROPERTY), propget]
223 VARIANT Property([in] long Pid);
224 [id(DISPID_SUMMARYINFO_PROPERTY), propput]
225 void Property(
226 [in] long Pid,
227 [in] VARIANT rhs);
228 [id(DISPID_SUMMARYINFO_PROPERTYCOUNT), propget]
229 long PropertyCount();
230 }
231
232 typedef enum {
233 msiViewModifySeek = -1,
234 msiViewModifyRefresh = 0,
235 msiViewModifyInsert = 1,
236 msiViewModifyUpdate = 2,
237 msiViewModifyAssign = 3,
238 msiViewModifyReplace = 4,
239 msiViewModifyMerge = 5,
240 msiViewModifyDelete = 6,
241 msiViewModifyInsertTemporary = 7,
242 msiViewModifyValidate = 8,
243 msiViewModifyValidateNew = 9,
244 msiViewModifyValidateField = 10,
245 msiViewModifyValidateDelete = 11,
246 } _MsiViewModify; /* Added underscore to avoid conflict with function name */
247
248 [ uuid(000C109C-0000-0000-C000-000000000046) ]
249 dispinterface View
250 {
251 properties:
252 methods:
253 [id(DISPID_VIEW_EXECUTE)]
254 void Execute([in, optional, defaultvalue(0)] Record *Params);
255 [id(DISPID_VIEW_FETCH)]
256 Record* Fetch();
257 [id(DISPID_VIEW_MODIFY)]
258 void Modify(
259 [in] _MsiViewModify Mode,
260 Record *Record);
261 [id(DISPID_VIEW_CLOSE)]
262 void Close();
263 }
264
265 [ uuid(000C109D-0000-0000-C000-000000000046) ]
266 dispinterface Database
267 {
268 properties:
269 methods:
270 [id(DISPID_DATABASE_OPENVIEW)]
271 View* OpenView([in] BSTR Sql);
272 [id(DISPID_DATABASE_SUMMARYINFORMATION), propget]
273 SummaryInfo *SummaryInformation([in, optional, defaultvalue(0)] long UpdateCount);
274 }
275
276 typedef enum {
277 msiDoActionStatusNoAction = 0,
278 msiDoActionStatusSuccess = 1,
279 msiDoActionStatusUserExit = 2,
280 msiDoActionStatusFailure = 3,
281 msiDoActionStatusSuspend = 4,
282 msiDoActionStatusFinished = 5,
283 msiDoActionStatusWrongState = 6,
284 msiDoActionStatusBadActionData = 7
285 } MsiDoActionStatus;
286
287 typedef enum {
288 msiRunModeAdmin = 0,
289 msiRunModeAdvertise = 1,
290 msiRunModeMaintenance = 2,
291 msiRunModeRollbackEnabled = 3,
292 msiRunModeLogEnabled = 4,
293 msiRunModeOperations = 5,
294 msiRunModeRebootAtEnd = 6,
295 msiRunModeRebootNow = 7,
296 msiRunModeCabinet = 8,
297 msiRunModeSourceShortNames = 9,
298 msiRunModeTargetShortNames = 10,
299 msiRunModeWindows9x = 12,
300 msiRunModeZawEnabled = 13,
301 msiRunModeScheduled = 16,
302 msiRunModeRollback = 17,
303 msiRunModeCommit = 18
304 } MsiRunMode;
305
306 typedef enum {
307 msiEvaluateConditionFalse = 0,
308 msiEvaluateConditionTrue = 1,
309 msiEvaluateConditionNone = 2,
310 msiEvaluateConditionError = 3
311 } _MsiEvaluateCondition; /* Added underscore to avoid conflict with function name */
312
313 [ uuid(000C109E-0000-0000-C000-000000000046) ]
314 dispinterface Session
315 {
316 properties:
317 methods:
318 [id(DISPID_SESSION_INSTALLER), propget]
319 Installer *Installer();
320 [id(DISPID_SESSION_PROPERTY), propget]
321 BSTR Property([in] BSTR Name);
322 [id(DISPID_SESSION_PROPERTY), propput]
323 void Property(
324 [in] BSTR Name,
325 [in] BSTR rhs);
326 [id(DISPID_SESSION_LANGUAGE), propget]
327 long Language();
328 [id(DISPID_SESSION_MODE), propget]
329 VARIANT_BOOL Mode([in] MsiRunMode Flag);
330 [id(DISPID_SESSION_MODE), propput]
331 void Mode(
332 [in] MsiRunMode Flag,
333 [in] VARIANT_BOOL rhs);
334 [id(DISPID_SESSION_DATABASE), propget]
335 Database* Database();
336 [id(DISPID_SESSION_DOACTION)]
337 MsiDoActionStatus DoAction([in] BSTR Action);
338 [id(DISPID_SESSION_EVALUATECONDITION)]
339 _MsiEvaluateCondition EvaluateCondition([in] BSTR Expression);
340 [id(DISPID_SESSION_FEATURECURRENTSTATE), propget]
341 MsiInstallState FeatureCurrentState([in] BSTR Feature);
342 [id(DISPID_SESSION_FEATUREREQUESTSTATE), propget]
343 MsiInstallState FeatureRequestState([in] BSTR Feature);
344 [id(DISPID_SESSION_FEATUREREQUESTSTATE), propput]
345 void FeatureRequestState(
346 [in] BSTR Feature,
347 [in] MsiInstallState rhs);
348 [id(DISPID_SESSION_SETINSTALLLEVEL)]
349 void SetInstallLevel([in] long Level);
350 }
351
352 [ uuid(000C109F-0000-0000-C000-000000000046) ]
353 dispinterface FeatureInfo
354 {
355 properties:
356 methods:
357 }
358
359 [ uuid(000C10A0-0000-0000-C000-000000000046) ]
360 dispinterface Product
361 {
362 properties:
363 methods:
364 }
365
366 [ uuid(000C10A1-0000-0000-C000-000000000046) ]
367 dispinterface Patch
368 {
369 properties:
370 methods:
371 }
372 }