rpcrt4: Add a stub implementation of CreateStubFromTypeInfo().
[wine.git] / dlls / wuapi / searcher.c
blob1ca8020a09df08fdc685dc8961e23b52157260b4
1 /*
2 * IUpdateSearcher 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 "config.h"
24 #include <stdarg.h>
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "ole2.h"
30 #include "wuapi.h"
31 #include "wuapi_private.h"
33 #include "wine/debug.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(wuapi);
37 typedef struct _update_searcher
39 IUpdateSearcher IUpdateSearcher_iface;
40 LONG refs;
41 } update_searcher;
43 static inline update_searcher *impl_from_IUpdateSearcher( IUpdateSearcher *iface )
45 return CONTAINING_RECORD(iface, update_searcher, IUpdateSearcher_iface);
48 static ULONG WINAPI update_searcher_AddRef(
49 IUpdateSearcher *iface )
51 update_searcher *update_searcher = impl_from_IUpdateSearcher( iface );
52 return InterlockedIncrement( &update_searcher->refs );
55 static ULONG WINAPI update_searcher_Release(
56 IUpdateSearcher *iface )
58 update_searcher *update_searcher = impl_from_IUpdateSearcher( iface );
59 LONG refs = InterlockedDecrement( &update_searcher->refs );
60 if (!refs)
62 TRACE("destroying %p\n", update_searcher);
63 HeapFree( GetProcessHeap(), 0, update_searcher );
65 return refs;
68 static HRESULT WINAPI update_searcher_QueryInterface(
69 IUpdateSearcher *iface,
70 REFIID riid,
71 void **ppvObject )
73 update_searcher *This = impl_from_IUpdateSearcher( iface );
75 TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject );
77 if ( IsEqualGUID( riid, &IID_IUpdateSearcher ) ||
78 IsEqualGUID( riid, &IID_IDispatch ) ||
79 IsEqualGUID( riid, &IID_IUnknown ) )
81 *ppvObject = iface;
83 else
85 FIXME("interface %s not implemented\n", debugstr_guid(riid));
86 return E_NOINTERFACE;
88 IUpdateSearcher_AddRef( iface );
89 return S_OK;
92 static HRESULT WINAPI update_searcher_GetTypeInfoCount(
93 IUpdateSearcher *iface,
94 UINT *pctinfo )
96 FIXME("\n");
97 return E_NOTIMPL;
100 static HRESULT WINAPI update_searcher_GetTypeInfo(
101 IUpdateSearcher *iface,
102 UINT iTInfo,
103 LCID lcid,
104 ITypeInfo **ppTInfo )
106 FIXME("\n");
107 return E_NOTIMPL;
110 static HRESULT WINAPI update_searcher_GetIDsOfNames(
111 IUpdateSearcher *iface,
112 REFIID riid,
113 LPOLESTR *rgszNames,
114 UINT cNames,
115 LCID lcid,
116 DISPID *rgDispId )
118 FIXME("\n");
119 return E_NOTIMPL;
122 static HRESULT WINAPI update_searcher_Invoke(
123 IUpdateSearcher *iface,
124 DISPID dispIdMember,
125 REFIID riid,
126 LCID lcid,
127 WORD wFlags,
128 DISPPARAMS *pDispParams,
129 VARIANT *pVarResult,
130 EXCEPINFO *pExcepInfo,
131 UINT *puArgErr )
133 FIXME("\n");
134 return E_NOTIMPL;
137 static HRESULT WINAPI update_searcher_get_CanAutomaticallyUpgradeService(
138 IUpdateSearcher *This,
139 VARIANT_BOOL *retval )
141 FIXME("\n");
142 return E_NOTIMPL;
145 static HRESULT WINAPI update_searcher_put_CanAutomaticallyUpgradeService(
146 IUpdateSearcher *This,
147 VARIANT_BOOL value )
149 FIXME("%p, %d\n", This, value);
150 return S_OK;
153 static HRESULT WINAPI update_searcher_get_ClientApplicationID(
154 IUpdateSearcher *This,
155 BSTR *retval )
157 FIXME("\n");
158 return E_NOTIMPL;
161 static HRESULT WINAPI update_searcher_put_ClientApplicationID(
162 IUpdateSearcher *This,
163 BSTR value )
165 FIXME("%p, %s\n", This, debugstr_w(value));
166 return E_NOTIMPL;
169 static HRESULT WINAPI update_searcher_get_IncludePotentiallySupersededUpdates(
170 IUpdateSearcher *This,
171 VARIANT_BOOL *retval )
173 FIXME("\n");
174 return E_NOTIMPL;
177 static HRESULT WINAPI update_searcher_put_IncludePotentiallySupersededUpdates(
178 IUpdateSearcher *This,
179 VARIANT_BOOL value )
181 FIXME("\n");
182 return E_NOTIMPL;
185 static HRESULT WINAPI update_searcher_get_ServerSelection(
186 IUpdateSearcher *This,
187 ServerSelection *retval )
189 FIXME("\n");
190 return E_NOTIMPL;
193 static HRESULT WINAPI update_searcher_put_ServerSelection(
194 IUpdateSearcher *This,
195 ServerSelection value )
197 FIXME("\n");
198 return E_NOTIMPL;
201 static HRESULT WINAPI update_searcher_BeginSearch(
202 IUpdateSearcher *This,
203 BSTR criteria,
204 IUnknown *onCompleted,
205 VARIANT state,
206 ISearchJob **retval )
208 FIXME("\n");
209 return E_NOTIMPL;
212 static HRESULT WINAPI update_searcher_EndSearch(
213 IUpdateSearcher *This,
214 ISearchJob *searchJob,
215 ISearchResult **retval )
217 FIXME("\n");
218 return E_NOTIMPL;
221 static HRESULT WINAPI update_searcher_EscapeString(
222 IUpdateSearcher *This,
223 BSTR unescaped,
224 BSTR *retval )
226 FIXME("\n");
227 return E_NOTIMPL;
230 static HRESULT WINAPI update_searcher_QueryHistory(
231 IUpdateSearcher *This,
232 LONG startIndex,
233 LONG count,
234 IUpdateHistoryEntryCollection **retval )
236 FIXME("\n");
237 return E_NOTIMPL;
240 static HRESULT WINAPI update_searcher_Search(
241 IUpdateSearcher *This,
242 BSTR criteria,
243 ISearchResult **retval )
245 FIXME("\n");
246 return E_NOTIMPL;
249 static HRESULT WINAPI update_searcher_get_Online(
250 IUpdateSearcher *This,
251 VARIANT_BOOL *retval )
253 FIXME("\n");
254 return E_NOTIMPL;
257 static HRESULT WINAPI update_searcher_put_Online(
258 IUpdateSearcher *This,
259 VARIANT_BOOL value )
261 FIXME("\n");
262 return E_NOTIMPL;
265 static HRESULT WINAPI update_searcher_GetTotalHistoryCount(
266 IUpdateSearcher *This,
267 LONG *retval )
269 FIXME("\n");
270 return E_NOTIMPL;
273 static HRESULT WINAPI update_searcher_get_ServiceID(
274 IUpdateSearcher *This,
275 BSTR *retval )
277 FIXME("\n");
278 return E_NOTIMPL;
281 static HRESULT WINAPI update_searcher_put_ServiceID(
282 IUpdateSearcher *This,
283 BSTR value )
285 FIXME("\n");
286 return E_NOTIMPL;
289 static const struct IUpdateSearcherVtbl update_searcher_vtbl =
291 update_searcher_QueryInterface,
292 update_searcher_AddRef,
293 update_searcher_Release,
294 update_searcher_GetTypeInfoCount,
295 update_searcher_GetTypeInfo,
296 update_searcher_GetIDsOfNames,
297 update_searcher_Invoke,
298 update_searcher_get_CanAutomaticallyUpgradeService,
299 update_searcher_put_CanAutomaticallyUpgradeService,
300 update_searcher_get_ClientApplicationID,
301 update_searcher_put_ClientApplicationID,
302 update_searcher_get_IncludePotentiallySupersededUpdates,
303 update_searcher_put_IncludePotentiallySupersededUpdates,
304 update_searcher_get_ServerSelection,
305 update_searcher_put_ServerSelection,
306 update_searcher_BeginSearch,
307 update_searcher_EndSearch,
308 update_searcher_EscapeString,
309 update_searcher_QueryHistory,
310 update_searcher_Search,
311 update_searcher_get_Online,
312 update_searcher_put_Online,
313 update_searcher_GetTotalHistoryCount,
314 update_searcher_get_ServiceID,
315 update_searcher_put_ServiceID
318 HRESULT UpdateSearcher_create( LPVOID *ppObj )
320 update_searcher *searcher;
322 TRACE("(%p)\n", ppObj);
324 searcher = HeapAlloc( GetProcessHeap(), 0, sizeof(*searcher) );
325 if (!searcher) return E_OUTOFMEMORY;
327 searcher->IUpdateSearcher_iface.lpVtbl = &update_searcher_vtbl;
328 searcher->refs = 1;
330 *ppObj = &searcher->IUpdateSearcher_iface;
332 TRACE("returning iface %p\n", *ppObj);
333 return S_OK;