inetcomm: Copy RFC822 headers into a memory block for later parsing.
[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 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_REGISTRYVALUE), propget]
149             BSTR RegistryValue(
150                 [in] VARIANT Root,
151                 [in] BSTR Key,
152                 [in, optional] VARIANT Value);
153         [id(DISPID_INSTALLER_PRODUCTSTATE), propget]
154             MsiInstallState ProductState(
155                 [in] BSTR Product);
156         [id(DISPID_INSTALLER_PRODUCTINFO), propget]
157             BSTR ProductInfo(
158                 [in] BSTR Product,
159                 [in] BSTR Attribute);
160         [id(DISPID_INSTALLER_PRODUCTS), propget]
161             StringList *Products();
162         [id(DISPID_INSTALLER_RELATEDPRODUCTS), propget]
163             StringList *RelatedProducts(
164                 [in] BSTR UpgradeCode);
165     }
166
167     [ uuid(000C1093-0000-0000-C000-000000000046) ]
168     dispinterface Record
169     {
170     properties:
171     methods:
172         [id(DISPID_RECORD_STRINGDATA), propget]
173             BSTR StringData([in] long Field);
174         [id(DISPID_RECORD_STRINGDATA), propput]
175             void StringData(
176                 [in] long Field,
177                 [in] BSTR rhs);
178         [id(DISPID_RECORD_INTEGERDATA), propget]
179             long IntegerData([in] long Field);
180         [id(DISPID_RECORD_INTEGERDATA), propput]
181             void IntegerData(
182                 [in] long Field,
183                 [in] long rhs);
184         [id(DISPID_RECORD_FIELDCOUNT), propget]
185             long FieldCount();
186     }
187
188     [ uuid(000C1095-0000-0000-C000-000000000046) ]
189     dispinterface StringList
190     {
191         properties:
192         methods:
193         [id(DISPID_LIST__NEWENUM)]
194             IUnknown _NewEnum();
195         [id(DISPID_LIST_ITEM), propget]
196             BSTR Item(long Index);
197         [id(DISPID_LIST_COUNT), propget]
198             long Count();
199     }
200
201     [ uuid(000C1096-0000-0000-C000-000000000046) ]
202     dispinterface RecordList
203     {
204         properties:
205         methods:
206     }
207
208     [ uuid(000C109A-0000-0000-C000-000000000046) ]
209     dispinterface UIPreview
210     {
211         properties:
212         methods:
213     }
214
215     [ uuid(000C109B-0000-0000-C000-000000000046) ]
216     dispinterface SummaryInfo
217     {
218         properties:
219         methods:
220         [id(DISPID_SUMMARYINFO_PROPERTY), propget]
221             VARIANT Property([in] long Pid);
222         [id(DISPID_SUMMARYINFO_PROPERTY), propput]
223             void Property(
224                 [in] long Pid,
225                 [in] VARIANT rhs);
226         [id(DISPID_SUMMARYINFO_PROPERTYCOUNT), propget]
227             long PropertyCount();
228     }
229
230     typedef enum {
231         msiViewModifySeek = -1,
232         msiViewModifyRefresh = 0,
233         msiViewModifyInsert = 1,
234         msiViewModifyUpdate = 2,
235         msiViewModifyAssign = 3,
236         msiViewModifyReplace = 4,
237         msiViewModifyMerge = 5,
238         msiViewModifyDelete = 6,
239         msiViewModifyInsertTemporary = 7,
240         msiViewModifyValidate = 8,
241         msiViewModifyValidateNew = 9,
242         msiViewModifyValidateField = 10,
243         msiViewModifyValidateDelete = 11,
244     } _MsiViewModify;                                /* Added underscore to avoid conflict with function name */
245
246     [ uuid(000C109C-0000-0000-C000-000000000046) ]
247     dispinterface View
248     {
249         properties:
250         methods:
251         [id(DISPID_VIEW_EXECUTE)]
252             void Execute([in, optional, defaultvalue(0)] Record *Params);
253         [id(DISPID_VIEW_FETCH)]
254             Record* Fetch();
255         [id(DISPID_VIEW_MODIFY)]
256             void Modify(
257                 [in] _MsiViewModify Mode,
258                 Record *Record);
259         [id(DISPID_VIEW_CLOSE)]
260             void Close();
261     }
262
263     [ uuid(000C109D-0000-0000-C000-000000000046) ]
264     dispinterface Database
265     {
266         properties:
267         methods:
268         [id(DISPID_DATABASE_OPENVIEW)]
269             View* OpenView([in] BSTR Sql);
270         [id(DISPID_DATABASE_SUMMARYINFORMATION), propget]
271             SummaryInfo *SummaryInformation([in, optional, defaultvalue(0)] long UpdateCount);
272     }
273
274     typedef enum {
275         msiDoActionStatusNoAction = 0,
276         msiDoActionStatusSuccess = 1,
277         msiDoActionStatusUserExit = 2,
278         msiDoActionStatusFailure = 3,
279         msiDoActionStatusSuspend = 4,
280         msiDoActionStatusFinished = 5,
281         msiDoActionStatusWrongState = 6,
282         msiDoActionStatusBadActionData = 7
283     } MsiDoActionStatus;
284
285     typedef enum {
286         msiRunModeAdmin = 0,
287         msiRunModeAdvertise = 1,
288         msiRunModeMaintenance = 2,
289         msiRunModeRollbackEnabled = 3,
290         msiRunModeLogEnabled = 4,
291         msiRunModeOperations = 5,
292         msiRunModeRebootAtEnd = 6,
293         msiRunModeRebootNow = 7,
294         msiRunModeCabinet = 8,
295         msiRunModeSourceShortNames = 9,
296         msiRunModeTargetShortNames = 10,
297         msiRunModeWindows9x = 12,
298         msiRunModeZawEnabled = 13,
299         msiRunModeScheduled = 16,
300         msiRunModeRollback = 17,
301         msiRunModeCommit = 18
302     } MsiRunMode;
303
304     typedef enum {
305         msiEvaluateConditionFalse = 0,
306         msiEvaluateConditionTrue = 1,
307         msiEvaluateConditionNone = 2,
308         msiEvaluateConditionError = 3
309     } _MsiEvaluateCondition;           /* Added underscore to avoid conflict with function name */
310
311     [ uuid(000C109E-0000-0000-C000-000000000046) ]
312     dispinterface Session
313     {
314     properties:
315     methods:
316         [id(DISPID_SESSION_INSTALLER), propget]
317             Installer *Installer();
318         [id(DISPID_SESSION_PROPERTY), propget]
319             BSTR Property([in] BSTR Name);
320         [id(DISPID_SESSION_PROPERTY), propput]
321             void Property(
322                 [in] BSTR Name,
323                 [in] BSTR rhs);
324         [id(DISPID_SESSION_LANGUAGE), propget]
325             long Language();
326         [id(DISPID_SESSION_MODE), propget]
327             VARIANT_BOOL Mode([in] MsiRunMode Flag);
328         [id(DISPID_SESSION_MODE), propput]
329             void Mode(
330                 [in] MsiRunMode Flag,
331                 [in] VARIANT_BOOL rhs);
332         [id(DISPID_SESSION_DATABASE), propget]
333             Database* Database();
334         [id(DISPID_SESSION_DOACTION)]
335             MsiDoActionStatus DoAction([in] BSTR Action);
336         [id(DISPID_SESSION_EVALUATECONDITION)]
337             _MsiEvaluateCondition EvaluateCondition([in] BSTR Expression);
338         [id(DISPID_SESSION_FEATURECURRENTSTATE), propget]
339             MsiInstallState FeatureCurrentState([in] BSTR Feature);
340         [id(DISPID_SESSION_FEATUREREQUESTSTATE), propget]
341             MsiInstallState FeatureRequestState([in] BSTR Feature);
342         [id(DISPID_SESSION_FEATUREREQUESTSTATE), propput]
343             void FeatureRequestState(
344                 [in] BSTR Feature,
345                 [in] MsiInstallState rhs);
346         [id(DISPID_SESSION_SETINSTALLLEVEL)]
347             void SetInstallLevel([in] long Level);
348     }
349
350     [ uuid(000C109F-0000-0000-C000-000000000046) ]
351     dispinterface FeatureInfo
352     {
353         properties:
354         methods:
355     }
356
357     [ uuid(000C10A0-0000-0000-C000-000000000046) ]
358     dispinterface Product
359     {
360         properties:
361         methods:
362     }
363
364     [ uuid(000C10A1-0000-0000-C000-000000000046) ]
365     dispinterface Patch
366     {
367         properties:
368         methods:
369     }
370 }