riched20: Fix test crash on WinXP-SP2.
[wine] / dlls / 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 MSIRUNMODE;
30 typedef int INSTALLSTATE;
31 typedef WORD LANGID;
32 cpp_quote("#endif")
33
34 [
35     uuid(902B3592-9D08-4dfd-A593-D07C52546421),
36     oleautomation,
37     object
38 ]
39 interface IWineMsiRemotePackage : IUnknown
40 {
41     HRESULT SetMsiHandle( [in] MSIHANDLE handle );
42     HRESULT GetActiveDatabase( [out] MSIHANDLE *handle );
43     HRESULT GetProperty( [in] BSTR property, [out] BSTR *value, [out] DWORD *size );
44     HRESULT SetProperty( [in] BSTR property, [in] BSTR value );
45     HRESULT ProcessMessage( [in] INSTALLMESSAGE message, [in] MSIHANDLE record );
46     HRESULT DoAction( [in] BSTR action );
47     HRESULT Sequence( [in] BSTR table, [in] int sequence );
48     HRESULT GetTargetPath( [in] BSTR folder, [out] BSTR *value, [out] DWORD *size );
49     HRESULT SetTargetPath( [in] BSTR folder, [in] BSTR value );
50     HRESULT GetSourcePath( [in] BSTR folder, [out] BSTR *value, [out] DWORD *size );
51     HRESULT GetMode( [in] MSIRUNMODE mode, [out] BOOL *ret );
52     HRESULT GetFeatureState( [in] BSTR feature, [out] INSTALLSTATE *installed, [out] INSTALLSTATE *action );
53     HRESULT SetFeatureState( [in] BSTR feature, [in] INSTALLSTATE state );
54     HRESULT GetComponentState( [in] BSTR component, [out] INSTALLSTATE *installed, [out] INSTALLSTATE *action );
55     HRESULT SetComponentState( [in] BSTR component, [in] INSTALLSTATE state );
56     HRESULT GetLanguage( [out] LANGID *language );
57     HRESULT SetInstallLevel( [in] int level );
58     HRESULT FormatRecord( [in] MSIHANDLE record, [out] BSTR value, [out] DWORD *size );
59     HRESULT EvaluateCondition( [in] BSTR condition );
60 }
61
62 [
63     uuid(56D58B64-8780-4c22-A8BC-8B0B29E4A9F8),
64     oleautomation,
65     object
66 ]
67 interface IWineMsiRemoteCustomAction : IUnknown
68 {
69     HRESULT GetActionInfo( [in] LPCGUID guid, [out] INT *type, [out] MSIHANDLE *handle, [out] BSTR *dllname,
70                            [out] BSTR *function, [out] IWineMsiRemotePackage **package );
71 }
72
73 [ uuid(000C1092-0000-0000-C000-000000000046), version(1.0) ]
74 library WindowsInstaller
75 {
76     dispinterface Installer;
77     dispinterface Record;
78     dispinterface Session;
79     dispinterface Database;
80     dispinterface SummaryInfo;
81     dispinterface View;
82     dispinterface UIPreview;
83     dispinterface FeatureInfo;
84     dispinterface RecordList;
85     dispinterface StringList;
86     dispinterface Product;
87     dispinterface Patch;
88
89     typedef enum {
90         msiInstallStateNotUsed = -7,
91         msiInstallStateBadConfig = -6,
92         msiInstallStateIncomplete = -5,
93         msiInstallStateSourceAbsent = -4,
94         msiInstallStateInvalidArg = -2,
95         msiInstallStateUnknown = -1,
96         msiInstallStateBroken = 0,
97         msiInstallStateAdvertised = 1,
98         msiInstallStateRemoved = 1,
99         msiInstallStateAbsent = 2,
100         msiInstallStateLocal = 3,
101         msiInstallStateSource = 4,
102         msiInstallStateDefault = 5
103     } MsiInstallState;
104
105     typedef enum {
106         msiOpenDatabaseModeReadOnly = 0,
107         msiOpenDatabaseModeTransact = 1,
108         msiOpenDatabaseModeDirect = 2,
109         msiOpenDatabaseModeCreate = 3,
110         msiOpenDatabaseModeCreateDirect = 4,
111         msiOpenDatabaseModePatchFile = 32
112     } MsiOpenDatabaseMode;
113
114     [ uuid(000C1090-0000-0000-C000-000000000046) ]
115     dispinterface Installer
116     {
117     properties:
118     methods:
119         [id(DISPID_INSTALLER_CREATERECORD)]
120             Record *CreateRecord([in] long Count);
121         [id(DISPID_INSTALLER_OPENPACKAGE)]
122             Session* OpenPackage(
123                 [in] VARIANT PackagePath,
124                 [in, optional, defaultvalue(0)] long Options);
125         [id(DISPID_INSTALLER_OPENDATABASE)]
126             Database *OpenDatabase(
127                     [in] BSTR DatabasePath,
128                     [in] VARIANT OpenMode);
129         [id(DISPID_INSTALLER_INSTALLPRODUCT)]
130             void InstallProduct(
131                 [in] BSTR PackagePath,
132                 [in, optional, defaultvalue("0")] BSTR PropertyValues);
133         [id(DISPID_INSTALLER_REGISTRYVALUE), propget]
134             BSTR RegistryValue(
135                 [in] VARIANT Root,
136                 [in] BSTR Key,
137                 [in, optional] VARIANT Value);
138         [id(DISPID_INSTALLER_PRODUCTSTATE), propget]
139             MsiInstallState ProductState(
140                 [in] BSTR Product);
141         [id(DISPID_INSTALLER_PRODUCTINFO), propget]
142             BSTR ProductInfo(
143                 [in] BSTR Product,
144                 [in] BSTR Attribute);
145         [id(DISPID_INSTALLER_PRODUCTS), propget]
146             StringList *Products();
147         [id(DISPID_INSTALLER_RELATEDPRODUCTS), propget]
148             StringList *RelatedProducts(
149                 [in] BSTR UpgradeCode);
150     }
151
152     [ uuid(000C1093-0000-0000-C000-000000000046) ]
153     dispinterface Record
154     {
155     properties:
156     methods:
157         [id(DISPID_RECORD_STRINGDATA), propget]
158             BSTR StringData([in] long Field);
159         [id(DISPID_RECORD_STRINGDATA), propput]
160             void StringData(
161                 [in] long Field,
162                 [in] BSTR rhs);
163         [id(DISPID_RECORD_INTEGERDATA), propget]
164             long IntegerData([in] long Field);
165         [id(DISPID_RECORD_INTEGERDATA), propput]
166             void IntegerData(
167                 [in] long Field,
168                 [in] long rhs);
169         [id(DISPID_RECORD_FIELDCOUNT), propget]
170             long FieldCount();
171     }
172
173     [ uuid(000C1095-0000-0000-C000-000000000046) ]
174     dispinterface StringList
175     {
176         properties:
177         methods:
178         [id(DISPID_LIST__NEWENUM)]
179             IUnknown _NewEnum();
180         [id(DISPID_LIST_ITEM), propget]
181             BSTR Item(long Index);
182         [id(DISPID_LIST_COUNT), propget]
183             long Count();
184     }
185
186     [ uuid(000C1096-0000-0000-C000-000000000046) ]
187     dispinterface RecordList
188     {
189         properties:
190         methods:
191     }
192
193     [ uuid(000C109A-0000-0000-C000-000000000046) ]
194     dispinterface UIPreview
195     {
196         properties:
197         methods:
198     }
199
200     [ uuid(000C109B-0000-0000-C000-000000000046) ]
201     dispinterface SummaryInfo
202     {
203         properties:
204         methods:
205         [id(DISPID_SUMMARYINFO_PROPERTY), propget]
206             VARIANT Property([in] long Pid);
207         [id(DISPID_SUMMARYINFO_PROPERTY), propput]
208             void Property(
209                 [in] long Pid,
210                 [in] VARIANT rhs);
211         [id(DISPID_SUMMARYINFO_PROPERTYCOUNT), propget]
212             long PropertyCount();
213     }
214
215     typedef enum {
216         msiViewModifySeek = -1,
217         msiViewModifyRefresh = 0,
218         msiViewModifyInsert = 1,
219         msiViewModifyUpdate = 2,
220         msiViewModifyAssign = 3,
221         msiViewModifyReplace = 4,
222         msiViewModifyMerge = 5,
223         msiViewModifyDelete = 6,
224         msiViewModifyInsertTemporary = 7,
225         msiViewModifyValidate = 8,
226         msiViewModifyValidateNew = 9,
227         msiViewModifyValidateField = 10,
228         msiViewModifyValidateDelete = 11,
229     } _MsiViewModify;                                /* Added underscore to avoid conflict with function name */
230
231     [ uuid(000C109C-0000-0000-C000-000000000046) ]
232     dispinterface View
233     {
234         properties:
235         methods:
236         [id(DISPID_VIEW_EXECUTE)]
237             void Execute([in, optional, defaultvalue(0)] Record *Params);
238         [id(DISPID_VIEW_FETCH)]
239             Record* Fetch();
240         [id(DISPID_VIEW_MODIFY)]
241             void Modify(
242                 [in] _MsiViewModify Mode,
243                 Record *Record);
244         [id(DISPID_VIEW_CLOSE)]
245             void Close();
246     }
247
248     [ uuid(000C109D-0000-0000-C000-000000000046) ]
249     dispinterface Database
250     {
251         properties:
252         methods:
253         [id(DISPID_DATABASE_OPENVIEW)]
254             View* OpenView([in] BSTR Sql);
255         [id(DISPID_DATABASE_SUMMARYINFORMATION), propget]
256             SummaryInfo *SummaryInformation([in, optional, defaultvalue(0)] long UpdateCount);
257     }
258
259     typedef enum {
260         msiDoActionStatusNoAction = 0,
261         msiDoActionStatusSuccess = 1,
262         msiDoActionStatusUserExit = 2,
263         msiDoActionStatusFailure = 3,
264         msiDoActionStatusSuspend = 4,
265         msiDoActionStatusFinished = 5,
266         msiDoActionStatusWrongState = 6,
267         msiDoActionStatusBadActionData = 7
268     } MsiDoActionStatus;
269
270     typedef enum {
271         msiRunModeAdmin = 0,
272         msiRunModeAdvertise = 1,
273         msiRunModeMaintenance = 2,
274         msiRunModeRollbackEnabled = 3,
275         msiRunModeLogEnabled = 4,
276         msiRunModeOperations = 5,
277         msiRunModeRebootAtEnd = 6,
278         msiRunModeRebootNow = 7,
279         msiRunModeCabinet = 8,
280         msiRunModeSourceShortNames = 9,
281         msiRunModeTargetShortNames = 10,
282         msiRunModeWindows9x = 12,
283         msiRunModeZawEnabled = 13,
284         msiRunModeScheduled = 16,
285         msiRunModeRollback = 17,
286         msiRunModeCommit = 18
287     } MsiRunMode;
288
289     typedef enum {
290         msiEvaluateConditionFalse = 0,
291         msiEvaluateConditionTrue = 1,
292         msiEvaluateConditionNone = 2,
293         msiEvaluateConditionError = 3
294     } _MsiEvaluateCondition;           /* Added underscore to avoid conflict with function name */
295
296     [ uuid(000C109E-0000-0000-C000-000000000046) ]
297     dispinterface Session
298     {
299     properties:
300     methods:
301         [id(DISPID_SESSION_INSTALLER), propget]
302             Installer *Installer();
303         [id(DISPID_SESSION_PROPERTY), propget]
304             BSTR Property([in] BSTR Name);
305         [id(DISPID_SESSION_PROPERTY), propput]
306             void Property(
307                 [in] BSTR Name,
308                 [in] BSTR rhs);
309         [id(DISPID_SESSION_LANGUAGE), propget]
310             long Language();
311         [id(DISPID_SESSION_MODE), propget]
312             VARIANT_BOOL Mode([in] MsiRunMode Flag);
313         [id(DISPID_SESSION_MODE), propput]
314             void Mode(
315                 [in] MsiRunMode Flag,
316                 [in] VARIANT_BOOL rhs);
317         [id(DISPID_SESSION_DATABASE), propget]
318             Database* Database();
319         [id(DISPID_SESSION_DOACTION)]
320             MsiDoActionStatus DoAction([in] BSTR Action);
321         [id(DISPID_SESSION_EVALUATECONDITION)]
322             _MsiEvaluateCondition EvaluateCondition([in] BSTR Expression);
323         [id(DISPID_SESSION_FEATURECURRENTSTATE), propget]
324             MsiInstallState FeatureCurrentState([in] BSTR Feature);
325         [id(DISPID_SESSION_FEATUREREQUESTSTATE), propget]
326             MsiInstallState FeatureRequestState([in] BSTR Feature);
327         [id(DISPID_SESSION_FEATUREREQUESTSTATE), propput]
328             void FeatureRequestState(
329                 [in] BSTR Feature,
330                 [in] MsiInstallState rhs);
331         [id(DISPID_SESSION_SETINSTALLLEVEL)]
332             void SetInstallLevel([in] long Level);
333     }
334
335     [ uuid(000C109F-0000-0000-C000-000000000046) ]
336     dispinterface FeatureInfo
337     {
338         properties:
339         methods:
340     }
341
342     [ uuid(000C10A0-0000-0000-C000-000000000046) ]
343     dispinterface Product
344     {
345         properties:
346         methods:
347     }
348
349     [ uuid(000C10A1-0000-0000-C000-000000000046) ]
350     dispinterface Patch
351     {
352         properties:
353         methods:
354     }
355 }