NSCFURLSession.h
1 #import <os/object.h> 2 #import <Foundation/NSURLSession.h> 3 #import <dispatch/dispatch.h> 4 5 @class NSOperationQueue, NSString, __NSCFSessionBridge; 6 7 __attribute__((visibility("hidden"))) 8 @interface __NSCFURLSessionConfiguration : NSObject 9 @end 10 11 __attribute__((visibility("hidden"))) 12 @interface __NSCFURLSession : NSObject { 13 __NSCFURLSessionConfiguration *_nsCFConfig; 14 BOOL _invalid; 15 NSOperationQueue *_delegateQueue; 16 id <NSURLSessionDelegate> _delegate; 17 NSString *_sessionDescription; 18 dispatch_queue_t _workQueue; 19 __NSCFSessionBridge *_connectionSession; 20 __NSCFURLSession *_extraRetain; 21 NSOperationQueue *_realDelegateQueue; 22 } 23 24 @property(retain) NSOperationQueue *realDelegateQueue; // @synthesize realDelegateQueue=_realDelegateQueue; 25 @property(retain) __NSCFURLSession *extraRetain; // @synthesize extraRetain=_extraRetain; 26 @property BOOL invalid; // @synthesize invalid=_invalid; 27 @property(retain) __NSCFSessionBridge *connectionSession; // @synthesize connectionSession=_connectionSession; 28 @property(retain) dispatch_queue_t workQueue; // @synthesize workQueue=_workQueue; 29 @property(copy) NSString *sessionDescription; // @synthesize sessionDescription=_sessionDescription; 30 @property(readonly) id <NSURLSessionDelegate> delegate; // @synthesize delegate=_delegate; 31 @property(readonly) NSOperationQueue *delegateQueue; // @synthesize delegateQueue=_delegateQueue; 32 @property(copy) __NSCFURLSessionConfiguration *configuration; 33 34 + (id)sessionWithConfiguration:(id)configuration delegate:(id)delegate delegateQueue:(id)delegateQueue; 35 + (id)sessionWithConfiguration:(id)configuration; 36 + (id)sharedSession; 37 + (void)_releaseProcessAssertionForSessionIdentifier:(NSString *)identifier; 38 + (void)_sendPendingCallbacksForSessionIdentifier:(NSString *)identifier; 39 40 // + (const struct ClassicConnectionSession *)defaultClassicConnectionSession; 41 42 - (id)initWithConfiguration:(NSURLSessionConfiguration *)configuration delegate:(id <NSURLSessionDelegate>)delegate delegateQueue:(NSOperationQueue *)queue; 43 44 - (void)delegate_didFinishEventsForBackgroundURLSession; 45 - (BOOL)can_delegate_didFinishEventsForBackgroundURLSession; 46 - (id)delegate_downloadTaskNeedsDownloadDirectory:(id)needsDownloadDirectory; 47 - (BOOL)can_delegate_downloadTaskNeedsDownloadDirectory; 48 - (void)delegate_downloadTask:(NSURLSessionDataTask *)task didReceiveResponse:(NSURLResponse *)response; 49 - (BOOL)can_delegate_downloadTask_didReceiveResponse; 50 - (void)delegate_downloadTask:(NSURLSessionDownloadTask *)task didResumeAtOffset:(int64_t)offset expectedTotalBytes:(int64_t)expectedTotalBytes; 51 - (BOOL)can_delegate_downloadTask_didResumeAtOffset; 52 - (void)delegate_downloadTask:(NSURLSessionDownloadTask *)task didWriteData:(int64_t)bytesWritten totalBytesWritten:(int64_t)totalBytesWritten totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite; 53 - (BOOL)can_delegate_downloadTask_didWriteData; 54 - (void)delegate_downloadTask:(NSURLSessionDownloadTask *)task didFinishDownloadingToURL:(NSURL *)location; 55 - (BOOL)can_delegate_downloadTask_didFinishDownloadingToURL; 56 - (void)delegate_dataTask:(NSURLSessionTask *)task willCacheResponse:(NSCachedURLResponse *)proposedResponse completionHandler:(void (^)(NSCachedURLResponse *cachedResponse))completionHandler; 57 - (BOOL)can_delegate_dataTask_willCacheResponse; 58 - (void)delegate_dataTask:(NSURLSessionDataTask *)task didReceiveData:(NSData *)data; 59 - (BOOL)can_delegate_dataTask_didReceiveData; 60 - (void)delegate_dataTask:(NSURLSessionDataTask *)task didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask; 61 - (BOOL)can_delegate_dataTask_didBecomeDownloadTask; 62 - (void)delegate_dataTask:(NSURLSessionDataTask *)task didReceiveResponse:(NSURLResponse *)response completionHandler:(void (^)(NSURLSessionResponseDisposition disposition))completionHandler; 63 - (BOOL)can_delegate_dataTask_didReceiveResponse; 64 - (void)delegate_task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error; 65 - (BOOL)can_delegate_task_didCompleteWithError; 66 - (void)delegate_task:(NSURLSessionTask *)task didSendBodyData:(int64_t)bytesSent totalBytesSent:(int64_t)totalBytesSent totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend; 67 - (BOOL)can_delegate_task_didSendBodyData; 68 - (void)delegate_task:(NSURLSessionTask *)task needNewBodyStream:(void (^)(NSInputStream *bodyStream))completionHandler; 69 - (BOOL)can_delegate_task_needNewBodyStream; 70 - (void)delegate_task:(NSURLSessionTask *)task didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler; 71 - (BOOL)can_delegate_task_didReceiveChallenge; 72 - (void)delegate_task:(NSURLSessionTask *)task willPerformHTTPRedirection:(NSHTTPURLResponse *)response newRequest:(NSURLRequest *)request completionHandler:(void (^)(NSURLRequest *))completionHandler; 73 - (BOOL)can_delegate_task_willPerformHTTPRedirection; 74 - (void)delegate_didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler; 75 - (BOOL)can_delegate_didReceiveChallenge; 76 77 - (void)addDelegateBlock:(void (^)(void))block; 78 79 - (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData; 80 - (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData completionHandler:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler; 81 - (NSURLSessionDownloadTask *)downloadTaskWithURL:(NSURL *)url; 82 - (NSURLSessionDownloadTask *)downloadTaskWithURL:(NSURL *)url completionHandler:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler; 83 - (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request; 84 - (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request completionHandler:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler; 85 - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromFile:(NSURL *)fileURL; 86 - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromFile:(NSURL *)fileURL completionHandler:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler; 87 - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromData:(NSData *)bodyData; 88 - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromData:(NSData *)bodyData completionHandler:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler; 89 - (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request; 90 - (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request; 91 - (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request completionHandler:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler; 92 - (NSURLSessionDataTask *)dataTaskWithURL:(NSURL *)url; 93 - (NSURLSessionDataTask *)dataTaskWithURL:(NSURL *)url completionHandler:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler; 94 - (NSURLSessionDataTask *)dataTaskWithHTTPGetRequest:(NSURL *)url; 95 - (NSURLSessionDataTask *)dataTaskWithHTTPGetRequest:(NSURL *)url completionHandler:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler; 96 97 - (void)getTasksWithCompletionHandler:(id)handler; 98 - (void)flushWithCompletionHandler:(id)handler; 99 - (void)resetWithCompletionHandler:(id)handler; 100 - (void)finishTasksAndInvalidate; 101 - (void)invalidateAndCancel; 102 - (void)_onqueue_completeInvalidation:(BOOL)completeInvalidation; 103 - (void)_onqueue_completeInvalidationFinal; 104 - (void)_onqueue_withTasks:(id)tasks; 105 - (BOOL)isBackgroundSession; 106 - (id)getConfiguration; 107 - (void)dealloc; 108 - (id)copyWithZone:(NSZone *)zone; 109 110 @end