Removed the FailReadOnly option, this is now the default behavior.
[wine] / dlls / shdocvw / persist.c
1 /*
2  * Implementation of IPersist interfaces for IE Web Browser control
3  *
4  * Copyright 2001 John R. Sheets (for CodeWeavers)
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #include "wine/debug.h"
22 #include "shdocvw.h"
23
24 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
25
26 /**********************************************************************
27  * Implement the IPersistStorage interface
28  */
29
30 static HRESULT WINAPI WBPS_QueryInterface(LPPERSISTSTORAGE iface,
31                                           REFIID riid, LPVOID *ppobj)
32 {
33     ICOM_THIS(IPersistStorageImpl, iface);
34
35     FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
36     return E_NOINTERFACE;
37 }
38
39 static ULONG WINAPI WBPS_AddRef(LPPERSISTSTORAGE iface)
40 {
41     ICOM_THIS(IPersistStorageImpl, iface);
42
43     TRACE("\n");
44     return ++(This->ref);
45 }
46
47 static ULONG WINAPI WBPS_Release(LPPERSISTSTORAGE iface)
48 {
49     ICOM_THIS(IPersistStorageImpl, iface);
50
51     /* static class, won't be freed */
52     TRACE("\n");
53     return --(This->ref);
54 }
55
56 static HRESULT WINAPI WBPS_GetClassID(LPPERSISTSTORAGE iface, CLSID *pClassID)
57 {
58     FIXME("stub: CLSID = %s\n", debugstr_guid(pClassID));
59     return S_OK;
60 }
61
62 static HRESULT WINAPI WBPS_IsDirty(LPPERSISTSTORAGE iface)
63 {
64     FIXME("stub\n");
65     return S_OK;
66 }
67
68 static HRESULT WINAPI WBPS_InitNew(LPPERSISTSTORAGE iface, LPSTORAGE pStg)
69 {
70     FIXME("stub: LPSTORAGE = %p\n", pStg);
71     return S_OK;
72 }
73
74 static HRESULT WINAPI WBPS_Load(LPPERSISTSTORAGE iface, LPSTORAGE pStg)
75 {
76     FIXME("stub: LPSTORAGE = %p\n", pStg);
77     return S_OK;
78 }
79
80 static HRESULT WINAPI WBPS_Save(LPPERSISTSTORAGE iface, LPSTORAGE pStg,
81                                 BOOL fSameAsLoad)
82 {
83     FIXME("stub: LPSTORAGE = %p, fSameAsLoad = %d\n", pStg, fSameAsLoad);
84     return S_OK;
85 }
86
87 static HRESULT WINAPI WBPS_SaveCompleted(LPPERSISTSTORAGE iface, LPSTORAGE pStgNew)
88 {
89     FIXME("stub: LPSTORAGE = %p\n", pStgNew);
90     return S_OK;
91 }
92
93 /**********************************************************************
94  * IPersistStorage virtual function table for IE Web Browser component
95  */
96
97 static ICOM_VTABLE(IPersistStorage) WBPS_Vtbl =
98 {
99     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
100     WBPS_QueryInterface,
101     WBPS_AddRef,
102     WBPS_Release,
103     WBPS_GetClassID,
104     WBPS_IsDirty,
105     WBPS_InitNew,
106     WBPS_Load,
107     WBPS_Save,
108     WBPS_SaveCompleted
109 };
110
111 IPersistStorageImpl SHDOCVW_PersistStorage = { &WBPS_Vtbl, 1 };
112
113
114 /**********************************************************************
115  * Implement the IPersistStreamInit interface
116  */
117
118 static HRESULT WINAPI WBPSI_QueryInterface(LPPERSISTSTREAMINIT iface,
119                                            REFIID riid, LPVOID *ppobj)
120 {
121     ICOM_THIS(IPersistStreamInitImpl, iface);
122
123     FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
124     return E_NOINTERFACE;
125 }
126
127 static ULONG WINAPI WBPSI_AddRef(LPPERSISTSTREAMINIT iface)
128 {
129     ICOM_THIS(IPersistStreamInitImpl, iface);
130
131     TRACE("\n");
132     return ++(This->ref);
133 }
134
135 static ULONG WINAPI WBPSI_Release(LPPERSISTSTREAMINIT iface)
136 {
137     ICOM_THIS(IPersistStreamInitImpl, iface);
138
139     /* static class, won't be freed */
140     TRACE("\n");
141     return --(This->ref);
142 }
143
144 static HRESULT WINAPI WBPSI_GetClassID(LPPERSISTSTREAMINIT iface, CLSID *pClassID)
145 {
146     FIXME("stub: CLSID = %s\n", debugstr_guid(pClassID));
147     return S_OK;
148 }
149
150 static HRESULT WINAPI WBPSI_IsDirty(LPPERSISTSTREAMINIT iface)
151 {
152     FIXME("stub\n");
153     return S_OK;
154 }
155
156 static HRESULT WINAPI WBPSI_Load(LPPERSISTSTREAMINIT iface, LPSTREAM pStg)
157 {
158     FIXME("stub: LPSTORAGE = %p\n", pStg);
159     return S_OK;
160 }
161
162 static HRESULT WINAPI WBPSI_Save(LPPERSISTSTREAMINIT iface, LPSTREAM pStg,
163                                 BOOL fSameAsLoad)
164 {
165     FIXME("stub: LPSTORAGE = %p, fSameAsLoad = %d\n", pStg, fSameAsLoad);
166     return S_OK;
167 }
168
169 static HRESULT WINAPI WBPSI_GetSizeMax(LPPERSISTSTREAMINIT iface,
170                                        ULARGE_INTEGER *pcbSize)
171 {
172     FIXME("stub: ULARGE_INTEGER = %p\n", pcbSize);
173     return S_OK;
174 }
175
176 static HRESULT WINAPI WBPSI_InitNew(LPPERSISTSTREAMINIT iface)
177 {
178     FIXME("stub\n");
179     return S_OK;
180 }
181
182 /**********************************************************************
183  * IPersistStreamInit virtual function table for IE Web Browser component
184  */
185
186 static ICOM_VTABLE(IPersistStreamInit) WBPSI_Vtbl =
187 {
188     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
189     WBPSI_QueryInterface,
190     WBPSI_AddRef,
191     WBPSI_Release,
192     WBPSI_GetClassID,
193     WBPSI_IsDirty,
194     WBPSI_Load,
195     WBPSI_Save,
196     WBPSI_GetSizeMax,
197     WBPSI_InitNew
198 };
199
200 IPersistStreamInitImpl SHDOCVW_PersistStreamInit = { &WBPSI_Vtbl, 1 };