winevulkan: Update to VK spec version 1.2.188.
[wine.git] / dlls / wuapi / updates.c
blob249f07ae96ff497c3e53d9fa3800aac5a7ecaf7c
1 /*
2 * IAutomaticUpdates 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 _automatic_updates
38 IAutomaticUpdates IAutomaticUpdates_iface;
39 LONG refs;
40 } automatic_updates;
42 static inline automatic_updates *impl_from_IAutomaticUpdates( IAutomaticUpdates *iface )
44 return CONTAINING_RECORD(iface, automatic_updates, IAutomaticUpdates_iface);
47 static ULONG WINAPI automatic_updates_AddRef(
48 IAutomaticUpdates *iface )
50 automatic_updates *automatic_updates = impl_from_IAutomaticUpdates( iface );
51 return InterlockedIncrement( &automatic_updates->refs );
54 static ULONG WINAPI automatic_updates_Release(
55 IAutomaticUpdates *iface )
57 automatic_updates *automatic_updates = impl_from_IAutomaticUpdates( iface );
58 LONG refs = InterlockedDecrement( &automatic_updates->refs );
59 if (!refs)
61 TRACE("destroying %p\n", automatic_updates);
62 HeapFree( GetProcessHeap(), 0, automatic_updates );
64 return refs;
67 static HRESULT WINAPI automatic_updates_QueryInterface(
68 IAutomaticUpdates *iface,
69 REFIID riid,
70 void **ppvObject )
72 automatic_updates *This = impl_from_IAutomaticUpdates( iface );
74 TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject );
76 if ( IsEqualGUID( riid, &IID_IAutomaticUpdates ) ||
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 IAutomaticUpdates_AddRef( iface );
88 return S_OK;
91 static HRESULT WINAPI automatic_updates_GetTypeInfoCount(
92 IAutomaticUpdates *iface,
93 UINT *pctinfo )
95 FIXME("\n");
96 return E_NOTIMPL;
99 static HRESULT WINAPI automatic_updates_GetTypeInfo(
100 IAutomaticUpdates *iface,
101 UINT iTInfo,
102 LCID lcid,
103 ITypeInfo **ppTInfo )
105 FIXME("\n");
106 return E_NOTIMPL;
109 static HRESULT WINAPI automatic_updates_GetIDsOfNames(
110 IAutomaticUpdates *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 automatic_updates_Invoke(
122 IAutomaticUpdates *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 automatic_updates_DetectNow(
137 IAutomaticUpdates *This )
139 FIXME("\n");
140 return E_NOTIMPL;
143 static HRESULT WINAPI automatic_updates_Pause(
144 IAutomaticUpdates *This )
146 FIXME("\n");
147 return S_OK;
150 static HRESULT WINAPI automatic_updates_Resume(
151 IAutomaticUpdates *This )
153 FIXME("\n");
154 return S_OK;
157 static HRESULT WINAPI automatic_updates_ShowSettingsDialog(
158 IAutomaticUpdates *This )
160 FIXME("\n");
161 return E_NOTIMPL;
164 static HRESULT WINAPI automatic_updates_EnableService(
165 IAutomaticUpdates *This )
167 FIXME("\n");
168 return E_NOTIMPL;
171 static HRESULT WINAPI automatic_updates_get_ServiceEnabled(
172 IAutomaticUpdates *This,
173 VARIANT_BOOL *retval )
175 FIXME("%p\n", retval);
176 return E_NOTIMPL;
179 static HRESULT WINAPI automatic_updates_get_Settings(
180 IAutomaticUpdates *This,
181 IAutomaticUpdatesSettings **retval )
183 FIXME("%p\n", retval);
184 return E_NOTIMPL;
187 static const struct IAutomaticUpdatesVtbl automatic_updates_vtbl =
189 automatic_updates_QueryInterface,
190 automatic_updates_AddRef,
191 automatic_updates_Release,
192 automatic_updates_GetTypeInfoCount,
193 automatic_updates_GetTypeInfo,
194 automatic_updates_GetIDsOfNames,
195 automatic_updates_Invoke,
196 automatic_updates_DetectNow,
197 automatic_updates_Pause,
198 automatic_updates_Resume,
199 automatic_updates_ShowSettingsDialog,
200 automatic_updates_get_Settings,
201 automatic_updates_get_ServiceEnabled,
202 automatic_updates_EnableService
205 HRESULT AutomaticUpdates_create( LPVOID *ppObj )
207 automatic_updates *updates;
209 TRACE("(%p)\n", ppObj);
211 updates = HeapAlloc( GetProcessHeap(), 0, sizeof(*updates) );
212 if (!updates) return E_OUTOFMEMORY;
214 updates->IAutomaticUpdates_iface.lpVtbl = &automatic_updates_vtbl;
215 updates->refs = 1;
217 *ppObj = &updates->IAutomaticUpdates_iface;
219 TRACE("returning iface %p\n", *ppObj);
220 return S_OK;