ReactOS  0.4.15-dev-4853-g3a72a52
job.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "qmgr.h"
#include "wine/debug.h"
Include dependency graph for job.c:

Go to the source code of this file.

Classes

struct  copy_error
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (qmgr)
 
BOOL transitionJobState (BackgroundCopyJobImpl *job, BG_JOB_STATE from, BG_JOB_STATE to)
 
static struct copy_errorimpl_from_IBackgroundCopyError (IBackgroundCopyError *iface)
 
static HRESULT WINAPI copy_error_QueryInterface (IBackgroundCopyError *iface, REFIID riid, void **obj)
 
static ULONG WINAPI copy_error_AddRef (IBackgroundCopyError *iface)
 
static ULONG WINAPI copy_error_Release (IBackgroundCopyError *iface)
 
static HRESULT WINAPI copy_error_GetError (IBackgroundCopyError *iface, BG_ERROR_CONTEXT *pContext, HRESULT *pCode)
 
static HRESULT WINAPI copy_error_GetFile (IBackgroundCopyError *iface, IBackgroundCopyFile **pVal)
 
static HRESULT WINAPI copy_error_GetErrorDescription (IBackgroundCopyError *iface, DWORD LanguageId, LPWSTR *pErrorDescription)
 
static HRESULT WINAPI copy_error_GetErrorContextDescription (IBackgroundCopyError *iface, DWORD LanguageId, LPWSTR *pContextDescription)
 
static HRESULT WINAPI copy_error_GetProtocol (IBackgroundCopyError *iface, LPWSTR *pProtocol)
 
static HRESULT create_copy_error (BG_ERROR_CONTEXT context, HRESULT code, IBackgroundCopyFile2 *file, IBackgroundCopyError **obj)
 
static BOOL is_job_done (const BackgroundCopyJobImpl *job)
 
static BackgroundCopyJobImplimpl_from_IBackgroundCopyJob3 (IBackgroundCopyJob3 *iface)
 
static HRESULT WINAPI BackgroundCopyJob_QueryInterface (IBackgroundCopyJob3 *iface, REFIID riid, void **obj)
 
static ULONG WINAPI BackgroundCopyJob_AddRef (IBackgroundCopyJob3 *iface)
 
static ULONG WINAPI BackgroundCopyJob_Release (IBackgroundCopyJob3 *iface)
 
static HRESULT WINAPI BackgroundCopyJob_AddFileSet (IBackgroundCopyJob3 *iface, ULONG cFileCount, BG_FILE_INFO *pFileSet)
 
static HRESULT WINAPI BackgroundCopyJob_AddFile (IBackgroundCopyJob3 *iface, LPCWSTR RemoteUrl, LPCWSTR LocalName)
 
static HRESULT WINAPI BackgroundCopyJob_EnumFiles (IBackgroundCopyJob3 *iface, IEnumBackgroundCopyFiles **enum_files)
 
static HRESULT WINAPI BackgroundCopyJob_Suspend (IBackgroundCopyJob3 *iface)
 
static HRESULT WINAPI BackgroundCopyJob_Resume (IBackgroundCopyJob3 *iface)
 
static HRESULT WINAPI BackgroundCopyJob_Cancel (IBackgroundCopyJob3 *iface)
 
static HRESULT WINAPI BackgroundCopyJob_Complete (IBackgroundCopyJob3 *iface)
 
static HRESULT WINAPI BackgroundCopyJob_GetId (IBackgroundCopyJob3 *iface, GUID *pVal)
 
static HRESULT WINAPI BackgroundCopyJob_GetType (IBackgroundCopyJob3 *iface, BG_JOB_TYPE *pVal)
 
static HRESULT WINAPI BackgroundCopyJob_GetProgress (IBackgroundCopyJob3 *iface, BG_JOB_PROGRESS *pVal)
 
static HRESULT WINAPI BackgroundCopyJob_GetTimes (IBackgroundCopyJob3 *iface, BG_JOB_TIMES *pVal)
 
static HRESULT WINAPI BackgroundCopyJob_GetState (IBackgroundCopyJob3 *iface, BG_JOB_STATE *pVal)
 
static HRESULT WINAPI BackgroundCopyJob_GetError (IBackgroundCopyJob3 *iface, IBackgroundCopyError **ppError)
 
static HRESULT WINAPI BackgroundCopyJob_GetOwner (IBackgroundCopyJob3 *iface, LPWSTR *pVal)
 
static HRESULT WINAPI BackgroundCopyJob_SetDisplayName (IBackgroundCopyJob3 *iface, LPCWSTR Val)
 
static HRESULT WINAPI BackgroundCopyJob_GetDisplayName (IBackgroundCopyJob3 *iface, LPWSTR *pVal)
 
static HRESULT WINAPI BackgroundCopyJob_SetDescription (IBackgroundCopyJob3 *iface, LPCWSTR Val)
 
static HRESULT WINAPI BackgroundCopyJob_GetDescription (IBackgroundCopyJob3 *iface, LPWSTR *pVal)
 
static HRESULT WINAPI BackgroundCopyJob_SetPriority (IBackgroundCopyJob3 *iface, BG_JOB_PRIORITY Val)
 
static HRESULT WINAPI BackgroundCopyJob_GetPriority (IBackgroundCopyJob3 *iface, BG_JOB_PRIORITY *pVal)
 
static HRESULT WINAPI BackgroundCopyJob_SetNotifyFlags (IBackgroundCopyJob3 *iface, ULONG Val)
 
static HRESULT WINAPI BackgroundCopyJob_GetNotifyFlags (IBackgroundCopyJob3 *iface, ULONG *pVal)
 
static HRESULT WINAPI BackgroundCopyJob_SetNotifyInterface (IBackgroundCopyJob3 *iface, IUnknown *Val)
 
static HRESULT WINAPI BackgroundCopyJob_GetNotifyInterface (IBackgroundCopyJob3 *iface, IUnknown **pVal)
 
static HRESULT WINAPI BackgroundCopyJob_SetMinimumRetryDelay (IBackgroundCopyJob3 *iface, ULONG Seconds)
 
static HRESULT WINAPI BackgroundCopyJob_GetMinimumRetryDelay (IBackgroundCopyJob3 *iface, ULONG *Seconds)
 
static HRESULT WINAPI BackgroundCopyJob_SetNoProgressTimeout (IBackgroundCopyJob3 *iface, ULONG Seconds)
 
static HRESULT WINAPI BackgroundCopyJob_GetNoProgressTimeout (IBackgroundCopyJob3 *iface, ULONG *Seconds)
 
static HRESULT WINAPI BackgroundCopyJob_GetErrorCount (IBackgroundCopyJob3 *iface, ULONG *Errors)
 
static HRESULT WINAPI BackgroundCopyJob_SetProxySettings (IBackgroundCopyJob3 *iface, BG_JOB_PROXY_USAGE ProxyUsage, const WCHAR *ProxyList, const WCHAR *ProxyBypassList)
 
static HRESULT WINAPI BackgroundCopyJob_GetProxySettings (IBackgroundCopyJob3 *iface, BG_JOB_PROXY_USAGE *pProxyUsage, LPWSTR *pProxyList, LPWSTR *pProxyBypassList)
 
static HRESULT WINAPI BackgroundCopyJob_TakeOwnership (IBackgroundCopyJob3 *iface)
 
static HRESULT WINAPI BackgroundCopyJob_SetNotifyCmdLine (IBackgroundCopyJob3 *iface, LPCWSTR prog, LPCWSTR params)
 
static HRESULT WINAPI BackgroundCopyJob_GetNotifyCmdLine (IBackgroundCopyJob3 *iface, LPWSTR *prog, LPWSTR *params)
 
static HRESULT WINAPI BackgroundCopyJob_GetReplyProgress (IBackgroundCopyJob3 *iface, BG_JOB_REPLY_PROGRESS *progress)
 
static HRESULT WINAPI BackgroundCopyJob_GetReplyData (IBackgroundCopyJob3 *iface, byte **pBuffer, UINT64 *pLength)
 
static HRESULT WINAPI BackgroundCopyJob_SetReplyFileName (IBackgroundCopyJob3 *iface, LPCWSTR filename)
 
static HRESULT WINAPI BackgroundCopyJob_GetReplyFileName (IBackgroundCopyJob3 *iface, LPWSTR *pFilename)
 
static int index_from_target (BG_AUTH_TARGET target)
 
static int index_from_scheme (BG_AUTH_SCHEME scheme)
 
static HRESULT WINAPI BackgroundCopyJob_SetCredentials (IBackgroundCopyJob3 *iface, BG_AUTH_CREDENTIALS *cred)
 
static HRESULT WINAPI BackgroundCopyJob_RemoveCredentials (IBackgroundCopyJob3 *iface, BG_AUTH_TARGET target, BG_AUTH_SCHEME scheme)
 
static HRESULT WINAPI BackgroundCopyJob_ReplaceRemotePrefix (IBackgroundCopyJob3 *iface, LPCWSTR OldPrefix, LPCWSTR NewPrefix)
 
static HRESULT WINAPI BackgroundCopyJob_AddFileWithRanges (IBackgroundCopyJob3 *iface, LPCWSTR RemoteUrl, LPCWSTR LocalName, DWORD RangeCount, BG_FILE_RANGE Ranges[])
 
static HRESULT WINAPI BackgroundCopyJob_SetFileACLFlags (IBackgroundCopyJob3 *iface, DWORD Flags)
 
static HRESULT WINAPI BackgroundCopyJob_GetFileACLFlags (IBackgroundCopyJob3 *iface, DWORD *Flags)
 
static BackgroundCopyJobImplimpl_from_IBackgroundCopyJobHttpOptions (IBackgroundCopyJobHttpOptions *iface)
 
static HRESULT WINAPI http_options_QueryInterface (IBackgroundCopyJobHttpOptions *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI http_options_AddRef (IBackgroundCopyJobHttpOptions *iface)
 
static ULONG WINAPI http_options_Release (IBackgroundCopyJobHttpOptions *iface)
 
static HRESULT WINAPI http_options_SetClientCertificateByID (IBackgroundCopyJobHttpOptions *iface, BG_CERT_STORE_LOCATION StoreLocation, LPCWSTR StoreName, BYTE *pCertHashBlob)
 
static HRESULT WINAPI http_options_SetClientCertificateByName (IBackgroundCopyJobHttpOptions *iface, BG_CERT_STORE_LOCATION StoreLocation, LPCWSTR StoreName, LPCWSTR SubjectName)
 
static HRESULT WINAPI http_options_RemoveClientCertificate (IBackgroundCopyJobHttpOptions *iface)
 
static HRESULT WINAPI http_options_GetClientCertificate (IBackgroundCopyJobHttpOptions *iface, BG_CERT_STORE_LOCATION *pStoreLocation, LPWSTR *pStoreName, BYTE **ppCertHashBlob, LPWSTR *pSubjectName)
 
static HRESULT WINAPI http_options_SetCustomHeaders (IBackgroundCopyJobHttpOptions *iface, LPCWSTR RequestHeaders)
 
static HRESULT WINAPI http_options_GetCustomHeaders (IBackgroundCopyJobHttpOptions *iface, LPWSTR *pRequestHeaders)
 
static HRESULT WINAPI http_options_SetSecurityFlags (IBackgroundCopyJobHttpOptions *iface, ULONG Flags)
 
static HRESULT WINAPI http_options_GetSecurityFlags (IBackgroundCopyJobHttpOptions *iface, ULONG *pFlags)
 
HRESULT BackgroundCopyJobConstructor (LPCWSTR displayName, BG_JOB_TYPE type, GUID *job_id, BackgroundCopyJobImpl **job)
 
void processJob (BackgroundCopyJobImpl *job)
 

Variables

static const IBackgroundCopyErrorVtbl copy_error_vtbl
 
static const IBackgroundCopyJob3Vtbl BackgroundCopyJob3Vtbl
 
static const IBackgroundCopyJobHttpOptionsVtbl http_options_vtbl
 

Function Documentation

◆ BackgroundCopyJob_AddFile()

static HRESULT WINAPI BackgroundCopyJob_AddFile ( IBackgroundCopyJob3 iface,
LPCWSTR  RemoteUrl,
LPCWSTR  LocalName 
)
static

Definition at line 321 of file job.c.

325 {
327  BG_FILE_INFO file;
328 
329  TRACE("(%p)->(%s %s)\n", This, debugstr_w(RemoteUrl), debugstr_w(LocalName));
330 
331  file.RemoteName = (LPWSTR)RemoteUrl;
332  file.LocalName = (LPWSTR)LocalName;
333  return IBackgroundCopyJob3_AddFileSet(iface, 1, &file);
334 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
const char file[]
Definition: icontest.c:11
WCHAR * LPWSTR
Definition: xmlstorage.h:184
Definition: fci.c:126

◆ BackgroundCopyJob_AddFileSet()

static HRESULT WINAPI BackgroundCopyJob_AddFileSet ( IBackgroundCopyJob3 iface,
ULONG  cFileCount,
BG_FILE_INFO *  pFileSet 
)
static

Definition at line 287 of file job.c.

291 {
293  HRESULT hr = S_OK;
294  ULONG i;
295 
296  TRACE("(%p)->(%d %p)\n", This, cFileCount, pFileSet);
297 
299 
300  for (i = 0; i < cFileCount; ++i)
301  {
303 
304  /* We should return E_INVALIDARG in these cases. */
305  FIXME("Check for valid filenames and supported protocols\n");
306 
307  hr = BackgroundCopyFileConstructor(This, pFileSet[i].RemoteName, pFileSet[i].LocalName, &file);
308  if (hr != S_OK) break;
309 
310  /* Add a reference to the file to file list */
311  list_add_head(&This->files, &file->entryFromJob);
312  This->jobProgress.BytesTotal = BG_SIZE_UNKNOWN;
313  ++This->jobProgress.FilesTotal;
314  }
315 
317 
318  return hr;
319 }
HRESULT hr
Definition: shlfolder.c:183
__WINE_SERVER_LIST_INLINE void list_add_head(struct list *list, struct list *elem)
Definition: list.h:96
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define FIXME(fmt,...)
Definition: debug.h:111
HRESULT BackgroundCopyFileConstructor(BackgroundCopyJobImpl *owner, LPCWSTR remoteName, LPCWSTR localName, BackgroundCopyFileImpl **file)
Definition: file.c:162
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
const char file[]
Definition: icontest.c:11
#define S_OK
Definition: intsafe.h:52
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int ULONG
Definition: retypes.h:1
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
Definition: fci.c:126

◆ BackgroundCopyJob_AddFileWithRanges()

static HRESULT WINAPI BackgroundCopyJob_AddFileWithRanges ( IBackgroundCopyJob3 iface,
LPCWSTR  RemoteUrl,
LPCWSTR  LocalName,
DWORD  RangeCount,
BG_FILE_RANGE  Ranges[] 
)
static

Definition at line 951 of file job.c.

957 {
959  FIXME("(%p)->(%s %s %u %p): stub\n", This, debugstr_w(RemoteUrl), debugstr_w(LocalName), RangeCount, Ranges);
960  return S_OK;
961 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_OK
Definition: intsafe.h:52

◆ BackgroundCopyJob_AddRef()

static ULONG WINAPI BackgroundCopyJob_AddRef ( IBackgroundCopyJob3 iface)
static

Definition at line 243 of file job.c.

244 {
247  TRACE("(%p)->(%d)\n", This, ref);
248  return ref;
249 }
Definition: send.c:48
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ BackgroundCopyJob_Cancel()

static HRESULT WINAPI BackgroundCopyJob_Cancel ( IBackgroundCopyJob3 iface)
static

Definition at line 388 of file job.c.

390 {
392  HRESULT rv = S_OK;
393 
394  TRACE("(%p)\n", This);
395 
397 
398  if (is_job_done(This))
399  {
400  rv = BG_E_INVALID_STATE;
401  }
402  else
403  {
405 
406  if (This->state == BG_JOB_STATE_CONNECTING || This->state == BG_JOB_STATE_TRANSFERRING)
407  {
408  This->state = BG_JOB_STATE_CANCELLED;
409  SetEvent(This->cancel);
410 
414  }
415 
416  LIST_FOR_EACH_ENTRY(file, &This->files, BackgroundCopyFileImpl, entryFromJob)
417  {
418  if (file->tempFileName[0] && !DeleteFileW(file->tempFileName))
419  {
420  WARN("Couldn't delete %s (%u)\n", debugstr_w(file->tempFileName), GetLastError());
422  }
423  if (file->info.LocalName && !DeleteFileW(file->info.LocalName))
424  {
425  WARN("Couldn't delete %s (%u)\n", debugstr_w(file->info.LocalName), GetLastError());
427  }
428  }
429  This->state = BG_JOB_STATE_CANCELLED;
430  }
431 
433  return rv;
434 }
#define WARN(fmt,...)
Definition: debug.h:112
#define BG_S_UNABLE_TO_DELETE_FILES
Definition: bitsmsg.h:25
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1040
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define BG_E_INVALID_STATE
Definition: bitsmsg.h:39
#define debugstr_w
Definition: kernel32.h:32
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
#define TRACE(s)
Definition: solgame.cpp:4
static BOOL is_job_done(const BackgroundCopyJobImpl *job)
Definition: job.c:205
LONG HRESULT
Definition: typedefs.h:79
const char file[]
Definition: icontest.c:11
#define S_OK
Definition: intsafe.h:52
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define INFINITE
Definition: serial.h:102
Definition: fci.c:126

◆ BackgroundCopyJob_Complete()

static HRESULT WINAPI BackgroundCopyJob_Complete ( IBackgroundCopyJob3 iface)
static

Definition at line 436 of file job.c.

438 {
440  HRESULT rv = S_OK;
441 
442  TRACE("(%p)\n", This);
443 
445 
446  if (is_job_done(This))
447  {
448  rv = BG_E_INVALID_STATE;
449  }
450  else
451  {
453  LIST_FOR_EACH_ENTRY(file, &This->files, BackgroundCopyFileImpl, entryFromJob)
454  {
455  if (file->fileProgress.Completed)
456  {
457  if (!MoveFileExW(file->tempFileName, file->info.LocalName,
461  {
462  ERR("Couldn't rename file %s -> %s\n",
463  debugstr_w(file->tempFileName),
464  debugstr_w(file->info.LocalName));
466  }
467  }
468  else
470  }
471  }
472 
473  This->state = BG_JOB_STATE_ACKNOWLEDGED;
475 
476  return rv;
477 }
#define MOVEFILE_REPLACE_EXISTING
Definition: filesup.h:28
#define MOVEFILE_COPY_ALLOWED
Definition: filesup.h:29
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define BG_E_INVALID_STATE
Definition: bitsmsg.h:39
#define MOVEFILE_WRITE_THROUGH
Definition: filesup.h:30
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
static BOOL is_job_done(const BackgroundCopyJobImpl *job)
Definition: job.c:205
LONG HRESULT
Definition: typedefs.h:79
const char file[]
Definition: icontest.c:11
#define BG_S_PARTIAL_COMPLETE
Definition: bitsmsg.h:24
#define ERR(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:52
BOOL WINAPI MoveFileExW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName OPTIONAL, IN DWORD dwFlags)
Definition: move.c:1060
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
Definition: fci.c:126

◆ BackgroundCopyJob_EnumFiles()

static HRESULT WINAPI BackgroundCopyJob_EnumFiles ( IBackgroundCopyJob3 iface,
IEnumBackgroundCopyFiles **  enum_files 
)
static

Definition at line 336 of file job.c.

339 {
341  TRACE("(%p)->(%p)\n", This, enum_files);
342  return EnumBackgroundCopyFilesConstructor(This, enum_files);
343 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
HRESULT EnumBackgroundCopyFilesConstructor(BackgroundCopyJobImpl *job, IEnumBackgroundCopyFiles **enum_files)
Definition: enum_files.c:183
#define TRACE(s)
Definition: solgame.cpp:4

◆ BackgroundCopyJob_GetDescription()

static HRESULT WINAPI BackgroundCopyJob_GetDescription ( IBackgroundCopyJob3 iface,
LPWSTR pVal 
)
static

Definition at line 625 of file job.c.

628 {
630 
631  TRACE("(%p)->(%p)\n", This, pVal);
632 
633  return return_strval(This->description, pVal);
634 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
static HRESULT return_strval(const WCHAR *str, WCHAR **ret)
Definition: qmgr.h:132
#define TRACE(s)
Definition: solgame.cpp:4

◆ BackgroundCopyJob_GetDisplayName()

static HRESULT WINAPI BackgroundCopyJob_GetDisplayName ( IBackgroundCopyJob3 iface,
LPWSTR pVal 
)
static

Definition at line 578 of file job.c.

581 {
583 
584  TRACE("(%p)->(%p)\n", This, pVal);
585 
586  return return_strval(This->displayName, pVal);
587 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
static HRESULT return_strval(const WCHAR *str, WCHAR **ret)
Definition: qmgr.h:132
#define TRACE(s)
Definition: solgame.cpp:4

◆ BackgroundCopyJob_GetError()

static HRESULT WINAPI BackgroundCopyJob_GetError ( IBackgroundCopyJob3 iface,
IBackgroundCopyError **  ppError 
)
static

Definition at line 547 of file job.c.

550 {
552 
553  TRACE("(%p)->(%p)\n", job, ppError);
554 
555  if (!job->error.context) return BG_E_ERROR_INFORMATION_UNAVAILABLE;
556 
557  return create_copy_error(job->error.context, job->error.code, job->error.file, ppError);
558 }
static HANDLE job
Definition: process.c:77
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define TRACE(s)
Definition: solgame.cpp:4
#define BG_E_ERROR_INFORMATION_UNAVAILABLE
Definition: bitsmsg.h:45
static HRESULT create_copy_error(BG_ERROR_CONTEXT context, HRESULT code, IBackgroundCopyFile2 *file, IBackgroundCopyError **obj)
Definition: job.c:182

◆ BackgroundCopyJob_GetErrorCount()

static HRESULT WINAPI BackgroundCopyJob_GetErrorCount ( IBackgroundCopyJob3 iface,
ULONG Errors 
)
static

Definition at line 772 of file job.c.

775 {
777  FIXME("(%p)->(%p): stub\n", This, Errors);
778  return E_NOTIMPL;
779 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99
static const struct token_string Errors[]
Definition: error.c:43

◆ BackgroundCopyJob_GetFileACLFlags()

static HRESULT WINAPI BackgroundCopyJob_GetFileACLFlags ( IBackgroundCopyJob3 iface,
DWORD Flags 
)
static

Definition at line 972 of file job.c.

975 {
977  FIXME("(%p)->(%p): stub\n", This, Flags);
978  return S_OK;
979 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define FIXME(fmt,...)
Definition: debug.h:111
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define S_OK
Definition: intsafe.h:52

◆ BackgroundCopyJob_GetId()

static HRESULT WINAPI BackgroundCopyJob_GetId ( IBackgroundCopyJob3 iface,
GUID pVal 
)
static

Definition at line 479 of file job.c.

482 {
484  TRACE("(%p)->(%p)\n", This, pVal);
485  *pVal = This->jobId;
486  return S_OK;
487 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:52

◆ BackgroundCopyJob_GetMinimumRetryDelay()

static HRESULT WINAPI BackgroundCopyJob_GetMinimumRetryDelay ( IBackgroundCopyJob3 iface,
ULONG Seconds 
)
static

Definition at line 743 of file job.c.

746 {
748  FIXME("(%p)->(%p): stub\n", This, Seconds);
749  *Seconds = 30;
750  return S_OK;
751 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_OK
Definition: intsafe.h:52

◆ BackgroundCopyJob_GetNoProgressTimeout()

static HRESULT WINAPI BackgroundCopyJob_GetNoProgressTimeout ( IBackgroundCopyJob3 iface,
ULONG Seconds 
)
static

Definition at line 762 of file job.c.

765 {
767  FIXME("(%p)->(%p): stub\n", This, Seconds);
768  *Seconds = 900;
769  return S_OK;
770 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_OK
Definition: intsafe.h:52

◆ BackgroundCopyJob_GetNotifyCmdLine()

static HRESULT WINAPI BackgroundCopyJob_GetNotifyCmdLine ( IBackgroundCopyJob3 iface,
LPWSTR prog,
LPWSTR params 
)
static

Definition at line 821 of file job.c.

825 {
827  FIXME("(%p)->(%p %p): stub\n", This, prog, params);
828  return E_NOTIMPL;
829 }
char * prog
Definition: isohybrid.c:47
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
GLenum const GLfloat * params
Definition: glext.h:5645
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ BackgroundCopyJob_GetNotifyFlags()

static HRESULT WINAPI BackgroundCopyJob_GetNotifyFlags ( IBackgroundCopyJob3 iface,
ULONG pVal 
)
static

Definition at line 673 of file job.c.

676 {
678 
679  TRACE("(%p)->(%p)\n", This, pVal);
680 
681  if (!pVal) return E_INVALIDARG;
682 
683  *pVal = This->notify_flags;
684 
685  return S_OK;
686 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:52

◆ BackgroundCopyJob_GetNotifyInterface()

static HRESULT WINAPI BackgroundCopyJob_GetNotifyInterface ( IBackgroundCopyJob3 iface,
IUnknown **  pVal 
)
static

Definition at line 718 of file job.c.

721 {
723 
724  TRACE("(%p)->(%p)\n", This, pVal);
725 
726  if (!pVal) return E_INVALIDARG;
727 
728  *pVal = (IUnknown*)This->callback;
729  if (*pVal)
730  IUnknown_AddRef(*pVal);
731 
732  return S_OK;
733 }
if(dx==0 &&dy==0)
Definition: linetemp.h:174
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:52

◆ BackgroundCopyJob_GetOwner()

static HRESULT WINAPI BackgroundCopyJob_GetOwner ( IBackgroundCopyJob3 iface,
LPWSTR pVal 
)
static

Definition at line 560 of file job.c.

563 {
565  FIXME("(%p)->(%p): stub\n", This, pVal);
566  return E_NOTIMPL;
567 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ BackgroundCopyJob_GetPriority()

static HRESULT WINAPI BackgroundCopyJob_GetPriority ( IBackgroundCopyJob3 iface,
BG_JOB_PRIORITY *  pVal 
)
static

Definition at line 645 of file job.c.

648 {
650  FIXME("(%p)->(%p): stub\n", This, pVal);
651  return E_NOTIMPL;
652 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ BackgroundCopyJob_GetProgress()

static HRESULT WINAPI BackgroundCopyJob_GetProgress ( IBackgroundCopyJob3 iface,
BG_JOB_PROGRESS *  pVal 
)
static

Definition at line 504 of file job.c.

507 {
509 
510  TRACE("(%p)->(%p)\n", This, pVal);
511 
512  if (!pVal)
513  return E_INVALIDARG;
514 
516  *pVal = This->jobProgress;
518 
519  return S_OK;
520 }
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:52
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

◆ BackgroundCopyJob_GetProxySettings()

static HRESULT WINAPI BackgroundCopyJob_GetProxySettings ( IBackgroundCopyJob3 iface,
BG_JOB_PROXY_USAGE *  pProxyUsage,
LPWSTR pProxyList,
LPWSTR pProxyBypassList 
)
static

Definition at line 792 of file job.c.

797 {
799  FIXME("(%p)->(%p %p %p): stub\n", This, pProxyUsage, pProxyList, pProxyBypassList);
800  return E_NOTIMPL;
801 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ BackgroundCopyJob_GetReplyData()

static HRESULT WINAPI BackgroundCopyJob_GetReplyData ( IBackgroundCopyJob3 iface,
byte **  pBuffer,
UINT64 pLength 
)
static

Definition at line 840 of file job.c.

844 {
846  FIXME("(%p)->(%p %p): stub\n", This, pBuffer, pLength);
847  return E_NOTIMPL;
848 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define FIXME(fmt,...)
Definition: debug.h:111
PVOID pBuffer
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ BackgroundCopyJob_GetReplyFileName()

static HRESULT WINAPI BackgroundCopyJob_GetReplyFileName ( IBackgroundCopyJob3 iface,
LPWSTR pFilename 
)
static

Definition at line 859 of file job.c.

862 {
864  FIXME("(%p)->(%p): stub\n", This, pFilename);
865  return E_NOTIMPL;
866 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ BackgroundCopyJob_GetReplyProgress()

static HRESULT WINAPI BackgroundCopyJob_GetReplyProgress ( IBackgroundCopyJob3 iface,
BG_JOB_REPLY_PROGRESS *  progress 
)
static

Definition at line 831 of file job.c.

834 {
836  FIXME("(%p)->(%p): stub\n", This, progress);
837  return E_NOTIMPL;
838 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99
cd_progress_ptr progress
Definition: cdjpeg.h:152

◆ BackgroundCopyJob_GetState()

static HRESULT WINAPI BackgroundCopyJob_GetState ( IBackgroundCopyJob3 iface,
BG_JOB_STATE *  pVal 
)
static

Definition at line 531 of file job.c.

534 {
536 
537  TRACE("(%p)->(%p)\n", This, pVal);
538 
539  if (!pVal)
540  return E_INVALIDARG;
541 
542  /* Don't think we need a critical section for this */
543  *pVal = This->state;
544  return S_OK;
545 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:52

◆ BackgroundCopyJob_GetTimes()

static HRESULT WINAPI BackgroundCopyJob_GetTimes ( IBackgroundCopyJob3 iface,
BG_JOB_TIMES *  pVal 
)
static

Definition at line 522 of file job.c.

525 {
527  FIXME("(%p)->(%p): stub\n", This, pVal);
528  return E_NOTIMPL;
529 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ BackgroundCopyJob_GetType()

static HRESULT WINAPI BackgroundCopyJob_GetType ( IBackgroundCopyJob3 iface,
BG_JOB_TYPE *  pVal 
)
static

Definition at line 489 of file job.c.

492 {
494 
495  TRACE("(%p)->(%p)\n", This, pVal);
496 
497  if (!pVal)
498  return E_INVALIDARG;
499 
500  *pVal = This->type;
501  return S_OK;
502 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:52

◆ BackgroundCopyJob_QueryInterface()

static HRESULT WINAPI BackgroundCopyJob_QueryInterface ( IBackgroundCopyJob3 iface,
REFIID  riid,
void **  obj 
)
static

Definition at line 215 of file job.c.

217 {
219 
220  TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), obj);
221 
222  if (IsEqualGUID(riid, &IID_IUnknown) ||
223  IsEqualGUID(riid, &IID_IBackgroundCopyJob) ||
224  IsEqualGUID(riid, &IID_IBackgroundCopyJob2) ||
225  IsEqualGUID(riid, &IID_IBackgroundCopyJob3))
226  {
227  *obj = &This->IBackgroundCopyJob3_iface;
228  }
229  else if (IsEqualGUID(riid, &IID_IBackgroundCopyJobHttpOptions))
230  {
231  *obj = &This->IBackgroundCopyJobHttpOptions_iface;
232  }
233  else
234  {
235  *obj = NULL;
236  return E_NOINTERFACE;
237  }
238 
239  IBackgroundCopyJob3_AddRef(iface);
240  return S_OK;
241 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

◆ BackgroundCopyJob_Release()

static ULONG WINAPI BackgroundCopyJob_Release ( IBackgroundCopyJob3 iface)
static

Definition at line 251 of file job.c.

252 {
254  ULONG i, j, ref = InterlockedDecrement(&This->ref);
255 
256  TRACE("(%p)->(%d)\n", This, ref);
257 
258  if (ref == 0)
259  {
260  This->cs.DebugInfo->Spare[0] = 0;
262  if (This->callback)
263  IBackgroundCopyCallback2_Release(This->callback);
264  HeapFree(GetProcessHeap(), 0, This->displayName);
265  HeapFree(GetProcessHeap(), 0, This->description);
266  HeapFree(GetProcessHeap(), 0, This->http_options.headers);
267  for (i = 0; i < BG_AUTH_TARGET_PROXY; i++)
268  {
269  for (j = 0; j < BG_AUTH_SCHEME_PASSPORT; j++)
270  {
271  BG_AUTH_CREDENTIALS *cred = &This->http_options.creds[i][j];
272  HeapFree(GetProcessHeap(), 0, cred->Credentials.Basic.UserName);
273  HeapFree(GetProcessHeap(), 0, cred->Credentials.Basic.Password);
274  }
275  }
276  CloseHandle(This->wait);
277  CloseHandle(This->cancel);
278  CloseHandle(This->done);
280  }
281 
282  return ref;
283 }
#define CloseHandle
Definition: compat.h:598
Definition: send.c:48
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
GLenum GLint ref
Definition: glext.h:6028
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define InterlockedDecrement
Definition: armddk.h:52
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:594

◆ BackgroundCopyJob_RemoveCredentials()

static HRESULT WINAPI BackgroundCopyJob_RemoveCredentials ( IBackgroundCopyJob3 iface,
BG_AUTH_TARGET  target,
BG_AUTH_SCHEME  scheme 
)
static

Definition at line 914 of file job.c.

918 {
920  BG_AUTH_CREDENTIALS *new_cred;
921  int idx_target, idx_scheme;
922 
923  TRACE("(%p)->(%u %u)\n", job, target, scheme);
924 
925  if ((idx_target = index_from_target(target)) < 0) return BG_E_INVALID_AUTH_TARGET;
926  if ((idx_scheme = index_from_scheme(scheme)) < 0) return BG_E_INVALID_AUTH_SCHEME;
927  new_cred = &job->http_options.creds[idx_target][idx_scheme];
928 
930 
931  new_cred->Target = new_cred->Scheme = 0;
932  HeapFree(GetProcessHeap(), 0, new_cred->Credentials.Basic.UserName);
933  new_cred->Credentials.Basic.UserName = NULL;
934  HeapFree(GetProcessHeap(), 0, new_cred->Credentials.Basic.Password);
935  new_cred->Credentials.Basic.Password = NULL;
936 
938  return S_OK;
939 }
#define BG_E_INVALID_AUTH_SCHEME
Definition: bitsmsg.h:64
static HANDLE job
Definition: process.c:77
DWORD scheme
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
static int index_from_target(BG_AUTH_TARGET target)
Definition: job.c:868
static int index_from_scheme(BG_AUTH_SCHEME scheme)
Definition: job.c:874
#define S_OK
Definition: intsafe.h:52
#define BG_E_INVALID_AUTH_TARGET
Definition: bitsmsg.h:63
#define NULL
Definition: types.h:112
GLenum target
Definition: glext.h:7315
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define HeapFree(x, y, z)
Definition: compat.h:594

◆ BackgroundCopyJob_ReplaceRemotePrefix()

static HRESULT WINAPI BackgroundCopyJob_ReplaceRemotePrefix ( IBackgroundCopyJob3 iface,
LPCWSTR  OldPrefix,
LPCWSTR  NewPrefix 
)
static

Definition at line 941 of file job.c.

945 {
947  FIXME("(%p)->(%s %s): stub\n", This, debugstr_w(OldPrefix), debugstr_w(NewPrefix));
948  return S_OK;
949 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_OK
Definition: intsafe.h:52

◆ BackgroundCopyJob_Resume()

static HRESULT WINAPI BackgroundCopyJob_Resume ( IBackgroundCopyJob3 iface)
static

Definition at line 353 of file job.c.

355 {
357  HRESULT rv = S_OK;
358 
359  TRACE("(%p)\n", This);
360 
362  if (is_job_done(This))
363  {
364  rv = BG_E_INVALID_STATE;
365  }
366  else if (This->jobProgress.FilesTransferred == This->jobProgress.FilesTotal)
367  {
368  rv = BG_E_EMPTY;
369  }
370  else if (This->state != BG_JOB_STATE_CONNECTING
371  && This->state != BG_JOB_STATE_TRANSFERRING)
372  {
373  This->state = BG_JOB_STATE_QUEUED;
374  This->error.context = 0;
375  This->error.code = S_OK;
376  if (This->error.file)
377  {
378  IBackgroundCopyFile2_Release(This->error.file);
379  This->error.file = NULL;
380  }
382  }
384 
385  return rv;
386 }
BackgroundCopyManagerImpl globalMgr
Definition: qmgr.c:26
CRITICAL_SECTION cs
Definition: qmgr.h:89
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define BG_E_EMPTY
Definition: bitsmsg.h:40
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define BG_E_INVALID_STATE
Definition: bitsmsg.h:39
#define TRACE(s)
Definition: solgame.cpp:4
static BOOL is_job_done(const BackgroundCopyJobImpl *job)
Definition: job.c:205
LONG HRESULT
Definition: typedefs.h:79
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

◆ BackgroundCopyJob_SetCredentials()

static HRESULT WINAPI BackgroundCopyJob_SetCredentials ( IBackgroundCopyJob3 iface,
BG_AUTH_CREDENTIALS *  cred 
)
static

Definition at line 880 of file job.c.

883 {
885  BG_AUTH_CREDENTIALS *new_cred;
886  int idx_target, idx_scheme;
887 
888  TRACE("(%p)->(%p)\n", job, cred);
889 
890  if ((idx_target = index_from_target(cred->Target)) < 0) return BG_E_INVALID_AUTH_TARGET;
891  if ((idx_scheme = index_from_scheme(cred->Scheme)) < 0) return BG_E_INVALID_AUTH_SCHEME;
892  new_cred = &job->http_options.creds[idx_target][idx_scheme];
893 
895 
896  new_cred->Target = cred->Target;
897  new_cred->Scheme = cred->Scheme;
898 
899  if (cred->Credentials.Basic.UserName)
900  {
901  HeapFree(GetProcessHeap(), 0, new_cred->Credentials.Basic.UserName);
902  new_cred->Credentials.Basic.UserName = strdupW(cred->Credentials.Basic.UserName);
903  }
904  if (cred->Credentials.Basic.Password)
905  {
906  HeapFree(GetProcessHeap(), 0, new_cred->Credentials.Basic.Password);
907  new_cred->Credentials.Basic.Password = strdupW(cred->Credentials.Basic.Password);
908  }
909 
911  return S_OK;
912 }
#define BG_E_INVALID_AUTH_SCHEME
Definition: bitsmsg.h:64
static HANDLE job
Definition: process.c:77
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
static int index_from_target(BG_AUTH_TARGET target)
Definition: job.c:868
static int index_from_scheme(BG_AUTH_SCHEME scheme)
Definition: job.c:874
#define S_OK
Definition: intsafe.h:52
#define BG_E_INVALID_AUTH_TARGET
Definition: bitsmsg.h:63
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define HeapFree(x, y, z)
Definition: compat.h:594

◆ BackgroundCopyJob_SetDescription()

static HRESULT WINAPI BackgroundCopyJob_SetDescription ( IBackgroundCopyJob3 iface,
LPCWSTR  Val 
)
static

Definition at line 589 of file job.c.

592 {
594  static const int max_description_len = 1024;
595  HRESULT hr = S_OK;
596  int len;
597 
598  TRACE("(%p)->(%s)\n", This, debugstr_w(Val));
599 
600  if (!Val) return E_INVALIDARG;
601 
602  len = lstrlenW(Val);
603  if (len > max_description_len) return BG_E_STRING_TOO_LONG;
604 
606 
607  if (is_job_done(This))
608  {
610  }
611  else
612  {
613  HeapFree(GetProcessHeap(), 0, This->description);
614  if ((This->description = HeapAlloc(GetProcessHeap(), 0, (len+1)*sizeof(WCHAR))))
615  lstrcpyW(This->description, Val);
616  else
617  hr = E_OUTOFMEMORY;
618  }
619 
621 
622  return hr;
623 }
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define lstrlenW
Definition: compat.h:609
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define BG_E_INVALID_STATE
Definition: bitsmsg.h:39
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_w
Definition: kernel32.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
static BOOL is_job_done(const BackgroundCopyJobImpl *job)
Definition: job.c:205
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
GLenum GLsizei len
Definition: glext.h:6722
#define BG_E_STRING_TOO_LONG
Definition: bitsmsg.h:58
#define S_OK
Definition: intsafe.h:52
#define lstrcpyW
Definition: compat.h:608
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define HeapFree(x, y, z)
Definition: compat.h:594

◆ BackgroundCopyJob_SetDisplayName()

static HRESULT WINAPI BackgroundCopyJob_SetDisplayName ( IBackgroundCopyJob3 iface,
LPCWSTR  Val 
)
static

Definition at line 569 of file job.c.

572 {
574  FIXME("(%p)->(%s): stub\n", This, debugstr_w(Val));
575  return E_NOTIMPL;
576 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ BackgroundCopyJob_SetFileACLFlags()

static HRESULT WINAPI BackgroundCopyJob_SetFileACLFlags ( IBackgroundCopyJob3 iface,
DWORD  Flags 
)
static

Definition at line 963 of file job.c.

966 {
968  FIXME("(%p)->(%x): stub\n", This, Flags);
969  return S_OK;
970 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define FIXME(fmt,...)
Definition: debug.h:111
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define S_OK
Definition: intsafe.h:52

◆ BackgroundCopyJob_SetMinimumRetryDelay()

static HRESULT WINAPI BackgroundCopyJob_SetMinimumRetryDelay ( IBackgroundCopyJob3 iface,
ULONG  Seconds 
)
static

Definition at line 735 of file job.c.

738 {
739  FIXME("%u\n", Seconds);
740  return S_OK;
741 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_OK
Definition: intsafe.h:52

◆ BackgroundCopyJob_SetNoProgressTimeout()

static HRESULT WINAPI BackgroundCopyJob_SetNoProgressTimeout ( IBackgroundCopyJob3 iface,
ULONG  Seconds 
)
static

Definition at line 753 of file job.c.

756 {
758  FIXME("(%p)->(%d): stub\n", This, Seconds);
759  return S_OK;
760 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_OK
Definition: intsafe.h:52

◆ BackgroundCopyJob_SetNotifyCmdLine()

static HRESULT WINAPI BackgroundCopyJob_SetNotifyCmdLine ( IBackgroundCopyJob3 iface,
LPCWSTR  prog,
LPCWSTR  params 
)
static

Definition at line 811 of file job.c.

815 {
817  FIXME("(%p)->(%s %s): stub\n", This, debugstr_w(prog), debugstr_w(params));
818  return E_NOTIMPL;
819 }
char * prog
Definition: isohybrid.c:47
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
GLenum const GLfloat * params
Definition: glext.h:5645
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ BackgroundCopyJob_SetNotifyFlags()

static HRESULT WINAPI BackgroundCopyJob_SetNotifyFlags ( IBackgroundCopyJob3 iface,
ULONG  Val 
)
static

Definition at line 654 of file job.c.

657 {
659  static const ULONG valid_flags = BG_NOTIFY_JOB_TRANSFERRED |
660  BG_NOTIFY_JOB_ERROR |
661  BG_NOTIFY_DISABLE |
662  BG_NOTIFY_JOB_MODIFICATION |
663  BG_NOTIFY_FILE_TRANSFERRED;
664 
665  TRACE("(%p)->(0x%x)\n", This, Val);
666 
667  if (is_job_done(This)) return BG_E_INVALID_STATE;
668  if (Val & ~valid_flags) return E_NOTIMPL;
669  This->notify_flags = Val;
670  return S_OK;
671 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define BG_E_INVALID_STATE
Definition: bitsmsg.h:39
#define TRACE(s)
Definition: solgame.cpp:4
static BOOL is_job_done(const BackgroundCopyJobImpl *job)
Definition: job.c:205
#define S_OK
Definition: intsafe.h:52
#define E_NOTIMPL
Definition: ddrawi.h:99
unsigned int ULONG
Definition: retypes.h:1

◆ BackgroundCopyJob_SetNotifyInterface()

static HRESULT WINAPI BackgroundCopyJob_SetNotifyInterface ( IBackgroundCopyJob3 iface,
IUnknown Val 
)
static

Definition at line 688 of file job.c.

691 {
693  HRESULT hr = S_OK;
694 
695  TRACE("(%p)->(%p)\n", This, Val);
696 
697  if (is_job_done(This)) return BG_E_INVALID_STATE;
698 
699  if (This->callback)
700  {
701  IBackgroundCopyCallback2_Release(This->callback);
702  This->callback = NULL;
703  This->callback2 = FALSE;
704  }
705 
706  if (Val)
707  {
708  hr = IUnknown_QueryInterface(Val, &IID_IBackgroundCopyCallback2, (void**)&This->callback);
709  if (FAILED(hr))
710  hr = IUnknown_QueryInterface(Val, &IID_IBackgroundCopyCallback, (void**)&This->callback);
711  else
712  This->callback2 = TRUE;
713  }
714 
715  return hr;
716 }
HRESULT hr
Definition: shlfolder.c:183
#define TRUE
Definition: types.h:120
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define BG_E_INVALID_STATE
Definition: bitsmsg.h:39
#define FALSE
Definition: types.h:117
#define TRACE(s)
Definition: solgame.cpp:4
static BOOL is_job_done(const BackgroundCopyJobImpl *job)
Definition: job.c:205
LONG HRESULT
Definition: typedefs.h:79
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112

◆ BackgroundCopyJob_SetPriority()

static HRESULT WINAPI BackgroundCopyJob_SetPriority ( IBackgroundCopyJob3 iface,
BG_JOB_PRIORITY  Val 
)
static

Definition at line 636 of file job.c.

639 {
641  FIXME("(%p)->(%d): stub\n", This, Val);
642  return S_OK;
643 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_OK
Definition: intsafe.h:52

◆ BackgroundCopyJob_SetProxySettings()

static HRESULT WINAPI BackgroundCopyJob_SetProxySettings ( IBackgroundCopyJob3 iface,
BG_JOB_PROXY_USAGE  ProxyUsage,
const WCHAR ProxyList,
const WCHAR ProxyBypassList 
)
static

Definition at line 781 of file job.c.

786 {
788  FIXME("(%p)->(%d %s %s): stub\n", This, ProxyUsage, debugstr_w(ProxyList), debugstr_w(ProxyBypassList));
789  return E_NOTIMPL;
790 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ BackgroundCopyJob_SetReplyFileName()

static HRESULT WINAPI BackgroundCopyJob_SetReplyFileName ( IBackgroundCopyJob3 iface,
LPCWSTR  filename 
)
static

Definition at line 850 of file job.c.

853 {
855  FIXME("(%p)->(%s): stub\n", This, debugstr_w(filename));
856  return E_NOTIMPL;
857 }
const char * filename
Definition: ioapi.h:135
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ BackgroundCopyJob_Suspend()

static HRESULT WINAPI BackgroundCopyJob_Suspend ( IBackgroundCopyJob3 iface)
static

Definition at line 345 of file job.c.

347 {
349  FIXME("(%p): stub\n", This);
350  return E_NOTIMPL;
351 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ BackgroundCopyJob_TakeOwnership()

static HRESULT WINAPI BackgroundCopyJob_TakeOwnership ( IBackgroundCopyJob3 iface)
static

Definition at line 803 of file job.c.

805 {
807  FIXME("(%p): stub\n", This);
808  return E_NOTIMPL;
809 }
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob3(IBackgroundCopyJob3 *iface)
Definition: job.c:210
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ BackgroundCopyJobConstructor()

HRESULT BackgroundCopyJobConstructor ( LPCWSTR  displayName,
BG_JOB_TYPE  type,
GUID job_id,
BackgroundCopyJobImpl **  job 
)

Definition at line 1197 of file job.c.

1198 {
1199  HRESULT hr;
1201 
1202  TRACE("(%s,%d,%p)\n", debugstr_w(displayName), type, job);
1203 
1204  This = HeapAlloc(GetProcessHeap(), 0, sizeof *This);
1205  if (!This)
1206  return E_OUTOFMEMORY;
1207 
1208  This->IBackgroundCopyJob3_iface.lpVtbl = &BackgroundCopyJob3Vtbl;
1209  This->IBackgroundCopyJobHttpOptions_iface.lpVtbl = &http_options_vtbl;
1211  This->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": BackgroundCopyJobImpl.cs");
1212 
1213  This->ref = 1;
1214  This->type = type;
1215 
1216  This->displayName = strdupW(displayName);
1217  if (!This->displayName)
1218  {
1219  This->cs.DebugInfo->Spare[0] = 0;
1221  HeapFree(GetProcessHeap(), 0, This);
1222  return E_OUTOFMEMORY;
1223  }
1224 
1225  hr = CoCreateGuid(&This->jobId);
1226  if (FAILED(hr))
1227  {
1228  This->cs.DebugInfo->Spare[0] = 0;
1230  HeapFree(GetProcessHeap(), 0, This->displayName);
1231  HeapFree(GetProcessHeap(), 0, This);
1232  return hr;
1233  }
1234  *job_id = This->jobId;
1235 
1236  list_init(&This->files);
1237  This->jobProgress.BytesTotal = 0;
1238  This->jobProgress.BytesTransferred = 0;
1239  This->jobProgress.FilesTotal = 0;
1240  This->jobProgress.FilesTransferred = 0;
1241 
1242  This->state = BG_JOB_STATE_SUSPENDED;
1243  This->description = NULL;
1244  This->notify_flags = BG_NOTIFY_JOB_ERROR | BG_NOTIFY_JOB_TRANSFERRED;
1245  This->callback = NULL;
1246  This->callback2 = FALSE;
1247 
1248  This->error.context = 0;
1249  This->error.code = S_OK;
1250  This->error.file = NULL;
1251 
1252  memset(&This->http_options, 0, sizeof(This->http_options));
1253 
1254  This->wait = CreateEventW(NULL, FALSE, FALSE, NULL);
1255  This->cancel = CreateEventW(NULL, FALSE, FALSE, NULL);
1256  This->done = CreateEventW(NULL, FALSE, FALSE, NULL);
1257 
1258  *job = This;
1259 
1260  TRACE("created job %s:%p\n", debugstr_guid(&This->jobId), This);
1261 
1262  return S_OK;
1263 }
static HANDLE job
Definition: process.c:77
#define DWORD_PTR
Definition: treelist.c:76
HRESULT hr
Definition: shlfolder.c:183
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
char displayName[]
Definition: tftpd.cpp:35
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define FALSE
Definition: types.h:117
#define debugstr_w
Definition: kernel32.h:32
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static const IBackgroundCopyJob3Vtbl BackgroundCopyJob3Vtbl
Definition: job.c:981
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
LONG HRESULT
Definition: typedefs.h:79
HRESULT WINAPI CoCreateGuid(GUID *pguid)
Definition: compobj.c:2206
static const IBackgroundCopyJobHttpOptionsVtbl http_options_vtbl
Definition: job.c:1182
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define memset(x, y, z)
Definition: compat.h:39
#define HeapFree(x, y, z)
Definition: compat.h:594

Referenced by BackgroundCopyManager_CreateJob().

◆ copy_error_AddRef()

static ULONG WINAPI copy_error_AddRef ( IBackgroundCopyError iface)
static

Definition at line 82 of file job.c.

84 {
87  TRACE("(%p)->(%d)\n", error, refs);
88  return refs;
89 }
#define error(str)
Definition: mkdosfs.c:1605
static struct copy_error * impl_from_IBackgroundCopyError(IBackgroundCopyError *iface)
Definition: job.c:53
long LONG
Definition: pedump.c:60
Definition: job.c:44
#define TRACE(s)
Definition: solgame.cpp:4
LONG refs
Definition: job.c:47
#define InterlockedIncrement
Definition: armddk.h:53

◆ copy_error_GetError()

static HRESULT WINAPI copy_error_GetError ( IBackgroundCopyError iface,
BG_ERROR_CONTEXT *  pContext,
HRESULT pCode 
)
static

Definition at line 107 of file job.c.

111 {
113 
114  TRACE("(%p)->(%p %p)\n", error, pContext, pCode);
115 
116  *pContext = error->context;
117  *pCode = error->code;
118 
119  TRACE("returning context %u error code 0x%08x\n", error->context, error->code);
120  return S_OK;
121 }
#define error(str)
Definition: mkdosfs.c:1605
static struct copy_error * impl_from_IBackgroundCopyError(IBackgroundCopyError *iface)
Definition: job.c:53
Definition: job.c:44
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:52

◆ copy_error_GetErrorContextDescription()

static HRESULT WINAPI copy_error_GetErrorContextDescription ( IBackgroundCopyError iface,
DWORD  LanguageId,
LPWSTR pContextDescription 
)
static

Definition at line 151 of file job.c.

155 {
157  FIXME("(%p)->(%p)\n", error, pContextDescription);
158  return E_NOTIMPL;
159 }
#define error(str)
Definition: mkdosfs.c:1605
static struct copy_error * impl_from_IBackgroundCopyError(IBackgroundCopyError *iface)
Definition: job.c:53
#define FIXME(fmt,...)
Definition: debug.h:111
Definition: job.c:44
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ copy_error_GetErrorDescription()

static HRESULT WINAPI copy_error_GetErrorDescription ( IBackgroundCopyError iface,
DWORD  LanguageId,
LPWSTR pErrorDescription 
)
static

Definition at line 141 of file job.c.

145 {
147  FIXME("(%p)->(%p)\n", error, pErrorDescription);
148  return E_NOTIMPL;
149 }
#define error(str)
Definition: mkdosfs.c:1605
static struct copy_error * impl_from_IBackgroundCopyError(IBackgroundCopyError *iface)
Definition: job.c:53
#define FIXME(fmt,...)
Definition: debug.h:111
Definition: job.c:44
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ copy_error_GetFile()

static HRESULT WINAPI copy_error_GetFile ( IBackgroundCopyError iface,
IBackgroundCopyFile **  pVal 
)
static

Definition at line 123 of file job.c.

126 {
128 
129  TRACE("(%p)->(%p)\n", error, pVal);
130 
131  if (error->file)
132  {
133  IBackgroundCopyFile2_AddRef(error->file);
134  *pVal = (IBackgroundCopyFile *)error->file;
135  return S_OK;
136  }
137  *pVal = NULL;
139 }
#define error(str)
Definition: mkdosfs.c:1605
static struct copy_error * impl_from_IBackgroundCopyError(IBackgroundCopyError *iface)
Definition: job.c:53
Definition: job.c:44
#define TRACE(s)
Definition: solgame.cpp:4
#define BG_E_FILE_NOT_AVAILABLE
Definition: bitsmsg.h:41
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112

◆ copy_error_GetProtocol()

static HRESULT WINAPI copy_error_GetProtocol ( IBackgroundCopyError iface,
LPWSTR pProtocol 
)
static

Definition at line 161 of file job.c.

164 {
166  FIXME("(%p)->(%p)\n", error, pProtocol);
167  return E_NOTIMPL;
168 }
#define error(str)
Definition: mkdosfs.c:1605
static struct copy_error * impl_from_IBackgroundCopyError(IBackgroundCopyError *iface)
Definition: job.c:53
#define FIXME(fmt,...)
Definition: debug.h:111
Definition: job.c:44
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ copy_error_QueryInterface()

static HRESULT WINAPI copy_error_QueryInterface ( IBackgroundCopyError iface,
REFIID  riid,
void **  obj 
)
static

Definition at line 58 of file job.c.

62 {
64 
65  TRACE("(%p)->(%s %p)\n", error, debugstr_guid(riid), obj);
66 
67  if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IBackgroundCopyError))
68  {
69  *obj = &error->IBackgroundCopyError_iface;
70  }
71  else
72  {
73  *obj = NULL;
74  WARN("interface %s not supported\n", debugstr_guid(riid));
75  return E_NOINTERFACE;
76  }
77 
78  IBackgroundCopyError_AddRef(iface);
79  return S_OK;
80 }
#define E_NOINTERFACE
Definition: winerror.h:2364
#define error(str)
Definition: mkdosfs.c:1605
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:112
static struct copy_error * impl_from_IBackgroundCopyError(IBackgroundCopyError *iface)
Definition: job.c:53
#define debugstr_guid
Definition: kernel32.h:35
Definition: job.c:44
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

◆ copy_error_Release()

static ULONG WINAPI copy_error_Release ( IBackgroundCopyError iface)
static

Definition at line 91 of file job.c.

93 {
96 
97  TRACE("(%p)->(%d)\n", error, refs);
98 
99  if (!refs)
100  {
101  if (error->file) IBackgroundCopyFile2_Release(error->file);
103  }
104  return refs;
105 }
#define error(str)
Definition: mkdosfs.c:1605
static struct copy_error * impl_from_IBackgroundCopyError(IBackgroundCopyError *iface)
Definition: job.c:53
long LONG
Definition: pedump.c:60
Definition: job.c:44
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
#define InterlockedDecrement
Definition: armddk.h:52
LONG refs
Definition: job.c:47
#define HeapFree(x, y, z)
Definition: compat.h:594

◆ create_copy_error()

static HRESULT create_copy_error ( BG_ERROR_CONTEXT  context,
HRESULT  code,
IBackgroundCopyFile2 file,
IBackgroundCopyError **  obj 
)
static

Definition at line 182 of file job.c.

187 {
188  struct copy_error *error;
189 
190  TRACE("context %u code %08x file %p\n", context, code, file);
191 
192  if (!(error = HeapAlloc(GetProcessHeap(), 0, sizeof(*error) ))) return E_OUTOFMEMORY;
193  error->IBackgroundCopyError_iface.lpVtbl = &copy_error_vtbl;
194  error->refs = 1;
195  error->context = context;
196  error->code = code;
197  error->file = file;
198  if (error->file) IBackgroundCopyFile2_AddRef(error->file);
199 
200  *obj = &error->IBackgroundCopyError_iface;
201  TRACE("returning iface %p\n", *obj);
202  return S_OK;
203 }
#define error(str)
Definition: mkdosfs.c:1605
Definition: http.c:7251
static const IBackgroundCopyErrorVtbl copy_error_vtbl
Definition: job.c:170
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
Definition: job.c:44
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
const char file[]
Definition: icontest.c:11
_In_opt_ PVOID _In_ ULONG _In_ PVOID context
Definition: wdfdriver.h:113
Definition: inflate.c:139
int code
Definition: main.c:75
#define S_OK
Definition: intsafe.h:52
Definition: fci.c:126

Referenced by BackgroundCopyJob_GetError().

◆ http_options_AddRef()

static ULONG WINAPI http_options_AddRef ( IBackgroundCopyJobHttpOptions iface)
static

Definition at line 1047 of file job.c.

1049 {
1051  return IBackgroundCopyJob3_AddRef(&job->IBackgroundCopyJob3_iface);
1052 }
static HANDLE job
Definition: process.c:77
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJobHttpOptions(IBackgroundCopyJobHttpOptions *iface)
Definition: job.c:1032

◆ http_options_GetClientCertificate()

static HRESULT WINAPI http_options_GetClientCertificate ( IBackgroundCopyJobHttpOptions iface,
BG_CERT_STORE_LOCATION *  pStoreLocation,
LPWSTR pStoreName,
BYTE **  ppCertHashBlob,
LPWSTR pSubjectName 
)
static

Definition at line 1088 of file job.c.

1094 {
1095  FIXME("\n");
1096  return E_NOTIMPL;
1097 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ http_options_GetCustomHeaders()

static HRESULT WINAPI http_options_GetCustomHeaders ( IBackgroundCopyJobHttpOptions iface,
LPWSTR pRequestHeaders 
)
static

Definition at line 1130 of file job.c.

1133 {
1135 
1136  TRACE("(%p)->(%p)\n", iface, pRequestHeaders);
1137 
1138  EnterCriticalSection(&job->cs);
1139 
1140  if (job->http_options.headers)
1141  {
1142  WCHAR *headers = co_strdupW(job->http_options.headers);
1143  if (!headers)
1144  {
1145  LeaveCriticalSection(&job->cs);
1146  return E_OUTOFMEMORY;
1147  }
1148  *pRequestHeaders = headers;
1149  LeaveCriticalSection(&job->cs);
1150  return S_OK;
1151  }
1152 
1153  *pRequestHeaders = NULL;
1154  LeaveCriticalSection(&job->cs);
1155  return S_FALSE;
1156 }
static HANDLE job
Definition: process.c:77
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJobHttpOptions(IBackgroundCopyJobHttpOptions *iface)
Definition: job.c:1032
vector< Header * > headers
Definition: sdkparse.cpp:39
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
static LPWSTR co_strdupW(LPCWSTR str)
Definition: ieframe.h:359
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

◆ http_options_GetSecurityFlags()

static HRESULT WINAPI http_options_GetSecurityFlags ( IBackgroundCopyJobHttpOptions iface,
ULONG pFlags 
)
static

Definition at line 1170 of file job.c.

1173 {
1175 
1176  TRACE("(%p)->(%p)\n", iface, pFlags);
1177 
1178  *pFlags = job->http_options.flags;
1179  return S_OK;
1180 }
static HANDLE job
Definition: process.c:77
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJobHttpOptions(IBackgroundCopyJobHttpOptions *iface)
Definition: job.c:1032
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:52

◆ http_options_QueryInterface()

static HRESULT WINAPI http_options_QueryInterface ( IBackgroundCopyJobHttpOptions iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 1038 of file job.c.

1042 {
1044  return IBackgroundCopyJob3_QueryInterface(&job->IBackgroundCopyJob3_iface, riid, ppvObject);
1045 }
static HANDLE job
Definition: process.c:77
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJobHttpOptions(IBackgroundCopyJobHttpOptions *iface)
Definition: job.c:1032
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppvObject
Definition: precomp.h:44

◆ http_options_Release()

static ULONG WINAPI http_options_Release ( IBackgroundCopyJobHttpOptions iface)
static

Definition at line 1054 of file job.c.

1056 {
1058  return IBackgroundCopyJob3_Release(&job->IBackgroundCopyJob3_iface);
1059 }
static HANDLE job
Definition: process.c:77
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJobHttpOptions(IBackgroundCopyJobHttpOptions *iface)
Definition: job.c:1032

◆ http_options_RemoveClientCertificate()

static HRESULT WINAPI http_options_RemoveClientCertificate ( IBackgroundCopyJobHttpOptions iface)
static

Definition at line 1081 of file job.c.

1083 {
1084  FIXME("\n");
1085  return E_NOTIMPL;
1086 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ http_options_SetClientCertificateByID()

static HRESULT WINAPI http_options_SetClientCertificateByID ( IBackgroundCopyJobHttpOptions iface,
BG_CERT_STORE_LOCATION  StoreLocation,
LPCWSTR  StoreName,
BYTE pCertHashBlob 
)
static

Definition at line 1061 of file job.c.

1066 {
1067  FIXME("\n");
1068  return E_NOTIMPL;
1069 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ http_options_SetClientCertificateByName()

static HRESULT WINAPI http_options_SetClientCertificateByName ( IBackgroundCopyJobHttpOptions iface,
BG_CERT_STORE_LOCATION  StoreLocation,
LPCWSTR  StoreName,
LPCWSTR  SubjectName 
)
static

Definition at line 1071 of file job.c.

1076 {
1077  FIXME("\n");
1078  return E_NOTIMPL;
1079 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ http_options_SetCustomHeaders()

static HRESULT WINAPI http_options_SetCustomHeaders ( IBackgroundCopyJobHttpOptions iface,
LPCWSTR  RequestHeaders 
)
static

Definition at line 1099 of file job.c.

1102 {
1104 
1105  TRACE("(%p)->(%s)\n", iface, debugstr_w(RequestHeaders));
1106 
1107  EnterCriticalSection(&job->cs);
1108 
1109  if (RequestHeaders)
1110  {
1111  WCHAR *headers = strdupW(RequestHeaders);
1112  if (!headers)
1113  {
1114  LeaveCriticalSection(&job->cs);
1115  return E_OUTOFMEMORY;
1116  }
1117  HeapFree(GetProcessHeap(), 0, job->http_options.headers);
1118  job->http_options.headers = headers;
1119  }
1120  else
1121  {
1122  HeapFree(GetProcessHeap(), 0, job->http_options.headers);
1123  job->http_options.headers = NULL;
1124  }
1125 
1126  LeaveCriticalSection(&job->cs);
1127  return S_OK;
1128 }
static HANDLE job
Definition: process.c:77
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJobHttpOptions(IBackgroundCopyJobHttpOptions *iface)
Definition: job.c:1032
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
vector< Header * > headers
Definition: sdkparse.cpp:39
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define HeapFree(x, y, z)
Definition: compat.h:594

◆ http_options_SetSecurityFlags()

static HRESULT WINAPI http_options_SetSecurityFlags ( IBackgroundCopyJobHttpOptions iface,
ULONG  Flags 
)
static

Definition at line 1158 of file job.c.

1161 {
1163 
1164  TRACE("(%p)->(0x%08x)\n", iface, Flags);
1165 
1166  job->http_options.flags = Flags;
1167  return S_OK;
1168 }
static HANDLE job
Definition: process.c:77
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJobHttpOptions(IBackgroundCopyJobHttpOptions *iface)
Definition: job.c:1032
#define TRACE(s)
Definition: solgame.cpp:4
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define S_OK
Definition: intsafe.h:52

◆ impl_from_IBackgroundCopyError()

static struct copy_error* impl_from_IBackgroundCopyError ( IBackgroundCopyError iface)
inlinestatic

Definition at line 53 of file job.c.

54 {
56 }
Definition: job.c:44
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
IBackgroundCopyError IBackgroundCopyError_iface
Definition: job.c:46

Referenced by copy_error_AddRef(), copy_error_GetError(), copy_error_GetErrorContextDescription(), copy_error_GetErrorDescription(), copy_error_GetFile(), copy_error_GetProtocol(), copy_error_QueryInterface(), and copy_error_Release().

◆ impl_from_IBackgroundCopyJob3()

static BackgroundCopyJobImpl* impl_from_IBackgroundCopyJob3 ( IBackgroundCopyJob3 iface)
inlinestatic

Definition at line 210 of file job.c.

211 {
212  return CONTAINING_RECORD(iface, BackgroundCopyJobImpl, IBackgroundCopyJob3_iface);
213 }
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 BackgroundCopyJob_AddFile(), BackgroundCopyJob_AddFileSet(), BackgroundCopyJob_AddFileWithRanges(), BackgroundCopyJob_AddRef(), BackgroundCopyJob_Cancel(), BackgroundCopyJob_Complete(), BackgroundCopyJob_EnumFiles(), BackgroundCopyJob_GetDescription(), BackgroundCopyJob_GetDisplayName(), BackgroundCopyJob_GetError(), BackgroundCopyJob_GetErrorCount(), BackgroundCopyJob_GetFileACLFlags(), BackgroundCopyJob_GetId(), BackgroundCopyJob_GetMinimumRetryDelay(), BackgroundCopyJob_GetNoProgressTimeout(), BackgroundCopyJob_GetNotifyCmdLine(), BackgroundCopyJob_GetNotifyFlags(), BackgroundCopyJob_GetNotifyInterface(), BackgroundCopyJob_GetOwner(), BackgroundCopyJob_GetPriority(), BackgroundCopyJob_GetProgress(), BackgroundCopyJob_GetProxySettings(), BackgroundCopyJob_GetReplyData(), BackgroundCopyJob_GetReplyFileName(), BackgroundCopyJob_GetReplyProgress(), BackgroundCopyJob_GetState(), BackgroundCopyJob_GetTimes(), BackgroundCopyJob_GetType(), BackgroundCopyJob_QueryInterface(), BackgroundCopyJob_Release(), BackgroundCopyJob_RemoveCredentials(), BackgroundCopyJob_ReplaceRemotePrefix(), BackgroundCopyJob_Resume(), BackgroundCopyJob_SetCredentials(), BackgroundCopyJob_SetDescription(), BackgroundCopyJob_SetDisplayName(), BackgroundCopyJob_SetFileACLFlags(), BackgroundCopyJob_SetNoProgressTimeout(), BackgroundCopyJob_SetNotifyCmdLine(), BackgroundCopyJob_SetNotifyFlags(), BackgroundCopyJob_SetNotifyInterface(), BackgroundCopyJob_SetPriority(), BackgroundCopyJob_SetProxySettings(), BackgroundCopyJob_SetReplyFileName(), BackgroundCopyJob_Suspend(), and BackgroundCopyJob_TakeOwnership().

◆ impl_from_IBackgroundCopyJobHttpOptions()

static BackgroundCopyJobImpl* impl_from_IBackgroundCopyJobHttpOptions ( IBackgroundCopyJobHttpOptions iface)
inlinestatic

Definition at line 1032 of file job.c.

1034 {
1035  return CONTAINING_RECORD(iface, BackgroundCopyJobImpl, IBackgroundCopyJobHttpOptions_iface);
1036 }
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 http_options_AddRef(), http_options_GetCustomHeaders(), http_options_GetSecurityFlags(), http_options_QueryInterface(), http_options_Release(), http_options_SetCustomHeaders(), and http_options_SetSecurityFlags().

◆ index_from_scheme()

static int index_from_scheme ( BG_AUTH_SCHEME  scheme)
static

Definition at line 874 of file job.c.

875 {
876  if (!scheme || scheme > BG_AUTH_SCHEME_PASSPORT) return -1;
877  return scheme - 1;
878 }
DWORD scheme

Referenced by BackgroundCopyJob_RemoveCredentials(), and BackgroundCopyJob_SetCredentials().

◆ index_from_target()

static int index_from_target ( BG_AUTH_TARGET  target)
static

Definition at line 868 of file job.c.

869 {
870  if (!target || target > BG_AUTH_TARGET_PROXY) return -1;
871  return target - 1;
872 }
GLenum target
Definition: glext.h:7315

Referenced by BackgroundCopyJob_RemoveCredentials(), and BackgroundCopyJob_SetCredentials().

◆ is_job_done()

static BOOL is_job_done ( const BackgroundCopyJobImpl job)
inlinestatic

Definition at line 205 of file job.c.

206 {
207  return job->state == BG_JOB_STATE_CANCELLED || job->state == BG_JOB_STATE_ACKNOWLEDGED;
208 }
static HANDLE job
Definition: process.c:77

Referenced by BackgroundCopyJob_Cancel(), BackgroundCopyJob_Complete(), BackgroundCopyJob_Resume(), BackgroundCopyJob_SetDescription(), BackgroundCopyJob_SetNotifyFlags(), and BackgroundCopyJob_SetNotifyInterface().

◆ processJob()

void processJob ( BackgroundCopyJobImpl job)

Definition at line 1265 of file job.c.

1266 {
1267  for (;;)
1268  {
1270  BOOL done = TRUE;
1271 
1272  EnterCriticalSection(&job->cs);
1273  LIST_FOR_EACH_ENTRY(file, &job->files, BackgroundCopyFileImpl, entryFromJob)
1274  if (!file->fileProgress.Completed)
1275  {
1276  done = FALSE;
1277  break;
1278  }
1279  LeaveCriticalSection(&job->cs);
1280  if (done)
1281  {
1282  transitionJobState(job, BG_JOB_STATE_QUEUED, BG_JOB_STATE_TRANSFERRED);
1283  return;
1284  }
1285 
1286  if (!processFile(file, job))
1287  return;
1288  }
1289 }
static HANDLE job
Definition: process.c:77
BOOL transitionJobState(BackgroundCopyJobImpl *job, BG_JOB_STATE from, BG_JOB_STATE to)
Definition: job.c:30
#define TRUE
Definition: types.h:120
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
const char file[]
Definition: icontest.c:11
BOOL processFile(BackgroundCopyFileImpl *file, BackgroundCopyJobImpl *job)
Definition: file.c:477
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
Definition: fci.c:126

Referenced by fileTransfer().

◆ transitionJobState()

BOOL transitionJobState ( BackgroundCopyJobImpl job,
BG_JOB_STATE  from,
BG_JOB_STATE  to 
)

Definition at line 30 of file job.c.

31 {
32  BOOL ret = FALSE;
33 
35  if (job->state == from)
36  {
37  job->state = to;
38  ret = TRUE;
39  }
41  return ret;
42 }
static HANDLE job
Definition: process.c:77
#define TRUE
Definition: types.h:120
BackgroundCopyManagerImpl globalMgr
Definition: qmgr.c:26
CRITICAL_SECTION cs
Definition: qmgr.h:89
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
int ret
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
CardRegion * from
Definition: spigame.cpp:19

Referenced by processFile(), processJob(), progress_callback_http(), transfer_file_http(), transfer_file_local(), and wait_for_completion().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( qmgr  )

Variable Documentation

◆ BackgroundCopyJob3Vtbl

const IBackgroundCopyJob3Vtbl BackgroundCopyJob3Vtbl
static

Definition at line 981 of file job.c.

Referenced by BackgroundCopyJobConstructor().

◆ copy_error_vtbl

const IBackgroundCopyErrorVtbl copy_error_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI copy_error_GetErrorDescription(IBackgroundCopyError *iface, DWORD LanguageId, LPWSTR *pErrorDescription)
Definition: job.c:141
static HRESULT WINAPI copy_error_GetErrorContextDescription(IBackgroundCopyError *iface, DWORD LanguageId, LPWSTR *pContextDescription)
Definition: job.c:151
static HRESULT WINAPI copy_error_GetProtocol(IBackgroundCopyError *iface, LPWSTR *pProtocol)
Definition: job.c:161
static ULONG WINAPI copy_error_Release(IBackgroundCopyError *iface)
Definition: job.c:91
static HRESULT WINAPI copy_error_GetError(IBackgroundCopyError *iface, BG_ERROR_CONTEXT *pContext, HRESULT *pCode)
Definition: job.c:107
static ULONG WINAPI copy_error_AddRef(IBackgroundCopyError *iface)
Definition: job.c:82
static HRESULT WINAPI copy_error_QueryInterface(IBackgroundCopyError *iface, REFIID riid, void **obj)
Definition: job.c:58
static HRESULT WINAPI copy_error_GetFile(IBackgroundCopyError *iface, IBackgroundCopyFile **pVal)
Definition: job.c:123

Definition at line 170 of file job.c.

Referenced by create_copy_error().

◆ http_options_vtbl

const IBackgroundCopyJobHttpOptionsVtbl http_options_vtbl
static
Initial value:
=
{
}
static ULONG WINAPI http_options_AddRef(IBackgroundCopyJobHttpOptions *iface)
Definition: job.c:1047
static HRESULT WINAPI http_options_QueryInterface(IBackgroundCopyJobHttpOptions *iface, REFIID riid, void **ppvObject)
Definition: job.c:1038
static HRESULT WINAPI http_options_GetCustomHeaders(IBackgroundCopyJobHttpOptions *iface, LPWSTR *pRequestHeaders)
Definition: job.c:1130
static HRESULT WINAPI http_options_SetSecurityFlags(IBackgroundCopyJobHttpOptions *iface, ULONG Flags)
Definition: job.c:1158
static HRESULT WINAPI http_options_SetClientCertificateByID(IBackgroundCopyJobHttpOptions *iface, BG_CERT_STORE_LOCATION StoreLocation, LPCWSTR StoreName, BYTE *pCertHashBlob)
Definition: job.c:1061
static HRESULT WINAPI http_options_RemoveClientCertificate(IBackgroundCopyJobHttpOptions *iface)
Definition: job.c:1081
static HRESULT WINAPI http_options_GetClientCertificate(IBackgroundCopyJobHttpOptions *iface, BG_CERT_STORE_LOCATION *pStoreLocation, LPWSTR *pStoreName, BYTE **ppCertHashBlob, LPWSTR *pSubjectName)
Definition: job.c:1088
static ULONG WINAPI http_options_Release(IBackgroundCopyJobHttpOptions *iface)
Definition: job.c:1054
static HRESULT WINAPI http_options_SetCustomHeaders(IBackgroundCopyJobHttpOptions *iface, LPCWSTR RequestHeaders)
Definition: job.c:1099
static HRESULT WINAPI http_options_GetSecurityFlags(IBackgroundCopyJobHttpOptions *iface, ULONG *pFlags)
Definition: job.c:1170
static HRESULT WINAPI http_options_SetClientCertificateByName(IBackgroundCopyJobHttpOptions *iface, BG_CERT_STORE_LOCATION StoreLocation, LPCWSTR StoreName, LPCWSTR SubjectName)
Definition: job.c:1071

Definition at line 1182 of file job.c.

Referenced by BackgroundCopyJobConstructor().