save old text color during a call of DrawCaptionTempW
[wine/kumbayo.git] / dlls / msxml3 / schema.c
blob0eec06ccf81878bbddbffed20bc484ef5298175f
1 /*
2 * Schema cache implementation
4 * Copyright 2007 Huw Davies
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #define COBJMACROS
23 #include "config.h"
25 #include <stdarg.h>
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "ole2.h"
30 #include "msxml2.h"
32 #include "wine/debug.h"
34 #include "msxml_private.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(msxml);
39 typedef struct
41 const struct IXMLDOMSchemaCollectionVtbl *lpVtbl;
42 LONG ref;
43 } schema_t;
45 static inline schema_t *impl_from_IXMLDOMSchemaCollection( IXMLDOMSchemaCollection *iface )
47 return (schema_t *)((char*)iface - FIELD_OFFSET(schema_t, lpVtbl));
50 static HRESULT WINAPI schema_cache_QueryInterface( IXMLDOMSchemaCollection *iface, REFIID riid, void** ppvObject )
52 schema_t *This = impl_from_IXMLDOMSchemaCollection( iface );
54 TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject );
56 if ( IsEqualIID( riid, &IID_IUnknown ) ||
57 IsEqualIID( riid, &IID_IDispatch ) ||
58 IsEqualIID( riid, &IID_IXMLDOMSchemaCollection ) )
60 *ppvObject = iface;
62 else
64 FIXME("interface %s not implemented\n", debugstr_guid(riid));
65 return E_NOINTERFACE;
68 IXMLDOMSchemaCollection_AddRef( iface );
70 return S_OK;
73 static ULONG WINAPI schema_cache_AddRef( IXMLDOMSchemaCollection *iface )
75 schema_t *This = impl_from_IXMLDOMSchemaCollection( iface );
76 LONG ref = InterlockedIncrement( &This->ref );
77 TRACE("%p new ref %d\n", This, ref);
78 return ref;
81 static ULONG WINAPI schema_cache_Release( IXMLDOMSchemaCollection *iface )
83 schema_t *This = impl_from_IXMLDOMSchemaCollection( iface );
84 LONG ref = InterlockedDecrement( &This->ref );
85 TRACE("%p new ref %d\n", This, ref);
87 if ( ref == 0 )
89 HeapFree( GetProcessHeap(), 0, This );
92 return ref;
95 static HRESULT WINAPI schema_cache_GetTypeInfoCount( IXMLDOMSchemaCollection *iface, UINT* pctinfo )
97 FIXME("\n");
98 return E_NOTIMPL;
101 static HRESULT WINAPI schema_cache_GetTypeInfo( IXMLDOMSchemaCollection *iface,
102 UINT iTInfo, LCID lcid, ITypeInfo** ppTInfo )
104 FIXME("\n");
105 return E_NOTIMPL;
108 static HRESULT WINAPI schema_cache_GetIDsOfNames( IXMLDOMSchemaCollection *iface,
109 REFIID riid,
110 LPOLESTR* rgszNames,
111 UINT cNames,
112 LCID lcid,
113 DISPID* rgDispId )
115 FIXME("\n");
116 return E_NOTIMPL;
119 static HRESULT WINAPI schema_cache_Invoke( IXMLDOMSchemaCollection *iface,
120 DISPID dispIdMember,
121 REFIID riid,
122 LCID lcid,
123 WORD wFlags,
124 DISPPARAMS* pDispParams,
125 VARIANT* pVarResult,
126 EXCEPINFO* pExcepInfo,
127 UINT* puArgErr )
129 FIXME("\n");
130 return E_NOTIMPL;
133 static HRESULT WINAPI schema_cache_add( IXMLDOMSchemaCollection *iface, BSTR uri, VARIANT var )
135 FIXME("(%p)->(%s, var(vt %x)): stub\n", iface, debugstr_w(uri), V_VT(&var));
136 return S_OK;
139 static HRESULT WINAPI schema_cache_get( IXMLDOMSchemaCollection *iface, BSTR uri, IXMLDOMNode **node )
141 FIXME("stub\n");
142 return E_NOTIMPL;
145 static HRESULT WINAPI schema_cache_remove( IXMLDOMSchemaCollection *iface, BSTR uri )
147 FIXME("stub\n");
148 return E_NOTIMPL;
151 static HRESULT WINAPI schema_cache_get_length( IXMLDOMSchemaCollection *iface, long *length )
153 FIXME("stub\n");
154 return E_NOTIMPL;
157 static HRESULT WINAPI schema_cache_get_namespaceURI( IXMLDOMSchemaCollection *iface, long index, BSTR *len )
159 FIXME("stub\n");
160 return E_NOTIMPL;
163 static HRESULT WINAPI schema_cache_addCollection( IXMLDOMSchemaCollection *iface, IXMLDOMSchemaCollection *otherCollection )
165 FIXME("stub\n");
166 return E_NOTIMPL;
169 static HRESULT WINAPI schema_cache_get__newEnum( IXMLDOMSchemaCollection *iface, IUnknown **ppUnk )
171 FIXME("stub\n");
172 return E_NOTIMPL;
175 static const struct IXMLDOMSchemaCollectionVtbl schema_vtbl =
177 schema_cache_QueryInterface,
178 schema_cache_AddRef,
179 schema_cache_Release,
180 schema_cache_GetTypeInfoCount,
181 schema_cache_GetTypeInfo,
182 schema_cache_GetIDsOfNames,
183 schema_cache_Invoke,
184 schema_cache_add,
185 schema_cache_get,
186 schema_cache_remove,
187 schema_cache_get_length,
188 schema_cache_get_namespaceURI,
189 schema_cache_addCollection,
190 schema_cache_get__newEnum
193 HRESULT SchemaCache_create(IUnknown *pUnkOuter, LPVOID *ppObj)
195 schema_t *schema = HeapAlloc( GetProcessHeap(), 0, sizeof (*schema) );
196 if( !schema )
197 return E_OUTOFMEMORY;
199 schema->lpVtbl = &schema_vtbl;
200 schema->ref = 1;
202 *ppObj = &schema->lpVtbl;
203 return S_OK;