ReactOS  0.4.15-dev-1384-g878186b
downloader.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "initguid.h"
#include "wuapi.h"
#include "wuapi_private.h"
#include "wine/debug.h"
Include dependency graph for downloader.c:

Go to the source code of this file.

Classes

struct  _update_downloader
 

Macros

#define COBJMACROS
 

Typedefs

typedef struct _update_downloader update_downloader
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (wuapi)
 
static update_downloaderimpl_from_IUpdateDownloader (IUpdateDownloader *iface)
 
static ULONG WINAPI update_downloader_AddRef (IUpdateDownloader *iface)
 
static ULONG WINAPI update_downloader_Release (IUpdateDownloader *iface)
 
static HRESULT WINAPI update_downloader_QueryInterface (IUpdateDownloader *iface, REFIID riid, void **ppvObject)
 
static HRESULT WINAPI update_downloader_GetTypeInfoCount (IUpdateDownloader *iface, UINT *pctinfo)
 
static HRESULT WINAPI update_downloader_GetTypeInfo (IUpdateDownloader *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI update_downloader_GetIDsOfNames (IUpdateDownloader *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI update_downloader_Invoke (IUpdateDownloader *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI update_downloader_get_IsForced (IUpdateDownloader *This, VARIANT_BOOL *retval)
 
static HRESULT WINAPI update_downloader_put_IsForced (IUpdateDownloader *This, VARIANT_BOOL value)
 
static HRESULT WINAPI update_downloader_get_ClientApplicationID (IUpdateDownloader *This, BSTR *retval)
 
static HRESULT WINAPI update_downloader_put_ClientApplicationID (IUpdateDownloader *This, BSTR value)
 
static HRESULT WINAPI update_downloader_get_Priority (IUpdateDownloader *This, DownloadPriority *retval)
 
static HRESULT WINAPI update_downloader_put_Priority (IUpdateDownloader *This, DownloadPriority value)
 
static HRESULT WINAPI update_downloader_get_Updates (IUpdateDownloader *This, IUpdateCollection **retval)
 
static HRESULT WINAPI update_downloader_put_Updates (IUpdateDownloader *This, IUpdateCollection *value)
 
static HRESULT WINAPI update_downloader_BeginDownload (IUpdateDownloader *This, IUnknown *onProgressChanged, IUnknown *onCompleted, VARIANT state, IDownloadJob **retval)
 
static HRESULT WINAPI update_downloader_Download (IUpdateDownloader *This, IDownloadResult **retval)
 
static HRESULT WINAPI update_downloader_EndDownload (IUpdateDownloader *This, IDownloadJob *value, IDownloadResult **retval)
 
HRESULT UpdateDownloader_create (LPVOID *ppObj)
 

Variables

static const struct IUpdateDownloaderVtbl update_downloader_vtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 21 of file downloader.c.

Typedef Documentation

◆ update_downloader

Function Documentation

◆ impl_from_IUpdateDownloader()

static update_downloader* impl_from_IUpdateDownloader ( IUpdateDownloader *  iface)
inlinestatic

Definition at line 43 of file downloader.c.

44 {
45  return CONTAINING_RECORD(iface, update_downloader, IUpdateDownloader_iface);
46 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by update_downloader_AddRef(), update_downloader_QueryInterface(), and update_downloader_Release().

◆ update_downloader_AddRef()

static ULONG WINAPI update_downloader_AddRef ( IUpdateDownloader *  iface)
static

Definition at line 48 of file downloader.c.

50 {
53 }
static update_downloader * impl_from_IUpdateDownloader(IUpdateDownloader *iface)
Definition: downloader.c:43
#define InterlockedIncrement
Definition: armddk.h:53

◆ update_downloader_BeginDownload()

static HRESULT WINAPI update_downloader_BeginDownload ( IUpdateDownloader *  This,
IUnknown onProgressChanged,
IUnknown onCompleted,
VARIANT  state,
IDownloadJob **  retval 
)
static

Definition at line 201 of file downloader.c.

207 {
208  FIXME("\n");
209  return E_NOTIMPL;
210 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ update_downloader_Download()

static HRESULT WINAPI update_downloader_Download ( IUpdateDownloader *  This,
IDownloadResult **  retval 
)
static

Definition at line 212 of file downloader.c.

215 {
216  FIXME("\n");
217  return E_NOTIMPL;
218 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ update_downloader_EndDownload()

static HRESULT WINAPI update_downloader_EndDownload ( IUpdateDownloader *  This,
IDownloadJob *  value,
IDownloadResult **  retval 
)
static

Definition at line 220 of file downloader.c.

224 {
225  FIXME("\n");
226  return E_NOTIMPL;
227 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ update_downloader_get_ClientApplicationID()

static HRESULT WINAPI update_downloader_get_ClientApplicationID ( IUpdateDownloader *  This,
BSTR retval 
)
static

Definition at line 153 of file downloader.c.

156 {
157  FIXME("\n");
158  return E_NOTIMPL;
159 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ update_downloader_get_IsForced()

static HRESULT WINAPI update_downloader_get_IsForced ( IUpdateDownloader *  This,
VARIANT_BOOL retval 
)
static

Definition at line 137 of file downloader.c.

140 {
141  FIXME("\n");
142  return E_NOTIMPL;
143 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ update_downloader_get_Priority()

static HRESULT WINAPI update_downloader_get_Priority ( IUpdateDownloader *  This,
DownloadPriority *  retval 
)
static

Definition at line 169 of file downloader.c.

172 {
173  FIXME("\n");
174  return E_NOTIMPL;
175 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ update_downloader_get_Updates()

static HRESULT WINAPI update_downloader_get_Updates ( IUpdateDownloader *  This,
IUpdateCollection **  retval 
)
static

Definition at line 185 of file downloader.c.

188 {
189  FIXME("\n");
190  return E_NOTIMPL;
191 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ update_downloader_GetIDsOfNames()

static HRESULT WINAPI update_downloader_GetIDsOfNames ( IUpdateDownloader *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 110 of file downloader.c.

117 {
118  FIXME("\n");
119  return E_NOTIMPL;
120 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ update_downloader_GetTypeInfo()

static HRESULT WINAPI update_downloader_GetTypeInfo ( IUpdateDownloader *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 100 of file downloader.c.

105 {
106  FIXME("\n");
107  return E_NOTIMPL;
108 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ update_downloader_GetTypeInfoCount()

static HRESULT WINAPI update_downloader_GetTypeInfoCount ( IUpdateDownloader *  iface,
UINT pctinfo 
)
static

Definition at line 92 of file downloader.c.

95 {
96  FIXME("\n");
97  return E_NOTIMPL;
98 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ update_downloader_Invoke()

static HRESULT WINAPI update_downloader_Invoke ( IUpdateDownloader *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 122 of file downloader.c.

132 {
133  FIXME("\n");
134  return E_NOTIMPL;
135 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ update_downloader_put_ClientApplicationID()

static HRESULT WINAPI update_downloader_put_ClientApplicationID ( IUpdateDownloader *  This,
BSTR  value 
)
static

Definition at line 161 of file downloader.c.

164 {
165  FIXME("%p, %s\n", This, debugstr_w(value));
166  return E_NOTIMPL;
167 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ update_downloader_put_IsForced()

static HRESULT WINAPI update_downloader_put_IsForced ( IUpdateDownloader *  This,
VARIANT_BOOL  value 
)
static

Definition at line 145 of file downloader.c.

148 {
149  FIXME("%p, %d\n", This, value);
150  return S_OK;
151 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_OK
Definition: intsafe.h:51

◆ update_downloader_put_Priority()

static HRESULT WINAPI update_downloader_put_Priority ( IUpdateDownloader *  This,
DownloadPriority  value 
)
static

Definition at line 177 of file downloader.c.

180 {
181  FIXME("\n");
182  return E_NOTIMPL;
183 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ update_downloader_put_Updates()

static HRESULT WINAPI update_downloader_put_Updates ( IUpdateDownloader *  This,
IUpdateCollection *  value 
)
static

Definition at line 193 of file downloader.c.

196 {
197  FIXME("\n");
198  return E_NOTIMPL;
199 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ update_downloader_QueryInterface()

static HRESULT WINAPI update_downloader_QueryInterface ( IUpdateDownloader *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 68 of file downloader.c.

72 {
74 
75  TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject );
76 
77  if ( IsEqualGUID( riid, &IID_IUpdateDownloader ) ||
80  {
81  *ppvObject = iface;
82  }
83  else
84  {
85  FIXME("interface %s not implemented\n", debugstr_guid(riid));
86  return E_NOINTERFACE;
87  }
88  IUpdateDownloader_AddRef( iface );
89  return S_OK;
90 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
static update_downloader * impl_from_IUpdateDownloader(IUpdateDownloader *iface)
Definition: downloader.c:43
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:51
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

◆ update_downloader_Release()

static ULONG WINAPI update_downloader_Release ( IUpdateDownloader *  iface)
static

Definition at line 55 of file downloader.c.

57 {
60  if (!refs)
61  {
62  TRACE("destroying %p\n", update_downloader);
64  }
65  return refs;
66 }
long LONG
Definition: pedump.c:60
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
static update_downloader * impl_from_IUpdateDownloader(IUpdateDownloader *iface)
Definition: downloader.c:43
#define InterlockedDecrement
Definition: armddk.h:52
#define HeapFree(x, y, z)
Definition: compat.h:594

◆ UpdateDownloader_create()

HRESULT UpdateDownloader_create ( LPVOID ppObj)

Definition at line 251 of file downloader.c.

252 {
253  update_downloader *downloader;
254 
255  TRACE("(%p)\n", ppObj);
256 
257  downloader = HeapAlloc( GetProcessHeap(), 0, sizeof(*downloader) );
258  if (!downloader) return E_OUTOFMEMORY;
259 
260  downloader->IUpdateDownloader_iface.lpVtbl = &update_downloader_vtbl;
261  downloader->refs = 1;
262 
263  *ppObj = &downloader->IUpdateDownloader_iface;
264 
265  TRACE("returning iface %p\n", *ppObj);
266  return S_OK;
267 }
IUpdateDownloader IUpdateDownloader_iface
Definition: downloader.c:39
static const struct IUpdateDownloaderVtbl update_downloader_vtbl
Definition: downloader.c:229
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define S_OK
Definition: intsafe.h:51

Referenced by update_session_CreateUpdateDownloader().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( wuapi  )

Variable Documentation

◆ update_downloader_vtbl

const struct IUpdateDownloaderVtbl update_downloader_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI update_downloader_BeginDownload(IUpdateDownloader *This, IUnknown *onProgressChanged, IUnknown *onCompleted, VARIANT state, IDownloadJob **retval)
Definition: downloader.c:201
static HRESULT WINAPI update_downloader_Download(IUpdateDownloader *This, IDownloadResult **retval)
Definition: downloader.c:212
static HRESULT WINAPI update_downloader_put_IsForced(IUpdateDownloader *This, VARIANT_BOOL value)
Definition: downloader.c:145
static ULONG WINAPI update_downloader_AddRef(IUpdateDownloader *iface)
Definition: downloader.c:48
static HRESULT WINAPI update_downloader_EndDownload(IUpdateDownloader *This, IDownloadJob *value, IDownloadResult **retval)
Definition: downloader.c:220
static HRESULT WINAPI update_downloader_get_Updates(IUpdateDownloader *This, IUpdateCollection **retval)
Definition: downloader.c:185
static HRESULT WINAPI update_downloader_get_IsForced(IUpdateDownloader *This, VARIANT_BOOL *retval)
Definition: downloader.c:137
static ULONG WINAPI update_downloader_Release(IUpdateDownloader *iface)
Definition: downloader.c:55
static HRESULT WINAPI update_downloader_GetTypeInfo(IUpdateDownloader *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: downloader.c:100
static HRESULT WINAPI update_downloader_put_Updates(IUpdateDownloader *This, IUpdateCollection *value)
Definition: downloader.c:193
static HRESULT WINAPI update_downloader_GetTypeInfoCount(IUpdateDownloader *iface, UINT *pctinfo)
Definition: downloader.c:92
static HRESULT WINAPI update_downloader_get_Priority(IUpdateDownloader *This, DownloadPriority *retval)
Definition: downloader.c:169
static HRESULT WINAPI update_downloader_GetIDsOfNames(IUpdateDownloader *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: downloader.c:110
static HRESULT WINAPI update_downloader_put_Priority(IUpdateDownloader *This, DownloadPriority value)
Definition: downloader.c:177
static HRESULT WINAPI update_downloader_get_ClientApplicationID(IUpdateDownloader *This, BSTR *retval)
Definition: downloader.c:153
static HRESULT WINAPI update_downloader_Invoke(IUpdateDownloader *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: downloader.c:122
static HRESULT WINAPI update_downloader_put_ClientApplicationID(IUpdateDownloader *This, BSTR value)
Definition: downloader.c:161
static HRESULT WINAPI update_downloader_QueryInterface(IUpdateDownloader *iface, REFIID riid, void **ppvObject)
Definition: downloader.c:68

Definition at line 229 of file downloader.c.

Referenced by UpdateDownloader_create().