rpcrt4: Try a lot harder to resuse existing connections by comparing inside the RpcQu...
[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 [ uuid(000C1092-0000-0000-C000-000000000046), version(1.0) ]
27 library WindowsInstaller
28 {
29     dispinterface Installer;
30     dispinterface Record;
31     dispinterface Session;
32     dispinterface Database;
33     dispinterface SummaryInfo;
34     dispinterface View;
35     dispinterface UIPreview;
36     dispinterface FeatureInfo;
37     dispinterface RecordList;
38     dispinterface StringList;
39     dispinterface Product;
40     dispinterface Patch;
41
42     typedef enum {
43         msiInstallStateNotUsed = -7,
44         msiInstallStateBadConfig = -6,
45         msiInstallStateIncomplete = -5,
46         msiInstallStateSourceAbsent = -4,
47         msiInstallStateInvalidArg = -2,
48         msiInstallStateUnknown = -1,
49         msiInstallStateBroken = 0,
50         msiInstallStateAdvertised = 1,
51         msiInstallStateRemoved = 1,
52         msiInstallStateAbsent = 2,
53         msiInstallStateLocal = 3,
54         msiInstallStateSource = 4,
55         msiInstallStateDefault = 5
56     } MsiInstallState;
57
58     typedef enum {
59         msiOpenDatabaseModeReadOnly = 0,
60         msiOpenDatabaseModeTransact = 1,
61         msiOpenDatabaseModeDirect = 2,
62         msiOpenDatabaseModeCreate = 3,
63         msiOpenDatabaseModeCreateDirect = 4,
64         msiOpenDatabaseModePatchFile = 32
65     } MsiOpenDatabaseMode;
66
67     [ uuid(000C1090-0000-0000-C000-000000000046) ]
68     dispinterface Installer
69     {
70     properties:
71     methods:
72         [id(DISPID_INSTALLER_CREATERECORD)]
73             Record *CreateRecord([in] long Count);
74         [id(DISPID_INSTALLER_OPENPACKAGE)]
75             Session* OpenPackage(
76                 [in] VARIANT PackagePath,
77                 [in, optional, defaultvalue(0)] long Options);
78         [id(DISPID_INSTALLER_OPENDATABASE)]
79             Database *OpenDatabase(
80                     [in] BSTR DatabasePath,
81                     [in] VARIANT OpenMode);
82         [id(DISPID_INSTALLER_INSTALLPRODUCT)]
83             void InstallProduct(
84                 [in] BSTR PackagePath,
85                 [in, optional, defaultvalue("0")] BSTR PropertyValues);
86         [id(DISPID_INSTALLER_REGISTRYVALUE), propget]
87             BSTR RegistryValue(
88                 [in] VARIANT Root,
89                 [in] BSTR Key,
90                 [in, optional] VARIANT Value);
91         [id(DISPID_INSTALLER_PRODUCTSTATE), propget]
92             MsiInstallState ProductState(
93                 [in] BSTR Product);
94         [id(DISPID_INSTALLER_PRODUCTINFO), propget]
95             BSTR ProductInfo(
96                 [in] BSTR Product,
97                 [in] BSTR Attribute);
98         [id(DISPID_INSTALLER_PRODUCTS), propget]
99             StringList *Products();
100         [id(DISPID_INSTALLER_RELATEDPRODUCTS), propget]
101             StringList *RelatedProducts(
102                 [in] BSTR UpgradeCode);
103     }
104
105     [ uuid(000C1093-0000-0000-C000-000000000046) ]
106     dispinterface Record
107     {
108     properties:
109     methods:
110         [id(DISPID_RECORD_STRINGDATA), propget]
111             BSTR StringData([in] long Field);
112         [id(DISPID_RECORD_STRINGDATA), propput]
113             void StringData(
114                 [in] long Field,
115                 [in] BSTR rhs);
116         [id(DISPID_RECORD_INTEGERDATA), propget]
117             long IntegerData([in] long Field);
118         [id(DISPID_RECORD_INTEGERDATA), propput]
119             void IntegerData(
120                 [in] long Field,
121                 [in] long rhs);
122         [id(DISPID_RECORD_FIELDCOUNT), propget]
123             long FieldCount();
124     }
125
126     [ uuid(000C1095-0000-0000-C000-000000000046) ]
127     dispinterface StringList
128     {
129         properties:
130         methods:
131         [id(DISPID_LIST__NEWENUM)]
132             IUnknown _NewEnum();
133         [id(DISPID_LIST_ITEM), propget]
134             BSTR Item(long Index);
135         [id(DISPID_LIST_COUNT), propget]
136             long Count();
137     }
138
139     [ uuid(000C1096-0000-0000-C000-000000000046) ]
140     dispinterface RecordList
141     {
142         properties:
143         methods:
144     }
145
146     [ uuid(000C109A-0000-0000-C000-000000000046) ]
147     dispinterface UIPreview
148     {
149         properties:
150         methods:
151     }
152
153     [ uuid(000C109B-0000-0000-C000-000000000046) ]
154     dispinterface SummaryInfo
155     {
156         properties:
157         methods:
158         [id(DISPID_SUMMARYINFO_PROPERTY), propget]
159             VARIANT Property([in] long Pid);
160         [id(DISPID_SUMMARYINFO_PROPERTY), propput]
161             void Property(
162                 [in] long Pid,
163                 [in] VARIANT rhs);
164         [id(DISPID_SUMMARYINFO_PROPERTYCOUNT), propget]
165             long PropertyCount();
166     }
167
168     typedef enum {
169         msiViewModifySeek = -1,
170         msiViewModifyRefresh = 0,
171         msiViewModifyInsert = 1,
172         msiViewModifyUpdate = 2,
173         msiViewModifyAssign = 3,
174         msiViewModifyReplace = 4,
175         msiViewModifyMerge = 5,
176         msiViewModifyDelete = 6,
177         msiViewModifyInsertTemporary = 7,
178         msiViewModifyValidate = 8,
179         msiViewModifyValidateNew = 9,
180         msiViewModifyValidateField = 10,
181         msiViewModifyValidateDelete = 11,
182     } _MsiViewModify;                                /* Added underscore to avoid conflict with function name */
183
184     [ uuid(000C109C-0000-0000-C000-000000000046) ]
185     dispinterface View
186     {
187         properties:
188         methods:
189         [id(DISPID_VIEW_EXECUTE)]
190             void Execute([in, optional, defaultvalue(0)] Record *Params);
191         [id(DISPID_VIEW_FETCH)]
192             Record* Fetch();
193         [id(DISPID_VIEW_MODIFY)]
194             void Modify(
195                 [in] _MsiViewModify Mode,
196                 Record *Record);
197         [id(DISPID_VIEW_CLOSE)]
198             void Close();
199     }
200
201     [ uuid(000C109D-0000-0000-C000-000000000046) ]
202     dispinterface Database
203     {
204         properties:
205         methods:
206         [id(DISPID_DATABASE_OPENVIEW)]
207             View* OpenView([in] BSTR Sql);
208         [id(DISPID_DATABASE_SUMMARYINFORMATION), propget]
209             SummaryInfo *SummaryInformation([in, optional, defaultvalue(0)] long UpdateCount);
210     }
211
212     typedef enum {
213         msiDoActionStatusNoAction = 0,
214         msiDoActionStatusSuccess = 1,
215         msiDoActionStatusUserExit = 2,
216         msiDoActionStatusFailure = 3,
217         msiDoActionStatusSuspend = 4,
218         msiDoActionStatusFinished = 5,
219         msiDoActionStatusWrongState = 6,
220         msiDoActionStatusBadActionData = 7
221     } MsiDoActionStatus;
222
223     typedef enum {
224         msiRunModeAdmin = 0,
225         msiRunModeAdvertise = 1,
226         msiRunModeMaintenance = 2,
227         msiRunModeRollbackEnabled = 3,
228         msiRunModeLogEnabled = 4,
229         msiRunModeOperations = 5,
230         msiRunModeRebootAtEnd = 6,
231         msiRunModeRebootNow = 7,
232         msiRunModeCabinet = 8,
233         msiRunModeSourceShortNames = 9,
234         msiRunModeTargetShortNames = 10,
235         msiRunModeWindows9x = 12,
236         msiRunModeZawEnabled = 13,
237         msiRunModeScheduled = 16,
238         msiRunModeRollback = 17,
239         msiRunModeCommit = 18
240     } MsiRunMode;
241
242     typedef enum {
243         msiEvaluateConditionFalse = 0,
244         msiEvaluateConditionTrue = 1,
245         msiEvaluateConditionNone = 2,
246         msiEvaluateConditionError = 3
247     } _MsiEvaluateCondition;           /* Added underscore to avoid conflict with function name */
248
249     [ uuid(000C109E-0000-0000-C000-000000000046) ]
250     dispinterface Session
251     {
252     properties:
253     methods:
254         [id(DISPID_SESSION_INSTALLER), propget]
255             Installer *Installer();
256         [id(DISPID_SESSION_PROPERTY), propget]
257             BSTR Property([in] BSTR Name);
258         [id(DISPID_SESSION_PROPERTY), propput]
259             void Property(
260                 [in] BSTR Name,
261                 [in] BSTR rhs);
262         [id(DISPID_SESSION_LANGUAGE), propget]
263             long Language();
264         [id(DISPID_SESSION_MODE), propget]
265             VARIANT_BOOL Mode([in] MsiRunMode Flag);
266         [id(DISPID_SESSION_MODE), propput]
267             void Mode(
268                 [in] MsiRunMode Flag,
269                 [in] VARIANT_BOOL rhs);
270         [id(DISPID_SESSION_DATABASE), propget]
271             Database* Database();
272         [id(DISPID_SESSION_DOACTION)]
273             MsiDoActionStatus DoAction([in] BSTR Action);
274         [id(DISPID_SESSION_EVALUATECONDITION)]
275             _MsiEvaluateCondition EvaluateCondition([in] BSTR Expression);
276         [id(DISPID_SESSION_FEATURECURRENTSTATE), propget]
277             MsiInstallState FeatureCurrentState([in] BSTR Feature);
278         [id(DISPID_SESSION_FEATUREREQUESTSTATE), propget]
279             MsiInstallState FeatureRequestState([in] BSTR Feature);
280         [id(DISPID_SESSION_FEATUREREQUESTSTATE), propput]
281             void FeatureRequestState(
282                 [in] BSTR Feature,
283                 [in] MsiInstallState rhs);
284         [id(DISPID_SESSION_SETINSTALLLEVEL)]
285             void SetInstallLevel([in] long Level);
286     }
287
288     [ uuid(000C109F-0000-0000-C000-000000000046) ]
289     dispinterface FeatureInfo
290     {
291         properties:
292         methods:
293     }
294
295     [ uuid(000C10A0-0000-0000-C000-000000000046) ]
296     dispinterface Product
297     {
298         properties:
299         methods:
300     }
301
302     [ uuid(000C10A1-0000-0000-C000-000000000046) ]
303     dispinterface Patch
304     {
305         properties:
306         methods:
307     }
308 }