ReactOS  0.4.15-dev-1177-g6cb3b62
stylesheet.c File Reference
#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 "initguid.h"
#include "asptlb.h"
#include "wine/debug.h"
Include dependency graph for stylesheet.c:

Go to the source code of this file.

Classes

struct  xsltemplate
 
struct  xslprocessor
 

Macros

#define COBJMACROS
 

Enumerations

enum  output_type { PROCESSOR_OUTPUT_NOT_SET, PROCESSOR_OUTPUT_STREAM, PROCESSOR_OUTPUT_PERSISTSTREAM, PROCESSOR_OUTPUT_RESPONSE }
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msxml)
 
static HRESULT XSLProcessor_create (xsltemplate *, IXSLProcessor **)
 
static xsltemplateimpl_from_IXSLTemplate (IXSLTemplate *iface)
 
static xslprocessorimpl_from_IXSLProcessor (IXSLProcessor *iface)
 
static void xslprocessor_par_free (struct xslprocessor_params *params, struct xslprocessor_par *par)
 
static void xsltemplate_set_node (xsltemplate *This, IXMLDOMNode *node)
 
static HRESULT WINAPI xsltemplate_QueryInterface (IXSLTemplate *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI xsltemplate_AddRef (IXSLTemplate *iface)
 
static ULONG WINAPI xsltemplate_Release (IXSLTemplate *iface)
 
static HRESULT WINAPI xsltemplate_GetTypeInfoCount (IXSLTemplate *iface, UINT *pctinfo)
 
static HRESULT WINAPI xsltemplate_GetTypeInfo (IXSLTemplate *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI xsltemplate_GetIDsOfNames (IXSLTemplate *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI xsltemplate_Invoke (IXSLTemplate *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI xsltemplate_putref_stylesheet (IXSLTemplate *iface, IXMLDOMNode *node)
 
static HRESULT WINAPI xsltemplate_get_stylesheet (IXSLTemplate *iface, IXMLDOMNode **node)
 
static HRESULT WINAPI xsltemplate_createProcessor (IXSLTemplate *iface, IXSLProcessor **processor)
 
HRESULT XSLTemplate_create (void **ppObj)
 
static HRESULT WINAPI xslprocessor_QueryInterface (IXSLProcessor *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI xslprocessor_AddRef (IXSLProcessor *iface)
 
static ULONG WINAPI xslprocessor_Release (IXSLProcessor *iface)
 
static HRESULT WINAPI xslprocessor_GetTypeInfoCount (IXSLProcessor *iface, UINT *pctinfo)
 
static HRESULT WINAPI xslprocessor_GetTypeInfo (IXSLProcessor *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI xslprocessor_GetIDsOfNames (IXSLProcessor *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI xslprocessor_Invoke (IXSLProcessor *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI xslprocessor_put_input (IXSLProcessor *iface, VARIANT input)
 
static HRESULT WINAPI xslprocessor_get_input (IXSLProcessor *iface, VARIANT *input)
 
static HRESULT WINAPI xslprocessor_get_ownerTemplate (IXSLProcessor *iface, IXSLTemplate **template)
 
static HRESULT WINAPI xslprocessor_setStartMode (IXSLProcessor *iface, BSTR p, BSTR uri)
 
static HRESULT WINAPI xslprocessor_get_startMode (IXSLProcessor *iface, BSTR *p)
 
static HRESULT WINAPI xslprocessor_get_startModeURI (IXSLProcessor *iface, BSTR *uri)
 
static HRESULT WINAPI xslprocessor_put_output (IXSLProcessor *iface, VARIANT var)
 
static HRESULT WINAPI xslprocessor_get_output (IXSLProcessor *iface, VARIANT *output)
 
static HRESULT WINAPI xslprocessor_transform (IXSLProcessor *iface, VARIANT_BOOL *ret)
 
static HRESULT WINAPI xslprocessor_reset (IXSLProcessor *iface)
 
static HRESULT WINAPI xslprocessor_get_readyState (IXSLProcessor *iface, LONG *state)
 
static HRESULT xslprocessor_set_parvalue (const VARIANT *var, struct xslprocessor_par *par)
 
static HRESULT WINAPI xslprocessor_addParameter (IXSLProcessor *iface, BSTR p, VARIANT var, BSTR uri)
 
static HRESULT WINAPI xslprocessor_addObject (IXSLProcessor *iface, IDispatch *obj, BSTR uri)
 
static HRESULT WINAPI xslprocessor_get_stylesheet (IXSLProcessor *iface, IXMLDOMNode **node)
 

Variables

static const struct IXSLTemplateVtbl XSLTemplateVtbl
 
static const tid_t xsltemplate_iface_tids []
 
static dispex_static_data_t xsltemplate_dispex
 
static const struct IXSLProcessorVtbl XSLProcessorVtbl
 
static const tid_t xslprocessor_iface_tids []
 
static dispex_static_data_t xslprocessor_dispex
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 21 of file stylesheet.c.

Enumeration Type Documentation

◆ output_type

Enumerator
PROCESSOR_OUTPUT_NOT_SET 
PROCESSOR_OUTPUT_STREAM 
PROCESSOR_OUTPUT_PERSISTSTREAM 
PROCESSOR_OUTPUT_RESPONSE 

Definition at line 55 of file stylesheet.c.

56 {
58  PROCESSOR_OUTPUT_STREAM, /* IStream or ISequentialStream */
59  PROCESSOR_OUTPUT_PERSISTSTREAM, /* IPersistStream or IPersistStreamInit */
60  PROCESSOR_OUTPUT_RESPONSE, /* IResponse */
61 };

Function Documentation

◆ impl_from_IXSLProcessor()

◆ impl_from_IXSLTemplate()

static xsltemplate* impl_from_IXSLTemplate ( IXSLTemplate *  iface)
inlinestatic

Definition at line 87 of file stylesheet.c.

88 {
89  return CONTAINING_RECORD(iface, xsltemplate, IXSLTemplate_iface);
90 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by xsltemplate_AddRef(), xsltemplate_createProcessor(), xsltemplate_get_stylesheet(), xsltemplate_GetIDsOfNames(), xsltemplate_GetTypeInfo(), xsltemplate_GetTypeInfoCount(), xsltemplate_Invoke(), xsltemplate_putref_stylesheet(), xsltemplate_QueryInterface(), and xsltemplate_Release().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msxml  )

◆ xslprocessor_addObject()

static HRESULT WINAPI xslprocessor_addObject ( IXSLProcessor *  iface,
IDispatch obj,
BSTR  uri 
)
static

Definition at line 758 of file stylesheet.c.

762 {
764 
765  FIXME("(%p)->(%p %s): stub\n", This, obj, debugstr_w(uri));
766  return E_NOTIMPL;
767 }
const char * uri
Definition: sec_mgr.c:1588
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ xslprocessor_addParameter()

static HRESULT WINAPI xslprocessor_addParameter ( IXSLProcessor *  iface,
BSTR  p,
VARIANT  var,
BSTR  uri 
)
static

Definition at line 697 of file stylesheet.c.

702 {
704  struct xslprocessor_par *cur, *par = NULL;
705  HRESULT hr;
706 
707  TRACE("(%p)->(%s %s %s)\n", This, debugstr_w(p), debugstr_variant(&var),
708  debugstr_w(uri));
709 
710  if (uri && *uri)
711  FIXME("namespace uri is not supported\n");
712 
713  /* search for existing parameter first */
714  LIST_FOR_EACH_ENTRY(cur, &This->params.list, struct xslprocessor_par, entry)
715  {
716  if (!strcmpW(cur->name, p))
717  {
718  par = cur;
719  break;
720  }
721  }
722 
723  /* override with new value or add new parameter */
724  if (par)
725  {
726  if (V_VT(&var) == VT_NULL || V_VT(&var) == VT_EMPTY)
727  {
728  /* remove parameter */
729  xslprocessor_par_free(&This->params, par);
730  return S_OK;
731  }
732  SysFreeString(par->value);
733  par->value = NULL;
734  }
735  else
736  {
737  /* new parameter */
738  par = heap_alloc(sizeof(struct xslprocessor_par));
739  if (!par) return E_OUTOFMEMORY;
740 
741  par->name = SysAllocString(p);
742  if (!par->name)
743  {
744  heap_free(par);
745  return E_OUTOFMEMORY;
746  }
747  list_add_tail(&This->params.list, &par->entry);
748  This->params.count++;
749  }
750 
752  if (FAILED(hr))
753  xslprocessor_par_free(&This->params, par);
754 
755  return hr;
756 }
const char * var
Definition: shader.c:5666
HRESULT hr
Definition: shlfolder.c:183
const char * uri
Definition: sec_mgr.c:1588
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static HRESULT xslprocessor_set_parvalue(const VARIANT *var, struct xslprocessor_par *par)
Definition: stylesheet.c:677
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
#define V_VT(A)
Definition: oleauto.h:211
uint32_t entry
Definition: isohybrid.c:63
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define S_OK
Definition: intsafe.h:51
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
struct list entry
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229
static void xslprocessor_par_free(struct xslprocessor_params *params, struct xslprocessor_par *par)
Definition: stylesheet.c:97
GLfloat GLfloat p
Definition: glext.h:8902
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ xslprocessor_AddRef()

static ULONG WINAPI xslprocessor_AddRef ( IXSLProcessor *  iface)
static

Definition at line 320 of file stylesheet.c.

321 {
323  ULONG ref = InterlockedIncrement( &This->ref );
324  TRACE("(%p)->(%d)\n", This, ref);
325  return ref;
326 }
Definition: send.c:48
GLenum GLint ref
Definition: glext.h:6028
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ XSLProcessor_create()

HRESULT XSLProcessor_create ( xsltemplate template,
IXSLProcessor **  ppObj 
)
static

Definition at line 816 of file stylesheet.c.

817 {
819 
820  TRACE("(%p)\n", ppObj);
821 
822  This = heap_alloc( sizeof (*This) );
823  if(!This)
824  return E_OUTOFMEMORY;
825 
826  This->IXSLProcessor_iface.lpVtbl = &XSLProcessorVtbl;
827  This->ref = 1;
828  This->input = NULL;
829  This->output.unk = NULL;
830  This->output_type = PROCESSOR_OUTPUT_NOT_SET;
831  This->outstr = NULL;
832  list_init(&This->params.list);
833  This->params.count = 0;
834  This->stylesheet = template;
835  IXSLTemplate_AddRef(&template->IXSLTemplate_iface);
836  init_dispex(&This->dispex, (IUnknown*)&This->IXSLProcessor_iface, &xslprocessor_dispex);
837 
838  *ppObj = &This->IXSLProcessor_iface;
839 
840  TRACE("returning iface %p\n", *ppObj);
841 
842  return S_OK;
843 }
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
static dispex_static_data_t xslprocessor_dispex
Definition: stylesheet.c:809
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
const UINT template
Definition: action.c:7785
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:919
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
static const struct IXSLProcessorVtbl XSLProcessorVtbl
Definition: stylesheet.c:779

Referenced by xsltemplate_createProcessor().

◆ xslprocessor_get_input()

static HRESULT WINAPI xslprocessor_get_input ( IXSLProcessor *  iface,
VARIANT input 
)
static

Definition at line 428 of file stylesheet.c.

429 {
431 
432  FIXME("(%p)->(%p): stub\n", This, input);
433  return E_NOTIMPL;
434 }
#define FIXME(fmt,...)
Definition: debug.h:111
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92
GLenum GLenum GLenum input
Definition: glext.h:9031
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ xslprocessor_get_output()

static HRESULT WINAPI xslprocessor_get_output ( IXSLProcessor *  iface,
VARIANT output 
)
static

Definition at line 535 of file stylesheet.c.

538 {
540 
541  TRACE("(%p)->(%p)\n", This, output);
542 
543  if (!output) return E_INVALIDARG;
544 
545  if (This->output.unk)
546  {
548  V_UNKNOWN(output) = This->output.unk;
549  IUnknown_AddRef(This->output.unk);
550  }
551  else if (This->outstr)
552  {
553  V_VT(output) = VT_BSTR;
554  V_BSTR(output) = SysAllocString(This->outstr);
555  }
556  else
557  V_VT(output) = VT_EMPTY;
558 
559  return S_OK;
560 }
static UCHAR ULONG UCHAR ULONG UCHAR * output
Definition: bcrypt.c:29
#define E_INVALIDARG
Definition: ddrawi.h:101
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92
#define TRACE(s)
Definition: solgame.cpp:4
#define V_VT(A)
Definition: oleauto.h:211
#define V_UNKNOWN(A)
Definition: oleauto.h:281
#define V_BSTR(A)
Definition: oleauto.h:226
#define S_OK
Definition: intsafe.h:51

◆ xslprocessor_get_ownerTemplate()

static HRESULT WINAPI xslprocessor_get_ownerTemplate ( IXSLProcessor *  iface,
IXSLTemplate **  template 
)
static

Definition at line 436 of file stylesheet.c.

439 {
441 
442  FIXME("(%p)->(%p): stub\n", This, template);
443  return E_NOTIMPL;
444 }
#define FIXME(fmt,...)
Definition: debug.h:111
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ xslprocessor_get_readyState()

static HRESULT WINAPI xslprocessor_get_readyState ( IXSLProcessor *  iface,
LONG state 
)
static

Definition at line 667 of file stylesheet.c.

670 {
672 
673  FIXME("(%p)->(%p): stub\n", This, state);
674  return E_NOTIMPL;
675 }
#define FIXME(fmt,...)
Definition: debug.h:111
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92
static int state
Definition: maze.c:121
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ xslprocessor_get_startMode()

static HRESULT WINAPI xslprocessor_get_startMode ( IXSLProcessor *  iface,
BSTR p 
)
static

Definition at line 457 of file stylesheet.c.

460 {
462 
463  FIXME("(%p)->(%p): stub\n", This, p);
464  return E_NOTIMPL;
465 }
#define FIXME(fmt,...)
Definition: debug.h:111
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92
#define E_NOTIMPL
Definition: ddrawi.h:99
GLfloat GLfloat p
Definition: glext.h:8902

◆ xslprocessor_get_startModeURI()

static HRESULT WINAPI xslprocessor_get_startModeURI ( IXSLProcessor *  iface,
BSTR uri 
)
static

Definition at line 467 of file stylesheet.c.

470 {
472 
473  FIXME("(%p)->(%p): stub\n", This, uri);
474  return E_NOTIMPL;
475 }
const char * uri
Definition: sec_mgr.c:1588
#define FIXME(fmt,...)
Definition: debug.h:111
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ xslprocessor_get_stylesheet()

static HRESULT WINAPI xslprocessor_get_stylesheet ( IXSLProcessor *  iface,
IXMLDOMNode **  node 
)
static

Definition at line 769 of file stylesheet.c.

772 {
774 
775  FIXME("(%p)->(%p): stub\n", This, node);
776  return E_NOTIMPL;
777 }
#define FIXME(fmt,...)
Definition: debug.h:111
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92
#define E_NOTIMPL
Definition: ddrawi.h:99
Definition: dlist.c:348

◆ xslprocessor_GetIDsOfNames()

static HRESULT WINAPI xslprocessor_GetIDsOfNames ( IXSLProcessor *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 369 of file stylesheet.c.

373 {
375  return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface,
376  riid, rgszNames, cNames, lcid, rgDispId);
377 }
REFIID riid
Definition: precomp.h:44
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92

◆ xslprocessor_GetTypeInfo()

static HRESULT WINAPI xslprocessor_GetTypeInfo ( IXSLProcessor *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 359 of file stylesheet.c.

363 {
365  return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface,
366  iTInfo, lcid, ppTInfo);
367 }
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92

◆ xslprocessor_GetTypeInfoCount()

static HRESULT WINAPI xslprocessor_GetTypeInfoCount ( IXSLProcessor *  iface,
UINT pctinfo 
)
static

Definition at line 353 of file stylesheet.c.

354 {
356  return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
357 }
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92

◆ xslprocessor_Invoke()

static HRESULT WINAPI xslprocessor_Invoke ( IXSLProcessor *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 379 of file stylesheet.c.

384 {
386  return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface,
387  dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
388 }
REFIID riid
Definition: precomp.h:44
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:534

◆ xslprocessor_par_free()

static void xslprocessor_par_free ( struct xslprocessor_params params,
struct xslprocessor_par par 
)
static

Definition at line 97 of file stylesheet.c.

98 {
99  params->count--;
100  list_remove(&par->entry);
101  SysFreeString(par->name);
102  SysFreeString(par->value);
103  heap_free(par);
104 }
GLenum const GLfloat * params
Definition: glext.h:5645
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
struct list entry
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by xslprocessor_addParameter(), and xslprocessor_Release().

◆ xslprocessor_put_input()

static HRESULT WINAPI xslprocessor_put_input ( IXSLProcessor *  iface,
VARIANT  input 
)
static

Definition at line 390 of file stylesheet.c.

391 {
393  IXMLDOMNode *input_node;
394  HRESULT hr;
395 
396  TRACE("(%p)->(%s)\n", This, debugstr_variant(&input));
397 
398  /* try IXMLDOMNode directly first */
399  if (V_VT(&input) == VT_UNKNOWN)
400  hr = IUnknown_QueryInterface(V_UNKNOWN(&input), &IID_IXMLDOMNode, (void**)&input_node);
401  else if (V_VT(&input) == VT_DISPATCH)
402  hr = IDispatch_QueryInterface(V_DISPATCH(&input), &IID_IXMLDOMNode, (void**)&input_node);
403  else
404  {
405  IXMLDOMDocument *doc;
406 
407  hr = DOMDocument_create(MSXML_DEFAULT, (void**)&doc);
408  if (hr == S_OK)
409  {
410  VARIANT_BOOL b;
411 
412  hr = IXMLDOMDocument_load(doc, input, &b);
413  if (hr == S_OK)
414  hr = IXMLDOMDocument_QueryInterface(doc, &IID_IXMLDOMNode, (void**)&input_node);
415  IXMLDOMDocument_Release(doc);
416  }
417  }
418 
419  if (hr == S_OK)
420  {
421  if (This->input) IXMLDOMNode_Release(This->input);
422  This->input = input_node;
423  }
424 
425  return hr;
426 }
HRESULT hr
Definition: shlfolder.c:183
short VARIANT_BOOL
Definition: compat.h:2038
#define V_DISPATCH(A)
Definition: oleauto.h:239
#define b
Definition: ke_i.h:79
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
#define V_VT(A)
Definition: oleauto.h:211
#define V_UNKNOWN(A)
Definition: oleauto.h:281
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define S_OK
Definition: intsafe.h:51
GLenum GLenum GLenum input
Definition: glext.h:9031
HRESULT DOMDocument_create(MSXML_VERSION version, void **ppObj)
Definition: domdoc.c:3727

◆ xslprocessor_put_output()

static HRESULT WINAPI xslprocessor_put_output ( IXSLProcessor *  iface,
VARIANT  var 
)
static

Definition at line 477 of file stylesheet.c.

480 {
483  IUnknown *output = NULL;
484  HRESULT hr = S_OK;
485 
486  TRACE("(%p)->(%s)\n", This, debugstr_variant(&var));
487 
488  switch (V_VT(&var))
489  {
490  case VT_EMPTY:
491  break;
492  case VT_UNKNOWN:
493  case VT_DISPATCH:
494  if (!V_UNKNOWN(&var))
495  break;
496 
498  hr = IUnknown_QueryInterface(V_UNKNOWN(&var), &IID_IStream, (void **)&output);
499  if (FAILED(hr))
500  hr = IUnknown_QueryInterface(V_UNKNOWN(&var), &IID_ISequentialStream, (void **)&output);
501  if (FAILED(hr))
502  {
504  hr = IUnknown_QueryInterface(V_UNKNOWN(&var), &IID_IResponse, (void **)&output);
505  }
506  if (FAILED(hr))
507  {
509  hr = IUnknown_QueryInterface(V_UNKNOWN(&var), &IID_IPersistStream, (void **)&output);
510  }
511  if (FAILED(hr))
512  hr = IUnknown_QueryInterface(V_UNKNOWN(&var), &IID_IPersistStreamInit, (void **)&output);
513  if (FAILED(hr))
514  {
516  WARN("failed to get output interface, 0x%08x\n", hr);
517  }
518  break;
519  default:
520  FIXME("output type %d not handled\n", V_VT(&var));
521  hr = E_FAIL;
522  }
523 
524  if (hr == S_OK)
525  {
526  if (This->output.unk)
527  IUnknown_Release(This->output.unk);
528  This->output.unk = output;
529  This->output_type = output_type;
530  }
531 
532  return hr;
533 }
const char * var
Definition: shader.c:5666
static UCHAR ULONG UCHAR ULONG UCHAR * output
Definition: bcrypt.c:29
HRESULT hr
Definition: shlfolder.c:183
#define WARN(fmt,...)
Definition: debug.h:112
#define E_FAIL
Definition: ddrawi.h:102
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
const GUID IID_IPersistStream
Definition: proxy.cpp:13
const GUID IID_IPersistStreamInit
#define V_VT(A)
Definition: oleauto.h:211
#define V_UNKNOWN(A)
Definition: oleauto.h:281
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define S_OK
Definition: intsafe.h:51
output_type
Definition: stylesheet.c:55

◆ xslprocessor_QueryInterface()

static HRESULT WINAPI xslprocessor_QueryInterface ( IXSLProcessor *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 291 of file stylesheet.c.

295 {
297  TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
298 
299  if ( IsEqualGUID( riid, &IID_IXSLProcessor ) ||
302  {
303  *ppvObject = iface;
304  }
305  else if (dispex_query_interface(&This->dispex, riid, ppvObject))
306  {
307  return *ppvObject ? S_OK : E_NOINTERFACE;
308  }
309  else
310  {
311  FIXME("Unsupported interface %s\n", debugstr_guid(riid));
312  *ppvObject = NULL;
313  return E_NOINTERFACE;
314  }
315 
316  IUnknown_AddRef((IUnknown*)*ppvObject);
317  return S_OK;
318 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:51
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

◆ xslprocessor_Release()

static ULONG WINAPI xslprocessor_Release ( IXSLProcessor *  iface)
static

Definition at line 328 of file stylesheet.c.

329 {
331  ULONG ref = InterlockedDecrement( &This->ref );
332 
333  TRACE("(%p)->(%d)\n", This, ref);
334  if ( ref == 0 )
335  {
336  struct xslprocessor_par *par, *par2;
337 
338  if (This->input) IXMLDOMNode_Release(This->input);
339  if (This->output.unk)
340  IUnknown_Release(This->output.unk);
341  SysFreeString(This->outstr);
342 
343  LIST_FOR_EACH_ENTRY_SAFE(par, par2, &This->params.list, struct xslprocessor_par, entry)
344  xslprocessor_par_free(&This->params, par);
345 
346  IXSLTemplate_Release(&This->stylesheet->IXSLTemplate_iface);
347  heap_free( This );
348  }
349 
350  return ref;
351 }
Definition: send.c:48
GLenum GLint ref
Definition: glext.h:6028
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
uint32_t entry
Definition: isohybrid.c:63
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
unsigned int ULONG
Definition: retypes.h:1
static void xslprocessor_par_free(struct xslprocessor_params *params, struct xslprocessor_par *par)
Definition: stylesheet.c:97
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ xslprocessor_reset()

static HRESULT WINAPI xslprocessor_reset ( IXSLProcessor *  iface)
static

Definition at line 659 of file stylesheet.c.

660 {
662 
663  FIXME("(%p): stub\n", This);
664  return E_NOTIMPL;
665 }
#define FIXME(fmt,...)
Definition: debug.h:111
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ xslprocessor_set_parvalue()

static HRESULT xslprocessor_set_parvalue ( const VARIANT var,
struct xslprocessor_par par 
)
static

Definition at line 677 of file stylesheet.c.

678 {
679  HRESULT hr = S_OK;
680 
681  switch (V_VT(var))
682  {
683  case VT_BSTR:
684  {
685  par->value = SysAllocString(V_BSTR(var));
686  if (!par->value) hr = E_OUTOFMEMORY;
687  break;
688  }
689  default:
690  FIXME("value type %d not handled\n", V_VT(var));
691  hr = E_NOTIMPL;
692  }
693 
694  return hr;
695 }
const char * var
Definition: shader.c:5666
HRESULT hr
Definition: shlfolder.c:183
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define FIXME(fmt,...)
Definition: debug.h:111
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
LONG HRESULT
Definition: typedefs.h:79
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
#define S_OK
Definition: intsafe.h:51
#define E_NOTIMPL
Definition: ddrawi.h:99

Referenced by xslprocessor_addParameter().

◆ xslprocessor_setStartMode()

static HRESULT WINAPI xslprocessor_setStartMode ( IXSLProcessor *  iface,
BSTR  p,
BSTR  uri 
)
static

Definition at line 446 of file stylesheet.c.

450 {
452 
453  FIXME("(%p)->(%s %s): stub\n", This, debugstr_w(p), debugstr_w(uri));
454  return E_NOTIMPL;
455 }
const char * uri
Definition: sec_mgr.c:1588
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92
#define E_NOTIMPL
Definition: ddrawi.h:99
GLfloat GLfloat p
Definition: glext.h:8902

◆ xslprocessor_transform()

static HRESULT WINAPI xslprocessor_transform ( IXSLProcessor *  iface,
VARIANT_BOOL ret 
)
static

Definition at line 562 of file stylesheet.c.

565 {
566 #ifdef HAVE_LIBXML2
569  HRESULT hr;
570 
571  TRACE("(%p)->(%p)\n", This, ret);
572 
573  if (!ret)
574  return E_INVALIDARG;
575 
576  if (This->output_type == PROCESSOR_OUTPUT_STREAM)
577  {
578  stream = This->output.stream;
579  ISequentialStream_AddRef(stream);
580  }
581  else if (This->output_type == PROCESSOR_OUTPUT_PERSISTSTREAM ||
582  This->output_type == PROCESSOR_OUTPUT_RESPONSE)
583  {
585  return hr;
586  }
587 
588  SysFreeString(This->outstr);
589 
590  hr = node_transform_node_params(get_node_obj(This->input), This->stylesheet->node,
591  &This->outstr, stream, &This->params);
592  if (SUCCEEDED(hr))
593  {
594  IStream *src = (IStream *)stream;
595 
596  switch (This->output_type)
597  {
599  {
601 
602  /* for IPersistStream* output seekable stream is used */
603  zero.QuadPart = 0;
604  IStream_Seek(src, zero, STREAM_SEEK_SET, NULL);
605  hr = IPersistStream_Load(This->output.persiststream, src);
606  break;
607  }
609  {
610  SAFEARRAYBOUND bound;
611  SAFEARRAY *array;
612  HGLOBAL hglobal;
613  VARIANT bin;
614  DWORD size;
615  void *dest;
616 
617  if (FAILED(hr = GetHGlobalFromStream(src, &hglobal)))
618  break;
619  size = GlobalSize(hglobal);
620 
621  bound.lLbound = 0;
622  bound.cElements = size;
623  if (!(array = SafeArrayCreate(VT_UI1, 1, &bound)))
624  break;
625 
626  V_VT(&bin) = VT_ARRAY | VT_UI1;
627  V_ARRAY(&bin) = array;
628 
630  if (hr == S_OK)
631  {
632  void *data = GlobalLock(hglobal);
633  memcpy(dest, data, size);
634  GlobalUnlock(hglobal);
636 
637  IResponse_BinaryWrite(This->output.response, bin);
638  }
639 
640  VariantClear(&bin);
641  break;
642  }
643  default:
644  ;
645  }
646  }
647 
648  if (stream)
649  ISequentialStream_Release(stream);
650 
651  *ret = hr == S_OK ? VARIANT_TRUE : VARIANT_FALSE;
652  return hr;
653 #else
654  FIXME("libxml2 is required but wasn't present at compile time\n");
655  return E_NOTIMPL;
656 #endif
657 }
HRESULT WINAPI GetHGlobalFromStream(IStream *pstm, HGLOBAL *phglobal)
HRESULT hr
Definition: shlfolder.c:183
#define TRUE
Definition: types.h:120
#define V_ARRAY(A)
Definition: oleauto.h:222
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
SIZE_T NTAPI GlobalSize(HGLOBAL hMem)
Definition: heapmem.c:1090
HRESULT WINAPI SafeArrayAccessData(SAFEARRAY *psa, void **ppvData)
Definition: safearray.c:1137
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
static xslprocessor * impl_from_IXSLProcessor(IXSLProcessor *iface)
Definition: stylesheet.c:92
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
LONG HRESULT
Definition: typedefs.h:79
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static double zero
Definition: j0_y0.c:96
int ret
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
Definition: heapmem.c:755
Definition: parse.h:22
#define V_VT(A)
Definition: oleauto.h:211
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum src
Definition: glext.h:6340
SAFEARRAY *WINAPI SafeArrayCreate(VARTYPE vt, UINT cDims, SAFEARRAYBOUND *rgsabound)
Definition: safearray.c:600
#define S_OK
Definition: intsafe.h:51
#define E_NOTIMPL
Definition: ddrawi.h:99
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190
static struct _PeImage bin
static char * dest
Definition: rtl.c:135
HRESULT WINAPI SafeArrayUnaccessData(SAFEARRAY *psa)
Definition: safearray.c:1168
#define SUCCEEDED(hr)
Definition: intsafe.h:49
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum GLint const GLfloat GLenum GLint const GLushort GLint GLint GLsizei GLsizei GLenum GLsizei GLsizei GLenum GLenum const GLvoid GLenum GLdouble GLenum GLint GLenum GLenum GLint GLenum GLenum GLfloat GLenum GLenum GLfloat GLenum GLfloat GLenum GLushort const GLubyte GLenum GLenum GLenum GLint GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLvoid GLenum GLenum GLint GLenum GLint GLenum GLint GLuint GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble const GLfloat GLenum const GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLint GLint GLsizei GLsizei GLenum GLuint GLenum array
Definition: glfuncs.h:320
static HTMLDOMNode * get_node_obj(IHTMLDOMNode *)
Definition: htmlnode.c:1045

◆ xsltemplate_AddRef()

static ULONG WINAPI xsltemplate_AddRef ( IXSLTemplate *  iface)
static

Definition at line 142 of file stylesheet.c.

143 {
145  ULONG ref = InterlockedIncrement( &This->ref );
146  TRACE("(%p)->(%d)\n", This, ref);
147  return ref;
148 }
Definition: send.c:48
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1
static xsltemplate * impl_from_IXSLTemplate(IXSLTemplate *iface)
Definition: stylesheet.c:87

◆ XSLTemplate_create()

HRESULT XSLTemplate_create ( void **  ppObj)

Definition at line 268 of file stylesheet.c.

269 {
270  xsltemplate *This;
271 
272  TRACE("(%p)\n", ppObj);
273 
274  This = heap_alloc( sizeof (*This) );
275  if(!This)
276  return E_OUTOFMEMORY;
277 
278  This->IXSLTemplate_iface.lpVtbl = &XSLTemplateVtbl;
279  This->ref = 1;
280  This->node = NULL;
281  init_dispex(&This->dispex, (IUnknown*)&This->IXSLTemplate_iface, &xsltemplate_dispex);
282 
283  *ppObj = &This->IXSLTemplate_iface;
284 
285  TRACE("returning iface %p\n", *ppObj);
286 
287  return S_OK;
288 }
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:919
static const struct IXSLTemplateVtbl XSLTemplateVtbl
Definition: stylesheet.c:242
static dispex_static_data_t xsltemplate_dispex
Definition: stylesheet.c:261

◆ xsltemplate_createProcessor()

static HRESULT WINAPI xsltemplate_createProcessor ( IXSLTemplate *  iface,
IXSLProcessor **  processor 
)
static

Definition at line 230 of file stylesheet.c.

232 {
234 
235  TRACE("(%p)->(%p)\n", This, processor);
236 
237  if (!processor) return E_INVALIDARG;
238 
239  return XSLProcessor_create(This, processor);
240 }
static HRESULT XSLProcessor_create(xsltemplate *, IXSLProcessor **)
Definition: stylesheet.c:816
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
static xsltemplate * impl_from_IXSLTemplate(IXSLTemplate *iface)
Definition: stylesheet.c:87

◆ xsltemplate_get_stylesheet()

static HRESULT WINAPI xsltemplate_get_stylesheet ( IXSLTemplate *  iface,
IXMLDOMNode **  node 
)
static

Definition at line 221 of file stylesheet.c.

223 {
225 
226  FIXME("(%p)->(%p): stub\n", This, node);
227  return E_NOTIMPL;
228 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99
static xsltemplate * impl_from_IXSLTemplate(IXSLTemplate *iface)
Definition: stylesheet.c:87
Definition: dlist.c:348

◆ xsltemplate_GetIDsOfNames()

static HRESULT WINAPI xsltemplate_GetIDsOfNames ( IXSLTemplate *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 181 of file stylesheet.c.

185 {
187  return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface,
188  riid, rgszNames, cNames, lcid, rgDispId);
189 }
REFIID riid
Definition: precomp.h:44
static xsltemplate * impl_from_IXSLTemplate(IXSLTemplate *iface)
Definition: stylesheet.c:87

◆ xsltemplate_GetTypeInfo()

static HRESULT WINAPI xsltemplate_GetTypeInfo ( IXSLTemplate *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 171 of file stylesheet.c.

175 {
177  return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface,
178  iTInfo, lcid, ppTInfo);
179 }
static xsltemplate * impl_from_IXSLTemplate(IXSLTemplate *iface)
Definition: stylesheet.c:87

◆ xsltemplate_GetTypeInfoCount()

static HRESULT WINAPI xsltemplate_GetTypeInfoCount ( IXSLTemplate *  iface,
UINT pctinfo 
)
static

Definition at line 165 of file stylesheet.c.

166 {
168  return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
169 }
static xsltemplate * impl_from_IXSLTemplate(IXSLTemplate *iface)
Definition: stylesheet.c:87

◆ xsltemplate_Invoke()

static HRESULT WINAPI xsltemplate_Invoke ( IXSLTemplate *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 191 of file stylesheet.c.

196 {
198  return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface,
199  dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
200 }
REFIID riid
Definition: precomp.h:44
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:534
static xsltemplate * impl_from_IXSLTemplate(IXSLTemplate *iface)
Definition: stylesheet.c:87

◆ xsltemplate_putref_stylesheet()

static HRESULT WINAPI xsltemplate_putref_stylesheet ( IXSLTemplate *  iface,
IXMLDOMNode node 
)
static

Definition at line 202 of file stylesheet.c.

204 {
206 
207  TRACE("(%p)->(%p)\n", This, node);
208 
209  if (!node)
210  {
212  return S_OK;
213  }
214 
215  /* FIXME: test for document type */
217 
218  return S_OK;
219 }
static void xsltemplate_set_node(xsltemplate *This, IXMLDOMNode *node)
Definition: stylesheet.c:106
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
static xsltemplate * impl_from_IXSLTemplate(IXSLTemplate *iface)
Definition: stylesheet.c:87
Definition: dlist.c:348

◆ xsltemplate_QueryInterface()

static HRESULT WINAPI xsltemplate_QueryInterface ( IXSLTemplate *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 113 of file stylesheet.c.

117 {
119  TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
120 
121  if ( IsEqualGUID( riid, &IID_IXSLTemplate ) ||
124  {
125  *ppvObject = iface;
126  }
127  else if (dispex_query_interface(&This->dispex, riid, ppvObject))
128  {
129  return *ppvObject ? S_OK : E_NOINTERFACE;
130  }
131  else
132  {
133  FIXME("Unsupported interface %s\n", debugstr_guid(riid));
134  *ppvObject = NULL;
135  return E_NOINTERFACE;
136  }
137 
138  IUnknown_AddRef((IUnknown*)*ppvObject);
139  return S_OK;
140 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:51
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
static xsltemplate * impl_from_IXSLTemplate(IXSLTemplate *iface)
Definition: stylesheet.c:87

◆ xsltemplate_Release()

static ULONG WINAPI xsltemplate_Release ( IXSLTemplate *  iface)
static

Definition at line 150 of file stylesheet.c.

151 {
153  ULONG ref = InterlockedDecrement( &This->ref );
154 
155  TRACE("(%p)->(%d)\n", This, ref);
156  if ( ref == 0 )
157  {
158  if (This->node) IXMLDOMNode_Release( This->node );
159  heap_free( This );
160  }
161 
162  return ref;
163 }
Definition: send.c:48
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
static xsltemplate * impl_from_IXSLTemplate(IXSLTemplate *iface)
Definition: stylesheet.c:87
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ xsltemplate_set_node()

static void xsltemplate_set_node ( xsltemplate This,
IXMLDOMNode node 
)
static

Definition at line 106 of file stylesheet.c.

107 {
108  if (This->node) IXMLDOMNode_Release(This->node);
109  This->node = node;
110  if (node) IXMLDOMNode_AddRef(node);
111 }
struct node node
Definition: dlist.c:348

Referenced by xsltemplate_putref_stylesheet().

Variable Documentation

◆ xslprocessor_dispex

dispex_static_data_t xslprocessor_dispex
static
Initial value:
= {
}
smooth NULL
Definition: ftsmooth.c:416
static const tid_t xslprocessor_iface_tids[]
Definition: stylesheet.c:804

Definition at line 809 of file stylesheet.c.

Referenced by XSLProcessor_create().

◆ xslprocessor_iface_tids

const tid_t xslprocessor_iface_tids[]
static
Initial value:

Definition at line 804 of file stylesheet.c.

◆ XSLProcessorVtbl

const struct IXSLProcessorVtbl XSLProcessorVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI xslprocessor_GetTypeInfoCount(IXSLProcessor *iface, UINT *pctinfo)
Definition: stylesheet.c:353
static HRESULT WINAPI xslprocessor_get_stylesheet(IXSLProcessor *iface, IXMLDOMNode **node)
Definition: stylesheet.c:769
static HRESULT WINAPI xslprocessor_get_output(IXSLProcessor *iface, VARIANT *output)
Definition: stylesheet.c:535
static HRESULT WINAPI xslprocessor_GetTypeInfo(IXSLProcessor *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: stylesheet.c:359
static HRESULT WINAPI xslprocessor_get_startMode(IXSLProcessor *iface, BSTR *p)
Definition: stylesheet.c:457
static HRESULT WINAPI xslprocessor_addParameter(IXSLProcessor *iface, BSTR p, VARIANT var, BSTR uri)
Definition: stylesheet.c:697
static HRESULT WINAPI xslprocessor_QueryInterface(IXSLProcessor *iface, REFIID riid, void **ppvObject)
Definition: stylesheet.c:291
static HRESULT WINAPI xslprocessor_get_ownerTemplate(IXSLProcessor *iface, IXSLTemplate **template)
Definition: stylesheet.c:436
static HRESULT WINAPI xslprocessor_reset(IXSLProcessor *iface)
Definition: stylesheet.c:659
static HRESULT WINAPI xslprocessor_transform(IXSLProcessor *iface, VARIANT_BOOL *ret)
Definition: stylesheet.c:562
static HRESULT WINAPI xslprocessor_get_readyState(IXSLProcessor *iface, LONG *state)
Definition: stylesheet.c:667
static ULONG WINAPI xslprocessor_AddRef(IXSLProcessor *iface)
Definition: stylesheet.c:320
static HRESULT WINAPI xslprocessor_GetIDsOfNames(IXSLProcessor *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: stylesheet.c:369
static HRESULT WINAPI xslprocessor_addObject(IXSLProcessor *iface, IDispatch *obj, BSTR uri)
Definition: stylesheet.c:758
static HRESULT WINAPI xslprocessor_put_output(IXSLProcessor *iface, VARIANT var)
Definition: stylesheet.c:477
static ULONG WINAPI xslprocessor_Release(IXSLProcessor *iface)
Definition: stylesheet.c:328
static HRESULT WINAPI xslprocessor_Invoke(IXSLProcessor *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: stylesheet.c:379
static HRESULT WINAPI xslprocessor_put_input(IXSLProcessor *iface, VARIANT input)
Definition: stylesheet.c:390
static HRESULT WINAPI xslprocessor_setStartMode(IXSLProcessor *iface, BSTR p, BSTR uri)
Definition: stylesheet.c:446
static HRESULT WINAPI xslprocessor_get_input(IXSLProcessor *iface, VARIANT *input)
Definition: stylesheet.c:428
static HRESULT WINAPI xslprocessor_get_startModeURI(IXSLProcessor *iface, BSTR *uri)
Definition: stylesheet.c:467

Definition at line 779 of file stylesheet.c.

Referenced by XSLProcessor_create().

◆ xsltemplate_dispex

dispex_static_data_t xsltemplate_dispex
static
Initial value:
= {
}
smooth NULL
Definition: ftsmooth.c:416
static const tid_t xsltemplate_iface_tids[]
Definition: stylesheet.c:256

Definition at line 261 of file stylesheet.c.

Referenced by XSLTemplate_create().

◆ xsltemplate_iface_tids

const tid_t xsltemplate_iface_tids[]
static
Initial value:

Definition at line 256 of file stylesheet.c.

◆ XSLTemplateVtbl

const struct IXSLTemplateVtbl XSLTemplateVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI xsltemplate_GetTypeInfo(IXSLTemplate *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: stylesheet.c:171
static HRESULT WINAPI xsltemplate_GetTypeInfoCount(IXSLTemplate *iface, UINT *pctinfo)
Definition: stylesheet.c:165
static HRESULT WINAPI xsltemplate_GetIDsOfNames(IXSLTemplate *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: stylesheet.c:181
static HRESULT WINAPI xsltemplate_get_stylesheet(IXSLTemplate *iface, IXMLDOMNode **node)
Definition: stylesheet.c:221
static ULONG WINAPI xsltemplate_AddRef(IXSLTemplate *iface)
Definition: stylesheet.c:142
static HRESULT WINAPI xsltemplate_putref_stylesheet(IXSLTemplate *iface, IXMLDOMNode *node)
Definition: stylesheet.c:202
static HRESULT WINAPI xsltemplate_createProcessor(IXSLTemplate *iface, IXSLProcessor **processor)
Definition: stylesheet.c:230
static ULONG WINAPI xsltemplate_Release(IXSLTemplate *iface)
Definition: stylesheet.c:150
static HRESULT WINAPI xsltemplate_Invoke(IXSLTemplate *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: stylesheet.c:191
static HRESULT WINAPI xsltemplate_QueryInterface(IXSLTemplate *iface, REFIID riid, void **ppvObject)
Definition: stylesheet.c:113

Definition at line 242 of file stylesheet.c.

Referenced by XSLTemplate_create().