Change messages about config file to registry.
[wine/multimedia.git] / dlls / mshtml / persist.c
blob2f78fbcb0d7d19afb33510eef224bf119b696c92
1 /*
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
19 #include "config.h"
21 #include <stdarg.h>
22 #include <stdio.h>
24 #define COBJMACROS
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "ole2.h"
30 #include "docobj.h"
32 #include "mshtml.h"
34 #include "wine/debug.h"
36 #include "mshtml_private.h"
38 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
40 /**********************************************************
41 * IPersistMoniker implementation
44 #define PERSISTMON_THIS \
45 HTMLDocument* const This=(HTMLDocument*)((char*)(iface)-offsetof(HTMLDocument,lpPersistMonikerVtbl));
47 static HRESULT WINAPI PersistMoniker_QueryInterface(IPersistMoniker *iface, REFIID riid,
48 void **ppvObject)
50 PERSISTMON_THIS
51 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject);
54 static ULONG WINAPI PersistMoniker_AddRef(IPersistMoniker *iface)
56 PERSISTMON_THIS
57 return IHTMLDocument2_AddRef(HTMLDOC(This));
60 static ULONG WINAPI PersistMoniker_Release(IPersistMoniker *iface)
62 PERSISTMON_THIS
63 return IHTMLDocument2_Release(HTMLDOC(This));
66 static HRESULT WINAPI PersistMoniker_GetClassID(IPersistMoniker *iface, CLSID *pClassID)
68 PERSISTMON_THIS
69 return IPersist_GetClassID(PERSIST(This), pClassID);
72 static HRESULT WINAPI PersistMoniker_IsDirty(IPersistMoniker *iface)
74 FIXME("(%p)\n", iface);
75 return E_NOTIMPL;
78 static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAvailable,
79 IMoniker *pimkName, LPBC pibc, DWORD grfMode)
81 FIXME("(%p)->(%x %p %p %08lx)\n", iface, fFullyAvailable, pimkName, pibc, grfMode);
82 return S_OK;
85 static HRESULT WINAPI PersistMoniker_Save(IPersistMoniker *iface, IMoniker *pimkName,
86 LPBC pbc, BOOL fRemember)
88 FIXME("(%p)->(%p %p %x)\n", iface, pimkName, pbc, fRemember);
89 return E_NOTIMPL;
92 static HRESULT WINAPI PersistMoniker_SaveCompleted(IPersistMoniker *iface, IMoniker *pimkName, LPBC pibc)
94 FIXME("(%p)->(%p %p)\n", iface, pimkName, pibc);
95 return E_NOTIMPL;
98 static HRESULT WINAPI PersistMoniker_GetCurMoniker(IPersistMoniker *iface, IMoniker **ppimkName)
100 FIXME("(%p)->(%p)\n", iface, ppimkName);
101 return E_NOTIMPL;
104 static const IPersistMonikerVtbl PersistMonikerVtbl = {
105 PersistMoniker_QueryInterface,
106 PersistMoniker_AddRef,
107 PersistMoniker_Release,
108 PersistMoniker_GetClassID,
109 PersistMoniker_IsDirty,
110 PersistMoniker_Load,
111 PersistMoniker_Save,
112 PersistMoniker_SaveCompleted,
113 PersistMoniker_GetCurMoniker
116 /**********************************************************
117 * IMonikerProp implementation
120 #define MONPROP_THIS \
121 HTMLDocument* const This=(HTMLDocument*)((char*)(iface)-offsetof(HTMLDocument,lpMonikerPropVtbl));
123 static HRESULT WINAPI MonikerProp_QueryInterface(IMonikerProp *iface, REFIID riid, void **ppvObject)
125 MONPROP_THIS
126 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject);
129 static ULONG WINAPI MonikerProp_AddRef(IMonikerProp *iface)
131 MONPROP_THIS
132 return IHTMLDocument2_AddRef(HTMLDOC(This));
135 static ULONG WINAPI MonikerProp_Release(IMonikerProp *iface)
137 MONPROP_THIS
138 return IHTMLDocument_Release(HTMLDOC(This));
141 static HRESULT WINAPI MonikerProp_PutProperty(IMonikerProp *iface, MONIKERPROPERTY mkp, LPCWSTR val)
143 FIXME("(%p)->(%d %s)\n", iface, mkp, debugstr_w(val));
144 return E_NOTIMPL;
147 static const IMonikerPropVtbl MonikerPropVtbl = {
148 MonikerProp_QueryInterface,
149 MonikerProp_AddRef,
150 MonikerProp_Release,
151 MonikerProp_PutProperty
154 /**********************************************************
155 * IPersistFile implementation
158 #define PERSISTFILE_THIS \
159 HTMLDocument* const This=(HTMLDocument*)((char*)(iface)-offsetof(HTMLDocument,lpPersistFileVtbl));
161 static HRESULT WINAPI PersistFile_QueryInterface(IPersistFile *iface, REFIID riid, void **ppvObject)
163 PERSISTFILE_THIS
164 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppvObject);
167 static ULONG WINAPI PersistFile_AddRef(IPersistFile *iface)
169 PERSISTFILE_THIS
170 return IHTMLDocument2_AddRef(HTMLDOC(This));
173 static ULONG WINAPI PersistFile_Release(IPersistFile *iface)
175 PERSISTFILE_THIS
176 return IHTMLDocument2_Release(HTMLDOC(This));
179 static HRESULT WINAPI PersistFile_GetClassID(IPersistFile *iface, CLSID *pClassID)
181 TRACE("(%p)->(%p)\n", iface, pClassID);
183 if(!pClassID)
184 return E_INVALIDARG;
186 memcpy(pClassID, &CLSID_HTMLDocument, sizeof(CLSID));
187 return S_OK;
190 static HRESULT WINAPI PersistFile_IsDirty(IPersistFile *iface)
192 FIXME("(%p)\n", iface);
193 return E_NOTIMPL;
196 static HRESULT WINAPI PersistFile_Load(IPersistFile *iface, LPCOLESTR pszFileName, DWORD dwMode)
198 FIXME("(%p)->(%s %08lx)\n", iface, debugstr_w(pszFileName), dwMode);
199 return E_NOTIMPL;
202 static HRESULT WINAPI PersistFile_Save(IPersistFile *iface, LPCOLESTR pszFileName, BOOL fRemember)
204 FIXME("(%p)->(%s %x)\n", iface, debugstr_w(pszFileName), fRemember);
205 return E_NOTIMPL;
208 static HRESULT WINAPI PersistFile_SaveCompleted(IPersistFile *iface, LPCOLESTR pszFileName)
210 FIXME("(%p)->(%s)\n", iface, debugstr_w(pszFileName));
211 return E_NOTIMPL;
214 static HRESULT WINAPI PersistFile_GetCurFile(IPersistFile *iface, LPOLESTR *pszFileName)
216 FIXME("(%p)->(%p)\n", iface, pszFileName);
217 return E_NOTIMPL;
220 static const IPersistFileVtbl PersistFileVtbl = {
221 PersistFile_QueryInterface,
222 PersistFile_AddRef,
223 PersistFile_Release,
224 PersistFile_GetClassID,
225 PersistFile_IsDirty,
226 PersistFile_Load,
227 PersistFile_Save,
228 PersistFile_SaveCompleted,
229 PersistFile_GetCurFile
232 void HTMLDocument_Persist_Init(HTMLDocument *This)
234 This->lpPersistMonikerVtbl = &PersistMonikerVtbl;
235 This->lpPersistFileVtbl = &PersistFileVtbl;
236 This->lpMonikerPropVtbl = &MonikerPropVtbl;