msxml: Add IXSLTemplate stub.
This commit is contained in:
parent
af5423ef57
commit
c406b888aa
|
@ -27,6 +27,7 @@ C_SRCS = \
|
||||||
queryresult.c \
|
queryresult.c \
|
||||||
saxreader.c \
|
saxreader.c \
|
||||||
schema.c \
|
schema.c \
|
||||||
|
stylesheet.c \
|
||||||
text.c \
|
text.c \
|
||||||
uuid.c \
|
uuid.c \
|
||||||
xdr.c \
|
xdr.c \
|
||||||
|
|
|
@ -81,6 +81,7 @@ static REFIID tid_ids[] = {
|
||||||
&IID_IXMLDOMDocument,
|
&IID_IXMLDOMDocument,
|
||||||
&IID_IXMLDOMDocument2,
|
&IID_IXMLDOMDocument2,
|
||||||
&IID_IXMLDOMDocumentFragment,
|
&IID_IXMLDOMDocumentFragment,
|
||||||
|
&IID_IXMLDOMDocumentType,
|
||||||
&IID_IXMLDOMElement,
|
&IID_IXMLDOMElement,
|
||||||
&IID_IXMLDOMEntityReference,
|
&IID_IXMLDOMEntityReference,
|
||||||
&IID_IXMLDOMImplementation,
|
&IID_IXMLDOMImplementation,
|
||||||
|
@ -95,6 +96,7 @@ static REFIID tid_ids[] = {
|
||||||
&IID_IXMLElement,
|
&IID_IXMLElement,
|
||||||
&IID_IXMLDOMDocument,
|
&IID_IXMLDOMDocument,
|
||||||
&IID_IXMLHTTPRequest,
|
&IID_IXMLHTTPRequest,
|
||||||
|
&IID_IXSLTemplate,
|
||||||
&IID_IVBSAXAttributes,
|
&IID_IVBSAXAttributes,
|
||||||
&IID_IVBSAXContentHandler,
|
&IID_IVBSAXContentHandler,
|
||||||
&IID_IVBSAXDeclHandler,
|
&IID_IVBSAXDeclHandler,
|
||||||
|
|
|
@ -206,6 +206,7 @@ static HRESULT DOMClassFactory_Create(const GUID *clsid, REFIID riid, void **ppv
|
||||||
static ClassFactory xmldoccf = { &ClassFactoryVtbl, XMLDocument_create };
|
static ClassFactory xmldoccf = { &ClassFactoryVtbl, XMLDocument_create };
|
||||||
static ClassFactory saxreadcf = { &ClassFactoryVtbl, SAXXMLReader_create };
|
static ClassFactory saxreadcf = { &ClassFactoryVtbl, SAXXMLReader_create };
|
||||||
static ClassFactory httpreqcf = { &ClassFactoryVtbl, XMLHTTPRequest_create };
|
static ClassFactory httpreqcf = { &ClassFactoryVtbl, XMLHTTPRequest_create };
|
||||||
|
static ClassFactory xsltemplatecf = { &ClassFactoryVtbl, XSLTemplate_create };
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
* DllGetClassObject (MSXML3.@)
|
* DllGetClassObject (MSXML3.@)
|
||||||
|
@ -261,6 +262,14 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID riid, void **ppv )
|
||||||
{
|
{
|
||||||
cf = (IClassFactory*) &httpreqcf.lpVtbl;
|
cf = (IClassFactory*) &httpreqcf.lpVtbl;
|
||||||
}
|
}
|
||||||
|
else if( IsEqualCLSID( rclsid, &CLSID_XSLTemplate ) ||
|
||||||
|
IsEqualCLSID( rclsid, &CLSID_XSLTemplate26 ) ||
|
||||||
|
IsEqualCLSID( rclsid, &CLSID_XSLTemplate30 ) ||
|
||||||
|
IsEqualCLSID( rclsid, &CLSID_XSLTemplate40 ) ||
|
||||||
|
IsEqualCLSID( rclsid, &CLSID_XSLTemplate60 ))
|
||||||
|
{
|
||||||
|
cf = (IClassFactory*) &xsltemplatecf.lpVtbl;
|
||||||
|
}
|
||||||
|
|
||||||
if ( !cf )
|
if ( !cf )
|
||||||
return CLASS_E_CLASSNOTAVAILABLE;
|
return CLASS_E_CLASSNOTAVAILABLE;
|
||||||
|
|
|
@ -59,6 +59,7 @@ typedef enum tid_t {
|
||||||
IXMLElement_tid,
|
IXMLElement_tid,
|
||||||
IXMLDocument_tid,
|
IXMLDocument_tid,
|
||||||
IXMLHTTPRequest_tid,
|
IXMLHTTPRequest_tid,
|
||||||
|
IXSLTemplate_tid,
|
||||||
IVBSAXAttributes_tid,
|
IVBSAXAttributes_tid,
|
||||||
IVBSAXContentHandler_tid,
|
IVBSAXContentHandler_tid,
|
||||||
IVBSAXDeclHandler_tid,
|
IVBSAXDeclHandler_tid,
|
||||||
|
@ -374,11 +375,12 @@ MAKE_FUNCPTR(xsltParseStylesheetDoc);
|
||||||
|
|
||||||
extern IXMLDOMParseError *create_parseError( LONG code, BSTR url, BSTR reason, BSTR srcText,
|
extern IXMLDOMParseError *create_parseError( LONG code, BSTR url, BSTR reason, BSTR srcText,
|
||||||
LONG line, LONG linepos, LONG filepos );
|
LONG line, LONG linepos, LONG filepos );
|
||||||
extern HRESULT DOMDocument_create( const GUID *clsid, IUnknown *pUnkOuter, void **ppObj );
|
extern HRESULT DOMDocument_create(const GUID*, IUnknown*, void**);
|
||||||
extern HRESULT SchemaCache_create( const GUID *clsid, IUnknown *pUnkOuter, void **ppObj );
|
extern HRESULT SchemaCache_create(const GUID*, IUnknown*, void**);
|
||||||
extern HRESULT XMLDocument_create( IUnknown *pUnkOuter, void **pObj );
|
extern HRESULT XMLDocument_create(IUnknown*, void**);
|
||||||
extern HRESULT SAXXMLReader_create(IUnknown *pUnkOuter, void **pObj );
|
extern HRESULT SAXXMLReader_create(IUnknown*, void**);
|
||||||
extern HRESULT XMLHTTPRequest_create(IUnknown *pUnkOuter, void **pObj);
|
extern HRESULT XMLHTTPRequest_create(IUnknown*, void **);
|
||||||
|
extern HRESULT XSLTemplate_create(IUnknown*, void**);
|
||||||
|
|
||||||
static inline const CLSID* DOMDocument_version(MSXML_VERSION v)
|
static inline const CLSID* DOMDocument_version(MSXML_VERSION v)
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,237 @@
|
||||||
|
/*
|
||||||
|
* XSLTemplate/XSLProcessor support
|
||||||
|
*
|
||||||
|
* Copyright 2011 Nikolay Sivov for CodeWeavers
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define COBJMACROS
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include "windef.h"
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "winuser.h"
|
||||||
|
#include "ole2.h"
|
||||||
|
#include "msxml6.h"
|
||||||
|
|
||||||
|
#include "msxml_private.h"
|
||||||
|
|
||||||
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(msxml);
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBXML2
|
||||||
|
|
||||||
|
typedef struct _xsltemplate
|
||||||
|
{
|
||||||
|
IXSLTemplate IXSLTemplate_iface;
|
||||||
|
LONG ref;
|
||||||
|
} xsltemplate;
|
||||||
|
|
||||||
|
static inline xsltemplate *impl_from_IXSLTemplate( IXSLTemplate *iface )
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, xsltemplate, IXSLTemplate_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI xsltemplate_QueryInterface(
|
||||||
|
IXSLTemplate *iface,
|
||||||
|
REFIID riid,
|
||||||
|
void** ppvObject )
|
||||||
|
{
|
||||||
|
xsltemplate *This = impl_from_IXSLTemplate( iface );
|
||||||
|
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
|
||||||
|
|
||||||
|
if ( IsEqualGUID( riid, &IID_IXSLTemplate ) ||
|
||||||
|
IsEqualGUID( riid, &IID_IDispatch ) ||
|
||||||
|
IsEqualGUID( riid, &IID_IUnknown ) )
|
||||||
|
{
|
||||||
|
*ppvObject = iface;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FIXME("Unsupported interface %s\n", debugstr_guid(riid));
|
||||||
|
return E_NOINTERFACE;
|
||||||
|
}
|
||||||
|
|
||||||
|
IUnknown_AddRef((IUnknown*)*ppvObject);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static ULONG WINAPI xsltemplate_AddRef( IXSLTemplate *iface )
|
||||||
|
{
|
||||||
|
xsltemplate *This = impl_from_IXSLTemplate( iface );
|
||||||
|
return InterlockedIncrement( &This->ref );
|
||||||
|
}
|
||||||
|
|
||||||
|
static ULONG WINAPI xsltemplate_Release( IXSLTemplate *iface )
|
||||||
|
{
|
||||||
|
xsltemplate *This = impl_from_IXSLTemplate( iface );
|
||||||
|
ULONG ref;
|
||||||
|
|
||||||
|
ref = InterlockedDecrement( &This->ref );
|
||||||
|
if ( ref == 0 )
|
||||||
|
heap_free( This );
|
||||||
|
|
||||||
|
return ref;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI xsltemplate_GetTypeInfoCount( IXSLTemplate *iface, UINT* pctinfo )
|
||||||
|
{
|
||||||
|
xsltemplate *This = impl_from_IXSLTemplate( iface );
|
||||||
|
|
||||||
|
TRACE("(%p)->(%p)\n", This, pctinfo);
|
||||||
|
|
||||||
|
*pctinfo = 1;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI xsltemplate_GetTypeInfo(
|
||||||
|
IXSLTemplate *iface,
|
||||||
|
UINT iTInfo, LCID lcid,
|
||||||
|
ITypeInfo** ppTInfo )
|
||||||
|
{
|
||||||
|
xsltemplate *This = impl_from_IXSLTemplate( iface );
|
||||||
|
|
||||||
|
TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
|
||||||
|
|
||||||
|
return get_typeinfo(IXSLTemplate_tid, ppTInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI xsltemplate_GetIDsOfNames(
|
||||||
|
IXSLTemplate *iface,
|
||||||
|
REFIID riid, LPOLESTR* rgszNames,
|
||||||
|
UINT cNames, LCID lcid, DISPID* rgDispId )
|
||||||
|
{
|
||||||
|
xsltemplate *This = impl_from_IXSLTemplate( iface );
|
||||||
|
ITypeInfo *typeinfo;
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
|
||||||
|
lcid, rgDispId);
|
||||||
|
|
||||||
|
if(!rgszNames || cNames == 0 || !rgDispId)
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
hr = get_typeinfo(IXSLTemplate_tid, &typeinfo);
|
||||||
|
if(SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
|
||||||
|
ITypeInfo_Release(typeinfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI xsltemplate_Invoke(
|
||||||
|
IXSLTemplate *iface,
|
||||||
|
DISPID dispIdMember, REFIID riid, LCID lcid,
|
||||||
|
WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult,
|
||||||
|
EXCEPINFO* pExcepInfo, UINT* puArgErr )
|
||||||
|
{
|
||||||
|
xsltemplate *This = impl_from_IXSLTemplate( iface );
|
||||||
|
ITypeInfo *typeinfo;
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
|
||||||
|
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||||
|
|
||||||
|
hr = get_typeinfo(IXSLTemplate_tid, &typeinfo);
|
||||||
|
if(SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
hr = ITypeInfo_Invoke(typeinfo, &This->IXSLTemplate_iface, dispIdMember,
|
||||||
|
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||||
|
ITypeInfo_Release(typeinfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI xsltemplate_putref_stylesheet( IXSLTemplate *iface,
|
||||||
|
IXMLDOMNode *node)
|
||||||
|
{
|
||||||
|
xsltemplate *This = impl_from_IXSLTemplate( iface );
|
||||||
|
|
||||||
|
FIXME("(%p)->(%p): stub\n", This, node);
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI xsltemplate_get_stylesheet( IXSLTemplate *iface,
|
||||||
|
IXMLDOMNode **node)
|
||||||
|
{
|
||||||
|
xsltemplate *This = impl_from_IXSLTemplate( iface );
|
||||||
|
|
||||||
|
FIXME("(%p)->(%p): stub\n", This, node);
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI xsltemplate_createProcessor( IXSLTemplate *iface,
|
||||||
|
IXSLProcessor **processor)
|
||||||
|
{
|
||||||
|
xsltemplate *This = impl_from_IXSLTemplate( iface );
|
||||||
|
|
||||||
|
FIXME("(%p)->(%p)\n", This, processor);
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct IXSLTemplateVtbl xsltemplate_vtbl =
|
||||||
|
{
|
||||||
|
xsltemplate_QueryInterface,
|
||||||
|
xsltemplate_AddRef,
|
||||||
|
xsltemplate_Release,
|
||||||
|
xsltemplate_GetTypeInfoCount,
|
||||||
|
xsltemplate_GetTypeInfo,
|
||||||
|
xsltemplate_GetIDsOfNames,
|
||||||
|
xsltemplate_Invoke,
|
||||||
|
|
||||||
|
xsltemplate_putref_stylesheet,
|
||||||
|
xsltemplate_get_stylesheet,
|
||||||
|
xsltemplate_createProcessor
|
||||||
|
};
|
||||||
|
|
||||||
|
HRESULT XSLTemplate_create(IUnknown *pUnkOuter, void **ppObj)
|
||||||
|
{
|
||||||
|
xsltemplate *This;
|
||||||
|
|
||||||
|
TRACE("(%p,%p)\n", pUnkOuter, ppObj);
|
||||||
|
|
||||||
|
if(pUnkOuter) FIXME("support aggregation, outer\n");
|
||||||
|
|
||||||
|
This = heap_alloc( sizeof (*This) );
|
||||||
|
if(!This)
|
||||||
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
This->IXSLTemplate_iface.lpVtbl = &xsltemplate_vtbl;
|
||||||
|
This->ref = 1;
|
||||||
|
|
||||||
|
*ppObj = &This->IXSLTemplate_iface;
|
||||||
|
|
||||||
|
TRACE("returning iface %p\n", *ppObj);
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
HRESULT XSLTemplate_create(IUnknown *pUnkOuter, void **ppObj)
|
||||||
|
{
|
||||||
|
MESSAGE("This program tried to use a XSLTemplate object, but\n"
|
||||||
|
"libxml2 support was not present at compile time.\n");
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue