Sync with trunk r63174.
[reactos.git] / dll / win32 / qmgr / qmgr.h
index c93bcc2..ae86685 100644 (file)
 #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);
 
@@ -46,11 +48,15 @@ typedef struct
     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;
@@ -87,7 +93,7 @@ extern HANDLE stop_event DECLSPEC_HIDDEN;
 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,
@@ -109,6 +115,19 @@ qmgr_strdup(const char *s)
     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)