ReactOS 0.4.15-dev-7660-g0086d05
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}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
GLfloat GLfloat p
Definition: glext.h:8902
static const IHTMLStorageVtbl HTMLStorageVtbl
Definition: htmlstorage.c:160
static dispex_static_data_t HTMLStorage_dispex
Definition: htmlstorage.c:181
#define S_OK
Definition: intsafe.h:52
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:919
DispatchEx dispex
Definition: htmlstorage.c:22
IHTMLStorage IHTMLStorage_iface
Definition: htmlstorage.c:23

◆ 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}
#define InterlockedIncrement
Definition: armddk.h:53
static HTMLStorage * impl_from_IHTMLStorage(IHTMLStorage *iface)
Definition: htmlstorage.c:27
long LONG
Definition: pedump.c:60
#define TRACE(s)
Definition: solgame.cpp:4
Definition: send.c:48

◆ 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}
#define FIXME(fmt,...)
Definition: debug.h:111
#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}

◆ 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}

◆ 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: atlbase.h:39

◆ 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}
#define debugstr_w
Definition: kernel32.h:32

◆ 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}

◆ 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}

◆ 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}
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531

◆ 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}

◆ 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}
const GUID IID_IUnknown
#define WARN(fmt,...)
Definition: debug.h:112
#define NULL
Definition: types.h:112
const char * debugstr_mshtml_guid(const GUID *iid)
Definition: main.c:542
REFIID LPVOID * ppv
Definition: atlbase.h:39
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ 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);
74 }
75
76 return ref;
77}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedDecrement
Definition: armddk.h:52
void release_dispex(DispatchEx *This)
Definition: dispex.c:1706

◆ 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}

◆ 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}

◆ impl_from_IHTMLStorage()

Variable Documentation

◆ HTMLStorage_dispex

dispex_static_data_t HTMLStorage_dispex
static
Initial value:
= {
IHTMLStorage_tid,
}
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_get_length(IHTMLStorage *iface, LONG *p)
Definition: htmlstorage.c:111
static HRESULT WINAPI HTMLStorage_removeItem(IHTMLStorage *iface, BSTR bstrKey)
Definition: htmlstorage.c:146
static HRESULT WINAPI HTMLStorage_clear(IHTMLStorage *iface)
Definition: htmlstorage.c:153
static ULONG WINAPI HTMLStorage_AddRef(IHTMLStorage *iface)
Definition: htmlstorage.c:54
static HRESULT WINAPI HTMLStorage_GetTypeInfoCount(IHTMLStorage *iface, UINT *pctinfo)
Definition: htmlstorage.c:79
static HRESULT WINAPI HTMLStorage_GetTypeInfo(IHTMLStorage *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmlstorage.c:85
static ULONG WINAPI HTMLStorage_Release(IHTMLStorage *iface)
Definition: htmlstorage.c:64
static HRESULT WINAPI HTMLStorage_QueryInterface(IHTMLStorage *iface, REFIID riid, void **ppv)
Definition: htmlstorage.c:32
static HRESULT WINAPI HTMLStorage_getItem(IHTMLStorage *iface, BSTR bstrKey, VARIANT *p)
Definition: htmlstorage.c:132
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
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_GetIDsOfNames(IHTMLStorage *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: htmlstorage.c:93

Definition at line 160 of file htmlstorage.c.

Referenced by create_storage().