Showing
7 changed files
with
59 additions
and
10 deletions
| @@ -31,5 +31,5 @@ typedef enum _ASIAuthenticationType { | @@ -31,5 +31,5 @@ typedef enum _ASIAuthenticationType { | ||
| 31 | @property (retain) ASIHTTPRequest *request; | 31 | @property (retain) ASIHTTPRequest *request; |
| 32 | @property (assign) ASIAuthenticationType type; | 32 | @property (assign) ASIAuthenticationType type; |
| 33 | @property (assign) BOOL didEnableRotationNotifications; | 33 | @property (assign) BOOL didEnableRotationNotifications; |
| 34 | -@property (retain) UIViewController *presentingController; | 34 | +@property (retain, nonatomic) UIViewController *presentingController; |
| 35 | @end | 35 | @end |
| @@ -40,8 +40,8 @@ | @@ -40,8 +40,8 @@ | ||
| 40 | // Do not use this formatter for parsing dates because the format can vary slightly - use ASIHTTPRequest's dateFromRFC1123String: class method instead | 40 | // Do not use this formatter for parsing dates because the format can vary slightly - use ASIHTTPRequest's dateFromRFC1123String: class method instead |
| 41 | + (NSDateFormatter *)rfc1123DateFormatter; | 41 | + (NSDateFormatter *)rfc1123DateFormatter; |
| 42 | 42 | ||
| 43 | -@property (assign) ASICachePolicy defaultCachePolicy; | 43 | +@property (assign, nonatomic) ASICachePolicy defaultCachePolicy; |
| 44 | -@property (retain) NSString *storagePath; | 44 | +@property (retain, nonatomic) NSString *storagePath; |
| 45 | @property (retain) NSRecursiveLock *accessLock; | 45 | @property (retain) NSRecursiveLock *accessLock; |
| 46 | @property (assign) BOOL shouldRespectCacheControlHeaders; | 46 | @property (assign) BOOL shouldRespectCacheControlHeaders; |
| 47 | @end | 47 | @end |
| @@ -47,6 +47,15 @@ static NSString *permanentCacheFolder = @"PermanentStore"; | @@ -47,6 +47,15 @@ static NSString *permanentCacheFolder = @"PermanentStore"; | ||
| 47 | [super dealloc]; | 47 | [super dealloc]; |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | +- (NSString *)storagePath | ||
| 51 | +{ | ||
| 52 | + [[self accessLock] lock]; | ||
| 53 | + NSString *p = [[storagePath retain] autorelease]; | ||
| 54 | + [[self accessLock] unlock]; | ||
| 55 | + return p; | ||
| 56 | +} | ||
| 57 | + | ||
| 58 | + | ||
| 50 | - (void)setStoragePath:(NSString *)path | 59 | - (void)setStoragePath:(NSString *)path |
| 51 | { | 60 | { |
| 52 | [[self accessLock] lock]; | 61 | [[self accessLock] lock]; |
| @@ -276,6 +285,14 @@ static NSString *permanentCacheFolder = @"PermanentStore"; | @@ -276,6 +285,14 @@ static NSString *permanentCacheFolder = @"PermanentStore"; | ||
| 276 | return YES; | 285 | return YES; |
| 277 | } | 286 | } |
| 278 | 287 | ||
| 288 | +- (ASICachePolicy)defaultCachePolicy | ||
| 289 | +{ | ||
| 290 | + [[self accessLock] lock]; | ||
| 291 | + ASICachePolicy cp = defaultCachePolicy; | ||
| 292 | + [[self accessLock] unlock]; | ||
| 293 | + return cp; | ||
| 294 | +} | ||
| 295 | + | ||
| 279 | 296 | ||
| 280 | - (void)setDefaultCachePolicy:(ASICachePolicy)cachePolicy | 297 | - (void)setDefaultCachePolicy:(ASICachePolicy)cachePolicy |
| 281 | { | 298 | { |
| @@ -751,10 +751,10 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount; | @@ -751,10 +751,10 @@ extern unsigned long const ASIWWANBandwidthThrottleAmount; | ||
| 751 | 751 | ||
| 752 | @property (retain,setter=setURL:) NSURL *url; | 752 | @property (retain,setter=setURL:) NSURL *url; |
| 753 | @property (retain) NSURL *originalURL; | 753 | @property (retain) NSURL *originalURL; |
| 754 | -@property (assign) id delegate; | 754 | +@property (assign, nonatomic) id delegate; |
| 755 | -@property (assign) id queue; | 755 | +@property (assign, nonatomic) id queue; |
| 756 | -@property (assign) id uploadProgressDelegate; | 756 | +@property (assign, nonatomic) id uploadProgressDelegate; |
| 757 | -@property (assign) id downloadProgressDelegate; | 757 | +@property (assign, nonatomic) id downloadProgressDelegate; |
| 758 | @property (assign) BOOL useKeychainPersistence; | 758 | @property (assign) BOOL useKeychainPersistence; |
| 759 | @property (assign) BOOL useSessionPersistence; | 759 | @property (assign) BOOL useSessionPersistence; |
| 760 | @property (retain) NSString *downloadDestinationPath; | 760 | @property (retain) NSString *downloadDestinationPath; |
| @@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
| 24 | 24 | ||
| 25 | // Automatically set on build | 25 | // Automatically set on build |
| 26 | 26 | ||
| 27 | -NSString *ASIHTTPRequestVersion = @"v1.7-10 2010-07-02"; | 27 | +NSString *ASIHTTPRequestVersion = @"v1.7-11 2010-07-02"; |
| 28 | 28 | ||
| 29 | NSString* const NetworkRequestErrorDomain = @"ASIHTTPRequestErrorDomain"; | 29 | NSString* const NetworkRequestErrorDomain = @"ASIHTTPRequestErrorDomain"; |
| 30 | 30 | ||
| @@ -461,6 +461,14 @@ static NSOperationQueue *sharedQueue = nil; | @@ -461,6 +461,14 @@ static NSOperationQueue *sharedQueue = nil; | ||
| 461 | [stream close]; | 461 | [stream close]; |
| 462 | } | 462 | } |
| 463 | 463 | ||
| 464 | +- (id)delegate | ||
| 465 | +{ | ||
| 466 | + [[self cancelledLock] lock]; | ||
| 467 | + id d = [[delegate retain] autorelease]; | ||
| 468 | + [[self cancelledLock] unlock]; | ||
| 469 | + return d; | ||
| 470 | +} | ||
| 471 | + | ||
| 464 | - (void)setDelegate:(id)newDelegate | 472 | - (void)setDelegate:(id)newDelegate |
| 465 | { | 473 | { |
| 466 | [[self cancelledLock] lock]; | 474 | [[self cancelledLock] lock]; |
| @@ -468,6 +476,15 @@ static NSOperationQueue *sharedQueue = nil; | @@ -468,6 +476,15 @@ static NSOperationQueue *sharedQueue = nil; | ||
| 468 | [[self cancelledLock] unlock]; | 476 | [[self cancelledLock] unlock]; |
| 469 | } | 477 | } |
| 470 | 478 | ||
| 479 | +- (id)queue | ||
| 480 | +{ | ||
| 481 | + [[self cancelledLock] lock]; | ||
| 482 | + id q = [[queue retain] autorelease]; | ||
| 483 | + [[self cancelledLock] unlock]; | ||
| 484 | + return q; | ||
| 485 | +} | ||
| 486 | + | ||
| 487 | + | ||
| 471 | - (void)setQueue:(id)newQueue | 488 | - (void)setQueue:(id)newQueue |
| 472 | { | 489 | { |
| 473 | [[self cancelledLock] lock]; | 490 | [[self cancelledLock] lock]; |
| @@ -1334,6 +1351,13 @@ static NSOperationQueue *sharedQueue = nil; | @@ -1334,6 +1351,13 @@ static NSOperationQueue *sharedQueue = nil; | ||
| 1334 | } | 1351 | } |
| 1335 | } | 1352 | } |
| 1336 | 1353 | ||
| 1354 | +- (id)uploadProgressDelegate | ||
| 1355 | +{ | ||
| 1356 | + [[self cancelledLock] lock]; | ||
| 1357 | + id d = [[uploadProgressDelegate retain] autorelease]; | ||
| 1358 | + [[self cancelledLock] unlock]; | ||
| 1359 | + return d; | ||
| 1360 | +} | ||
| 1337 | 1361 | ||
| 1338 | - (void)setUploadProgressDelegate:(id)newDelegate | 1362 | - (void)setUploadProgressDelegate:(id)newDelegate |
| 1339 | { | 1363 | { |
| @@ -1348,6 +1372,14 @@ static NSOperationQueue *sharedQueue = nil; | @@ -1348,6 +1372,14 @@ static NSOperationQueue *sharedQueue = nil; | ||
| 1348 | [[self cancelledLock] unlock]; | 1372 | [[self cancelledLock] unlock]; |
| 1349 | } | 1373 | } |
| 1350 | 1374 | ||
| 1375 | +- (id)downloadProgressDelegate | ||
| 1376 | +{ | ||
| 1377 | + [[self cancelledLock] lock]; | ||
| 1378 | + id d = [[downloadProgressDelegate retain] autorelease]; | ||
| 1379 | + [[self cancelledLock] unlock]; | ||
| 1380 | + return d; | ||
| 1381 | +} | ||
| 1382 | + | ||
| 1351 | - (void)setDownloadProgressDelegate:(id)newDelegate | 1383 | - (void)setDownloadProgressDelegate:(id)newDelegate |
| 1352 | { | 1384 | { |
| 1353 | [[self cancelledLock] lock]; | 1385 | [[self cancelledLock] lock]; |
| @@ -80,8 +80,8 @@ | @@ -80,8 +80,8 @@ | ||
| 80 | // This method will start the queue | 80 | // This method will start the queue |
| 81 | - (void)go; | 81 | - (void)go; |
| 82 | 82 | ||
| 83 | -@property (assign,setter=setUploadProgressDelegate:) id uploadProgressDelegate; | 83 | +@property (assign, nonatomic, setter=setUploadProgressDelegate:) id uploadProgressDelegate; |
| 84 | -@property (assign,setter=setDownloadProgressDelegate:) id downloadProgressDelegate; | 84 | +@property (assign, nonatomic, setter=setDownloadProgressDelegate:) id downloadProgressDelegate; |
| 85 | 85 | ||
| 86 | @property (assign) SEL requestDidStartSelector; | 86 | @property (assign) SEL requestDidStartSelector; |
| 87 | @property (assign) SEL requestDidReceiveResponseHeadersSelector; | 87 | @property (assign) SEL requestDidReceiveResponseHeadersSelector; |
This diff was suppressed by a .gitattributes entry.
-
Please register or login to post a comment