wuapi: Return success from automatic_updates_Pause.
[wine/hramrach.git] / include / bits.idl
blob89b916d0a2c9b722aa61a7b00b4157f7eabb4f85
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")
33 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
34 cpp_quote("#undef EnumJobs")
35 cpp_quote("#undef GetJob")
36 cpp_quote("#endif")
38 #define BG_ENUM_SIZEIS(maxcount) maxcount
39 #define BG_ENUM_LENGTHIS(maxcount,lengthptr) lengthptr ? *lengthptr : maxcount
42 uuid(01b7bd23-fb88-4a77-8490-5891d3e4653a),
43 odl
45 interface IBackgroundCopyFile : IUnknown
47 typedef struct _BG_FILE_PROGRESS {
48 UINT64 BytesTotal;
49 UINT64 BytesTransferred;
50 BOOL Completed;
51 } BG_FILE_PROGRESS;
53 HRESULT GetRemoteName(
54 [out] LPWSTR *pVal
57 HRESULT GetLocalName(
58 [out] LPWSTR *pVal
61 HRESULT GetProgress(
62 [out] BG_FILE_PROGRESS *pVal
68 uuid(ca51e165-c365-424c-8d41-24aaa4ff3c40),
69 odl
71 interface IEnumBackgroundCopyFiles: IUnknown
73 HRESULT Next(
74 [in] ULONG celt,
75 [out,size_is(BG_ENUM_SIZEIS(celt)),length_is(BG_ENUM_LENGTHIS(celt,pceltFetched))] IBackgroundCopyFile **rgelt,
76 [in,out,unique] ULONG *pceltFetched
79 HRESULT Skip(
80 [in] ULONG celt
83 HRESULT Reset();
85 HRESULT Clone(
86 [out] IEnumBackgroundCopyFiles **ppenum
89 HRESULT GetCount(
90 [out] ULONG *puCount
96 uuid(19c613a0-fcb8-4f28-81ae-897c3d078f81),
97 odl
99 interface IBackgroundCopyError : IUnknown
101 typedef enum {
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,
110 } BG_ERROR_CONTEXT;
112 HRESULT GetError(
113 [out,ref] BG_ERROR_CONTEXT *pContext,
114 [out,ref] HRESULT *pCode
117 HRESULT GetFile(
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
131 HRESULT GetProtocol(
132 [out,ref] LPWSTR *pProtocol
139 uuid(37668d37-507e-4160-9316-26306d150b12),
142 interface IBackgroundCopyJob : IUnknown
144 typedef struct _BG_FILE_INFO {
145 LPWSTR RemoteName;
146 LPWSTR LocalName;
147 } BG_FILE_INFO;
149 typedef struct _BG_JOB_PROGRESS {
150 UINT64 BytesTotal;
151 UINT64 BytesTransferred;
152 ULONG FilesTotal;
153 ULONG FilesTransferred;
154 } BG_JOB_PROGRESS;
156 typedef struct _BG_JOB_TIMES {
157 FILETIME CreationTime;
158 FILETIME ModificationTime;
159 FILETIME TransferCompletionTime;
160 } BG_JOB_TIMES;
162 typedef enum {
163 BG_JOB_PRIORITY_FOREGROUND = 0,
164 BG_JOB_PRIORITY_HIGH = 1,
165 BG_JOB_PRIORITY_NORMAL = 2,
166 BG_JOB_PRIORITY_LOW = 3
167 } BG_JOB_PRIORITY;
169 typedef enum {
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
179 } BG_JOB_STATE;
181 typedef enum {
182 BG_JOB_TYPE_DOWNLOAD = 0,
183 BG_JOB_TYPE_UPLOAD = 1,
184 BG_JOB_TYPE_UPLOAD_REPLY = 2
185 } BG_JOB_TYPE;
187 typedef enum {
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;
195 HRESULT AddFileSet(
196 [in] ULONG cFileCount,
197 [in,size_is(cFileCount)] BG_FILE_INFO *pFileSet
200 HRESULT AddFile(
201 [in] LPCWSTR RemoteUrl,
202 [in] LPCWSTR LocalName
205 HRESULT EnumFiles(
206 [out] IEnumBackgroundCopyFiles **pEnum
209 HRESULT Suspend();
211 HRESULT Resume();
213 HRESULT Cancel();
215 HRESULT Complete();
217 HRESULT GetId(
218 [out] GUID *pVal
221 HRESULT GetType(
222 [out] BG_JOB_TYPE *pVal
225 HRESULT GetProgress(
226 [out] BG_JOB_PROGRESS *pVal
229 HRESULT GetTimes(
230 [out] BG_JOB_TIMES *pVal
233 HRESULT GetState(
234 [out] BG_JOB_STATE *pVal
237 HRESULT GetError(
238 [out] IBackgroundCopyError **ppError
241 HRESULT GetOwner(
242 [out] LPWSTR *pVal
245 HRESULT SetDisplayName(
246 [in] LPCWSTR Val
249 HRESULT GetDisplayName(
250 [out] LPWSTR *pVal
253 HRESULT SetDescription(
254 [in] LPCWSTR Val
257 HRESULT GetDescription(
258 [out] LPWSTR *pVal
261 HRESULT SetPriority(
262 [in] BG_JOB_PRIORITY Val
265 HRESULT GetPriority(
266 [out] BG_JOB_PRIORITY *pVal
269 HRESULT SetNotifyFlags(
270 [in] ULONG Val
273 HRESULT GetNotifyFlags(
274 [out] ULONG *pVal
277 HRESULT SetNotifyInterface(
278 [in] IUnknown *Val
281 HRESULT GetNotifyInterface(
282 [out] IUnknown ** pVal
285 HRESULT SetMinimumRetryDelay(
286 [in] ULONG Seconds
289 HRESULT GetMinimumRetryDelay(
290 [out] ULONG *Seconds
293 HRESULT SetNoProgressTimeout(
294 [in] ULONG Seconds
297 HRESULT GetNoProgressTimeout(
298 [out] ULONG *Seconds
301 HRESULT GetErrorCount(
302 [out] ULONG *Errors
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
326 HRESULT Next(
327 [in] ULONG celt,
328 [out,size_is(BG_ENUM_SIZEIS(celt)),length_is(BG_ENUM_LENGTHIS(celt,pceltFetched))] IBackgroundCopyJob **rgelt,
329 [in,out,unique] ULONG *pceltFetched
332 HRESULT Skip(
333 [in] ULONG celt
336 HRESULT Reset();
338 HRESULT Clone(
339 [out] IEnumBackgroundCopyJobs **ppenum
342 HRESULT GetCount(
343 [out] ULONG *puCount
349 uuid(97ea99c7-0186-4ad4-8df9-c5b4e0ed6b22),
352 interface IBackgroundCopyCallback : IUnknown
354 HRESULT JobTransferred(
355 [in] IBackgroundCopyJob *pJob
358 HRESULT JobError(
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")
377 HRESULT CreateJob(
378 [in] LPCWSTR DisplayName,
379 [in] BG_JOB_TYPE Type,
380 [out] GUID *pJobId,
381 [out] IBackgroundCopyJob **ppJob
384 HRESULT GetJob(
385 [in] REFGUID jobID,
386 [out] IBackgroundCopyJob **ppJob
389 HRESULT EnumJobs(
390 [in] DWORD dwFlags,
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),
402 version(1.0)
404 library BackgroundCopyManager
407 uuid(4991d34b-80a1-4291-83b6-3328366b9097),
409 coclass BackgroundCopyManager
411 [default] interface IBackgroundCopyManager;
414 interface IBackgroundCopyCallback;