Start work on porting the new threading model to NSOperationQueue
Showing
3 changed files
with
5 additions
and
8 deletions
@@ -342,9 +342,6 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount; | @@ -342,9 +342,6 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount; | ||
342 | // Default is YES | 342 | // Default is YES |
343 | BOOL shouldPresentCredentialsBeforeChallenge; | 343 | BOOL shouldPresentCredentialsBeforeChallenge; |
344 | 344 | ||
345 | - // YES when the request is run with runSynchronous, NO otherwise. READ-ONLY | ||
346 | - BOOL isSynchronous; | ||
347 | - | ||
348 | // YES when the request hasn't finished yet. Will still be YES even if the request isn't doing anything (eg it's waiting for delegate authentication). READ-ONLY | 345 | // YES when the request hasn't finished yet. Will still be YES even if the request isn't doing anything (eg it's waiting for delegate authentication). READ-ONLY |
349 | BOOL inProgress; | 346 | BOOL inProgress; |
350 | 347 | ||
@@ -383,9 +380,6 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount; | @@ -383,9 +380,6 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount; | ||
383 | // The stream will be closed + released either when another request comes to use the connection, or when the timer fires to tell the connection to expire | 380 | // The stream will be closed + released either when another request comes to use the connection, or when the timer fires to tell the connection to expire |
384 | NSMutableDictionary *connectionInfo; | 381 | NSMutableDictionary *connectionInfo; |
385 | 382 | ||
386 | - // This timer checks up on the request every 0.25 seconds, and updates progress | ||
387 | - NSTimer *statusTimer; | ||
388 | - | ||
389 | // When set to YES, 301 and 302 automatic redirects will use the original method and and body, according to the HTTP 1.1 standard | 383 | // When set to YES, 301 and 302 automatic redirects will use the original method and and body, according to the HTTP 1.1 standard |
390 | // Default is NO (to follow the behaviour of most browsers) | 384 | // Default is NO (to follow the behaviour of most browsers) |
391 | BOOL shouldUseRFC2616RedirectBehaviour; | 385 | BOOL shouldUseRFC2616RedirectBehaviour; |
@@ -689,6 +683,10 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount; | @@ -689,6 +683,10 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount; | ||
689 | // And also by ASIS3Request | 683 | // And also by ASIS3Request |
690 | + (NSString *)base64forData:(NSData *)theData; | 684 | + (NSString *)base64forData:(NSData *)theData; |
691 | 685 | ||
686 | +#pragma mark request threading behaviour | ||
687 | + | ||
688 | ++ (NSThread *)threadForRequest:(ASIHTTPRequest *)request; | ||
689 | + | ||
692 | #pragma mark === | 690 | #pragma mark === |
693 | 691 | ||
694 | @property (retain) NSString *username; | 692 | @property (retain) NSString *username; |
@@ -766,7 +764,6 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount; | @@ -766,7 +764,6 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount; | ||
766 | @property (assign, readonly) int proxyAuthenticationRetryCount; | 764 | @property (assign, readonly) int proxyAuthenticationRetryCount; |
767 | @property (assign) BOOL haveBuiltRequestHeaders; | 765 | @property (assign) BOOL haveBuiltRequestHeaders; |
768 | @property (assign, nonatomic) BOOL haveBuiltPostBody; | 766 | @property (assign, nonatomic) BOOL haveBuiltPostBody; |
769 | -@property (assign, readonly) BOOL isSynchronous; | ||
770 | @property (assign, readonly) BOOL inProgress; | 767 | @property (assign, readonly) BOOL inProgress; |
771 | @property (assign) int numberOfTimesToRetryOnTimeout; | 768 | @property (assign) int numberOfTimesToRetryOnTimeout; |
772 | @property (assign, readonly) int retryCount; | 769 | @property (assign, readonly) int retryCount; |
This diff is collapsed. Click to expand it.
@@ -94,7 +94,7 @@ | @@ -94,7 +94,7 @@ | ||
94 | // Stop any other requests | 94 | // Stop any other requests |
95 | [networkQueue reset]; | 95 | [networkQueue reset]; |
96 | 96 | ||
97 | - [self setBigFetchRequest:[[[ASIHTTPRequest alloc] initWithURL:[NSURL URLWithString:@"http://allseeing-i.com/ASIHTTPRequest/tests/redirect_resume"]] autorelease]]; | 97 | + [self setBigFetchRequest:[ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"http://allseeing-i.com/ASIHTTPRequest/tests/redirect_resume"]]]; |
98 | [[self bigFetchRequest] setDownloadDestinationPath:[[[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"The Great American Novel.txt"]]; | 98 | [[self bigFetchRequest] setDownloadDestinationPath:[[[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"The Great American Novel.txt"]]; |
99 | [[self bigFetchRequest] setTemporaryFileDownloadPath:[[[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"The Great American Novel.txt.download"]]; | 99 | [[self bigFetchRequest] setTemporaryFileDownloadPath:[[[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"The Great American Novel.txt.download"]]; |
100 | [[self bigFetchRequest] setAllowResumeForFileDownloads:YES]; | 100 | [[self bigFetchRequest] setAllowResumeForFileDownloads:YES]; |
-
Please register or login to post a comment