msdasql: Support IRowsetInfo in IRowset interface.
[wine.git] / dlls / wuapi / installer.c
blobacfc101f8c2ec25274d84a778e6169c1fc5b730d
1 /*
2 * IUpdateInstaller implementation
4 * Copyright 2008 Hans Leidekker
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.
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.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #define COBJMACROS
23 #include <stdarg.h>
25 #include "windef.h"
26 #include "winbase.h"
27 #include "winuser.h"
28 #include "ole2.h"
29 #include "wuapi.h"
30 #include "wuapi_private.h"
32 #include "wine/debug.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(wuapi);
36 typedef struct _update_installer
38 IUpdateInstaller IUpdateInstaller_iface;
39 LONG refs;
40 } update_installer;
42 static inline update_installer *impl_from_IUpdateInstaller( IUpdateInstaller *iface )
44 return CONTAINING_RECORD(iface, update_installer, IUpdateInstaller_iface);
47 static ULONG WINAPI update_installer_AddRef(
48 IUpdateInstaller *iface )
50 update_installer *update_installer = impl_from_IUpdateInstaller( iface );
51 return InterlockedIncrement( &update_installer->refs );
54 static ULONG WINAPI update_installer_Release(
55 IUpdateInstaller *iface )
57 update_installer *update_installer = impl_from_IUpdateInstaller( iface );
58 LONG refs = InterlockedDecrement( &update_installer->refs );
59 if (!refs)
61 TRACE("destroying %p\n", update_installer);
62 HeapFree( GetProcessHeap(), 0, update_installer );
64 return refs;
67 static HRESULT WINAPI update_installer_QueryInterface(
68 IUpdateInstaller *iface,
69 REFIID riid,
70 void **ppvObject )
72 update_installer *This = impl_from_IUpdateInstaller( iface );
74 TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject );
76 if ( IsEqualGUID( riid, &IID_IUpdateInstaller ) ||
77 IsEqualGUID( riid, &IID_IDispatch ) ||
78 IsEqualGUID( riid, &IID_IUnknown ) )
80 *ppvObject = iface;
82 else
84 FIXME("interface %s not implemented\n", debugstr_guid(riid));
85 return E_NOINTERFACE;
87 IUpdateInstaller_AddRef( iface );
88 return S_OK;
91 static HRESULT WINAPI update_installer_GetTypeInfoCount(
92 IUpdateInstaller *iface,
93 UINT *pctinfo )
95 FIXME("\n");
96 return E_NOTIMPL;
99 static HRESULT WINAPI update_installer_GetTypeInfo(
100 IUpdateInstaller *iface,
101 UINT iTInfo,
102 LCID lcid,
103 ITypeInfo **ppTInfo )
105 FIXME("\n");
106 return E_NOTIMPL;
109 static HRESULT WINAPI update_installer_GetIDsOfNames(
110 IUpdateInstaller *iface,
111 REFIID riid,
112 LPOLESTR *rgszNames,
113 UINT cNames,
114 LCID lcid,
115 DISPID *rgDispId )
117 FIXME("\n");
118 return E_NOTIMPL;
121 static HRESULT WINAPI update_installer_Invoke(
122 IUpdateInstaller *iface,
123 DISPID dispIdMember,
124 REFIID riid,
125 LCID lcid,
126 WORD wFlags,
127 DISPPARAMS *pDispParams,
128 VARIANT *pVarResult,
129 EXCEPINFO *pExcepInfo,
130 UINT *puArgErr )
132 FIXME("\n");
133 return E_NOTIMPL;
136 static HRESULT WINAPI update_installer_get_ClientApplicationID(
137 IUpdateInstaller *This,
138 BSTR *retval )
140 FIXME("\n");
141 return E_NOTIMPL;
144 static HRESULT WINAPI update_installer_put_ClientApplicationID(
145 IUpdateInstaller *This,
146 BSTR value )
148 FIXME("%p, %s\n", This, debugstr_w(value));
149 return E_NOTIMPL;
152 static HRESULT WINAPI update_installer_get_IsForced(
153 IUpdateInstaller *This,
154 VARIANT_BOOL *retval )
156 FIXME("\n");
157 return E_NOTIMPL;
160 static HRESULT WINAPI update_installer_put_IsForced(
161 IUpdateInstaller *This,
162 VARIANT_BOOL value )
164 FIXME("\n");
165 return E_NOTIMPL;
168 static HRESULT WINAPI update_installer_get_ParentHwnd(
169 IUpdateInstaller *This,
170 HWND *retval )
172 FIXME("\n");
173 return E_NOTIMPL;
176 static HRESULT WINAPI update_installer_put_ParentHwnd(
177 IUpdateInstaller *This,
178 HWND value )
180 FIXME("\n");
181 return E_NOTIMPL;
184 static HRESULT WINAPI update_installer_put_ParentWindow(
185 IUpdateInstaller *This,
186 IUnknown *value )
188 FIXME("\n");
189 return E_NOTIMPL;
192 static HRESULT WINAPI update_installer_get_ParentWindow(
193 IUpdateInstaller *This,
194 IUnknown **retval )
196 FIXME("\n");
197 return E_NOTIMPL;
200 static HRESULT WINAPI update_installer_get_Updates(
201 IUpdateInstaller *This,
202 IUpdateCollection **retval )
204 FIXME("\n");
205 return E_NOTIMPL;
208 static HRESULT WINAPI update_installer_put_Updates(
209 IUpdateInstaller *This,
210 IUpdateCollection *value )
212 FIXME("\n");
213 return E_NOTIMPL;
216 static HRESULT WINAPI update_installer_BeginInstall(
217 IUpdateInstaller *This,
218 IUnknown *onProgressChanged,
219 IUnknown *onCompleted,
220 VARIANT state,
221 IInstallationJob **retval )
223 FIXME("\n");
224 return E_NOTIMPL;
227 static HRESULT WINAPI update_installer_BeginUninstall(
228 IUpdateInstaller *This,
229 IUnknown *onProgressChanged,
230 IUnknown *onCompleted,
231 VARIANT state,
232 IInstallationJob **retval )
234 FIXME("\n");
235 return E_NOTIMPL;
238 static HRESULT WINAPI update_installer_EndInstall(
239 IUpdateInstaller *This,
240 IInstallationJob *value,
241 IInstallationResult **retval )
243 FIXME("\n");
244 return E_NOTIMPL;
247 static HRESULT WINAPI update_installer_EndUninstall(
248 IUpdateInstaller *This,
249 IInstallationJob *value,
250 IInstallationResult **retval )
252 FIXME("\n");
253 return E_NOTIMPL;
256 static HRESULT WINAPI update_installer_Install(
257 IUpdateInstaller *This,
258 IInstallationResult **retval )
260 FIXME("\n");
261 return E_NOTIMPL;
264 static HRESULT WINAPI update_installer_RunWizard(
265 IUpdateInstaller *This,
266 BSTR dialogTitle,
267 IInstallationResult **retval )
269 FIXME("\n");
270 return E_NOTIMPL;
273 static HRESULT WINAPI update_installer_get_IsBusy(
274 IUpdateInstaller *This,
275 VARIANT_BOOL *retval )
277 FIXME("semi-stub, returning VARIANT_FALSE!\n");
278 *retval = VARIANT_FALSE;
279 return S_OK;
282 static HRESULT WINAPI update_installer_Uninstall(
283 IUpdateInstaller *This,
284 IInstallationResult **retval )
286 FIXME("\n");
287 return E_NOTIMPL;
290 static HRESULT WINAPI update_installer_get_AllowSourcePrompts(
291 IUpdateInstaller *This,
292 VARIANT_BOOL *retval )
294 FIXME("\n");
295 return E_NOTIMPL;
298 static HRESULT WINAPI update_installer_put_AllowSourcePrompts(
299 IUpdateInstaller *This,
300 VARIANT_BOOL value )
302 FIXME("\n");
303 return E_NOTIMPL;
306 static HRESULT WINAPI update_installer_get_RebootRequiredBeforeInstallation(
307 IUpdateInstaller *This,
308 VARIANT_BOOL *retval )
310 FIXME("\n");
311 return E_NOTIMPL;
314 static const struct IUpdateInstallerVtbl update_installer_vtbl =
316 update_installer_QueryInterface,
317 update_installer_AddRef,
318 update_installer_Release,
319 update_installer_GetTypeInfoCount,
320 update_installer_GetTypeInfo,
321 update_installer_GetIDsOfNames,
322 update_installer_Invoke,
323 update_installer_get_ClientApplicationID,
324 update_installer_put_ClientApplicationID,
325 update_installer_get_IsForced,
326 update_installer_put_IsForced,
327 update_installer_get_ParentHwnd,
328 update_installer_put_ParentHwnd,
329 update_installer_put_ParentWindow,
330 update_installer_get_ParentWindow,
331 update_installer_get_Updates,
332 update_installer_put_Updates,
333 update_installer_BeginInstall,
334 update_installer_BeginUninstall,
335 update_installer_EndInstall,
336 update_installer_EndUninstall,
337 update_installer_Install,
338 update_installer_RunWizard,
339 update_installer_get_IsBusy,
340 update_installer_Uninstall,
341 update_installer_get_AllowSourcePrompts,
342 update_installer_put_AllowSourcePrompts,
343 update_installer_get_RebootRequiredBeforeInstallation
346 HRESULT UpdateInstaller_create( LPVOID *ppObj )
348 update_installer *installer;
350 TRACE("(%p)\n", ppObj);
352 installer = HeapAlloc( GetProcessHeap(), 0, sizeof(*installer) );
353 if (!installer) return E_OUTOFMEMORY;
355 installer->IUpdateInstaller_iface.lpVtbl = &update_installer_vtbl;
356 installer->refs = 1;
358 *ppObj = &installer->IUpdateInstaller_iface;
360 TRACE("returning iface %p\n", *ppObj);
361 return S_OK;