ReactOS 0.4.15-dev-7924-g5949c20
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}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

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}
#define InterlockedIncrement
Definition: armddk.h:53
static update_downloader * impl_from_IUpdateDownloader(IUpdateDownloader *iface)
Definition: downloader.c:43

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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
Definition: pdh_main.c:94

◆ 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 S_OK
Definition: intsafe.h:52

◆ 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}

◆ 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}

◆ 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}
const GUID IID_IUnknown
REFIID riid
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
const GUID IID_IDispatch
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define TRACE(s)
Definition: solgame.cpp:4
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ 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}
#define InterlockedDecrement
Definition: armddk.h:52
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735
long LONG
Definition: pedump.c:60

◆ 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
261 downloader->refs = 1;
262
263 *ppObj = &downloader->IUpdateDownloader_iface;
264
265 TRACE("returning iface %p\n", *ppObj);
266 return S_OK;
267}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define HeapAlloc
Definition: compat.h:733
static const struct IUpdateDownloaderVtbl update_downloader_vtbl
Definition: downloader.c:229
IUpdateDownloader IUpdateDownloader_iface
Definition: downloader.c:39

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_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 ULONG WINAPI update_downloader_AddRef(IUpdateDownloader *iface)
Definition: downloader.c:48
static HRESULT WINAPI update_downloader_put_IsForced(IUpdateDownloader *This, VARIANT_BOOL value)
Definition: downloader.c:145
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_BeginDownload(IUpdateDownloader *This, IUnknown *onProgressChanged, IUnknown *onCompleted, VARIANT state, IDownloadJob **retval)
Definition: downloader.c:201
static HRESULT WINAPI update_downloader_get_ClientApplicationID(IUpdateDownloader *This, BSTR *retval)
Definition: downloader.c:153
static HRESULT WINAPI update_downloader_Download(IUpdateDownloader *This, IDownloadResult **retval)
Definition: downloader.c:212
static HRESULT WINAPI update_downloader_EndDownload(IUpdateDownloader *This, IDownloadJob *value, IDownloadResult **retval)
Definition: downloader.c:220
static HRESULT WINAPI update_downloader_put_Updates(IUpdateDownloader *This, IUpdateCollection *value)
Definition: downloader.c:193
static HRESULT WINAPI update_downloader_put_Priority(IUpdateDownloader *This, DownloadPriority value)
Definition: downloader.c:177
static HRESULT WINAPI update_downloader_get_Priority(IUpdateDownloader *This, DownloadPriority *retval)
Definition: downloader.c:169
static HRESULT WINAPI update_downloader_QueryInterface(IUpdateDownloader *iface, REFIID riid, void **ppvObject)
Definition: downloader.c:68
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_get_IsForced(IUpdateDownloader *This, VARIANT_BOOL *retval)
Definition: downloader.c:137
static HRESULT WINAPI update_downloader_get_Updates(IUpdateDownloader *This, IUpdateCollection **retval)
Definition: downloader.c:185
static HRESULT WINAPI update_downloader_GetTypeInfoCount(IUpdateDownloader *iface, UINT *pctinfo)
Definition: downloader.c:92

Definition at line 229 of file downloader.c.

Referenced by UpdateDownloader_create().