ReactOS  0.4.14-dev-337-gf981a68
htmlstorage.c File Reference
#include "mshtml_private.h"
Include dependency graph for htmlstorage.c:

Go to the source code of this file.

Classes

struct  HTMLStorage
 

Functions

static HTMLStorageimpl_from_IHTMLStorage (IHTMLStorage *iface)
 
static HRESULT WINAPI HTMLStorage_QueryInterface (IHTMLStorage *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI HTMLStorage_AddRef (IHTMLStorage *iface)
 
static ULONG WINAPI HTMLStorage_Release (IHTMLStorage *iface)
 
static HRESULT WINAPI HTMLStorage_GetTypeInfoCount (IHTMLStorage *iface, UINT *pctinfo)
 
static HRESULT WINAPI HTMLStorage_GetTypeInfo (IHTMLStorage *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI HTMLStorage_GetIDsOfNames (IHTMLStorage *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI HTMLStorage_Invoke (IHTMLStorage *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI HTMLStorage_get_length (IHTMLStorage *iface, LONG *p)
 
static HRESULT WINAPI HTMLStorage_get_remainingSpace (IHTMLStorage *iface, LONG *p)
 
static HRESULT WINAPI HTMLStorage_key (IHTMLStorage *iface, LONG lIndex, BSTR *p)
 
static HRESULT WINAPI HTMLStorage_getItem (IHTMLStorage *iface, BSTR bstrKey, VARIANT *p)
 
static HRESULT WINAPI HTMLStorage_setItem (IHTMLStorage *iface, BSTR bstrKey, BSTR bstrValue)
 
static HRESULT WINAPI HTMLStorage_removeItem (IHTMLStorage *iface, BSTR bstrKey)
 
static HRESULT WINAPI HTMLStorage_clear (IHTMLStorage *iface)
 
HRESULT create_storage (IHTMLStorage **p)
 

Variables

static const IHTMLStorageVtbl HTMLStorageVtbl
 
static const tid_t HTMLStorage_iface_tids []
 
static dispex_static_data_t HTMLStorage_dispex
 

Function Documentation

◆ create_storage()

HRESULT create_storage ( IHTMLStorage **  p)

Definition at line 188 of file htmlstorage.c.

189 {
190  HTMLStorage *storage;
191 
192  storage = heap_alloc_zero(sizeof(*storage));
193  if(!storage)
194  return E_OUTOFMEMORY;
195 
196  storage->IHTMLStorage_iface.lpVtbl = &HTMLStorageVtbl;
197  storage->ref = 1;
199 
200  *p = &storage->IHTMLStorage_iface;
201  return S_OK;
202 }
DispatchEx dispex
Definition: htmlstorage.c:22
static const IHTMLStorageVtbl HTMLStorageVtbl
Definition: htmlstorage.c:160
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static dispex_static_data_t HTMLStorage_dispex
Definition: htmlstorage.c:181
#define S_OK
Definition: intsafe.h:59
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:919
GLfloat GLfloat p
Definition: glext.h:8902
IHTMLStorage IHTMLStorage_iface
Definition: htmlstorage.c:23

Referenced by HTMLWindow6_get_sessionStorage().

◆ HTMLStorage_AddRef()

static ULONG WINAPI HTMLStorage_AddRef ( IHTMLStorage *  iface)
static

Definition at line 54 of file htmlstorage.c.

55 {
58 
59  TRACE("(%p) ref=%d\n", This, ref);
60 
61  return ref;
62 }
Definition: send.c:47
static HTMLStorage * impl_from_IHTMLStorage(IHTMLStorage *iface)
Definition: htmlstorage.c:27
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53

◆ HTMLStorage_clear()

static HRESULT WINAPI HTMLStorage_clear ( IHTMLStorage *  iface)
static

Definition at line 153 of file htmlstorage.c.

154 {
156  FIXME("(%p)->()\n", This);
157  return E_NOTIMPL;
158 }
static HTMLStorage * impl_from_IHTMLStorage(IHTMLStorage *iface)
Definition: htmlstorage.c:27
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ HTMLStorage_get_length()

static HRESULT WINAPI HTMLStorage_get_length ( IHTMLStorage *  iface,
LONG p 
)
static

Definition at line 111 of file htmlstorage.c.

112 {
114  FIXME("(%p)->(%p)\n", This, p);
115  return E_NOTIMPL;
116 }
static HTMLStorage * impl_from_IHTMLStorage(IHTMLStorage *iface)
Definition: htmlstorage.c:27
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
GLfloat GLfloat p
Definition: glext.h:8902

◆ HTMLStorage_get_remainingSpace()

static HRESULT WINAPI HTMLStorage_get_remainingSpace ( IHTMLStorage *  iface,
LONG p 
)
static

Definition at line 118 of file htmlstorage.c.

119 {
121  FIXME("(%p)->(%p)\n", This, p);
122  return E_NOTIMPL;
123 }
static HTMLStorage * impl_from_IHTMLStorage(IHTMLStorage *iface)
Definition: htmlstorage.c:27
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
GLfloat GLfloat p
Definition: glext.h:8902

◆ HTMLStorage_GetIDsOfNames()

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

Definition at line 93 of file htmlstorage.c.

95 {
97 
98  return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
99  lcid, rgDispId);
100 }
REFIID riid
Definition: precomp.h:44
static HTMLStorage * impl_from_IHTMLStorage(IHTMLStorage *iface)
Definition: htmlstorage.c:27

◆ HTMLStorage_getItem()

static HRESULT WINAPI HTMLStorage_getItem ( IHTMLStorage *  iface,
BSTR  bstrKey,
VARIANT p 
)
static

Definition at line 132 of file htmlstorage.c.

133 {
135  FIXME("(%p)->(%s %p)\n", This, debugstr_w(bstrKey), p);
136  return E_NOTIMPL;
137 }
static HTMLStorage * impl_from_IHTMLStorage(IHTMLStorage *iface)
Definition: htmlstorage.c:27
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
GLfloat GLfloat p
Definition: glext.h:8902

◆ HTMLStorage_GetTypeInfo()

static HRESULT WINAPI HTMLStorage_GetTypeInfo ( IHTMLStorage *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 85 of file htmlstorage.c.

87 {
89 
90  return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
91 }
static HTMLStorage * impl_from_IHTMLStorage(IHTMLStorage *iface)
Definition: htmlstorage.c:27

◆ HTMLStorage_GetTypeInfoCount()

static HRESULT WINAPI HTMLStorage_GetTypeInfoCount ( IHTMLStorage *  iface,
UINT pctinfo 
)
static

Definition at line 79 of file htmlstorage.c.

80 {
82  return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
83 }
static HTMLStorage * impl_from_IHTMLStorage(IHTMLStorage *iface)
Definition: htmlstorage.c:27

◆ HTMLStorage_Invoke()

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

Definition at line 102 of file htmlstorage.c.

104 {
106 
107  return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags,
108  pDispParams, pVarResult, pExcepInfo, puArgErr);
109 }
REFIID riid
Definition: precomp.h:44
static HTMLStorage * impl_from_IHTMLStorage(IHTMLStorage *iface)
Definition: htmlstorage.c:27
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519

◆ HTMLStorage_key()

static HRESULT WINAPI HTMLStorage_key ( IHTMLStorage *  iface,
LONG  lIndex,
BSTR p 
)
static

Definition at line 125 of file htmlstorage.c.

126 {
128  FIXME("(%p)->(%d %p)\n", This, lIndex, p);
129  return E_NOTIMPL;
130 }
static HTMLStorage * impl_from_IHTMLStorage(IHTMLStorage *iface)
Definition: htmlstorage.c:27
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
GLfloat GLfloat p
Definition: glext.h:8902

◆ HTMLStorage_QueryInterface()

static HRESULT WINAPI HTMLStorage_QueryInterface ( IHTMLStorage *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 32 of file htmlstorage.c.

33 {
35 
36  TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
37 
39  *ppv = &This->IHTMLStorage_iface;
40  }else if(IsEqualGUID(&IID_IHTMLStorage, riid)) {
41  *ppv = &This->IHTMLStorage_iface;
42  }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
43  return *ppv ? S_OK : E_NOINTERFACE;
44  }else {
45  *ppv = NULL;
46  WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
47  return E_NOINTERFACE;
48  }
49 
50  IUnknown_AddRef((IUnknown*)*ppv);
51  return S_OK;
52 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
REFIID LPVOID * ppv
Definition: atlbase.h:39
const char * debugstr_mshtml_guid(const GUID *iid)
Definition: main.c:535
static HTMLStorage * impl_from_IHTMLStorage(IHTMLStorage *iface)
Definition: htmlstorage.c:27
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
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

◆ HTMLStorage_Release()

static ULONG WINAPI HTMLStorage_Release ( IHTMLStorage *  iface)
static

Definition at line 64 of file htmlstorage.c.

65 {
68 
69  TRACE("(%p) ref=%d\n", This, ref);
70 
71  if(!ref) {
72  release_dispex(&This->dispex);
73  heap_free(This);
74  }
75 
76  return ref;
77 }
Definition: send.c:47
static HTMLStorage * impl_from_IHTMLStorage(IHTMLStorage *iface)
Definition: htmlstorage.c:27
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
void release_dispex(DispatchEx *This)
Definition: dispex.c:1706
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ HTMLStorage_removeItem()

static HRESULT WINAPI HTMLStorage_removeItem ( IHTMLStorage *  iface,
BSTR  bstrKey 
)
static

Definition at line 146 of file htmlstorage.c.

147 {
149  FIXME("(%p)->(%s)\n", This, debugstr_w(bstrKey));
150  return E_NOTIMPL;
151 }
static HTMLStorage * impl_from_IHTMLStorage(IHTMLStorage *iface)
Definition: htmlstorage.c:27
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ HTMLStorage_setItem()

static HRESULT WINAPI HTMLStorage_setItem ( IHTMLStorage *  iface,
BSTR  bstrKey,
BSTR  bstrValue 
)
static

Definition at line 139 of file htmlstorage.c.

140 {
142  FIXME("(%p)->(%s %s)\n", This, debugstr_w(bstrKey), debugstr_w(bstrValue));
143  return E_NOTIMPL;
144 }
static HTMLStorage * impl_from_IHTMLStorage(IHTMLStorage *iface)
Definition: htmlstorage.c:27
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ impl_from_IHTMLStorage()

static HTMLStorage* impl_from_IHTMLStorage ( IHTMLStorage *  iface)
inlinestatic

Definition at line 27 of file htmlstorage.c.

28 {
29  return CONTAINING_RECORD(iface, HTMLStorage, IHTMLStorage_iface);
30 }
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 HTMLStorage_AddRef(), HTMLStorage_clear(), HTMLStorage_get_length(), HTMLStorage_get_remainingSpace(), HTMLStorage_GetIDsOfNames(), HTMLStorage_getItem(), HTMLStorage_GetTypeInfo(), HTMLStorage_GetTypeInfoCount(), HTMLStorage_Invoke(), HTMLStorage_key(), HTMLStorage_QueryInterface(), HTMLStorage_Release(), HTMLStorage_removeItem(), and HTMLStorage_setItem().

Variable Documentation

◆ HTMLStorage_dispex

dispex_static_data_t HTMLStorage_dispex
static
Initial value:
= {
IHTMLStorage_tid,
}
smooth NULL
Definition: ftsmooth.c:416
static const tid_t HTMLStorage_iface_tids[]
Definition: htmlstorage.c:177

Definition at line 181 of file htmlstorage.c.

Referenced by create_storage().

◆ HTMLStorage_iface_tids

const tid_t HTMLStorage_iface_tids[]
static
Initial value:
= {
IHTMLStorage_tid,
0
}

Definition at line 177 of file htmlstorage.c.

◆ HTMLStorageVtbl

const IHTMLStorageVtbl HTMLStorageVtbl
static
Initial value:
= {
}
static HRESULT WINAPI HTMLStorage_QueryInterface(IHTMLStorage *iface, REFIID riid, void **ppv)
Definition: htmlstorage.c:32
static HRESULT WINAPI HTMLStorage_GetTypeInfoCount(IHTMLStorage *iface, UINT *pctinfo)
Definition: htmlstorage.c:79
static HRESULT WINAPI HTMLStorage_getItem(IHTMLStorage *iface, BSTR bstrKey, VARIANT *p)
Definition: htmlstorage.c:132
static HRESULT WINAPI HTMLStorage_get_length(IHTMLStorage *iface, LONG *p)
Definition: htmlstorage.c:111
static HRESULT WINAPI HTMLStorage_removeItem(IHTMLStorage *iface, BSTR bstrKey)
Definition: htmlstorage.c:146
static ULONG WINAPI HTMLStorage_AddRef(IHTMLStorage *iface)
Definition: htmlstorage.c:54
static HRESULT WINAPI HTMLStorage_GetIDsOfNames(IHTMLStorage *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: htmlstorage.c:93
static ULONG WINAPI HTMLStorage_Release(IHTMLStorage *iface)
Definition: htmlstorage.c:64
static HRESULT WINAPI HTMLStorage_clear(IHTMLStorage *iface)
Definition: htmlstorage.c:153
static HRESULT WINAPI HTMLStorage_setItem(IHTMLStorage *iface, BSTR bstrKey, BSTR bstrValue)
Definition: htmlstorage.c:139
static HRESULT WINAPI HTMLStorage_key(IHTMLStorage *iface, LONG lIndex, BSTR *p)
Definition: htmlstorage.c:125
static HRESULT WINAPI HTMLStorage_get_remainingSpace(IHTMLStorage *iface, LONG *p)
Definition: htmlstorage.c:118
static HRESULT WINAPI HTMLStorage_GetTypeInfo(IHTMLStorage *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmlstorage.c:85
static HRESULT WINAPI HTMLStorage_Invoke(IHTMLStorage *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: htmlstorage.c:102

Definition at line 160 of file htmlstorage.c.

Referenced by create_storage().