ReactOS 0.4.17-dev-966-gf06eace
job.c
Go to the documentation of this file.
1/*
2 * Background Copy Job Interface for BITS
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#include <stdarg.h>
22
23#include "windef.h"
24#include "winbase.h"
25#include "qmgr.h"
26#include "wine/debug.h"
27
29
30BOOL transitionJobState(BackgroundCopyJobImpl *job, BG_JOB_STATE from, BG_JOB_STATE to)
31{
32 BOOL ret = FALSE;
33
35 if (job->state == from)
36 {
37 job->state = to;
38 ret = TRUE;
39 }
41 return ret;
42}
43
45{
48 BG_ERROR_CONTEXT context;
51};
52
54{
56}
57
61 void **obj)
62{
64
65 TRACE("(%p)->(%s %p)\n", error, debugstr_guid(riid), obj);
66
67 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IBackgroundCopyError))
68 {
69 *obj = &error->IBackgroundCopyError_iface;
70 }
71 else
72 {
73 *obj = NULL;
74 WARN("interface %s not supported\n", debugstr_guid(riid));
75 return E_NOINTERFACE;
76 }
77
78 IBackgroundCopyError_AddRef(iface);
79 return S_OK;
80}
81
84{
87 TRACE("(%p)->(%ld)\n", error, refs);
88 return refs;
89}
90
93{
96
97 TRACE("(%p)->(%ld)\n", error, refs);
98
99 if (!refs)
100 {
101 if (error->file) IBackgroundCopyFile2_Release(error->file);
102 free(error);
103 }
104 return refs;
105}
106
109 BG_ERROR_CONTEXT *pContext,
110 HRESULT *pCode)
111{
113
114 TRACE("(%p)->(%p %p)\n", error, pContext, pCode);
115
116 *pContext = error->context;
117 *pCode = error->code;
118
119 TRACE("returning context %u error code 0x%08lx\n", error->context, error->code);
120 return S_OK;
121}
122
125 IBackgroundCopyFile **pVal)
126{
128
129 TRACE("(%p)->(%p)\n", error, pVal);
130
131 if (error->file)
132 {
133 IBackgroundCopyFile2_AddRef(error->file);
134 *pVal = (IBackgroundCopyFile *)error->file;
135 return S_OK;
136 }
137 *pVal = NULL;
139}
140
143 DWORD LanguageId,
144 LPWSTR *pErrorDescription)
145{
147 FIXME("(%p)->(%p)\n", error, pErrorDescription);
148 return E_NOTIMPL;
149}
150
153 DWORD LanguageId,
154 LPWSTR *pContextDescription)
155{
157 FIXME("(%p)->(%p)\n", error, pContextDescription);
158 return E_NOTIMPL;
159}
160
163 LPWSTR *pProtocol)
164{
166 FIXME("(%p)->(%p)\n", error, pProtocol);
167 return E_NOTIMPL;
168}
169
170static const IBackgroundCopyErrorVtbl copy_error_vtbl =
171{
180};
181
183 BG_ERROR_CONTEXT context,
187{
188 struct copy_error *error;
189
190 TRACE("context %u code %08lx file %p\n", context, code, file);
191
192 if (!(error = malloc(sizeof(*error) ))) return E_OUTOFMEMORY;
193 error->IBackgroundCopyError_iface.lpVtbl = &copy_error_vtbl;
194 error->refs = 1;
195 error->context = context;
196 error->code = code;
197 error->file = file;
198 if (error->file) IBackgroundCopyFile2_AddRef(error->file);
199
200 *obj = &error->IBackgroundCopyError_iface;
201 TRACE("returning iface %p\n", *obj);
202 return S_OK;
203}
204
206{
207 return job->state == BG_JOB_STATE_CANCELLED || job->state == BG_JOB_STATE_ACKNOWLEDGED;
208}
209
211{
212 return CONTAINING_RECORD(iface, BackgroundCopyJobImpl, IBackgroundCopyJob4_iface);
213}
214
216{
218
219 TRACE("%p, %s, %p.\n", iface, debugstr_guid(riid), obj);
220
222 IsEqualGUID(riid, &IID_IBackgroundCopyJob) ||
223 IsEqualGUID(riid, &IID_IBackgroundCopyJob2) ||
224 IsEqualGUID(riid, &IID_IBackgroundCopyJob3) ||
225 IsEqualGUID(riid, &IID_IBackgroundCopyJob4))
226 {
227 *obj = &job->IBackgroundCopyJob4_iface;
228 }
229 else if (IsEqualGUID(riid, &IID_IBackgroundCopyJobHttpOptions))
230 {
231 *obj = &job->IBackgroundCopyJobHttpOptions_iface;
232 }
233 else
234 {
235 WARN("Unsupported interface %s.\n", debugstr_guid(riid));
236 *obj = NULL;
237 return E_NOINTERFACE;
238 }
239
240 IBackgroundCopyJob4_AddRef(iface);
241 return S_OK;
242}
243
245{
247 ULONG refcount = InterlockedIncrement(&job->ref);
248 TRACE("%p, refcount %ld.\n", iface, refcount);
249 return refcount;
250}
251
253{
255 ULONG i, j, ref = InterlockedDecrement(&job->ref);
256
257 TRACE("%p, refcount %ld.\n", iface, ref);
258
259 if (!ref)
260 {
261 job->cs.DebugInfo->Spare[0] = 0;
263 if (job->callback)
264 IBackgroundCopyCallback2_Release(job->callback);
265 free(job->displayName);
266 free(job->description);
267 free(job->http_options.headers);
268 for (i = 0; i < BG_AUTH_TARGET_PROXY; i++)
269 {
270 for (j = 0; j < BG_AUTH_SCHEME_PASSPORT; j++)
271 {
272 BG_AUTH_CREDENTIALS *cred = &job->http_options.creds[i][j];
273 free(cred->Credentials.Basic.UserName);
274 free(cred->Credentials.Basic.Password);
275 }
276 }
277 CloseHandle(job->wait);
278 CloseHandle(job->cancel);
279 CloseHandle(job->done);
280 free(job);
281 }
282
283 return ref;
284}
285
286/*** IBackgroundCopyJob methods ***/
287
288static HRESULT WINAPI BackgroundCopyJob_AddFileSet(IBackgroundCopyJob4 *iface, ULONG cFileCount, BG_FILE_INFO *pFileSet)
289{
291 HRESULT hr = S_OK;
292 ULONG i;
293
294 TRACE("%p, %lu, %p.\n", iface, cFileCount, pFileSet);
295
297
298 for (i = 0; i < cFileCount; ++i)
299 {
301
302 /* We should return E_INVALIDARG in these cases. */
303 FIXME("Check for valid filenames and supported protocols\n");
304
305 hr = BackgroundCopyFileConstructor(job, pFileSet[i].RemoteName, pFileSet[i].LocalName, &file);
306 if (hr != S_OK) break;
307
308 /* Add a reference to the file to file list */
309 list_add_head(&job->files, &file->entryFromJob);
310 job->jobProgress.BytesTotal = BG_SIZE_UNKNOWN;
311 ++job->jobProgress.FilesTotal;
312 }
313
315
316 return hr;
317}
318
320{
321 BG_FILE_INFO file;
322
323 TRACE("%p, %s, %s.\n", iface, debugstr_w(RemoteUrl), debugstr_w(LocalName));
324
325 file.RemoteName = (LPWSTR)RemoteUrl;
326 file.LocalName = (LPWSTR)LocalName;
327 return IBackgroundCopyJob4_AddFileSet(iface, 1, &file);
328}
329
331{
333 TRACE("%p, %p.\n", iface, enum_files);
334 return EnumBackgroundCopyFilesConstructor(job, enum_files);
335}
336
338{
339 FIXME("(%p): stub\n", iface);
340 return E_NOTIMPL;
341}
342
344{
346 HRESULT hr = S_OK;
347
348 TRACE("%p.\n", iface);
349
351 if (is_job_done(job))
352 {
354 }
355 else if (job->jobProgress.FilesTransferred == job->jobProgress.FilesTotal)
356 {
357 hr = BG_E_EMPTY;
358 }
359 else if (job->state != BG_JOB_STATE_CONNECTING
360 && job->state != BG_JOB_STATE_TRANSFERRING)
361 {
362 job->state = BG_JOB_STATE_QUEUED;
363 job->error.context = 0;
364 job->error.code = S_OK;
365 if (job->error.file)
366 {
367 IBackgroundCopyFile2_Release(job->error.file);
368 job->error.file = NULL;
369 }
371 }
373
374 return hr;
375}
376
378{
380 HRESULT hr = S_OK;
381
382 TRACE("%p.\n", iface);
383
385
386 if (is_job_done(job))
387 {
389 }
390 else
391 {
393
394 if (job->state == BG_JOB_STATE_CONNECTING || job->state == BG_JOB_STATE_TRANSFERRING)
395 {
396 job->state = BG_JOB_STATE_CANCELLED;
397 SetEvent(job->cancel);
398
402 }
403
404 LIST_FOR_EACH_ENTRY(file, &job->files, BackgroundCopyFileImpl, entryFromJob)
405 {
406 if (file->tempFileName[0] && !DeleteFileW(file->tempFileName))
407 {
408 WARN("Couldn't delete %s (%lu)\n", debugstr_w(file->tempFileName), GetLastError());
410 }
411 if (file->info.LocalName && !DeleteFileW(file->info.LocalName))
412 {
413 WARN("Couldn't delete %s (%lu)\n", debugstr_w(file->info.LocalName), GetLastError());
415 }
416 }
417 job->state = BG_JOB_STATE_CANCELLED;
418 }
419
421 return hr;
422}
423
425{
427 HRESULT hr = S_OK;
428
429 TRACE("%p.\n", iface);
430
432
433 if (is_job_done(job))
434 {
436 }
437 else
438 {
440 LIST_FOR_EACH_ENTRY(file, &job->files, BackgroundCopyFileImpl, entryFromJob)
441 {
442 if (file->fileProgress.Completed)
443 {
444 if (!MoveFileExW(file->tempFileName, file->info.LocalName,
448 {
449 ERR("Couldn't rename file %s -> %s\n",
450 debugstr_w(file->tempFileName),
451 debugstr_w(file->info.LocalName));
453 }
454 }
455 else
457 }
458 }
459
460 job->state = BG_JOB_STATE_ACKNOWLEDGED;
462
463 return hr;
464}
465
467{
469
470 TRACE("%p, %p.\n", iface, id);
471
472 *id = job->jobId;
473
474 return S_OK;
475}
476
477static HRESULT WINAPI BackgroundCopyJob_GetType(IBackgroundCopyJob4 *iface, BG_JOB_TYPE *job_type)
478{
480
481 TRACE("%p, %p.\n", iface, job_type);
482
483 if (!job_type)
484 return E_INVALIDARG;
485
486 *job_type = job->type;
487 return S_OK;
488}
489
491{
493
494 TRACE("%p, %p.\n", iface, progress);
495
496 if (!progress)
497 return E_INVALIDARG;
498
500 *progress = job->jobProgress;
502
503 return S_OK;
504}
505
507{
508 FIXME("%p, %p: stub\n", iface, pVal);
509 return E_NOTIMPL;
510}
511
513{
515
516 TRACE("%p, %p.\n", iface, state);
517
518 if (!state)
519 return E_INVALIDARG;
520
521 /* Don't think we need a critical section for this */
522 *state = job->state;
523 return S_OK;
524}
525
527{
529
530 TRACE("%p, %p.\n", iface, ppError);
531
532 if (!job->error.context) return BG_E_ERROR_INFORMATION_UNAVAILABLE;
533
534 return create_copy_error(job->error.context, job->error.code, job->error.file, ppError);
535}
536
538{
539 FIXME("%p, %p: stub\n", iface, owner);
540 return E_NOTIMPL;
541}
542
544{
545 FIXME("%p, %s: stub\n", iface, debugstr_w(name));
546 return E_NOTIMPL;
547}
548
550{
552
553 TRACE("%p, %p.\n", iface, name);
554
555 return return_strval(job->displayName, name);
556}
557
559{
561 static const int max_description_len = 1024;
562 HRESULT hr = S_OK;
563 int len;
564
565 TRACE("%p, %s.\n", iface, debugstr_w(desc));
566
567 if (!desc)
568 return E_INVALIDARG;
569
570 len = lstrlenW(desc);
571 if (len > max_description_len) return BG_E_STRING_TOO_LONG;
572
574
575 if (is_job_done(job))
576 {
578 }
579 else
580 {
581 free(job->description);
582 if (!(job->description = wcsdup(desc)))
584 }
585
587
588 return hr;
589}
590
592{
594
595 TRACE("%p, %p.\n", iface, desc);
596
597 return return_strval(job->description, desc);
598}
599
601{
602 FIXME("%p, %d: stub\n", iface, priority);
603 return S_OK;
604}
605
607{
608 FIXME("%p, %p: stub\n", iface, priority);
609 return E_NOTIMPL;
610}
611
613{
615 static const ULONG valid_flags = BG_NOTIFY_JOB_TRANSFERRED |
616 BG_NOTIFY_JOB_ERROR |
617 BG_NOTIFY_DISABLE |
618 BG_NOTIFY_JOB_MODIFICATION |
619 BG_NOTIFY_FILE_TRANSFERRED;
620
621 TRACE("%p, %#lx.\n", iface, flags);
622
624 if (flags & ~valid_flags) return E_NOTIMPL;
625 job->notify_flags = flags;
626 return S_OK;
627}
628
630{
632
633 TRACE("%p, %p.\n", iface, flags);
634
635 if (!flags) return E_INVALIDARG;
636
637 *flags = job->notify_flags;
638
639 return S_OK;
640}
641
643{
645 HRESULT hr = S_OK;
646
647 TRACE("%p, %p.\n", iface, callback);
648
650
651 if (job->callback)
652 {
653 IBackgroundCopyCallback2_Release(job->callback);
654 job->callback = NULL;
655 job->callback2 = FALSE;
656 }
657
658 if (callback)
659 {
660 hr = IUnknown_QueryInterface(callback, &IID_IBackgroundCopyCallback2, (void **)&job->callback);
661 if (FAILED(hr))
662 hr = IUnknown_QueryInterface(callback, &IID_IBackgroundCopyCallback, (void**)&job->callback);
663 else
664 job->callback2 = TRUE;
665 }
666
667 return hr;
668}
669
671{
673
674 TRACE("%p, %p.\n", iface, callback);
675
676 if (!callback) return E_INVALIDARG;
677
678 *callback = (IUnknown *)job->callback;
679 if (*callback)
680 IUnknown_AddRef(*callback);
681
682 return S_OK;
683}
684
686{
687 FIXME("%p, %lu.\n", iface, delay);
688 return S_OK;
689}
690
692{
693 FIXME("%p, %p: stub\n", iface, delay);
694 *delay = 30;
695 return S_OK;
696}
697
699{
700 FIXME("%p, %lu.: stub\n", iface, timeout);
701 return S_OK;
702}
703
705{
706 FIXME("%p, %p: stub\n", iface, timeout);
707 *timeout = 900;
708 return S_OK;
709}
710
712{
713 FIXME("%p, %p: stub\n", iface, count);
714 return E_NOTIMPL;
715}
716
717static HRESULT WINAPI BackgroundCopyJob_SetProxySettings(IBackgroundCopyJob4 *iface, BG_JOB_PROXY_USAGE proxy_usage,
718 const WCHAR *proxy_list, const WCHAR *proxy_bypass_list)
719{
720 FIXME("%p, %d, %s, %s: stub\n", iface, proxy_usage, debugstr_w(proxy_list), debugstr_w(proxy_bypass_list));
721 return E_NOTIMPL;
722}
723
724static HRESULT WINAPI BackgroundCopyJob_GetProxySettings(IBackgroundCopyJob4 *iface, BG_JOB_PROXY_USAGE *proxy_usage,
725 LPWSTR *proxy_list, LPWSTR *proxy_bypass_list)
726{
727 FIXME("%p, %p, %p, %p: stub\n", iface, proxy_usage, proxy_list, proxy_bypass_list);
728 return E_NOTIMPL;
729}
730
732{
733 FIXME("%p: stub\n", iface);
734 return E_NOTIMPL;
735}
736
738{
739 FIXME("%p, %s, %s: stub\n", iface, debugstr_w(prog), debugstr_w(params));
740 return E_NOTIMPL;
741}
742
744{
745 FIXME("%p, %p, %p: stub\n", iface, prog, params);
746 return E_NOTIMPL;
747}
748
750{
751 FIXME("%p, %p: stub\n", iface, progress);
752 return E_NOTIMPL;
753}
754
756{
757 FIXME("%p, %p, %p: stub\n", iface, buffer, length);
758 return E_NOTIMPL;
759}
760
762{
763 FIXME("%p, %s: stub\n", iface, debugstr_w(filename));
764 return E_NOTIMPL;
765}
766
768{
769 FIXME("%p, %p: stub\n", iface, filename);
770 return E_NOTIMPL;
771}
772
773static int index_from_target(BG_AUTH_TARGET target)
774{
775 if (!target || target > BG_AUTH_TARGET_PROXY) return -1;
776 return target - 1;
777}
778
779static int index_from_scheme(BG_AUTH_SCHEME scheme)
780{
781 if (!scheme || scheme > BG_AUTH_SCHEME_PASSPORT) return -1;
782 return scheme - 1;
783}
784
786{
788 BG_AUTH_CREDENTIALS *new_cred;
789 int idx_target, idx_scheme;
790
791 TRACE("%p, %p.\n", iface, cred);
792
793 if ((idx_target = index_from_target(cred->Target)) < 0) return BG_E_INVALID_AUTH_TARGET;
794 if ((idx_scheme = index_from_scheme(cred->Scheme)) < 0) return BG_E_INVALID_AUTH_SCHEME;
795 new_cred = &job->http_options.creds[idx_target][idx_scheme];
796
798
799 new_cred->Target = cred->Target;
800 new_cred->Scheme = cred->Scheme;
801
802 if (cred->Credentials.Basic.UserName)
803 {
804 free(new_cred->Credentials.Basic.UserName);
805 new_cred->Credentials.Basic.UserName = wcsdup(cred->Credentials.Basic.UserName);
806 }
807 if (cred->Credentials.Basic.Password)
808 {
809 free(new_cred->Credentials.Basic.Password);
810 new_cred->Credentials.Basic.Password = wcsdup(cred->Credentials.Basic.Password);
811 }
812
814 return S_OK;
815}
816
818 IBackgroundCopyJob4 *iface,
819 BG_AUTH_TARGET target,
820 BG_AUTH_SCHEME scheme)
821{
823 BG_AUTH_CREDENTIALS *new_cred;
824 int idx_target, idx_scheme;
825
826 TRACE("%p, %u, %u.\n", iface, target, scheme);
827
828 if ((idx_target = index_from_target(target)) < 0) return BG_E_INVALID_AUTH_TARGET;
829 if ((idx_scheme = index_from_scheme(scheme)) < 0) return BG_E_INVALID_AUTH_SCHEME;
830 new_cred = &job->http_options.creds[idx_target][idx_scheme];
831
833
834 new_cred->Target = 0;
835 new_cred->Scheme = 0;
836 free(new_cred->Credentials.Basic.UserName);
837 new_cred->Credentials.Basic.UserName = NULL;
838 free(new_cred->Credentials.Basic.Password);
839 new_cred->Credentials.Basic.Password = NULL;
840
842 return S_OK;
843}
844
846 IBackgroundCopyJob4 *iface,
847 LPCWSTR OldPrefix,
848 LPCWSTR NewPrefix)
849{
850 FIXME("%p, %s, %s: stub\n", iface, debugstr_w(OldPrefix), debugstr_w(NewPrefix));
851 return S_OK;
852}
853
855 IBackgroundCopyJob4 *iface,
856 LPCWSTR RemoteUrl,
857 LPCWSTR LocalName,
858 DWORD RangeCount,
859 BG_FILE_RANGE Ranges[])
860{
861 FIXME("%p, %s, %s, %lu, %p: stub\n", iface, debugstr_w(RemoteUrl), debugstr_w(LocalName), RangeCount, Ranges);
862 return S_OK;
863}
864
866{
867 FIXME("%p, %#lx: stub\n", iface, flags);
868 return S_OK;
869}
870
872{
873 FIXME("%p, %p: stub\n", iface, flags);
874 return S_OK;
875}
876
878{
879 FIXME("%p, %#lx.\n", iface, flags);
880 return S_OK;
881}
882
884{
885 FIXME("%p, %p.\n", iface, flags);
886 return E_NOTIMPL;
887}
888
890{
891 FIXME("%p, %p.\n", iface, level);
892 return E_NOTIMPL;
893}
894
896{
897 FIXME("%p, %p.\n", iface, elevated);
898 return E_NOTIMPL;
899}
900
902{
903 FIXME("%p, %lu.\n", iface, timeout);
904 return S_OK;
905}
906
908{
909 FIXME("%p, %p.\n", iface, timeout);
910 return E_NOTIMPL;
911}
912
913static const IBackgroundCopyJob4Vtbl BackgroundCopyJobVtbl =
914{
968};
969
972{
973 return CONTAINING_RECORD(iface, BackgroundCopyJobImpl, IBackgroundCopyJobHttpOptions_iface);
974}
975
978 REFIID riid,
979 void **ppvObject)
980{
982 return IBackgroundCopyJob4_QueryInterface(&job->IBackgroundCopyJob4_iface, riid, ppvObject);
983}
984
987{
989 return IBackgroundCopyJob4_AddRef(&job->IBackgroundCopyJob4_iface);
990}
991
994{
996 return IBackgroundCopyJob4_Release(&job->IBackgroundCopyJob4_iface);
997}
998
1001 BG_CERT_STORE_LOCATION StoreLocation,
1002 LPCWSTR StoreName,
1003 BYTE *pCertHashBlob)
1004{
1005 FIXME("\n");
1006 return E_NOTIMPL;
1007}
1008
1011 BG_CERT_STORE_LOCATION StoreLocation,
1012 LPCWSTR StoreName,
1013 LPCWSTR SubjectName)
1014{
1015 FIXME("\n");
1016 return E_NOTIMPL;
1017}
1018
1021{
1022 FIXME("\n");
1023 return E_NOTIMPL;
1024}
1025
1028 BG_CERT_STORE_LOCATION *pStoreLocation,
1029 LPWSTR *pStoreName,
1030 BYTE **ppCertHashBlob,
1031 LPWSTR *pSubjectName)
1032{
1033 FIXME("\n");
1034 return E_NOTIMPL;
1035}
1036
1039 LPCWSTR RequestHeaders)
1040{
1042
1043 TRACE("(%p)->(%s)\n", iface, debugstr_w(RequestHeaders));
1044
1046
1047 if (RequestHeaders)
1048 {
1049 WCHAR *headers = wcsdup(RequestHeaders);
1050 if (!headers)
1051 {
1053 return E_OUTOFMEMORY;
1054 }
1055 free(job->http_options.headers);
1056 job->http_options.headers = headers;
1057 }
1058 else
1059 {
1060 free(job->http_options.headers);
1061 job->http_options.headers = NULL;
1062 }
1063
1065 return S_OK;
1066}
1067
1070 LPWSTR *pRequestHeaders)
1071{
1073
1074 TRACE("(%p)->(%p)\n", iface, pRequestHeaders);
1075
1077
1078 if (job->http_options.headers)
1079 {
1080 WCHAR *headers = co_strdupW(job->http_options.headers);
1081 if (!headers)
1082 {
1084 return E_OUTOFMEMORY;
1085 }
1086 *pRequestHeaders = headers;
1088 return S_OK;
1089 }
1090
1091 *pRequestHeaders = NULL;
1093 return S_FALSE;
1094}
1095
1098 ULONG Flags)
1099{
1101
1102 TRACE("(%p)->(0x%08lx)\n", iface, Flags);
1103
1104 job->http_options.flags = Flags;
1105 return S_OK;
1106}
1107
1110 ULONG *pFlags)
1111{
1113
1114 TRACE("(%p)->(%p)\n", iface, pFlags);
1115
1116 *pFlags = job->http_options.flags;
1117 return S_OK;
1118}
1119
1120static const IBackgroundCopyJobHttpOptionsVtbl http_options_vtbl =
1121{
1133};
1134
1136{
1137 HRESULT hr;
1139
1140 TRACE("(%s,%d,%p)\n", debugstr_w(displayName), type, job);
1141
1142 This = malloc(sizeof(*This));
1143 if (!This)
1144 return E_OUTOFMEMORY;
1145
1146 This->IBackgroundCopyJob4_iface.lpVtbl = &BackgroundCopyJobVtbl;
1147 This->IBackgroundCopyJobHttpOptions_iface.lpVtbl = &http_options_vtbl;
1149 This->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": BackgroundCopyJobImpl.cs");
1150
1151 This->ref = 1;
1152 This->type = type;
1153
1154 This->displayName = wcsdup(displayName);
1155 if (!This->displayName)
1156 {
1157 This->cs.DebugInfo->Spare[0] = 0;
1159 free(This);
1160 return E_OUTOFMEMORY;
1161 }
1162
1163 hr = CoCreateGuid(&This->jobId);
1164 if (FAILED(hr))
1165 {
1166 This->cs.DebugInfo->Spare[0] = 0;
1168 free(This->displayName);
1169 free(This);
1170 return hr;
1171 }
1172 *job_id = This->jobId;
1173
1174 list_init(&This->files);
1175 This->jobProgress.BytesTotal = 0;
1176 This->jobProgress.BytesTransferred = 0;
1177 This->jobProgress.FilesTotal = 0;
1178 This->jobProgress.FilesTransferred = 0;
1179
1180 This->state = BG_JOB_STATE_SUSPENDED;
1181 This->description = NULL;
1182 This->notify_flags = BG_NOTIFY_JOB_ERROR | BG_NOTIFY_JOB_TRANSFERRED;
1183 This->callback = NULL;
1184 This->callback2 = FALSE;
1185
1186 This->error.context = 0;
1187 This->error.code = S_OK;
1188 This->error.file = NULL;
1189
1190 memset(&This->http_options, 0, sizeof(This->http_options));
1191
1192 This->wait = CreateEventW(NULL, FALSE, FALSE, NULL);
1193 This->cancel = CreateEventW(NULL, FALSE, FALSE, NULL);
1194 This->done = CreateEventW(NULL, FALSE, FALSE, NULL);
1195
1196 *job = This;
1197
1198 TRACE("created job %s:%p\n", debugstr_guid(&This->jobId), This);
1199
1200 return S_OK;
1201}
1202
1204{
1205 for (;;)
1206 {
1208 BOOL done = TRUE;
1209
1211 LIST_FOR_EACH_ENTRY(file, &job->files, BackgroundCopyFileImpl, entryFromJob)
1212 if (!file->fileProgress.Completed)
1213 {
1214 done = FALSE;
1215 break;
1216 }
1218 if (done)
1219 {
1220 transitionJobState(job, BG_JOB_STATE_QUEUED, BG_JOB_STATE_TRANSFERRED);
1221 if (job->callback && (job->notify_flags & BG_NOTIFY_JOB_TRANSFERRED))
1222 {
1223 TRACE("Calling JobTransferred -->\n");
1224 IBackgroundCopyCallback2_JobTransferred(job->callback, (IBackgroundCopyJob*)&job->IBackgroundCopyJob4_iface);
1225 TRACE("Called JobTransferred <--\n");
1226 }
1227 return;
1228 }
1229
1230 if (!processFile(file, job))
1231 return;
1232 }
1233}
COMPILER_DEPENDENT_UINT64 UINT64
Definition: actypes.h:131
static int state
Definition: maze.c:121
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
static void list_add_head(struct list_entry *head, struct list_entry *entry)
Definition: list.h:76
static void list_init(struct list_entry *head)
Definition: list.h:51
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
const GUID IID_IUnknown
#define BG_E_EMPTY
Definition: bitsmsg.h:40
#define BG_S_UNABLE_TO_DELETE_FILES
Definition: bitsmsg.h:25
#define BG_E_FILE_NOT_AVAILABLE
Definition: bitsmsg.h:41
#define BG_E_INVALID_AUTH_TARGET
Definition: bitsmsg.h:63
#define BG_E_ERROR_INFORMATION_UNAVAILABLE
Definition: bitsmsg.h:45
#define BG_E_INVALID_AUTH_SCHEME
Definition: bitsmsg.h:64
#define BG_S_PARTIAL_COMPLETE
Definition: bitsmsg.h:24
#define BG_E_INVALID_STATE
Definition: bitsmsg.h:39
#define BG_E_STRING_TOO_LONG
Definition: bitsmsg.h:58
cd_progress_ptr progress
Definition: cdjpeg.h:152
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
HRESULT hr
Definition: delayimp.cpp:582
_In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ ULONG _In_ ULONG Flags
Definition: dispmprt.h:245
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HRESULT WINAPI CoCreateGuid(GUID *guid)
Definition: combase.c:1016
#define CloseHandle
Definition: compat.h:739
#define lstrlenW
Definition: compat.h:750
LONG refs
Definition: port.c:62
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
BOOL WINAPI MoveFileExW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName OPTIONAL, IN DWORD dwFlags)
Definition: move.c:1074
BOOL WINAPI InitializeCriticalSectionEx(OUT LPCRITICAL_SECTION lpCriticalSection, IN DWORD dwSpinCount, IN DWORD flags)
Definition: sync.c:107
static wchar_t * wcsdup(const wchar_t *str)
Definition: string.h:94
HRESULT EnumBackgroundCopyFilesConstructor(BackgroundCopyJobImpl *job, IEnumBackgroundCopyFiles **enum_files)
Definition: enum_files.c:183
BOOL processFile(BackgroundCopyFileImpl *file, BackgroundCopyJobImpl *job)
Definition: file.c:471
HRESULT BackgroundCopyFileConstructor(BackgroundCopyJobImpl *owner, LPCWSTR remoteName, LPCWSTR localName, BackgroundCopyFileImpl **file)
Definition: file.c:162
static HRESULT WINAPI BackgroundCopyJob_SetNoProgressTimeout(IBackgroundCopyJob4 *iface, ULONG timeout)
Definition: job.c:698
static const IBackgroundCopyJob4Vtbl BackgroundCopyJobVtbl
Definition: job.c:913
static HRESULT WINAPI http_options_RemoveClientCertificate(IBackgroundCopyJobHttpOptions *iface)
Definition: job.c:1019
static HRESULT WINAPI copy_error_GetErrorContextDescription(IBackgroundCopyError *iface, DWORD LanguageId, LPWSTR *pContextDescription)
Definition: job.c:151
static HRESULT WINAPI BackgroundCopyJob_EnumFiles(IBackgroundCopyJob4 *iface, IEnumBackgroundCopyFiles **enum_files)
Definition: job.c:330
static HRESULT WINAPI BackgroundCopyJob_GetReplyData(IBackgroundCopyJob4 *iface, byte **buffer, UINT64 *length)
Definition: job.c:755
static HRESULT WINAPI BackgroundCopyJob_GetNotifyInterface(IBackgroundCopyJob4 *iface, IUnknown **callback)
Definition: job.c:670
HRESULT BackgroundCopyJobConstructor(LPCWSTR displayName, BG_JOB_TYPE type, GUID *job_id, BackgroundCopyJobImpl **job)
Definition: job.c:1135
static HRESULT WINAPI BackgroundCopyJob_AddFileWithRanges(IBackgroundCopyJob4 *iface, LPCWSTR RemoteUrl, LPCWSTR LocalName, DWORD RangeCount, BG_FILE_RANGE Ranges[])
Definition: job.c:854
BOOL transitionJobState(BackgroundCopyJobImpl *job, BG_JOB_STATE from, BG_JOB_STATE to)
Definition: job.c:30
static ULONG WINAPI copy_error_Release(IBackgroundCopyError *iface)
Definition: job.c:91
static HRESULT WINAPI BackgroundCopyJob_TakeOwnership(IBackgroundCopyJob4 *iface)
Definition: job.c:731
static HRESULT WINAPI BackgroundCopyJob_GetPeerCachingFlags(IBackgroundCopyJob4 *iface, DWORD *flags)
Definition: job.c:883
static ULONG WINAPI copy_error_AddRef(IBackgroundCopyError *iface)
Definition: job.c:82
static HRESULT WINAPI BackgroundCopyJob_RemoveCredentials(IBackgroundCopyJob4 *iface, BG_AUTH_TARGET target, BG_AUTH_SCHEME scheme)
Definition: job.c:817
static HRESULT WINAPI BackgroundCopyJob_SetNotifyFlags(IBackgroundCopyJob4 *iface, ULONG flags)
Definition: job.c:612
static HRESULT WINAPI BackgroundCopyJob_Resume(IBackgroundCopyJob4 *iface)
Definition: job.c:343
static HRESULT WINAPI BackgroundCopyJob_SetMinimumRetryDelay(IBackgroundCopyJob4 *iface, ULONG delay)
Definition: job.c:685
static HRESULT WINAPI BackgroundCopyJob_GetReplyProgress(IBackgroundCopyJob4 *iface, BG_JOB_REPLY_PROGRESS *progress)
Definition: job.c:749
static HRESULT WINAPI BackgroundCopyJob_Cancel(IBackgroundCopyJob4 *iface)
Definition: job.c:377
static HRESULT WINAPI BackgroundCopyJob_GetId(IBackgroundCopyJob4 *iface, GUID *id)
Definition: job.c:466
static HRESULT WINAPI BackgroundCopyJob_GetProxySettings(IBackgroundCopyJob4 *iface, BG_JOB_PROXY_USAGE *proxy_usage, LPWSTR *proxy_list, LPWSTR *proxy_bypass_list)
Definition: job.c:724
static const IBackgroundCopyErrorVtbl copy_error_vtbl
Definition: job.c:170
static HRESULT WINAPI BackgroundCopyJob_GetMinimumRetryDelay(IBackgroundCopyJob4 *iface, ULONG *delay)
Definition: job.c:691
static ULONG WINAPI BackgroundCopyJob_Release(IBackgroundCopyJob4 *iface)
Definition: job.c:252
static int index_from_target(BG_AUTH_TARGET target)
Definition: job.c:773
static HRESULT WINAPI BackgroundCopyJob_SetNotifyCmdLine(IBackgroundCopyJob4 *iface, LPCWSTR prog, LPCWSTR params)
Definition: job.c:737
static HRESULT WINAPI BackgroundCopyJob_ReplaceRemotePrefix(IBackgroundCopyJob4 *iface, LPCWSTR OldPrefix, LPCWSTR NewPrefix)
Definition: job.c:845
static HRESULT WINAPI copy_error_GetProtocol(IBackgroundCopyError *iface, LPWSTR *pProtocol)
Definition: job.c:161
static HRESULT WINAPI BackgroundCopyJob_SetDescription(IBackgroundCopyJob4 *iface, LPCWSTR desc)
Definition: job.c:558
static HRESULT WINAPI http_options_SetSecurityFlags(IBackgroundCopyJobHttpOptions *iface, ULONG Flags)
Definition: job.c:1096
static HRESULT WINAPI BackgroundCopyJob_GetFileACLFlags(IBackgroundCopyJob4 *iface, DWORD *flags)
Definition: job.c:871
static HRESULT WINAPI BackgroundCopyJob_GetState(IBackgroundCopyJob4 *iface, BG_JOB_STATE *state)
Definition: job.c:512
static HRESULT WINAPI http_options_GetCustomHeaders(IBackgroundCopyJobHttpOptions *iface, LPWSTR *pRequestHeaders)
Definition: job.c:1068
static HRESULT WINAPI BackgroundCopyJob_GetOwnerIntegrityLevel(IBackgroundCopyJob4 *iface, ULONG *level)
Definition: job.c:889
static HRESULT WINAPI BackgroundCopyJob_SetPriority(IBackgroundCopyJob4 *iface, BG_JOB_PRIORITY priority)
Definition: job.c:600
static BOOL is_job_done(const BackgroundCopyJobImpl *job)
Definition: job.c:205
static const IBackgroundCopyJobHttpOptionsVtbl http_options_vtbl
Definition: job.c:1120
static HRESULT WINAPI BackgroundCopyJob_SetReplyFileName(IBackgroundCopyJob4 *iface, LPCWSTR filename)
Definition: job.c:761
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJob4(IBackgroundCopyJob4 *iface)
Definition: job.c:210
static struct copy_error * impl_from_IBackgroundCopyError(IBackgroundCopyError *iface)
Definition: job.c:53
static HRESULT WINAPI BackgroundCopyJob_AddFile(IBackgroundCopyJob4 *iface, LPCWSTR RemoteUrl, LPCWSTR LocalName)
Definition: job.c:319
static HRESULT WINAPI http_options_QueryInterface(IBackgroundCopyJobHttpOptions *iface, REFIID riid, void **ppvObject)
Definition: job.c:976
static HRESULT WINAPI BackgroundCopyJob_GetOwner(IBackgroundCopyJob4 *iface, LPWSTR *owner)
Definition: job.c:537
static HRESULT WINAPI copy_error_GetError(IBackgroundCopyError *iface, BG_ERROR_CONTEXT *pContext, HRESULT *pCode)
Definition: job.c:107
static HRESULT WINAPI http_options_SetCustomHeaders(IBackgroundCopyJobHttpOptions *iface, LPCWSTR RequestHeaders)
Definition: job.c:1037
static HRESULT WINAPI http_options_GetSecurityFlags(IBackgroundCopyJobHttpOptions *iface, ULONG *pFlags)
Definition: job.c:1108
static HRESULT WINAPI BackgroundCopyJob_GetNotifyFlags(IBackgroundCopyJob4 *iface, ULONG *flags)
Definition: job.c:629
static HRESULT WINAPI BackgroundCopyJob_AddFileSet(IBackgroundCopyJob4 *iface, ULONG cFileCount, BG_FILE_INFO *pFileSet)
Definition: job.c:288
void processJob(BackgroundCopyJobImpl *job)
Definition: job.c:1203
static HRESULT WINAPI copy_error_GetErrorDescription(IBackgroundCopyError *iface, DWORD LanguageId, LPWSTR *pErrorDescription)
Definition: job.c:141
static HRESULT WINAPI copy_error_GetFile(IBackgroundCopyError *iface, IBackgroundCopyFile **pVal)
Definition: job.c:123
static BackgroundCopyJobImpl * impl_from_IBackgroundCopyJobHttpOptions(IBackgroundCopyJobHttpOptions *iface)
Definition: job.c:970
static HRESULT WINAPI BackgroundCopyJob_GetNoProgressTimeout(IBackgroundCopyJob4 *iface, ULONG *timeout)
Definition: job.c:704
static HRESULT WINAPI BackgroundCopyJob_GetType(IBackgroundCopyJob4 *iface, BG_JOB_TYPE *job_type)
Definition: job.c:477
static HRESULT WINAPI BackgroundCopyJob_GetOwnerElevationState(IBackgroundCopyJob4 *iface, BOOL *elevated)
Definition: job.c:895
static ULONG WINAPI http_options_AddRef(IBackgroundCopyJobHttpOptions *iface)
Definition: job.c:985
static HRESULT WINAPI BackgroundCopyJob_SetProxySettings(IBackgroundCopyJob4 *iface, BG_JOB_PROXY_USAGE proxy_usage, const WCHAR *proxy_list, const WCHAR *proxy_bypass_list)
Definition: job.c:717
static HRESULT WINAPI BackgroundCopyJob_SetDisplayName(IBackgroundCopyJob4 *iface, LPCWSTR name)
Definition: job.c:543
static ULONG WINAPI http_options_Release(IBackgroundCopyJobHttpOptions *iface)
Definition: job.c:992
static HRESULT create_copy_error(BG_ERROR_CONTEXT context, HRESULT code, IBackgroundCopyFile2 *file, IBackgroundCopyError **obj)
Definition: job.c:182
static HRESULT WINAPI BackgroundCopyJob_SetPeerCachingFlags(IBackgroundCopyJob4 *iface, DWORD flags)
Definition: job.c:877
static HRESULT WINAPI BackgroundCopyJob_GetError(IBackgroundCopyJob4 *iface, IBackgroundCopyError **ppError)
Definition: job.c:526
static HRESULT WINAPI BackgroundCopyJob_GetErrorCount(IBackgroundCopyJob4 *iface, ULONG *count)
Definition: job.c:711
static HRESULT WINAPI BackgroundCopyJob_GetPriority(IBackgroundCopyJob4 *iface, BG_JOB_PRIORITY *priority)
Definition: job.c:606
static HRESULT WINAPI copy_error_QueryInterface(IBackgroundCopyError *iface, REFIID riid, void **obj)
Definition: job.c:58
static HRESULT WINAPI BackgroundCopyJob_SetCredentials(IBackgroundCopyJob4 *iface, BG_AUTH_CREDENTIALS *cred)
Definition: job.c:785
static int index_from_scheme(BG_AUTH_SCHEME scheme)
Definition: job.c:779
static HRESULT WINAPI BackgroundCopyJob_SetNotifyInterface(IBackgroundCopyJob4 *iface, IUnknown *callback)
Definition: job.c:642
static HRESULT WINAPI BackgroundCopyJob_GetDisplayName(IBackgroundCopyJob4 *iface, LPWSTR *name)
Definition: job.c:549
static ULONG WINAPI BackgroundCopyJob_AddRef(IBackgroundCopyJob4 *iface)
Definition: job.c:244
static HRESULT WINAPI BackgroundCopyJob_GetMaximumDownloadTime(IBackgroundCopyJob4 *iface, ULONG *timeout)
Definition: job.c:907
static HRESULT WINAPI http_options_SetClientCertificateByID(IBackgroundCopyJobHttpOptions *iface, BG_CERT_STORE_LOCATION StoreLocation, LPCWSTR StoreName, BYTE *pCertHashBlob)
Definition: job.c:999
static HRESULT WINAPI BackgroundCopyJob_Complete(IBackgroundCopyJob4 *iface)
Definition: job.c:424
static HRESULT WINAPI BackgroundCopyJob_GetTimes(IBackgroundCopyJob4 *iface, BG_JOB_TIMES *pVal)
Definition: job.c:506
static HRESULT WINAPI BackgroundCopyJob_SetMaximumDownloadTime(IBackgroundCopyJob4 *iface, ULONG timeout)
Definition: job.c:901
static HRESULT WINAPI http_options_SetClientCertificateByName(IBackgroundCopyJobHttpOptions *iface, BG_CERT_STORE_LOCATION StoreLocation, LPCWSTR StoreName, LPCWSTR SubjectName)
Definition: job.c:1009
static HRESULT WINAPI BackgroundCopyJob_GetDescription(IBackgroundCopyJob4 *iface, LPWSTR *desc)
Definition: job.c:591
static HRESULT WINAPI http_options_GetClientCertificate(IBackgroundCopyJobHttpOptions *iface, BG_CERT_STORE_LOCATION *pStoreLocation, LPWSTR *pStoreName, BYTE **ppCertHashBlob, LPWSTR *pSubjectName)
Definition: job.c:1026
static HRESULT WINAPI BackgroundCopyJob_GetNotifyCmdLine(IBackgroundCopyJob4 *iface, LPWSTR *prog, LPWSTR *params)
Definition: job.c:743
static HRESULT WINAPI BackgroundCopyJob_GetProgress(IBackgroundCopyJob4 *iface, BG_JOB_PROGRESS *progress)
Definition: job.c:490
static HRESULT WINAPI BackgroundCopyJob_GetReplyFileName(IBackgroundCopyJob4 *iface, LPWSTR *filename)
Definition: job.c:767
static HRESULT WINAPI BackgroundCopyJob_SetFileACLFlags(IBackgroundCopyJob4 *iface, DWORD flags)
Definition: job.c:865
static HRESULT WINAPI BackgroundCopyJob_Suspend(IBackgroundCopyJob4 *iface)
Definition: job.c:337
static HRESULT WINAPI BackgroundCopyJob_QueryInterface(IBackgroundCopyJob4 *iface, REFIID riid, void **obj)
Definition: job.c:215
BackgroundCopyManagerImpl globalMgr
Definition: qmgr.c:26
return ret
Definition: mutex.c:147
#define INFINITE
Definition: serial.h:102
#define MOVEFILE_WRITE_THROUGH
Definition: filesup.h:30
#define MOVEFILE_REPLACE_EXISTING
Definition: filesup.h:28
#define MOVEFILE_COPY_ALLOWED
Definition: filesup.h:29
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint level
Definition: gl.h:1546
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint buffer
Definition: glext.h:5915
GLenum const GLfloat * params
Definition: glext.h:5645
GLbitfield flags
Definition: glext.h:7161
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
static LPWSTR co_strdupW(LPCWSTR str)
Definition: ieframe.h:359
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
const char * filename
Definition: ioapi.h:137
char * prog
Definition: isohybrid.c:47
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
if(dx< 0)
Definition: linetemp.h:194
#define error(str)
Definition: mkdosfs.c:1605
static IPrintDialogCallback callback
Definition: printdlg.c:325
D3D11_SHADER_VARIABLE_DESC desc
Definition: reflection.c:1683
static HANDLE job
Definition: process.c:79
static int priority
Definition: timer.c:163
short WCHAR
Definition: pedump.c:58
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
static HRESULT return_strval(const WCHAR *str, WCHAR **ret)
Definition: qmgr.h:125
DWORD scheme
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:236
#define memset(x, y, z)
Definition: compat.h:39
vector< Header * > headers
Definition: sdkparse.cpp:39
#define TRACE(s)
Definition: solgame.cpp:4
CardRegion * from
Definition: spigame.cpp:19
CRITICAL_SECTION cs
Definition: qmgr.h:89
Definition: inflate.c:139
Definition: http.c:7252
Definition: job.c:45
IBackgroundCopyFile2 * file
Definition: job.c:50
HRESULT code
Definition: job.c:49
IBackgroundCopyError IBackgroundCopyError_iface
Definition: job.c:46
BG_ERROR_CONTEXT context
Definition: job.c:48
LONG refs
Definition: job.c:47
Definition: fci.c:123
Definition: name.c:39
Definition: send.c:48
Definition: tools.h:99
Definition: dhcpd.h:248
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:587
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:669
char displayName[]
Definition: tftpd.cpp:35
#define DWORD_PTR
Definition: treelist.c:76
const uint16_t * LPCWSTR
Definition: typedefs.h:57
uint16_t * LPWSTR
Definition: typedefs.h:56
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:3451
#define E_NOINTERFACE
Definition: winerror.h:3479
#define RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO
Definition: winnt_old.h:1156
unsigned char BYTE
Definition: xxhash.c:193