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
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
,
51 return IHTMLDocument2_QueryInterface(HTMLDOC(This
), riid
, ppvObject
);
54 static ULONG WINAPI
PersistMoniker_AddRef(IPersistMoniker
*iface
)
57 return IHTMLDocument2_AddRef(HTMLDOC(This
));
60 static ULONG WINAPI
PersistMoniker_Release(IPersistMoniker
*iface
)
63 return IHTMLDocument2_Release(HTMLDOC(This
));
66 static HRESULT WINAPI
PersistMoniker_GetClassID(IPersistMoniker
*iface
, CLSID
*pClassID
)
69 return IPersist_GetClassID(PERSIST(This
), pClassID
);
72 static HRESULT WINAPI
PersistMoniker_IsDirty(IPersistMoniker
*iface
)
74 FIXME("(%p)\n", iface
);
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
);
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
);
92 static HRESULT WINAPI
PersistMoniker_SaveCompleted(IPersistMoniker
*iface
, IMoniker
*pimkName
, LPBC pibc
)
94 FIXME("(%p)->(%p %p)\n", iface
, pimkName
, pibc
);
98 static HRESULT WINAPI
PersistMoniker_GetCurMoniker(IPersistMoniker
*iface
, IMoniker
**ppimkName
)
100 FIXME("(%p)->(%p)\n", iface
, ppimkName
);
104 static const IPersistMonikerVtbl PersistMonikerVtbl
= {
105 PersistMoniker_QueryInterface
,
106 PersistMoniker_AddRef
,
107 PersistMoniker_Release
,
108 PersistMoniker_GetClassID
,
109 PersistMoniker_IsDirty
,
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
)
126 return IHTMLDocument2_QueryInterface(HTMLDOC(This
), riid
, ppvObject
);
129 static ULONG WINAPI
MonikerProp_AddRef(IMonikerProp
*iface
)
132 return IHTMLDocument2_AddRef(HTMLDOC(This
));
135 static ULONG WINAPI
MonikerProp_Release(IMonikerProp
*iface
)
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
));
147 static const IMonikerPropVtbl MonikerPropVtbl
= {
148 MonikerProp_QueryInterface
,
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
)
164 return IHTMLDocument2_QueryInterface(HTMLDOC(This
), riid
, ppvObject
);
167 static ULONG WINAPI
PersistFile_AddRef(IPersistFile
*iface
)
170 return IHTMLDocument2_AddRef(HTMLDOC(This
));
173 static ULONG WINAPI
PersistFile_Release(IPersistFile
*iface
)
176 return IHTMLDocument2_Release(HTMLDOC(This
));
179 static HRESULT WINAPI
PersistFile_GetClassID(IPersistFile
*iface
, CLSID
*pClassID
)
181 TRACE("(%p)->(%p)\n", iface
, pClassID
);
186 memcpy(pClassID
, &CLSID_HTMLDocument
, sizeof(CLSID
));
190 static HRESULT WINAPI
PersistFile_IsDirty(IPersistFile
*iface
)
192 FIXME("(%p)\n", iface
);
196 static HRESULT WINAPI
PersistFile_Load(IPersistFile
*iface
, LPCOLESTR pszFileName
, DWORD dwMode
)
198 FIXME("(%p)->(%s %08lx)\n", iface
, debugstr_w(pszFileName
), dwMode
);
202 static HRESULT WINAPI
PersistFile_Save(IPersistFile
*iface
, LPCOLESTR pszFileName
, BOOL fRemember
)
204 FIXME("(%p)->(%s %x)\n", iface
, debugstr_w(pszFileName
), fRemember
);
208 static HRESULT WINAPI
PersistFile_SaveCompleted(IPersistFile
*iface
, LPCOLESTR pszFileName
)
210 FIXME("(%p)->(%s)\n", iface
, debugstr_w(pszFileName
));
214 static HRESULT WINAPI
PersistFile_GetCurFile(IPersistFile
*iface
, LPOLESTR
*pszFileName
)
216 FIXME("(%p)->(%p)\n", iface
, pszFileName
);
220 static const IPersistFileVtbl PersistFileVtbl
= {
221 PersistFile_QueryInterface
,
224 PersistFile_GetClassID
,
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
;