1 | /*
|
---|
2 | * Background Intelligent Transfer Service (BITS) interface
|
---|
3 | *
|
---|
4 | * Copyright 2007 Google (Roy Shea)
|
---|
5 | *
|
---|
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.
|
---|
10 | *
|
---|
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.
|
---|
15 | *
|
---|
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
|
---|
19 | *
|
---|
20 | */
|
---|
21 |
|
---|
22 | /*
|
---|
23 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
24 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
25 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
26 | * a choice of LGPL license versions is made available with the language indicating
|
---|
27 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
28 | * of the LGPL is applied is otherwise unspecified.
|
---|
29 | */
|
---|
30 |
|
---|
31 | #ifndef DO_NO_IMPORTS
|
---|
32 | import "unknwn.idl";
|
---|
33 | #endif
|
---|
34 |
|
---|
35 | cpp_quote("#include \"bitsmsg.h\"")
|
---|
36 | cpp_quote("#define BG_SIZE_UNKNOWN (UINT64)(-1)")
|
---|
37 | cpp_quote("#define BG_NOTIFY_JOB_TRANSFERRED 0x0001")
|
---|
38 | cpp_quote("#define BG_NOTIFY_JOB_ERROR 0x0002")
|
---|
39 | cpp_quote("#define BG_NOTIFY_DISABLE 0x0004")
|
---|
40 | cpp_quote("#define BG_NOTIFY_JOB_MODIFICATION 0x0008")
|
---|
41 |
|
---|
42 | cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
|
---|
43 | cpp_quote("#undef EnumJobs")
|
---|
44 | cpp_quote("#undef GetJob")
|
---|
45 | cpp_quote("#endif")
|
---|
46 |
|
---|
47 | #define BG_ENUM_SIZEIS(maxcount) maxcount
|
---|
48 | #define BG_ENUM_LENGTHIS(maxcount,lengthptr) lengthptr ? *lengthptr : maxcount
|
---|
49 |
|
---|
50 | [
|
---|
51 | uuid(01b7bd23-fb88-4a77-8490-5891d3e4653a),
|
---|
52 | odl
|
---|
53 | ]
|
---|
54 | interface IBackgroundCopyFile : IUnknown
|
---|
55 | {
|
---|
56 | typedef struct _BG_FILE_PROGRESS {
|
---|
57 | UINT64 BytesTotal;
|
---|
58 | UINT64 BytesTransferred;
|
---|
59 | BOOL Completed;
|
---|
60 | } BG_FILE_PROGRESS;
|
---|
61 |
|
---|
62 | HRESULT GetRemoteName(
|
---|
63 | [out] LPWSTR *pVal
|
---|
64 | );
|
---|
65 |
|
---|
66 | HRESULT GetLocalName(
|
---|
67 | [out] LPWSTR *pVal
|
---|
68 | );
|
---|
69 |
|
---|
70 | HRESULT GetProgress(
|
---|
71 | [out] BG_FILE_PROGRESS *pVal
|
---|
72 | );
|
---|
73 | }
|
---|
74 |
|
---|
75 |
|
---|
76 | [
|
---|
77 | uuid(ca51e165-c365-424c-8d41-24aaa4ff3c40),
|
---|
78 | odl
|
---|
79 | ]
|
---|
80 | interface IEnumBackgroundCopyFiles: IUnknown
|
---|
81 | {
|
---|
82 | HRESULT Next(
|
---|
83 | [in] ULONG celt,
|
---|
84 | [out,size_is(BG_ENUM_SIZEIS(celt)),length_is(BG_ENUM_LENGTHIS(celt,pceltFetched))] IBackgroundCopyFile **rgelt,
|
---|
85 | [in,out,unique] ULONG *pceltFetched
|
---|
86 | );
|
---|
87 |
|
---|
88 | HRESULT Skip(
|
---|
89 | [in] ULONG celt
|
---|
90 | );
|
---|
91 |
|
---|
92 | HRESULT Reset();
|
---|
93 |
|
---|
94 | HRESULT Clone(
|
---|
95 | [out] IEnumBackgroundCopyFiles **ppenum
|
---|
96 | );
|
---|
97 |
|
---|
98 | HRESULT GetCount(
|
---|
99 | [out] ULONG *puCount
|
---|
100 | );
|
---|
101 | }
|
---|
102 |
|
---|
103 |
|
---|
104 | [
|
---|
105 | uuid(19c613a0-fcb8-4f28-81ae-897c3d078f81),
|
---|
106 | odl
|
---|
107 | ]
|
---|
108 | interface IBackgroundCopyError : IUnknown
|
---|
109 | {
|
---|
110 | typedef enum {
|
---|
111 | BG_ERROR_CONTEXT_NONE = 0,
|
---|
112 | BG_ERROR_CONTEXT_UNKNOWN = 1,
|
---|
113 | BG_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER = 2,
|
---|
114 | BG_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION =3,
|
---|
115 | BG_ERROR_CONTEXT_LOCAL_FILE = 4,
|
---|
116 | BG_ERROR_CONTEXT_REMOTE_FILE = 5,
|
---|
117 | BG_ERROR_CONTEXT_GENERAL_TRANSPORT = 6,
|
---|
118 | BG_ERROR_CONTEXT_REMOTE_APPLICATION =7,
|
---|
119 | } BG_ERROR_CONTEXT;
|
---|
120 |
|
---|
121 | HRESULT GetError(
|
---|
122 | [out,ref] BG_ERROR_CONTEXT *pContext,
|
---|
123 | [out,ref] HRESULT *pCode
|
---|
124 | );
|
---|
125 |
|
---|
126 | HRESULT GetFile(
|
---|
127 | [out] IBackgroundCopyFile **pVal
|
---|
128 | );
|
---|
129 |
|
---|
130 | HRESULT GetErrorDescription(
|
---|
131 | [in] DWORD LanguageId,
|
---|
132 | [out,ref] LPWSTR *pErrorDescription
|
---|
133 | );
|
---|
134 |
|
---|
135 | HRESULT GetErrorContextDescription(
|
---|
136 | [in] DWORD LanguageId,
|
---|
137 | [out,ref] LPWSTR *pContextDescription
|
---|
138 | );
|
---|
139 |
|
---|
140 | HRESULT GetProtocol(
|
---|
141 | [out,ref] LPWSTR *pProtocol
|
---|
142 | );
|
---|
143 | }
|
---|
144 |
|
---|
145 |
|
---|
146 |
|
---|
147 | [
|
---|
148 | uuid(37668d37-507e-4160-9316-26306d150b12),
|
---|
149 | odl
|
---|
150 | ]
|
---|
151 | interface IBackgroundCopyJob : IUnknown
|
---|
152 | {
|
---|
153 | typedef struct _BG_FILE_INFO {
|
---|
154 | LPWSTR RemoteName;
|
---|
155 | LPWSTR LocalName;
|
---|
156 | } BG_FILE_INFO;
|
---|
157 |
|
---|
158 | typedef struct _BG_JOB_PROGRESS {
|
---|
159 | UINT64 BytesTotal;
|
---|
160 | UINT64 BytesTransferred;
|
---|
161 | ULONG FilesTotal;
|
---|
162 | ULONG FilesTransferred;
|
---|
163 | } BG_JOB_PROGRESS;
|
---|
164 |
|
---|
165 | typedef struct _BG_JOB_TIMES {
|
---|
166 | FILETIME CreationTime;
|
---|
167 | FILETIME ModificationTime;
|
---|
168 | FILETIME TransferCompletionTime;
|
---|
169 | } BG_JOB_TIMES;
|
---|
170 |
|
---|
171 | typedef enum {
|
---|
172 | BG_JOB_PRIORITY_FOREGROUND = 0,
|
---|
173 | BG_JOB_PRIORITY_HIGH = 1,
|
---|
174 | BG_JOB_PRIORITY_NORMAL = 2,
|
---|
175 | BG_JOB_PRIORITY_LOW = 3
|
---|
176 | } BG_JOB_PRIORITY;
|
---|
177 |
|
---|
178 | typedef enum {
|
---|
179 | BG_JOB_STATE_QUEUED = 0,
|
---|
180 | BG_JOB_STATE_CONNECTING = 1,
|
---|
181 | BG_JOB_STATE_TRANSFERRING = 2,
|
---|
182 | BG_JOB_STATE_SUSPENDED = 3,
|
---|
183 | BG_JOB_STATE_ERROR = 4,
|
---|
184 | BG_JOB_STATE_TRANSIENT_ERROR = 5,
|
---|
185 | BG_JOB_STATE_TRANSFERRED = 6,
|
---|
186 | BG_JOB_STATE_ACKNOWLEDGED = 7,
|
---|
187 | BG_JOB_STATE_CANCELLED = 8
|
---|
188 | } BG_JOB_STATE;
|
---|
189 |
|
---|
190 | typedef enum {
|
---|
191 | BG_JOB_TYPE_DOWNLOAD = 0,
|
---|
192 | BG_JOB_TYPE_UPLOAD = 1,
|
---|
193 | BG_JOB_TYPE_UPLOAD_REPLY = 2
|
---|
194 | } BG_JOB_TYPE;
|
---|
195 |
|
---|
196 | typedef enum {
|
---|
197 | BG_JOB_PROXY_USAGE_PRECONFIG,
|
---|
198 | BG_JOB_PROXY_USAGE_NO_PROXY,
|
---|
199 | BG_JOB_PROXY_USAGE_OVERRIDE,
|
---|
200 | BG_JOB_PROXY_USAGE_AUTODETECT
|
---|
201 | } BG_JOB_PROXY_USAGE;
|
---|
202 |
|
---|
203 |
|
---|
204 | HRESULT AddFileSet(
|
---|
205 | [in] ULONG cFileCount,
|
---|
206 | [in,size_is(cFileCount)] BG_FILE_INFO *pFileSet
|
---|
207 | );
|
---|
208 |
|
---|
209 | HRESULT AddFile(
|
---|
210 | [in] LPCWSTR RemoteUrl,
|
---|
211 | [in] LPCWSTR LocalName
|
---|
212 | );
|
---|
213 |
|
---|
214 | HRESULT EnumFiles(
|
---|
215 | [out] IEnumBackgroundCopyFiles **pEnum
|
---|
216 | );
|
---|
217 |
|
---|
218 | HRESULT Suspend();
|
---|
219 |
|
---|
220 | HRESULT Resume();
|
---|
221 |
|
---|
222 | HRESULT Cancel();
|
---|
223 |
|
---|
224 | HRESULT Complete();
|
---|
225 |
|
---|
226 | HRESULT GetId(
|
---|
227 | [out] GUID *pVal
|
---|
228 | );
|
---|
229 |
|
---|
230 | HRESULT GetType(
|
---|
231 | [out] BG_JOB_TYPE *pVal
|
---|
232 | );
|
---|
233 |
|
---|
234 | HRESULT GetProgress(
|
---|
235 | [out] BG_JOB_PROGRESS *pVal
|
---|
236 | );
|
---|
237 |
|
---|
238 | HRESULT GetTimes(
|
---|
239 | [out] BG_JOB_TIMES *pVal
|
---|
240 | );
|
---|
241 |
|
---|
242 | HRESULT GetState(
|
---|
243 | [out] BG_JOB_STATE *pVal
|
---|
244 | );
|
---|
245 |
|
---|
246 | HRESULT GetError(
|
---|
247 | [out] IBackgroundCopyError **ppError
|
---|
248 | );
|
---|
249 |
|
---|
250 | HRESULT GetOwner(
|
---|
251 | [out] LPWSTR *pVal
|
---|
252 | );
|
---|
253 |
|
---|
254 | HRESULT SetDisplayName(
|
---|
255 | [in] LPCWSTR Val
|
---|
256 | );
|
---|
257 |
|
---|
258 | HRESULT GetDisplayName(
|
---|
259 | [out] LPWSTR *pVal
|
---|
260 | );
|
---|
261 |
|
---|
262 | HRESULT SetDescription(
|
---|
263 | [in] LPCWSTR Val
|
---|
264 | );
|
---|
265 |
|
---|
266 | HRESULT GetDescription(
|
---|
267 | [out] LPWSTR *pVal
|
---|
268 | );
|
---|
269 |
|
---|
270 | HRESULT SetPriority(
|
---|
271 | [in] BG_JOB_PRIORITY Val
|
---|
272 | );
|
---|
273 |
|
---|
274 | HRESULT GetPriority(
|
---|
275 | [out] BG_JOB_PRIORITY *pVal
|
---|
276 | );
|
---|
277 |
|
---|
278 | HRESULT SetNotifyFlags(
|
---|
279 | [in] ULONG Val
|
---|
280 | );
|
---|
281 |
|
---|
282 | HRESULT GetNotifyFlags(
|
---|
283 | [out] ULONG *pVal
|
---|
284 | );
|
---|
285 |
|
---|
286 | HRESULT SetNotifyInterface(
|
---|
287 | [in] IUnknown *Val
|
---|
288 | );
|
---|
289 |
|
---|
290 | HRESULT GetNotifyInterface(
|
---|
291 | [out] IUnknown ** pVal
|
---|
292 | );
|
---|
293 |
|
---|
294 | HRESULT SetMinimumRetryDelay(
|
---|
295 | [in] ULONG Seconds
|
---|
296 | );
|
---|
297 |
|
---|
298 | HRESULT GetMinimumRetryDelay(
|
---|
299 | [out] ULONG *Seconds
|
---|
300 | );
|
---|
301 |
|
---|
302 | HRESULT SetNoProgressTimeout(
|
---|
303 | [in] ULONG Seconds
|
---|
304 | );
|
---|
305 |
|
---|
306 | HRESULT GetNoProgressTimeout(
|
---|
307 | [out] ULONG *Seconds
|
---|
308 | );
|
---|
309 |
|
---|
310 | HRESULT GetErrorCount(
|
---|
311 | [out] ULONG *Errors
|
---|
312 | );
|
---|
313 |
|
---|
314 | HRESULT SetProxySettings(
|
---|
315 | [in] BG_JOB_PROXY_USAGE ProxyUsage,
|
---|
316 | [in,string,unique] const WCHAR *ProxyList,
|
---|
317 | [in,string,unique] const WCHAR *ProxyBypassList
|
---|
318 | );
|
---|
319 |
|
---|
320 | HRESULT GetProxySettings(
|
---|
321 | [out] BG_JOB_PROXY_USAGE *pProxyUsage,
|
---|
322 | [out] LPWSTR *pProxyList,
|
---|
323 | [out] LPWSTR *pProxyBypassList
|
---|
324 | );
|
---|
325 |
|
---|
326 | HRESULT TakeOwnership();
|
---|
327 | }
|
---|
328 |
|
---|
329 | [
|
---|
330 | uuid(1af4f612-3b71-466f-8f58-7b6f73ac57ad),
|
---|
331 | odl
|
---|
332 | ]
|
---|
333 | interface IEnumBackgroundCopyJobs : IUnknown
|
---|
334 | {
|
---|
335 | HRESULT Next(
|
---|
336 | [in] ULONG celt,
|
---|
337 | [out,size_is(BG_ENUM_SIZEIS(celt)),length_is(BG_ENUM_LENGTHIS(celt,pceltFetched))] IBackgroundCopyJob **rgelt,
|
---|
338 | [in,out,unique] ULONG *pceltFetched
|
---|
339 | );
|
---|
340 |
|
---|
341 | HRESULT Skip(
|
---|
342 | [in] ULONG celt
|
---|
343 | );
|
---|
344 |
|
---|
345 | HRESULT Reset();
|
---|
346 |
|
---|
347 | HRESULT Clone(
|
---|
348 | [out] IEnumBackgroundCopyJobs **ppenum
|
---|
349 | );
|
---|
350 |
|
---|
351 | HRESULT GetCount(
|
---|
352 | [out] ULONG *puCount
|
---|
353 | );
|
---|
354 | }
|
---|
355 |
|
---|
356 |
|
---|
357 | [
|
---|
358 | uuid(97ea99c7-0186-4ad4-8df9-c5b4e0ed6b22),
|
---|
359 | odl
|
---|
360 | ]
|
---|
361 | interface IBackgroundCopyCallback : IUnknown
|
---|
362 | {
|
---|
363 | HRESULT JobTransferred(
|
---|
364 | [in] IBackgroundCopyJob *pJob
|
---|
365 | );
|
---|
366 |
|
---|
367 | HRESULT JobError(
|
---|
368 | [in] IBackgroundCopyJob *pJob,
|
---|
369 | [in] IBackgroundCopyError *pError
|
---|
370 | );
|
---|
371 |
|
---|
372 | HRESULT JobModification(
|
---|
373 | [in] IBackgroundCopyJob *pJob,
|
---|
374 | [in] DWORD dwReserved
|
---|
375 | );
|
---|
376 | }
|
---|
377 |
|
---|
378 | [
|
---|
379 | uuid(5ce34c0d-0dc9-4c1f-897c-daa1b78cee7c),
|
---|
380 | odl
|
---|
381 | ]
|
---|
382 | interface IBackgroundCopyManager : IUnknown
|
---|
383 | {
|
---|
384 | cpp_quote("#define BG_JOB_ENUM_ALL_USERS 0x0001")
|
---|
385 |
|
---|
386 | HRESULT CreateJob(
|
---|
387 | [in] LPCWSTR DisplayName,
|
---|
388 | [in] BG_JOB_TYPE Type,
|
---|
389 | [out] GUID *pJobId,
|
---|
390 | [out] IBackgroundCopyJob **ppJob
|
---|
391 | );
|
---|
392 |
|
---|
393 | HRESULT GetJob(
|
---|
394 | [in] REFGUID jobID,
|
---|
395 | [out] IBackgroundCopyJob **ppJob
|
---|
396 | );
|
---|
397 |
|
---|
398 | HRESULT EnumJobs(
|
---|
399 | [in] DWORD dwFlags,
|
---|
400 | [out] IEnumBackgroundCopyJobs **ppEnum
|
---|
401 | );
|
---|
402 | HRESULT GetErrorDescription(
|
---|
403 | [in] HRESULT hResult,
|
---|
404 | [in] DWORD LanguageId,
|
---|
405 | [out] LPWSTR *pErrorDescription);
|
---|
406 | }
|
---|
407 |
|
---|
408 |
|
---|
409 | [
|
---|
410 | uuid(1deeb74f-7915-4560-b558-918c83f176a6),
|
---|
411 | version(1.0)
|
---|
412 | ]
|
---|
413 | library BackgroundCopyManager
|
---|
414 | {
|
---|
415 | [
|
---|
416 | uuid(4991d34b-80a1-4291-83b6-3328366b9097),
|
---|
417 | ]
|
---|
418 | coclass BackgroundCopyManager
|
---|
419 | {
|
---|
420 | [default] interface IBackgroundCopyManager;
|
---|
421 | };
|
---|
422 |
|
---|
423 | interface IBackgroundCopyCallback;
|
---|
424 | }
|
---|