2 * Copyright 2005 Jacek Caban
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
35 #include "wine/debug.h"
37 #include "mshtml_private.h"
39 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
41 /**********************************************************
42 * IPersistMoniker implementation
45 #define PERSISTMON_THIS \
46 HTMLDocument* const This=(HTMLDocument*)((char*)(iface)-offsetof(HTMLDocument,lpPersistMonikerVtbl));
48 static HRESULT WINAPI PersistMoniker_QueryInterface(IPersistMoniker *iface, REFIID riid,
52 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject);
55 static ULONG WINAPI PersistMoniker_AddRef(IPersistMoniker *iface)
58 return IHTMLDocument2_AddRef(HTMLDOC(This));
61 static ULONG WINAPI PersistMoniker_Release(IPersistMoniker *iface)
64 return IHTMLDocument2_Release(HTMLDOC(This));
67 static HRESULT WINAPI PersistMoniker_GetClassID(IPersistMoniker *iface, CLSID *pClassID)
70 return IPersist_GetClassID(PERSIST(This), pClassID);
73 static HRESULT WINAPI PersistMoniker_IsDirty(IPersistMoniker *iface)
75 FIXME("(%p)\n", iface);
79 static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAvailable,
80 IMoniker *pimkName, LPBC pibc, DWORD grfMode)
82 FIXME("(%p)->(%x %p %p %08lx)\n", iface, fFullyAvailable, pimkName, pibc, grfMode);
86 static HRESULT WINAPI PersistMoniker_Save(IPersistMoniker *iface, IMoniker *pimkName,
87 LPBC pbc, BOOL fRemember)
89 FIXME("(%p)->(%p %p %x)\n", iface, pimkName, pbc, fRemember);
93 static HRESULT WINAPI PersistMoniker_SaveCompleted(IPersistMoniker *iface, IMoniker *pimkName, LPBC pibc)
95 FIXME("(%p)->(%p %p)\n", iface, pimkName, pibc);
99 static HRESULT WINAPI PersistMoniker_GetCurMoniker(IPersistMoniker *iface, IMoniker **ppimkName)
101 FIXME("(%p)->(%p)\n", iface, ppimkName);
105 static const IPersistMonikerVtbl PersistMonikerVtbl = {
106 PersistMoniker_QueryInterface,
107 PersistMoniker_AddRef,
108 PersistMoniker_Release,
109 PersistMoniker_GetClassID,
110 PersistMoniker_IsDirty,
113 PersistMoniker_SaveCompleted,
114 PersistMoniker_GetCurMoniker
117 /**********************************************************
118 * IMonikerProp implementation
121 #define MONPROP_THIS \
122 HTMLDocument* const This=(HTMLDocument*)((char*)(iface)-offsetof(HTMLDocument,lpMonikerPropVtbl));
124 static HRESULT WINAPI MonikerProp_QueryInterface(IMonikerProp *iface, REFIID riid, void **ppvObject)
127 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject);
130 static ULONG WINAPI MonikerProp_AddRef(IMonikerProp *iface)
133 return IHTMLDocument2_AddRef(HTMLDOC(This));
136 static ULONG WINAPI MonikerProp_Release(IMonikerProp *iface)
139 return IHTMLDocument_Release(HTMLDOC(This));
142 static HRESULT WINAPI MonikerProp_PutProperty(IMonikerProp *iface, MONIKERPROPERTY mkp, LPCWSTR val)
144 FIXME("(%p)->(%d %s)\n", iface, mkp, debugstr_w(val));
148 static const IMonikerPropVtbl MonikerPropVtbl = {
149 MonikerProp_QueryInterface,
152 MonikerProp_PutProperty
155 /**********************************************************
156 * IPersistFile implementation
159 #define PERSISTFILE_THIS \
160 HTMLDocument* const This=(HTMLDocument*)((char*)(iface)-offsetof(HTMLDocument,lpPersistFileVtbl));
162 static HRESULT WINAPI PersistFile_QueryInterface(IPersistFile *iface, REFIID riid, void **ppvObject)
165 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject);
168 static ULONG WINAPI PersistFile_AddRef(IPersistFile *iface)
171 return IHTMLDocument2_AddRef(HTMLDOC(This));
174 static ULONG WINAPI PersistFile_Release(IPersistFile *iface)
177 return IHTMLDocument2_Release(HTMLDOC(This));
180 static HRESULT WINAPI PersistFile_GetClassID(IPersistFile *iface, CLSID *pClassID)
182 TRACE("(%p)->(%p)\n", iface, pClassID);
187 memcpy(pClassID, &CLSID_HTMLDocument, sizeof(CLSID));
191 static HRESULT WINAPI PersistFile_IsDirty(IPersistFile *iface)
193 FIXME("(%p)\n", iface);
197 static HRESULT WINAPI PersistFile_Load(IPersistFile *iface, LPCOLESTR pszFileName, DWORD dwMode)
199 FIXME("(%p)->(%s %08lx)\n", iface, debugstr_w(pszFileName), dwMode);
203 static HRESULT WINAPI PersistFile_Save(IPersistFile *iface, LPCOLESTR pszFileName, BOOL fRemember)
205 FIXME("(%p)->(%s %x)\n", iface, debugstr_w(pszFileName), fRemember);
209 static HRESULT WINAPI PersistFile_SaveCompleted(IPersistFile *iface, LPCOLESTR pszFileName)
211 FIXME("(%p)->(%s)\n", iface, debugstr_w(pszFileName));
215 static HRESULT WINAPI PersistFile_GetCurFile(IPersistFile *iface, LPOLESTR *pszFileName)
217 FIXME("(%p)->(%p)\n", iface, pszFileName);
221 static const IPersistFileVtbl PersistFileVtbl = {
222 PersistFile_QueryInterface,
225 PersistFile_GetClassID,
229 PersistFile_SaveCompleted,
230 PersistFile_GetCurFile
233 void HTMLDocument_Persist_Init(HTMLDocument *This)
235 This->lpPersistMonikerVtbl = &PersistMonikerVtbl;
236 This->lpPersistFileVtbl = &PersistFileVtbl;
237 This->lpMonikerPropVtbl = &MonikerPropVtbl;