2 * Background Intelligent Transfer Service (BITS) interface
4 * Copyright 2007 Google (Roy Shea)
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
26 cpp_quote
("#include \"bitsmsg.h\"")
27 cpp_quote
("#define BG_SIZE_UNKNOWN (UINT64)(-1)")
28 cpp_quote
("#define BG_NOTIFY_JOB_TRANSFERRED 0x0001")
29 cpp_quote
("#define BG_NOTIFY_JOB_ERROR 0x0002")
30 cpp_quote
("#define BG_NOTIFY_DISABLE 0x0004")
31 cpp_quote
("#define BG_NOTIFY_JOB_MODIFICATION 0x0008")
33 cpp_quote
("#ifdef WINE_NO_UNICODE_MACROS")
34 cpp_quote
("#undef EnumJobs")
35 cpp_quote
("#undef GetJob")
38 #define BG_ENUM_SIZEIS
(maxcount
) maxcount
39 #define BG_ENUM_LENGTHIS
(maxcount
,lengthptr
) lengthptr ?
*lengthptr
: maxcount
42 uuid(01b7bd23
-fb88
-4a77
-8490-5891d3e4653a
),
45 interface IBackgroundCopyFile
: IUnknown
47 typedef struct _BG_FILE_PROGRESS
{
49 UINT64 BytesTransferred
;
53 HRESULT GetRemoteName
(
62 [out] BG_FILE_PROGRESS
*pVal
68 uuid(ca51e165
-c365
-424c
-8d41
-24aaa4ff3c40
),
71 interface IEnumBackgroundCopyFiles
: IUnknown
75 [out,size_is(BG_ENUM_SIZEIS
(celt
)),length_is(BG_ENUM_LENGTHIS
(celt
,pceltFetched
))] IBackgroundCopyFile
**rgelt
,
76 [in,out,unique] ULONG
*pceltFetched
86 [out] IEnumBackgroundCopyFiles
**ppenum
96 uuid(19c613a0
-fcb8
-4f28
-81ae
-897c3d078f81
),
99 interface IBackgroundCopyError
: IUnknown
102 BG_ERROR_CONTEXT_NONE
= 0,
103 BG_ERROR_CONTEXT_UNKNOWN
= 1,
104 BG_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER
= 2,
105 BG_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION
=3,
106 BG_ERROR_CONTEXT_LOCAL_FILE
= 4,
107 BG_ERROR_CONTEXT_REMOTE_FILE
= 5,
108 BG_ERROR_CONTEXT_GENERAL_TRANSPORT
= 6,
109 BG_ERROR_CONTEXT_REMOTE_APPLICATION
=7,
113 [out,ref] BG_ERROR_CONTEXT
*pContext
,
114 [out,ref] HRESULT *pCode
118 [out] IBackgroundCopyFile
**pVal
121 HRESULT GetErrorDescription
(
122 [in] DWORD LanguageId
,
123 [out,ref] LPWSTR
*pErrorDescription
126 HRESULT GetErrorContextDescription
(
127 [in] DWORD LanguageId
,
128 [out,ref] LPWSTR
*pContextDescription
132 [out,ref] LPWSTR
*pProtocol
139 uuid(37668d37
-507e-4160-9316-26306d150b12
),
142 interface IBackgroundCopyJob
: IUnknown
144 typedef struct _BG_FILE_INFO
{
149 typedef struct _BG_JOB_PROGRESS
{
151 UINT64 BytesTransferred
;
153 ULONG FilesTransferred
;
156 typedef struct _BG_JOB_TIMES
{
157 FILETIME CreationTime
;
158 FILETIME ModificationTime
;
159 FILETIME TransferCompletionTime
;
163 BG_JOB_PRIORITY_FOREGROUND
= 0,
164 BG_JOB_PRIORITY_HIGH
= 1,
165 BG_JOB_PRIORITY_NORMAL
= 2,
166 BG_JOB_PRIORITY_LOW
= 3
170 BG_JOB_STATE_QUEUED
= 0,
171 BG_JOB_STATE_CONNECTING
= 1,
172 BG_JOB_STATE_TRANSFERRING
= 2,
173 BG_JOB_STATE_SUSPENDED
= 3,
174 BG_JOB_STATE_ERROR
= 4,
175 BG_JOB_STATE_TRANSIENT_ERROR
= 5,
176 BG_JOB_STATE_TRANSFERRED
= 6,
177 BG_JOB_STATE_ACKNOWLEDGED
= 7,
178 BG_JOB_STATE_CANCELLED
= 8
182 BG_JOB_TYPE_DOWNLOAD
= 0,
183 BG_JOB_TYPE_UPLOAD
= 1,
184 BG_JOB_TYPE_UPLOAD_REPLY
= 2
188 BG_JOB_PROXY_USAGE_PRECONFIG
,
189 BG_JOB_PROXY_USAGE_NO_PROXY
,
190 BG_JOB_PROXY_USAGE_OVERRIDE
,
191 BG_JOB_PROXY_USAGE_AUTODETECT
192 } BG_JOB_PROXY_USAGE
;
196 [in] ULONG cFileCount
,
197 [in,size_is(cFileCount
)] BG_FILE_INFO
*pFileSet
201 [in] LPCWSTR RemoteUrl
,
202 [in] LPCWSTR LocalName
206 [out] IEnumBackgroundCopyFiles
**pEnum
222 [out] BG_JOB_TYPE
*pVal
226 [out] BG_JOB_PROGRESS
*pVal
230 [out] BG_JOB_TIMES
*pVal
234 [out] BG_JOB_STATE
*pVal
238 [out] IBackgroundCopyError
**ppError
245 HRESULT SetDisplayName
(
249 HRESULT GetDisplayName
(
253 HRESULT SetDescription
(
257 HRESULT GetDescription
(
262 [in] BG_JOB_PRIORITY Val
266 [out] BG_JOB_PRIORITY
*pVal
269 HRESULT SetNotifyFlags
(
273 HRESULT GetNotifyFlags
(
277 HRESULT SetNotifyInterface
(
281 HRESULT GetNotifyInterface
(
282 [out] IUnknown
** pVal
285 HRESULT SetMinimumRetryDelay
(
289 HRESULT GetMinimumRetryDelay
(
293 HRESULT SetNoProgressTimeout
(
297 HRESULT GetNoProgressTimeout
(
301 HRESULT GetErrorCount
(
305 HRESULT SetProxySettings
(
306 [in] BG_JOB_PROXY_USAGE ProxyUsage
,
307 [in,string,unique] const WCHAR
*ProxyList
,
308 [in,string,unique] const WCHAR
*ProxyBypassList
311 HRESULT GetProxySettings
(
312 [out] BG_JOB_PROXY_USAGE
*pProxyUsage
,
313 [out] LPWSTR
*pProxyList
,
314 [out] LPWSTR
*pProxyBypassList
317 HRESULT TakeOwnership
();
321 uuid(1af4f612
-3b71
-466f
-8f58
-7b6f73ac57ad
),
324 interface IEnumBackgroundCopyJobs
: IUnknown
328 [out,size_is(BG_ENUM_SIZEIS
(celt
)),length_is(BG_ENUM_LENGTHIS
(celt
,pceltFetched
))] IBackgroundCopyJob
**rgelt
,
329 [in,out,unique] ULONG
*pceltFetched
339 [out] IEnumBackgroundCopyJobs
**ppenum
349 uuid(97ea99c7
-0186-4ad4
-8df9
-c5b4e0ed6b22
),
352 interface IBackgroundCopyCallback
: IUnknown
354 HRESULT JobTransferred
(
355 [in] IBackgroundCopyJob
*pJob
359 [in] IBackgroundCopyJob
*pJob
,
360 [in] IBackgroundCopyError
*pError
363 HRESULT JobModification
(
364 [in] IBackgroundCopyJob
*pJob
,
365 [in] DWORD dwReserved
370 uuid(5ce34c0d
-0dc9
-4c1f
-897c
-daa1b78cee7c
),
373 interface IBackgroundCopyManager
: IUnknown
375 cpp_quote
("#define BG_JOB_ENUM_ALL_USERS 0x0001")
378 [in] LPCWSTR DisplayName
,
379 [in] BG_JOB_TYPE Type
,
381 [out] IBackgroundCopyJob
**ppJob
386 [out] IBackgroundCopyJob
**ppJob
391 [out] IEnumBackgroundCopyJobs
**ppEnum
393 HRESULT GetErrorDescription
(
394 [in] HRESULT hResult,
395 [in] DWORD LanguageId
,
396 [out] LPWSTR
*pErrorDescription
);
401 uuid(1deeb74f
-7915-4560-b558
-918c83f176a6
),
404 library BackgroundCopyManager
407 uuid(4991d34b
-80a1
-4291-83b6
-3328366b9097
),
409 coclass BackgroundCopyManager
411 [default] interface IBackgroundCopyManager
;
414 interface IBackgroundCopyCallback
;