ReactOS 0.4.15-dev-7674-gc0b4db1
searcher.c
Go to the documentation of this file.
1/*
2 * IUpdateSearcher implementation
3 *
4 * Copyright 2008 Hans Leidekker
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#define COBJMACROS
22
23#include <stdarg.h>
24
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"
31
32#include "wine/debug.h"
33
35
36typedef struct _update_searcher
37{
38 IUpdateSearcher IUpdateSearcher_iface;
41
42static inline update_searcher *impl_from_IUpdateSearcher( IUpdateSearcher *iface )
43{
44 return CONTAINING_RECORD(iface, update_searcher, IUpdateSearcher_iface);
45}
46
48 IUpdateSearcher *iface )
49{
52}
53
55 IUpdateSearcher *iface )
56{
59 if (!refs)
60 {
61 TRACE("destroying %p\n", update_searcher);
63 }
64 return refs;
65}
66
68 IUpdateSearcher *iface,
70 void **ppvObject )
71{
73
74 TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject );
75
76 if ( IsEqualGUID( riid, &IID_IUpdateSearcher ) ||
79 {
80 *ppvObject = iface;
81 }
82 else
83 {
84 FIXME("interface %s not implemented\n", debugstr_guid(riid));
85 return E_NOINTERFACE;
86 }
87 IUpdateSearcher_AddRef( iface );
88 return S_OK;
89}
90
92 IUpdateSearcher *iface,
93 UINT *pctinfo )
94{
95 FIXME("\n");
96 return E_NOTIMPL;
97}
98
100 IUpdateSearcher *iface,
101 UINT iTInfo,
102 LCID lcid,
103 ITypeInfo **ppTInfo )
104{
105 FIXME("\n");
106 return E_NOTIMPL;
107}
108
110 IUpdateSearcher *iface,
111 REFIID riid,
112 LPOLESTR *rgszNames,
113 UINT cNames,
114 LCID lcid,
115 DISPID *rgDispId )
116{
117 FIXME("\n");
118 return E_NOTIMPL;
119}
120
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 )
131{
132 FIXME("\n");
133 return E_NOTIMPL;
134}
135
137 IUpdateSearcher *This,
138 VARIANT_BOOL *retval )
139{
140 FIXME("\n");
141 return E_NOTIMPL;
142}
143
145 IUpdateSearcher *This,
147{
148 FIXME("%p, %d\n", This, value);
149 return S_OK;
150}
151
153 IUpdateSearcher *This,
154 BSTR *retval )
155{
156 FIXME("\n");
157 return E_NOTIMPL;
158}
159
161 IUpdateSearcher *This,
162 BSTR value )
163{
164 FIXME("%p, %s\n", This, debugstr_w(value));
165 return E_NOTIMPL;
166}
167
169 IUpdateSearcher *This,
170 VARIANT_BOOL *retval )
171{
172 FIXME("\n");
173 return E_NOTIMPL;
174}
175
177 IUpdateSearcher *This,
179{
180 FIXME("\n");
181 return E_NOTIMPL;
182}
183
185 IUpdateSearcher *This,
186 ServerSelection *retval )
187{
188 FIXME("\n");
189 return E_NOTIMPL;
190}
191
193 IUpdateSearcher *This,
194 ServerSelection value )
195{
196 FIXME("\n");
197 return E_NOTIMPL;
198}
199
201 IUpdateSearcher *This,
202 BSTR criteria,
203 IUnknown *onCompleted,
205 ISearchJob **retval )
206{
207 FIXME("\n");
208 return E_NOTIMPL;
209}
210
212 IUpdateSearcher *This,
213 ISearchJob *searchJob,
214 ISearchResult **retval )
215{
216 FIXME("\n");
217 return E_NOTIMPL;
218}
219
221 IUpdateSearcher *This,
222 BSTR unescaped,
223 BSTR *retval )
224{
225 FIXME("\n");
226 return E_NOTIMPL;
227}
228
230 IUpdateSearcher *This,
231 LONG startIndex,
232 LONG count,
233 IUpdateHistoryEntryCollection **retval )
234{
235 FIXME("\n");
236 return E_NOTIMPL;
237}
238
240 IUpdateSearcher *This,
241 BSTR criteria,
242 ISearchResult **retval )
243{
244 FIXME("\n");
245 return E_NOTIMPL;
246}
247
249 IUpdateSearcher *This,
250 VARIANT_BOOL *retval )
251{
252 FIXME("\n");
253 return E_NOTIMPL;
254}
255
257 IUpdateSearcher *This,
259{
260 FIXME("\n");
261 return E_NOTIMPL;
262}
263
265 IUpdateSearcher *This,
266 LONG *retval )
267{
268 FIXME("\n");
269 return E_NOTIMPL;
270}
271
273 IUpdateSearcher *This,
274 BSTR *retval )
275{
276 FIXME("\n");
277 return E_NOTIMPL;
278}
279
281 IUpdateSearcher *This,
282 BSTR value )
283{
284 FIXME("\n");
285 return E_NOTIMPL;
286}
287
288static const struct IUpdateSearcherVtbl update_searcher_vtbl =
289{
315};
316
318{
319 update_searcher *searcher;
320
321 TRACE("(%p)\n", ppObj);
322
323 searcher = HeapAlloc( GetProcessHeap(), 0, sizeof(*searcher) );
324 if (!searcher) return E_OUTOFMEMORY;
325
327 searcher->refs = 1;
328
329 *ppObj = &searcher->IUpdateSearcher_iface;
330
331 TRACE("returning iface %p\n", *ppObj);
332 return S_OK;
333}
static int state
Definition: maze.c:121
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
const GUID IID_IUnknown
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_NOTIMPL
Definition: ddrawi.h:99
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
OLECHAR * BSTR
Definition: compat.h:2293
#define HeapFree(x, y, z)
Definition: compat.h:735
short VARIANT_BOOL
Definition: compat.h:2290
unsigned short WORD
Definition: ntddk_ex.h:93
GLuint GLuint GLsizei count
Definition: gl.h:1545
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
static LPOLESTR
Definition: stg_prop.c:27
static VARIANTARG static DISPID
Definition: ordinal.c:52
unsigned int UINT
Definition: ndis.h:50
const GUID IID_IDispatch
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
DWORD LCID
Definition: nls.h:13
static HRESULT WINAPI update_searcher_QueryInterface(IUpdateSearcher *iface, REFIID riid, void **ppvObject)
Definition: searcher.c:67
static HRESULT WINAPI update_searcher_put_ClientApplicationID(IUpdateSearcher *This, BSTR value)
Definition: searcher.c:160
static HRESULT WINAPI update_searcher_put_IncludePotentiallySupersededUpdates(IUpdateSearcher *This, VARIANT_BOOL value)
Definition: searcher.c:176
static HRESULT WINAPI update_searcher_get_IncludePotentiallySupersededUpdates(IUpdateSearcher *This, VARIANT_BOOL *retval)
Definition: searcher.c:168
static HRESULT WINAPI update_searcher_Search(IUpdateSearcher *This, BSTR criteria, ISearchResult **retval)
Definition: searcher.c:239
static HRESULT WINAPI update_searcher_put_Online(IUpdateSearcher *This, VARIANT_BOOL value)
Definition: searcher.c:256
static ULONG WINAPI update_searcher_AddRef(IUpdateSearcher *iface)
Definition: searcher.c:47
static HRESULT WINAPI update_searcher_GetTotalHistoryCount(IUpdateSearcher *This, LONG *retval)
Definition: searcher.c:264
HRESULT UpdateSearcher_create(LPVOID *ppObj)
Definition: searcher.c:317
static HRESULT WINAPI update_searcher_get_ServiceID(IUpdateSearcher *This, BSTR *retval)
Definition: searcher.c:272
static HRESULT WINAPI update_searcher_get_ClientApplicationID(IUpdateSearcher *This, BSTR *retval)
Definition: searcher.c:152
static const struct IUpdateSearcherVtbl update_searcher_vtbl
Definition: searcher.c:288
static HRESULT WINAPI update_searcher_EndSearch(IUpdateSearcher *This, ISearchJob *searchJob, ISearchResult **retval)
Definition: searcher.c:211
static HRESULT WINAPI update_searcher_Invoke(IUpdateSearcher *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: searcher.c:121
static update_searcher * impl_from_IUpdateSearcher(IUpdateSearcher *iface)
Definition: searcher.c:42
static HRESULT WINAPI update_searcher_EscapeString(IUpdateSearcher *This, BSTR unescaped, BSTR *retval)
Definition: searcher.c:220
static HRESULT WINAPI update_searcher_BeginSearch(IUpdateSearcher *This, BSTR criteria, IUnknown *onCompleted, VARIANT state, ISearchJob **retval)
Definition: searcher.c:200
struct _update_searcher update_searcher
static HRESULT WINAPI update_searcher_put_ServiceID(IUpdateSearcher *This, BSTR value)
Definition: searcher.c:280
static HRESULT WINAPI update_searcher_put_ServerSelection(IUpdateSearcher *This, ServerSelection value)
Definition: searcher.c:192
static HRESULT WINAPI update_searcher_GetTypeInfoCount(IUpdateSearcher *iface, UINT *pctinfo)
Definition: searcher.c:91
static HRESULT WINAPI update_searcher_GetIDsOfNames(IUpdateSearcher *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: searcher.c:109
static HRESULT WINAPI update_searcher_get_ServerSelection(IUpdateSearcher *This, ServerSelection *retval)
Definition: searcher.c:184
static HRESULT WINAPI update_searcher_get_Online(IUpdateSearcher *This, VARIANT_BOOL *retval)
Definition: searcher.c:248
static HRESULT WINAPI update_searcher_get_CanAutomaticallyUpgradeService(IUpdateSearcher *This, VARIANT_BOOL *retval)
Definition: searcher.c:136
static HRESULT WINAPI update_searcher_QueryHistory(IUpdateSearcher *This, LONG startIndex, LONG count, IUpdateHistoryEntryCollection **retval)
Definition: searcher.c:229
static HRESULT WINAPI update_searcher_GetTypeInfo(IUpdateSearcher *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: searcher.c:99
static HRESULT WINAPI update_searcher_put_CanAutomaticallyUpgradeService(IUpdateSearcher *This, VARIANT_BOOL value)
Definition: searcher.c:144
static ULONG WINAPI update_searcher_Release(IUpdateSearcher *iface)
Definition: searcher.c:54
#define TRACE(s)
Definition: solgame.cpp:4
IUpdateSearcher IUpdateSearcher_iface
Definition: searcher.c:38
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
Definition: pdh_main.c:94
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364