widl: Always check the runtimeclass interfaces presence.
[wine/zf.git] / include / bits.idl
blob0e3362cc9563c705a86bdaccfbcc4fbb97b64eb1
1 /*
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
22 #ifndef DO_NO_IMPORTS
23 import "unknwn.idl";
24 #endif
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")
32 cpp_quote("#define BG_NOTIFY_FILE_TRANSFERRED 0x0010")
34 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
35 cpp_quote("#undef EnumJobs")
36 cpp_quote("#undef GetJob")
37 cpp_quote("#endif")
39 #define BG_ENUM_SIZEIS(maxcount) maxcount
40 #define BG_ENUM_LENGTHIS(maxcount,lengthptr) lengthptr ? *lengthptr : maxcount
43 uuid(01b7bd23-fb88-4a77-8490-5891d3e4653a),
44 odl
46 interface IBackgroundCopyFile : IUnknown
48 typedef struct _BG_FILE_PROGRESS {
49 UINT64 BytesTotal;
50 UINT64 BytesTransferred;
51 BOOL Completed;
52 } BG_FILE_PROGRESS;
54 HRESULT GetRemoteName(
55 [out] LPWSTR *pVal
58 HRESULT GetLocalName(
59 [out] LPWSTR *pVal
62 HRESULT GetProgress(
63 [out] BG_FILE_PROGRESS *pVal
69 uuid(ca51e165-c365-424c-8d41-24aaa4ff3c40),
70 odl
72 interface IEnumBackgroundCopyFiles: IUnknown
74 HRESULT Next(
75 [in] ULONG celt,
76 [out,size_is(BG_ENUM_SIZEIS(celt)),length_is(BG_ENUM_LENGTHIS(celt,pceltFetched))] IBackgroundCopyFile **rgelt,
77 [in,out,unique] ULONG *pceltFetched
80 HRESULT Skip(
81 [in] ULONG celt
84 HRESULT Reset();
86 HRESULT Clone(
87 [out] IEnumBackgroundCopyFiles **ppenum
90 HRESULT GetCount(
91 [out] ULONG *puCount
97 uuid(19c613a0-fcb8-4f28-81ae-897c3d078f81),
98 odl
100 interface IBackgroundCopyError : IUnknown
102 typedef enum {
103 BG_ERROR_CONTEXT_NONE = 0,
104 BG_ERROR_CONTEXT_UNKNOWN = 1,
105 BG_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER = 2,
106 BG_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION =3,
107 BG_ERROR_CONTEXT_LOCAL_FILE = 4,
108 BG_ERROR_CONTEXT_REMOTE_FILE = 5,
109 BG_ERROR_CONTEXT_GENERAL_TRANSPORT = 6,
110 BG_ERROR_CONTEXT_REMOTE_APPLICATION =7,
111 } BG_ERROR_CONTEXT;
113 HRESULT GetError(
114 [out,ref] BG_ERROR_CONTEXT *pContext,
115 [out,ref] HRESULT *pCode
118 HRESULT GetFile(
119 [out] IBackgroundCopyFile **pVal
122 HRESULT GetErrorDescription(
123 [in] DWORD LanguageId,
124 [out,ref] LPWSTR *pErrorDescription
127 HRESULT GetErrorContextDescription(
128 [in] DWORD LanguageId,
129 [out,ref] LPWSTR *pContextDescription
132 HRESULT GetProtocol(
133 [out,ref] LPWSTR *pProtocol
140 uuid(37668d37-507e-4160-9316-26306d150b12),
143 interface IBackgroundCopyJob : IUnknown
145 typedef struct _BG_FILE_INFO {
146 LPWSTR RemoteName;
147 LPWSTR LocalName;
148 } BG_FILE_INFO;
150 typedef struct _BG_JOB_PROGRESS {
151 UINT64 BytesTotal;
152 UINT64 BytesTransferred;
153 ULONG FilesTotal;
154 ULONG FilesTransferred;
155 } BG_JOB_PROGRESS;
157 typedef struct _BG_JOB_TIMES {
158 FILETIME CreationTime;
159 FILETIME ModificationTime;
160 FILETIME TransferCompletionTime;
161 } BG_JOB_TIMES;
163 typedef enum {
164 BG_JOB_PRIORITY_FOREGROUND = 0,
165 BG_JOB_PRIORITY_HIGH = 1,
166 BG_JOB_PRIORITY_NORMAL = 2,
167 BG_JOB_PRIORITY_LOW = 3
168 } BG_JOB_PRIORITY;
170 typedef enum {
171 BG_JOB_STATE_QUEUED = 0,
172 BG_JOB_STATE_CONNECTING = 1,
173 BG_JOB_STATE_TRANSFERRING = 2,
174 BG_JOB_STATE_SUSPENDED = 3,
175 BG_JOB_STATE_ERROR = 4,
176 BG_JOB_STATE_TRANSIENT_ERROR = 5,
177 BG_JOB_STATE_TRANSFERRED = 6,
178 BG_JOB_STATE_ACKNOWLEDGED = 7,
179 BG_JOB_STATE_CANCELLED = 8
180 } BG_JOB_STATE;
182 typedef enum {
183 BG_JOB_TYPE_DOWNLOAD = 0,
184 BG_JOB_TYPE_UPLOAD = 1,
185 BG_JOB_TYPE_UPLOAD_REPLY = 2
186 } BG_JOB_TYPE;
188 typedef enum {
189 BG_JOB_PROXY_USAGE_PRECONFIG,
190 BG_JOB_PROXY_USAGE_NO_PROXY,
191 BG_JOB_PROXY_USAGE_OVERRIDE,
192 BG_JOB_PROXY_USAGE_AUTODETECT
193 } BG_JOB_PROXY_USAGE;
196 HRESULT AddFileSet(
197 [in] ULONG cFileCount,
198 [in,size_is(cFileCount)] BG_FILE_INFO *pFileSet
201 HRESULT AddFile(
202 [in] LPCWSTR RemoteUrl,
203 [in] LPCWSTR LocalName
206 HRESULT EnumFiles(
207 [out] IEnumBackgroundCopyFiles **pEnum
210 HRESULT Suspend();
212 HRESULT Resume();
214 HRESULT Cancel();
216 HRESULT Complete();
218 HRESULT GetId(
219 [out] GUID *pVal
222 HRESULT GetType(
223 [out] BG_JOB_TYPE *pVal
226 HRESULT GetProgress(
227 [out] BG_JOB_PROGRESS *pVal
230 HRESULT GetTimes(
231 [out] BG_JOB_TIMES *pVal
234 HRESULT GetState(
235 [out] BG_JOB_STATE *pVal
238 HRESULT GetError(
239 [out] IBackgroundCopyError **ppError
242 HRESULT GetOwner(
243 [out] LPWSTR *pVal
246 HRESULT SetDisplayName(
247 [in] LPCWSTR Val
250 HRESULT GetDisplayName(
251 [out] LPWSTR *pVal
254 HRESULT SetDescription(
255 [in] LPCWSTR Val
258 HRESULT GetDescription(
259 [out] LPWSTR *pVal
262 HRESULT SetPriority(
263 [in] BG_JOB_PRIORITY Val
266 HRESULT GetPriority(
267 [out] BG_JOB_PRIORITY *pVal
270 HRESULT SetNotifyFlags(
271 [in] ULONG Val
274 HRESULT GetNotifyFlags(
275 [out] ULONG *pVal
278 HRESULT SetNotifyInterface(
279 [in] IUnknown *Val
282 HRESULT GetNotifyInterface(
283 [out] IUnknown ** pVal
286 HRESULT SetMinimumRetryDelay(
287 [in] ULONG Seconds
290 HRESULT GetMinimumRetryDelay(
291 [out] ULONG *Seconds
294 HRESULT SetNoProgressTimeout(
295 [in] ULONG Seconds
298 HRESULT GetNoProgressTimeout(
299 [out] ULONG *Seconds
302 HRESULT GetErrorCount(
303 [out] ULONG *Errors
306 HRESULT SetProxySettings(
307 [in] BG_JOB_PROXY_USAGE ProxyUsage,
308 [in,string,unique] const WCHAR *ProxyList,
309 [in,string,unique] const WCHAR *ProxyBypassList
312 HRESULT GetProxySettings(
313 [out] BG_JOB_PROXY_USAGE *pProxyUsage,
314 [out] LPWSTR *pProxyList,
315 [out] LPWSTR *pProxyBypassList
318 HRESULT TakeOwnership();
322 uuid(1af4f612-3b71-466f-8f58-7b6f73ac57ad),
325 interface IEnumBackgroundCopyJobs : IUnknown
327 HRESULT Next(
328 [in] ULONG celt,
329 [out,size_is(BG_ENUM_SIZEIS(celt)),length_is(BG_ENUM_LENGTHIS(celt,pceltFetched))] IBackgroundCopyJob **rgelt,
330 [in,out,unique] ULONG *pceltFetched
333 HRESULT Skip(
334 [in] ULONG celt
337 HRESULT Reset();
339 HRESULT Clone(
340 [out] IEnumBackgroundCopyJobs **ppenum
343 HRESULT GetCount(
344 [out] ULONG *puCount
350 uuid(97ea99c7-0186-4ad4-8df9-c5b4e0ed6b22),
353 interface IBackgroundCopyCallback : IUnknown
355 HRESULT JobTransferred(
356 [in] IBackgroundCopyJob *pJob
359 HRESULT JobError(
360 [in] IBackgroundCopyJob *pJob,
361 [in] IBackgroundCopyError *pError
364 HRESULT JobModification(
365 [in] IBackgroundCopyJob *pJob,
366 [in] DWORD dwReserved
371 uuid(5ce34c0d-0dc9-4c1f-897c-daa1b78cee7c),
374 interface IBackgroundCopyManager : IUnknown
376 cpp_quote("#define BG_JOB_ENUM_ALL_USERS 0x0001")
378 HRESULT CreateJob(
379 [in] LPCWSTR DisplayName,
380 [in] BG_JOB_TYPE Type,
381 [out] GUID *pJobId,
382 [out] IBackgroundCopyJob **ppJob
385 HRESULT GetJob(
386 [in] REFGUID jobID,
387 [out] IBackgroundCopyJob **ppJob
390 HRESULT EnumJobs(
391 [in] DWORD dwFlags,
392 [out] IEnumBackgroundCopyJobs **ppEnum
394 HRESULT GetErrorDescription(
395 [in] HRESULT hResult,
396 [in] DWORD LanguageId,
397 [out] LPWSTR *pErrorDescription);
402 uuid(1deeb74f-7915-4560-b558-918c83f176a6),
403 version(1.0)
405 library BackgroundCopyManager
408 uuid(4991d34b-80a1-4291-83b6-3328366b9097),
410 coclass BackgroundCopyManager
412 [default] interface IBackgroundCopyManager;
415 interface IBackgroundCopyCallback;
418 cpp_quote("#include \"bits1_5.h\"")