xref: /reactos/sdk/include/psdk/msxml.idl (revision 8a978a17)
1/*
2 * Copyright (C) 2005 Mike McCormack
3 * Copyright (C) 2005 Vijay Kiran Kamuju
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 <msxmldid.h>
21#include <msxml2did.h>
22#include <idispids.h>
23
24#ifndef DO_NO_IMPORTS
25import "unknwn.idl";
26import "wtypes.idl";
27import "objidl.idl";
28import "oaidl.idl";
29#endif
30
31[
32    uuid(d63e0ce2-a0a2-11d0-9c02-00c04fc99c8e),
33    version(2.0),
34    helpstring("Microsoft XML, v2.0")
35]
36library MSXML
37{
38
39importlib("stdole2.tlb");
40
41#include <xmldom.idl>
42#include <xmldso.idl>
43
44[
45local,
46object,
47odl,
48dual,
49oleautomation,
50uuid(65725580-9b5d-11d0-9bfe-00c04fc99c8e)
51]
52interface IXMLElementCollection : IDispatch
53{
54    [propput, id(DISPID_XMLELEMENTCOLLECTION_LENGTH)]
55    HRESULT length( [in] LONG v );
56
57    [propget, id(DISPID_XMLELEMENTCOLLECTION_LENGTH)]
58    HRESULT length( [retval, out] LONG *p );
59
60    [propget, id(DISPID_XMLELEMENTCOLLECTION_NEWENUM)]
61    HRESULT _newEnum( [retval, out] IUnknown ** ppUnk );
62
63    [id(DISPID_XMLELEMENTCOLLECTION_ITEM)]
64    HRESULT item(
65            [optional, in] VARIANT var1,
66            [optional, in] VARIANT var2,
67            [retval, out] IDispatch ** ppDisp );
68}
69
70[
71local,
72object,
73uuid(3f7f31ac-e15f-11d0-9c25-00c04fc99c8e)
74]
75interface IXMLElement : IDispatch
76{
77    [propget, id(DISPID_XMLELEMENT_TAGNAME)]
78    HRESULT tagName( [retval, out] BSTR *p);
79
80    [propput, id(DISPID_XMLELEMENT_TAGNAME)]
81    HRESULT tagName( [in] BSTR p );
82
83    [propget, id(DISPID_XMLELEMENT_PARENT)]
84    HRESULT parent( [retval, out] IXMLElement **parent );
85
86    [id(DISPID_XMLELEMENT_SETATTRIBUTE)]
87    HRESULT setAttribute(
88            [in] BSTR strPropertyName,
89            [in] VARIANT PropertyValue );
90
91    [id(DISPID_XMLELEMENT_GETATTRIBUTE)]
92    HRESULT getAttribute(
93            [in] BSTR strPropertyName,
94            [retval, out] VARIANT *PropertyValue );
95
96    [id(DISPID_XMLELEMENT_REMOVEATTRIBUTE)]
97    HRESULT removeAttribute(
98            [in] BSTR strPropertyName );
99
100    [propget, id(DISPID_XMLELEMENT_CHILDREN)]
101    HRESULT children( [retval, out] IXMLElementCollection **p );
102
103    [propget, id(DISPID_XMLELEMENT_TYPE)]
104    HRESULT type( [retval, out] LONG *p );
105
106    [propget, id(DISPID_XMLELEMENT_TEXT)]
107    HRESULT text( [retval, out] BSTR *p );
108
109    [propput, id(DISPID_XMLELEMENT_TEXT)]
110    HRESULT text( [in] BSTR p );
111
112    [id(DISPID_XMLELEMENT_ADDCHILD)]
113    HRESULT addChild(
114            [in] IXMLElement *pChildElem,
115            [in] LONG lIndex,
116            [in] LONG lreserved );
117
118    [id(DISPID_XMLELEMENT_REMOVECHILD)]
119    HRESULT removeChild(
120            [in] IXMLElement *pChildElem );
121}
122
123[
124local,
125object,
126uuid(f52e2b61-18a1-11d1-b105-00805f49916b)
127]
128interface IXMLDocument : IDispatch
129{
130    [propget, id(DISPID_XMLDOCUMENT_ROOT)]
131    HRESULT root( [retval, out] IXMLElement **p );
132
133    [propget, id(DISPID_XMLDOCUMENT_FILESIZE)]
134    HRESULT fileSize( [retval, out] BSTR *p );
135
136    [propget, id(DISPID_XMLDOCUMENT_FILEMODIFIEDDATE)]
137    HRESULT fileModifiedDate( [retval, out] BSTR *p );
138
139    [propget, id(DISPID_XMLDOCUMENT_FILEUPDATEDDATE)]
140    HRESULT fileUpdatedDate( [retval, out] BSTR *p );
141
142    [propget, id(DISPID_XMLDOCUMENT_URL)]
143    HRESULT URL( [retval, out] BSTR *p );
144
145    [propput, id(DISPID_XMLDOCUMENT_URL)]
146    HRESULT URL( [in] BSTR p );
147
148    [propget, id(DISPID_XMLDOCUMENT_MIMETYPE)]
149    HRESULT mimeType( [retval, out] BSTR *p );
150
151    [propget, id(DISPID_XMLDOCUMENT_READYSTATE)]
152    HRESULT readyState( [retval, out] LONG *p );
153
154    [propget, id(DISPID_XMLDOCUMENT_CHARSET)]
155    HRESULT charset( [retval, out] BSTR *p );
156
157    [propput, id(DISPID_XMLDOCUMENT_CHARSET)]
158    HRESULT charset( [in] BSTR p );
159
160    [propget, id(DISPID_XMLDOCUMENT_VERSION)]
161    HRESULT version( [retval, out] BSTR *p );
162
163    [propget, id(DISPID_XMLDOCUMENT_DOCTYPE)]
164    HRESULT doctype( [retval, out] BSTR *p );
165
166    [propget, id(DISPID_XMLDOCUMENT_DTDURL)]
167    HRESULT dtdURl( [retval, out] BSTR *p );
168
169    [id(DISPID_XMLDOCUMENT_CREATEELEMENT)]
170    HRESULT createElement(
171            [in] VARIANT vType,
172            [optional, in] VARIANT var1,
173            [retval, out] IXMLElement **ppElem );
174}
175
176[
177local,
178object,
179uuid(2B8DE2FF-8D2D-11d1-B2FC-00C04FD915A9)
180]
181interface IXMLElement2 : IDispatch
182{
183    [propget, id(DISPID_XMLELEMENT_TAGNAME)]
184    HRESULT tagName([retval, out] BSTR *p);
185
186    [propput, id(DISPID_XMLELEMENT_TAGNAME)]
187    HRESULT tagName([in] BSTR p);
188
189    [propget, id(DISPID_XMLELEMENT_PARENT)]
190    HRESULT parent([retval, out]IXMLElement2 **ppParent);
191
192    [id(DISPID_XMLELEMENT_SETATTRIBUTE)]
193    HRESULT setAttribute(
194        [in] BSTR strPropertyName,
195        [in] VARIANT PropertyValue);
196
197    [id(DISPID_XMLELEMENT_GETATTRIBUTE)]
198    HRESULT getAttribute(
199        [in] BSTR strPropertyName,
200        [retval, out] VARIANT *PropertyValue);
201
202    [id(DISPID_XMLELEMENT_REMOVEATTRIBUTE)]
203    HRESULT removeAttribute([in] BSTR strPropertyName);
204
205    [propget, id(DISPID_XMLELEMENT_CHILDREN)]
206    HRESULT children([retval, out] IXMLElementCollection **pp);
207
208    [propget, id(DISPID_XMLELEMENT_TYPE)]
209    HRESULT type([retval, out] LONG *plType);
210
211    [propget, id(DISPID_XMLELEMENT_TEXT)]
212    HRESULT text([retval, out] BSTR *p);
213
214    [propput, id(DISPID_XMLELEMENT_TEXT)]
215    HRESULT text([in] BSTR p);
216
217    [id(DISPID_XMLELEMENT_ADDCHILD)]
218    HRESULT addChild(
219        [in] IXMLElement2 *pChildElem,
220        [in] LONG lIndex,
221        [in] LONG lReserved);
222
223    [id(DISPID_XMLELEMENT_REMOVECHILD)]
224    HRESULT removeChild([in]IXMLElement2 *pChildElem);
225
226    [propget, id(DISPID_XMLELEMENT_ATTRIBUTES)]
227    HRESULT attributes([retval, out] IXMLElementCollection **pp);
228}
229
230[
231local,
232object,
233uuid(2B8DE2FE-8D2D-11d1-B2FC-00C04FD915A9)
234]
235interface IXMLDocument2 : IDispatch
236{
237    [propget, id(DISPID_XMLDOCUMENT_ROOT)]
238    HRESULT root([retval, out] IXMLElement2 **p);
239
240    [propget, id(DISPID_XMLDOCUMENT_FILESIZE)]
241    HRESULT fileSize([retval, out] BSTR *p);
242
243    [propget, id(DISPID_XMLDOCUMENT_FILEMODIFIEDDATE)]
244    HRESULT fileModifiedDate([retval, out] BSTR *p);
245
246    [propget, id(DISPID_XMLDOCUMENT_FILEUPDATEDDATE)]
247    HRESULT fileUpdatedDate([retval, out] BSTR *p);
248
249    [propget, id(DISPID_XMLDOCUMENT_URL)]
250    HRESULT URL([retval, out] BSTR *p);
251
252    [propput, id(DISPID_XMLDOCUMENT_URL)]
253    HRESULT URL([in] BSTR p);
254
255    [propget, id(DISPID_XMLDOCUMENT_MIMETYPE)]
256    HRESULT mimeType([retval, out] BSTR *p);
257
258    [propget, id(DISPID_XMLDOCUMENT_READYSTATE)]
259    HRESULT readyState([retval, out]LONG *pl);
260
261    [propget, id(DISPID_XMLDOCUMENT_CHARSET)]
262    HRESULT charset([retval, out]BSTR *p);
263
264    [propput, id(DISPID_XMLDOCUMENT_CHARSET)]
265    HRESULT charset([in]BSTR p);
266
267    [propget, id(DISPID_XMLDOCUMENT_VERSION)]
268    HRESULT version([retval, out]BSTR *p);
269
270    [propget, id(DISPID_XMLDOCUMENT_DOCTYPE)]
271    HRESULT doctype([retval, out]BSTR *p);
272
273    [propget, restricted, id(DISPID_XMLDOCUMENT_DTDURL)]
274    HRESULT dtdURL([retval, out]BSTR *p);
275
276    [id(DISPID_XMLDOCUMENT_CREATEELEMENT)]
277    HRESULT createElement(
278        [in] VARIANT vType,
279        [optional, in] VARIANT var,
280        [retval, out] IXMLElement2 **ppElem);
281
282    [propget, id(DISPID_XMLDOCUMENT_ASYNC)]
283    HRESULT async([retval, out] VARIANT_BOOL *pf);
284
285    [propput, id(DISPID_XMLDOCUMENT_ASYNC)]
286    HRESULT async([in] VARIANT_BOOL f);
287}
288
289typedef enum tagXMLEMEM_TYPE {
290	XMLELEMTYPE_ELEMENT	= 0,
291	XMLELEMTYPE_TEXT 	= 1,
292	XMLELEMTYPE_COMMENT	= 2,
293	XMLELEMTYPE_DOCUMENT	= 3,
294	XMLELEMTYPE_DTD		= 4,
295	XMLELEMTYPE_PI		= 5,
296	XMLELEMTYPE_OTHER	= 6
297} XMLELEM_TYPE;
298
299typedef struct _xml_error {
300	UINT _nLine;
301	BSTR _pchBuf;
302	BSTR _cchBuf;
303	UINT _ich;
304	BSTR _pszFound;
305	BSTR _pszExpected;
306	DWORD _reserved1;
307	DWORD _reserved2;
308} XML_ERROR;
309
310[
311local,
312object,
313uuid(d4d4a0fc-3b73-11d1-b2b4-00c04fb92596)
314]
315interface IXMLAttribute : IDispatch
316{
317    [propget, id(DISPID_XMLATTRIBUTE_NAME)]
318    HRESULT name( [retval, out] BSTR *p );
319
320    [propget, id(DISPID_XMLATTRIBUTE_VALUE)]
321    HRESULT value( [retval, out] BSTR *p );
322}
323
324[
325local,
326object,
327uuid(948c5ad3-c58d-11d0-9c0b-00c04fc99c8e)
328]
329interface IXMLError : IUnknown
330{
331    HRESULT GetErrorInfo([out]XML_ERROR *pErrorReturn);
332}
333
334[
335    object,
336    local,
337    uuid(D9F1E15A-CCDB-11d0-9C0C-00C04FC99C8E)
338]
339interface IXMLElementNotificationSink : IDispatch
340{
341    [id(DISPID_XMLNOTIFSINK_CHILDADDED)]
342    HRESULT ChildAdded([in]IDispatch *pChildElem);
343}
344
345[
346    helpstring("Msxml"),
347    progid("Msxml"),
348    threading(both),
349    version(1.0),
350    uuid(cfc399af-d876-11d0-9c10-00c04fc99c8e)
351]
352coclass XMLDocument
353{
354    [default] interface IXMLDocument;
355}
356
357} /* Library MSXML */
358