Ben Copsey

Fix mac build

@@ -14,11 +14,12 @@ @@ -14,11 +14,12 @@
14 #import <zlib.h> 14 #import <zlib.h>
15 #if TARGET_OS_IPHONE 15 #if TARGET_OS_IPHONE
16 #import "Reachability.h" 16 #import "Reachability.h"
  17 +#import "ASIAuthenticationDialog.h"
17 #else 18 #else
18 #import <SystemConfiguration/SystemConfiguration.h> 19 #import <SystemConfiguration/SystemConfiguration.h>
19 #endif 20 #endif
20 #import "ASIInputStream.h" 21 #import "ASIInputStream.h"
21 -#import "ASIAuthenticationDialog.h" 22 +
22 23
23 // We use our own custom run loop mode as CoreAnimation seems to want to hijack our threads otherwise 24 // We use our own custom run loop mode as CoreAnimation seems to want to hijack our threads otherwise
24 static CFStringRef ASIHTTPRequestRunMode = CFSTR("ASIHTTPRequest"); 25 static CFStringRef ASIHTTPRequestRunMode = CFSTR("ASIHTTPRequest");
@@ -78,8 +79,6 @@ BOOL shouldThrottleBandwithForWWANOnly = NO; @@ -78,8 +79,6 @@ BOOL shouldThrottleBandwithForWWANOnly = NO;
78 79
79 static NSLock *sessionCookiesLock = nil; 80 static NSLock *sessionCookiesLock = nil;
80 81
81 -UIActionSheet *loginDialog = nil;  
82 -  
83 // Private stuff 82 // Private stuff
84 @interface ASIHTTPRequest () 83 @interface ASIHTTPRequest ()
85 84
@@ -1421,6 +1420,8 @@ UIActionSheet *loginDialog = nil; @@ -1421,6 +1420,8 @@ UIActionSheet *loginDialog = nil;
1421 1420
1422 - (BOOL)showProxyAuthenticationDialog 1421 - (BOOL)showProxyAuthenticationDialog
1423 { 1422 {
  1423 +// Mac authentication dialog coming soon!
  1424 +#if TARGET_OS_IPHONE
1424 if ([self shouldPresentProxyAuthenticationDialog]) { 1425 if ([self shouldPresentProxyAuthenticationDialog]) {
1425 [ASIAuthenticationDialog performSelectorOnMainThread:@selector(presentProxyAuthenticationDialogForRequest:) withObject:self waitUntilDone:[NSThread isMainThread]]; 1426 [ASIAuthenticationDialog performSelectorOnMainThread:@selector(presentProxyAuthenticationDialogForRequest:) withObject:self waitUntilDone:[NSThread isMainThread]];
1426 [[self authenticationLock] lockWhenCondition:2]; 1427 [[self authenticationLock] lockWhenCondition:2];
@@ -1428,6 +1429,9 @@ UIActionSheet *loginDialog = nil; @@ -1428,6 +1429,9 @@ UIActionSheet *loginDialog = nil;
1428 return YES; 1429 return YES;
1429 } 1430 }
1430 return NO; 1431 return NO;
  1432 +#else
  1433 + return NO;
  1434 +#endif
1431 } 1435 }
1432 1436
1433 1437
@@ -1545,6 +1549,8 @@ UIActionSheet *loginDialog = nil; @@ -1545,6 +1549,8 @@ UIActionSheet *loginDialog = nil;
1545 1549
1546 - (BOOL)showAuthenticationDialog 1550 - (BOOL)showAuthenticationDialog
1547 { 1551 {
  1552 +// Mac authentication dialog coming soon!
  1553 +#if TARGET_OS_IPHONE
1548 if ([self shouldPresentAuthenticationDialog]) { 1554 if ([self shouldPresentAuthenticationDialog]) {
1549 [ASIAuthenticationDialog performSelectorOnMainThread:@selector(presentAuthenticationDialogForRequest:) withObject:self waitUntilDone:[NSThread isMainThread]]; 1555 [ASIAuthenticationDialog performSelectorOnMainThread:@selector(presentAuthenticationDialogForRequest:) withObject:self waitUntilDone:[NSThread isMainThread]];
1550 [[self authenticationLock] lockWhenCondition:2]; 1556 [[self authenticationLock] lockWhenCondition:2];
@@ -1552,6 +1558,9 @@ UIActionSheet *loginDialog = nil; @@ -1552,6 +1558,9 @@ UIActionSheet *loginDialog = nil;
1552 return YES; 1558 return YES;
1553 } 1559 }
1554 return NO; 1560 return NO;
  1561 +#else
  1562 + return NO;
  1563 +#endif
1555 } 1564 }
1556 1565
1557 - (BOOL)askDelegateForCredentials 1566 - (BOOL)askDelegateForCredentials