Nikolay Sivov | ea762fd | 2010-01-18 23:43:11 +0300 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2010 Nikolay Sivov |
| 3 | * |
| 4 | * This library is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU Lesser General Public |
| 6 | * License as published by the Free Software Foundation; either |
| 7 | * version 2.1 of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This library is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | * Lesser General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Lesser General Public |
| 15 | * License along with this library; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
| 17 | */ |
| 18 | |
| 19 | import "unknwn.idl"; |
| 20 | import "objidl.idl"; |
| 21 | import "oaidl.idl"; |
| 22 | |
| 23 | typedef enum XmlNodeType { |
| 24 | XmlNodeType_None = 0, |
| 25 | XmlNodeType_Element = 1, |
| 26 | XmlNodeType_Attribute = 2, |
| 27 | XmlNodeType_Text = 3, |
| 28 | XmlNodeType_CDATA = 4, |
| 29 | XmlNodeType_ProcessingInstruction = 7, |
| 30 | XmlNodeType_Comment = 8, |
| 31 | XmlNodeType_DocumentType = 10, |
| 32 | XmlNodeType_Whitespace = 13, |
| 33 | XmlNodeType_EndElement = 15, |
| 34 | XmlNodeType_XmlDeclaration = 17, |
| 35 | _XmlNodeType_Last = 17 |
| 36 | } XmlNodeType; |
| 37 | |
| 38 | /* IXmlReader */ |
| 39 | [ |
| 40 | local, |
| 41 | object, |
| 42 | uuid(7279fc81-709d-4095-b63d-69fe4b0d9030), |
| 43 | pointer_default(unique) |
| 44 | ] |
| 45 | interface IXmlReader : IUnknown |
| 46 | { |
| 47 | HRESULT SetInput( [in] IUnknown *input); |
| 48 | HRESULT GetProperty( [in] UINT property, [out] LONG_PTR *value); |
| 49 | HRESULT SetProperty( [in] UINT property, [in] LONG_PTR value); |
| 50 | HRESULT Read( [out] XmlNodeType *node_type); |
| 51 | HRESULT GetNodeType( [out] XmlNodeType *node_type); |
| 52 | HRESULT MoveToFirstAttribute(void); |
| 53 | HRESULT MoveToNextAttribute(void); |
| 54 | HRESULT MoveToAttributeByName( [in] LPCWSTR local_name, |
| 55 | [in] LPCWSTR namespaceUri); |
| 56 | HRESULT MoveToElement(void); |
| 57 | HRESULT GetQualifiedName( [out] LPCWSTR *qualifiedName, |
| 58 | [out] UINT *qualifiedName_length); |
| 59 | HRESULT GetNamespaceUri( [out] LPCWSTR *namespaceUri, |
| 60 | [out] UINT *nnamespaceUri_length); |
| 61 | HRESULT GetLocalName( [out] LPCWSTR *local_name, |
| 62 | [out] UINT *locale_name_length); |
| 63 | HRESULT GetPrefix( [out] LPCWSTR *prefix, |
| 64 | [out] UINT *prefix_length); |
| 65 | HRESULT GetValue( [out] LPCWSTR *value, |
| 66 | [out] UINT *value_length); |
| 67 | HRESULT ReadValueChunk( [out] WCHAR *buffer, |
| 68 | [in] UINT chunk_size, |
| 69 | [in,out] UINT *read); |
| 70 | HRESULT GetBaseUri( [out] LPCWSTR *baseUri, |
| 71 | [out] UINT *baseUri_length); |
| 72 | BOOL IsDefault(void); |
| 73 | BOOL IsEmptyElement(void); |
| 74 | HRESULT GetLineNumber( [out] UINT *lineNumber); |
| 75 | HRESULT GetLinePosition( [out] UINT *linePosition); |
| 76 | HRESULT GetAttributeCount( [out] UINT *attributeCount); |
| 77 | HRESULT GetDepth( [out] UINT *depth); |
| 78 | BOOL IsEOF(void); |
| 79 | } |
| 80 | |
| 81 | /* IXmlReader construction */ |
| 82 | cpp_quote("STDAPI CreateXmlReader(REFIID riid, void **ppvObject, IMalloc *pMalloc);") |