gdi32: Avoid redundant computation of the gradient bounding rectangle.
[wine/multimedia.git] / dlls / wuapi / searcher.c
blob522f99abf087d6e26505c5c2606a5ec4c9127b5c
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"
32 #include "wine/debug.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(wuapi);
36 typedef struct _update_searcher
38 IUpdateSearcher IUpdateSearcher_iface;
39 LONG refs;
40 } update_searcher;
42 static inline update_searcher *impl_from_IUpdateSearcher( IUpdateSearcher *iface )
44 return CONTAINING_RECORD(iface, update_searcher, IUpdateSearcher_iface);
47 static ULONG WINAPI update_searcher_AddRef(
48 IUpdateSearcher *iface )
50 update_searcher *update_searcher = impl_from_IUpdateSearcher( iface );
51 return InterlockedIncrement( &update_searcher->refs );
54 static ULONG WINAPI update_searcher_Release(
55 IUpdateSearcher *iface )
57 update_searcher *update_searcher = impl_from_IUpdateSearcher( iface );
58 LONG refs = InterlockedDecrement( &update_searcher->refs );
59 if (!refs)
61 TRACE("destroying %p\n", update_searcher);
62 HeapFree( GetProcessHeap(), 0, update_searcher );
64 return refs;
67 static HRESULT WINAPI update_searcher_QueryInterface(
68 IUpdateSearcher *iface,
69 REFIID riid,
70 void **ppvObject )
72 update_searcher *This = impl_from_IUpdateSearcher( iface );
74 TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject );
76 if ( IsEqualGUID( riid, &IID_IUpdateSearcher ) ||
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 IUpdateSearcher_AddRef( iface );
88 return S_OK;
91 static HRESULT WINAPI update_searcher_GetTypeInfoCount(
92 IUpdateSearcher *iface,
93 UINT *pctinfo )
95 FIXME("\n");
96 return E_NOTIMPL;
99 static HRESULT WINAPI update_searcher_GetTypeInfo(
100 IUpdateSearcher *iface,
101 UINT iTInfo,
102 LCID lcid,
103 ITypeInfo **ppTInfo )
105 FIXME("\n");
106 return E_NOTIMPL;
109 static HRESULT WINAPI update_searcher_GetIDsOfNames(
110 IUpdateSearcher *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_searcher_Invoke(
122 IUpdateSearcher *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_searcher_get_CanAutomaticallyUpgradeService(
137 IUpdateSearcher *This,
138 VARIANT_BOOL *retval )
140 FIXME("\n");
141 return E_NOTIMPL;
144 static HRESULT WINAPI update_searcher_put_CanAutomaticallyUpgradeService(
145 IUpdateSearcher *This,
146 VARIANT_BOOL value )
148 FIXME("%p, %d\n", This, value);
149 return S_OK;
152 static HRESULT WINAPI update_searcher_get_ClientApplicationID(
153 IUpdateSearcher *This,
154 BSTR *retval )
156 FIXME("\n");
157 return E_NOTIMPL;
160 static HRESULT WINAPI update_searcher_put_ClientApplicationID(
161 IUpdateSearcher *This,
162 BSTR value )
164 FIXME("%p, %s\n", This, debugstr_w(value));
165 return E_NOTIMPL;
168 static HRESULT WINAPI update_searcher_get_IncludePotentiallySupersededUpdates(
169 IUpdateSearcher *This,
170 VARIANT_BOOL *retval )
172 FIXME("\n");
173 return E_NOTIMPL;
176 static HRESULT WINAPI update_searcher_put_IncludePotentiallySupersededUpdates(
177 IUpdateSearcher *This,
178 VARIANT_BOOL value )
180 FIXME("\n");
181 return E_NOTIMPL;
184 static HRESULT WINAPI update_searcher_get_ServerSelection(
185 IUpdateSearcher *This,
186 ServerSelection *retval )
188 FIXME("\n");
189 return E_NOTIMPL;
192 static HRESULT WINAPI update_searcher_put_ServerSelection(
193 IUpdateSearcher *This,
194 ServerSelection value )
196 FIXME("\n");
197 return E_NOTIMPL;
200 static HRESULT WINAPI update_searcher_BeginSearch(
201 IUpdateSearcher *This,
202 BSTR criteria,
203 IUnknown *onCompleted,
204 VARIANT state,
205 ISearchJob **retval )
207 FIXME("\n");
208 return E_NOTIMPL;
211 static HRESULT WINAPI update_searcher_EndSearch(
212 IUpdateSearcher *This,
213 ISearchJob *searchJob,
214 ISearchResult **retval )
216 FIXME("\n");
217 return E_NOTIMPL;
220 static HRESULT WINAPI update_searcher_EscapeString(
221 IUpdateSearcher *This,
222 BSTR unescaped,
223 BSTR *retval )
225 FIXME("\n");
226 return E_NOTIMPL;
229 static HRESULT WINAPI update_searcher_QueryHistory(
230 IUpdateSearcher *This,
231 LONG startIndex,
232 LONG count,
233 IUpdateHistoryEntryCollection **retval )
235 FIXME("\n");
236 return E_NOTIMPL;
239 static HRESULT WINAPI update_searcher_Search(
240 IUpdateSearcher *This,
241 BSTR criteria,
242 ISearchResult **retval )
244 FIXME("\n");
245 return E_NOTIMPL;
248 static HRESULT WINAPI update_searcher_get_Online(
249 IUpdateSearcher *This,
250 VARIANT_BOOL *retval )
252 FIXME("\n");
253 return E_NOTIMPL;
256 static HRESULT WINAPI update_searcher_put_Online(
257 IUpdateSearcher *This,
258 VARIANT_BOOL value )
260 FIXME("\n");
261 return E_NOTIMPL;
264 static HRESULT WINAPI update_searcher_GetTotalHistoryCount(
265 IUpdateSearcher *This,
266 LONG *retval )
268 FIXME("\n");
269 return E_NOTIMPL;
272 static HRESULT WINAPI update_searcher_get_ServiceID(
273 IUpdateSearcher *This,
274 BSTR *retval )
276 FIXME("\n");
277 return E_NOTIMPL;
280 static HRESULT WINAPI update_searcher_put_ServiceID(
281 IUpdateSearcher *This,
282 BSTR value )
284 FIXME("\n");
285 return E_NOTIMPL;
288 static const struct IUpdateSearcherVtbl update_searcher_vtbl =
290 update_searcher_QueryInterface,
291 update_searcher_AddRef,
292 update_searcher_Release,
293 update_searcher_GetTypeInfoCount,
294 update_searcher_GetTypeInfo,
295 update_searcher_GetIDsOfNames,
296 update_searcher_Invoke,
297 update_searcher_get_CanAutomaticallyUpgradeService,
298 update_searcher_put_CanAutomaticallyUpgradeService,
299 update_searcher_get_ClientApplicationID,
300 update_searcher_put_ClientApplicationID,
301 update_searcher_get_IncludePotentiallySupersededUpdates,
302 update_searcher_put_IncludePotentiallySupersededUpdates,
303 update_searcher_get_ServerSelection,
304 update_searcher_put_ServerSelection,
305 update_searcher_BeginSearch,
306 update_searcher_EndSearch,
307 update_searcher_EscapeString,
308 update_searcher_QueryHistory,
309 update_searcher_Search,
310 update_searcher_get_Online,
311 update_searcher_put_Online,
312 update_searcher_GetTotalHistoryCount,
313 update_searcher_get_ServiceID,
314 update_searcher_put_ServiceID
317 HRESULT UpdateSearcher_create( IUnknown *pUnkOuter, LPVOID *ppObj )
319 update_searcher *searcher;
321 TRACE("(%p,%p)\n", pUnkOuter, ppObj);
323 searcher = HeapAlloc( GetProcessHeap(), 0, sizeof(*searcher) );
324 if (!searcher) return E_OUTOFMEMORY;
326 searcher->IUpdateSearcher_iface.lpVtbl = &update_searcher_vtbl;
327 searcher->refs = 1;
329 *ppObj = &searcher->IUpdateSearcher_iface;
331 TRACE("returning iface %p\n", *ppObj);
332 return S_OK;