#include <winsvc.h>
#include <objbase.h>
#include <bits1_5.h>
+#include <bits3_0.h>
#include <wine/list.h>
#include <wine/debug.h>
+#include <wine/unicode.h>
WINE_DEFAULT_DEBUG_CHANNEL(qmgr);
IBackgroundCopyJob2 IBackgroundCopyJob2_iface;
LONG ref;
LPWSTR displayName;
+ LPWSTR description;
BG_JOB_TYPE type;
GUID jobId;
struct list files;
BG_JOB_PROGRESS jobProgress;
BG_JOB_STATE state;
+ ULONG notify_flags;
+ IBackgroundCopyCallback2 *callback;
+ BOOL callback2; /* IBackgroundCopyCallback2 is supported in addition to IBackgroundCopyCallback */
/* Protects file list, and progress */
CRITICAL_SECTION cs;
struct list entryFromQmgr;
extern ClassFactoryImpl BITS_ClassFactory DECLSPEC_HIDDEN;
extern BackgroundCopyManagerImpl globalMgr DECLSPEC_HIDDEN;
-HRESULT BackgroundCopyManagerConstructor(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN;
+HRESULT BackgroundCopyManagerConstructor(LPVOID *ppObj) DECLSPEC_HIDDEN;
HRESULT BackgroundCopyJobConstructor(LPCWSTR displayName, BG_JOB_TYPE type,
GUID *pJobId, BackgroundCopyJobImpl **job) DECLSPEC_HIDDEN;
HRESULT enum_copy_job_create(BackgroundCopyManagerImpl *qmgr,
return d ? memcpy(d, s, n) : NULL;
}
+static inline HRESULT return_strval(const WCHAR *str, WCHAR **ret)
+{
+ int len;
+
+ if (!ret) return E_INVALIDARG;
+
+ len = strlenW(str);
+ *ret = CoTaskMemAlloc((len+1)*sizeof(WCHAR));
+ if (!*ret) return E_OUTOFMEMORY;
+ strcpyW(*ret, str);
+ return S_OK;
+}
+
static inline BOOL
transitionJobState(BackgroundCopyJobImpl *job, BG_JOB_STATE fromState,
BG_JOB_STATE toState)