msxml.idl 8.65 KB
Newer Older
Mike McCormack's avatar
Mike McCormack committed
1 2
/*
 * Copyright (C) 2005 Mike McCormack
3
 * Copyright (C) 2005 Vijay Kiran Kamuju
Mike McCormack's avatar
Mike McCormack committed
4 5 6 7 8 9 10 11 12 13 14 15 16
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * 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
Mike McCormack's avatar
Mike McCormack committed
18 19
 */

20
#include <msxmldid.h>
Mike McCormack's avatar
Mike McCormack committed
21

22
#ifndef DO_NO_IMPORTS
Mike McCormack's avatar
Mike McCormack committed
23 24 25 26
import "unknwn.idl";
import "wtypes.idl";
import "objidl.idl";
import "oaidl.idl";
27
#endif
28

Mike McCormack's avatar
Mike McCormack committed
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
[
local,
object,
odl,
dual,
oleautomation,
uuid(65725580-9b5d-11d0-9bfe-00c04fc99c8e)
]
interface IXMLElementCollection : IDispatch
{
    [propput, id(DISPID_XMLELEMENTCOLLECTION_LENGTH)]
    HRESULT length( [in] long v );

    [propget, id(DISPID_XMLELEMENTCOLLECTION_LENGTH)]
    HRESULT length( [retval, out] long *p );

    [propget, id(DISPID_XMLELEMENTCOLLECTION_NEWENUM)]
    HRESULT _newEnum( [retval, out] IUnknown ** ppUnk );

    [id(DISPID_XMLELEMENTCOLLECTION_ITEM)]
    HRESULT item(
            [optional, in] VARIANT var1,
            [optional, in] VARIANT var2,
            [retval, out] IDispatch ** ppDisp );
53
}
Mike McCormack's avatar
Mike McCormack committed
54 55 56

[
local,
57 58
object,
uuid(3f7f31ac-e15f-11d0-9c25-00c04fc99c8e)
Mike McCormack's avatar
Mike McCormack committed
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
]
interface IXMLElement : IDispatch
{
    [propget, id(DISPID_XMLELEMENT_TAGNAME)]
    HRESULT tagName( [retval, out] BSTR *p);

    [propput, id(DISPID_XMLELEMENT_TAGNAME)]
    HRESULT tagName( [in] BSTR p );

    [propget, id(DISPID_XMLELEMENT_PARENT)]
    HRESULT parent( [retval, out] IXMLElement **parent );

    [id(DISPID_XMLELEMENT_SETATTRIBUTE)]
    HRESULT setAttribute(
            [in] BSTR strPropertyName,
            [in] VARIANT PropertyValue );

    [id(DISPID_XMLELEMENT_GETATTRIBUTE)]
    HRESULT getAttribute(
            [in] BSTR strPropertyName,
            [retval, out] VARIANT *PropertyValue );

    [id(DISPID_XMLELEMENT_REMOVEATTRIBUTE)]
    HRESULT removeAttribute(
            [in] BSTR strPropertyName );

    [propget, id(DISPID_XMLELEMENT_CHILDREN)]
    HRESULT children( [retval, out] IXMLElementCollection **p );

    [propget, id(DISPID_XMLELEMENT_TYPE)]
    HRESULT type( [retval, out] long *p );

    [propget, id(DISPID_XMLELEMENT_TEXT)]
    HRESULT text( [retval, out] BSTR *p );

    [propput, id(DISPID_XMLELEMENT_TEXT)]
    HRESULT text( [in] BSTR p );

    [id(DISPID_XMLELEMENT_ADDCHILD)]
    HRESULT addChild(
            [in] IXMLElement *pChildElem,
            [in] long lIndex,
            [in] long lreserved );

    [id(DISPID_XMLELEMENT_REMOVECHILD)]
    HRESULT removeChild(
            [in] IXMLElement *pChildElem );
106
}
Mike McCormack's avatar
Mike McCormack committed
107 108 109

[
local,
110 111
object,
uuid(f52e2b61-18a1-11d1-b105-00805f49916b)
Mike McCormack's avatar
Mike McCormack committed
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
]
interface IXMLDocument : IDispatch
{
    [propget, id(DISPID_XMLDOCUMENT_ROOT)]
    HRESULT root( [retval, out] IXMLElement **p );

    [propget, id(DISPID_XMLDOCUMENT_FILESIZE)]
    HRESULT fileSize( [retval, out] BSTR *p );

    [propget, id(DISPID_XMLDOCUMENT_FILEMODIFIEDDATE)]
    HRESULT fileModifiedDate( [retval, out] BSTR *p );

    [propget, id(DISPID_XMLDOCUMENT_FILEUPDATEDDATE)]
    HRESULT fileUpdatedDate( [retval, out] BSTR *p );

    [propget, id(DISPID_XMLDOCUMENT_URL)]
    HRESULT URL( [retval, out] BSTR *p );

    [propput, id(DISPID_XMLDOCUMENT_URL)]
    HRESULT URL( [in] BSTR p );

    [propget, id(DISPID_XMLDOCUMENT_MIMETYPE)]
    HRESULT mimeType( [retval, out] BSTR *p );

    [propget, id(DISPID_XMLDOCUMENT_READYSTATE)]
    HRESULT readyState( [retval, out] long *p );

    [propget, id(DISPID_XMLDOCUMENT_CHARSET)]
    HRESULT charset( [retval, out] BSTR *p );

    [propput, id(DISPID_XMLDOCUMENT_CHARSET)]
    HRESULT charset( [in] BSTR p );

    [propget, id(DISPID_XMLDOCUMENT_VERSION)]
    HRESULT version( [retval, out] BSTR *p );

    [propget, id(DISPID_XMLDOCUMENT_DOCTYPE)]
    HRESULT doctype( [retval, out] BSTR *p );

    [propget, id(DISPID_XMLDOCUMENT_DTDURL)]
    HRESULT dtdURl( [retval, out] BSTR *p );

    [id(DISPID_XMLDOCUMENT_CREATEELEMENT)]
    HRESULT createElement(
            [in] VARIANT vType,
            [optional, in] VARIANT var1,
            [retval, out] IXMLElement **ppElem );
159
}
160

161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
[
local,
object,
uuid(2B8DE2FF-8D2D-11d1-B2FC-00C04FD915A9)
]
interface IXMLElement2 : IDispatch
{
    [propget, id(DISPID_XMLELEMENT_TAGNAME)]
    HRESULT tagName([retval, out] BSTR *p);

    [propput, id(DISPID_XMLELEMENT_TAGNAME)]
    HRESULT tagName([in] BSTR p);

    [propget, id(DISPID_XMLELEMENT_PARENT)]
    HRESULT parent([retval, out]IXMLElement2 **ppParent);

    [id(DISPID_XMLELEMENT_SETATTRIBUTE)]
    HRESULT setAttribute(
        [in] BSTR strPropertyName,
        [in] VARIANT PropertyValue);

    [id(DISPID_XMLELEMENT_GETATTRIBUTE)]
    HRESULT getAttribute(
        [in] BSTR strPropertyName,
        [retval, out] VARIANT *PropertyValue);

    [id(DISPID_XMLELEMENT_REMOVEATTRIBUTE)]
    HRESULT removeAttribute([in] BSTR strPropertyName);

    [propget, id(DISPID_XMLELEMENT_CHILDREN)]
    HRESULT children([retval, out] IXMLElementCollection **pp);

    [propget, id(DISPID_XMLELEMENT_TYPE)]
    HRESULT type([retval, out] long *plType);

    [propget, id(DISPID_XMLELEMENT_TEXT)]
    HRESULT text([retval, out] BSTR *p);

    [propput, id(DISPID_XMLELEMENT_TEXT)]
    HRESULT text([in] BSTR p);

    [id(DISPID_XMLELEMENT_ADDCHILD)]
    HRESULT addChild(
        [in] IXMLElement2 *pChildElem,
205 206
        [in] long lIndex,
        [in] long lReserved);
207 208 209 210 211 212

    [id(DISPID_XMLELEMENT_REMOVECHILD)]
    HRESULT removeChild([in]IXMLElement2 *pChildElem);

    [propget, id(DISPID_XMLELEMENT_ATTRIBUTES)]
    HRESULT attributes([retval, out] IXMLElementCollection **pp); 
213
}
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271

[
local,
object,
uuid(2B8DE2FE-8D2D-11d1-B2FC-00C04FD915A9)
]
interface IXMLDocument2 : IDispatch
{
    [propget, id(DISPID_XMLDOCUMENT_ROOT)]
    HRESULT root([retval, out] IXMLElement2 **p);

    [propget, id(DISPID_XMLDOCUMENT_FILESIZE)]
    HRESULT fileSize([retval, out] BSTR *p);

    [propget, id(DISPID_XMLDOCUMENT_FILEMODIFIEDDATE)]
    HRESULT fileModifiedDate([retval, out] BSTR *p);

    [propget, id(DISPID_XMLDOCUMENT_FILEUPDATEDDATE)]
    HRESULT fileUpdatedDate([retval, out] BSTR *p);

    [propget, id(DISPID_XMLDOCUMENT_URL)]
    HRESULT URL([retval, out] BSTR *p);

    [propput, id(DISPID_XMLDOCUMENT_URL)]
    HRESULT URL([in] BSTR p);

    [propget, id(DISPID_XMLDOCUMENT_MIMETYPE)]
    HRESULT mimeType([retval, out] BSTR *p);
   
    [propget, id(DISPID_XMLDOCUMENT_READYSTATE)]
    HRESULT readyState([retval, out]long *pl);

    [propget, id(DISPID_XMLDOCUMENT_CHARSET)]
    HRESULT charset([retval, out]BSTR *p);

    [propput, id(DISPID_XMLDOCUMENT_CHARSET)]
    HRESULT charset([in]BSTR p);

    [propget, id(DISPID_XMLDOCUMENT_VERSION)]
    HRESULT version([retval, out]BSTR *p);

    [propget, id(DISPID_XMLDOCUMENT_DOCTYPE)]
    HRESULT doctype([retval, out]BSTR *p);

    [propget, restricted, id(DISPID_XMLDOCUMENT_DTDURL)]
    HRESULT dtdURL([retval, out]BSTR *p);

    [id(DISPID_XMLDOCUMENT_CREATEELEMENT)]
    HRESULT createElement(
        [in] VARIANT vType, 
        [optional, in] VARIANT var, 
        [retval, out] IXMLElement2 **ppElem);

    [propget, id(DISPID_XMLDOCUMENT_ASYNC)]
    HRESULT async([retval, out] VARIANT_BOOL *pf);

    [propput, id(DISPID_XMLDOCUMENT_ASYNC)]
    HRESULT async([in] VARIANT_BOOL f);
272
}
273

274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294
typedef enum tagXMLEMEM_TYPE {
	XMLELEMTYPE_ELEMENT	= 0,
	XMLELEMTYPE_TEXT 	= 1,
	XMLELEMTYPE_COMMENT	= 2,
	XMLELEMTYPE_DOCUMENT	= 3,
	XMLELEMTYPE_DTD		= 4,
	XMLELEMTYPE_PI		= 5,
	XMLELEMTYPE_OTHER	= 6
} XMLELEM_TYPE;

typedef struct _xml_error {
	UINT _nLine;
	BSTR _pchBuf;
	BSTR _cchBuf;
	UINT _ich;
	BSTR _pszFound;
	BSTR _pszExpected;
	DWORD _reserved1;
	DWORD _reserved2;
} XML_ERROR;

295 296 297 298 299 300 301 302 303 304 305 306
[
local,
object,
uuid(d4d4a0fc-3b73-11d1-b2b4-00c04fb92596)
]
interface IXMLAttribute : IDispatch
{
    [propget, id(DISPID_XMLATTRIBUTE_NAME)]
    HRESULT name( [retval, out] BSTR *p );

    [propget, id(DISPID_XMLATTRIBUTE_VALUE)]
    HRESULT value( [retval, out] BSTR *p );
307
}
308

309 310 311 312 313 314 315 316
[
local,
object,
uuid(948c5ad3-c58d-11d0-9c0b-00c04fc99c8e)
]
interface IXMLError : IUnknown
{
    HRESULT GetErrorInfo([out]XML_ERROR *pErrorReturn);
317
}
318

319 320 321 322 323 324 325 326 327
[
    object,
    local,
    uuid(D9F1E15A-CCDB-11d0-9C0C-00C04FC99C8E)
]
interface IXMLElementNotificationSink : IDispatch
{
    [id(DISPID_XMLNOTIFSINK_CHILDADDED)] 
    HRESULT ChildAdded([in]IDispatch *pChildElem); 
328
}
329

330 331 332 333 334 335
[
uuid(cfc399af-d876-11d0-9c10-00c04fc99c8e)
]
coclass XMLDocument
{
    [default] interface IXMLDocument;
336
}