aboutsummaryrefslogtreecommitdiff
path: root/Foundation/GTMHTTPFetcher.m
diff options
context:
space:
mode:
authorGravatar thomasvl <thomasvl@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2008-06-13 19:21:50 +0000
committerGravatar thomasvl <thomasvl@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2008-06-13 19:21:50 +0000
commitc53ec5520e39096e0804ce8d89a21378c0904481 (patch)
treed36a0055b59b1376d86c4ba4a01f9c479c2101a7 /Foundation/GTMHTTPFetcher.m
parent80d493da05c8d461d74bfaa919ffc487be03ffe6 (diff)
Landing a log of AppleScript/AppleEvent support code.
Landing GTMHTTPServer as a simple server but mainly for use in unittesting. _GTMCompileAssert for doing compile time assertions to GTMDefines.h Lots of improvments for UnitTesting, Dave's gonna put up a wiki page shortly with the full details of what can be done.
Diffstat (limited to 'Foundation/GTMHTTPFetcher.m')
-rw-r--r--Foundation/GTMHTTPFetcher.m9
1 files changed, 5 insertions, 4 deletions
diff --git a/Foundation/GTMHTTPFetcher.m b/Foundation/GTMHTTPFetcher.m
index 9853d0d..cac49df 100644
--- a/Foundation/GTMHTTPFetcher.m
+++ b/Foundation/GTMHTTPFetcher.m
@@ -65,6 +65,7 @@ const NSTimeInterval kDefaultMaxRetryInterval = 60. * 10.; // 10 minutes
- (NSArray *)cookiesForURL:(NSURL *)theURL inArray:(NSMutableArray *)cookieStorageArray;
- (void)handleCookiesForResponse:(NSURLResponse *)response;
- (BOOL)shouldRetryNowForStatus:(NSInteger)status error:(NSError *)error;
+- (void)retryTimerFired:(NSTimer *)timer;
- (void)destroyRetryTimer;
- (void)beginRetryTimer;
- (void)primeTimerWithNewTimeInterval:(NSTimeInterval)secs;
@@ -135,7 +136,7 @@ const NSTimeInterval kDefaultMaxRetryInterval = 60. * 10.; // 10 minutes
GTMAssertSelectorNilOrImplementedWithArguments(delegate, finishedSEL, @encode(GTMHTTPFetcher *), @encode(NSData *), NULL);
GTMAssertSelectorNilOrImplementedWithArguments(delegate, failedSEL, @encode(GTMHTTPFetcher *), @encode(NSError *), NULL);
GTMAssertSelectorNilOrImplementedWithArguments(delegate, receivedDataSEL_, @encode(GTMHTTPFetcher *), @encode(NSData *), NULL);
- GTMAssertSelectorNilOrImplementedWithArguments(delegate, retrySEL_, @encode(GTMHTTPFetcher *), @encode(BOOL), @encode(NSError *), NULL);
+ GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(delegate, retrySEL_, @encode(BOOL), @encode(GTMHTTPFetcher *), @encode(BOOL), @encode(NSError *), NULL);
if (connection_ != nil) {
_GTMDevAssert(connection_ != nil,
@@ -244,7 +245,7 @@ const NSTimeInterval kDefaultMaxRetryInterval = 60. * 10.; // 10 minutes
delegate:self
startImmediately:NO];
- for (int idx = 0; idx < [runLoopModes count]; idx++) {
+ for (NSUInteger idx = 0; idx < [runLoopModes count]; idx++) {
NSString *mode = [runLoopModes objectAtIndex:idx];
[connection_ scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:mode];
}
@@ -1412,7 +1413,7 @@ static NSString* gLoggingProcessName = nil;
NSMutableData *mutableData = [NSMutableData dataWithData:data];
unsigned char *bytes = [mutableData mutableBytes];
- for (int idx = 0; idx < [mutableData length]; idx++) {
+ for (NSUInteger idx = 0; idx < [mutableData length]; idx++) {
if (bytes[idx] > 0x7F || bytes[idx] == 0) {
bytes[idx] = '_';
}
@@ -1436,7 +1437,7 @@ static NSString* gLoggingProcessName = nil;
// convert those into UTF-8
NSMutableArray *origParts = [NSMutableArray array];
NSUInteger offset = 0;
- for (int partIdx = 0; partIdx < [mungedParts count]; partIdx++) {
+ for (NSUInteger partIdx = 0; partIdx < [mungedParts count]; partIdx++) {
NSString *mungedPart = [mungedParts objectAtIndex:partIdx];
NSUInteger partSize = [mungedPart length];