File tree Expand file tree Collapse file tree 2 files changed +22
-17
lines changed
pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http Expand file tree Collapse file tree 2 files changed +22
-17
lines changed Original file line number Diff line number Diff line change 1+ #import < Foundation/NSLock.h>
2+ #import < Foundation/NSURL.h>
3+ #import < Foundation/NSURLSession.h>
4+ #include < stdint.h>
5+
6+ #if !__has_feature(objc_arc)
7+ #error "This file must be compiled with ARC enabled"
8+ #endif
9+
10+ typedef void (^_DidFinish)(void *closure, NSURLSession *session,
11+ NSURLSessionDownloadTask *downloadTask,
12+ NSURL *location);
13+ typedef void (^_DidFinishWithLock)(NSCondition *lock, NSURLSession *session,
14+ NSURLSessionDownloadTask *downloadTask,
15+ NSURL *location);
16+ // / Create a block useable as a
17+ // / `URLSession:downloadTask:didFinishDownloadingToURL:` that can be used to
18+ // / make an async Dart callback behave synchronously.
19+ __attribute__ ((visibility(" default" ))) __attribute__((used))
20+ _DidFinish adaptFinishWithLock(_DidFinishWithLock block);
Original file line number Diff line number Diff line change 1- #import < Foundation/NSLock.h>
2- #import < Foundation/NSURL.h>
3- #import < Foundation/NSURLSession.h>
4- #include < stdint.h>
1+ #include " utils.h"
52
6- #if !__has_feature(objc_arc)
7- #error "This file must be compiled with ARC enabled"
8- #endif
9-
10- typedef void (^_DidFinish)(void *closure, NSURLSession *session,
11- NSURLSessionDownloadTask *downloadTask,
12- NSURL *location);
13- typedef void (^_DidFinishWithLock)(NSCondition *lock, NSURLSession *session,
14- NSURLSessionDownloadTask *downloadTask,
15- NSURL *location);
16-
17- __attribute__ ((visibility(" default" ))) __attribute__((used)) _DidFinish
18- adaptFinishWithLock(_DidFinishWithLock block) {
3+ _DidFinish adaptFinishWithLock (_DidFinishWithLock block) {
194 return ^void (void *closure, NSURLSession *session,
205 NSURLSessionDownloadTask *downloadTask, NSURL *location) {
216 NSCondition *lock = [[NSCondition alloc ] init ];
You can’t perform that action at this time.
0 commit comments