Commit 0f2eaf88 authored by A. Wilcox's avatar A. Wilcox

XBridge: Add #if TARGET_OS_IPHONE so it compiles on OS X.

parent fe0f31fe
......@@ -7,8 +7,12 @@
//
#import "AuXBridge.h"
// XXX: iPhone specific
#import <TargetConditionals.h>
#if TARGET_OS_IPHONE
#import "MobileAuctionsAppDelegate.h"
#endif
#include <Models/AuSite.h>
#include <Models/eBaySite.h>
#include <Models/eBayMessaging.h>
......@@ -1888,13 +1892,15 @@ AuCallFn call_fns[INVALID] = {NULL,
{
int half_secs = 10;
// XXX: iPhone specific
#if TARGET_OS_IPHONE
MobileAuctionsAppDelegate *appDelegate = (MobileAuctionsAppDelegate *)[[UIApplication sharedApplication] delegate];
#endif
if([self isCancelled])
return;
// XXX: iPhone specific
#if TARGET_OS_IPHONE
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
while([[appDelegate reach] currentReachabilityStatus] == NotReachable && --half_secs)
......@@ -1909,14 +1915,16 @@ AuCallFn call_fns[INVALID] = {NULL,
[call_delegate performSelectorOnMainThread:@selector(auctionCallDidFailWithError:) withObject:[NSDictionary dictionaryWithObjectsAndKeys:@"You do not have Internet connectivity.",@"message",[NSNumber numberWithInt:call_no],@"call",nil] waitUntilDone:NO];
return;
}
#endif
#ifdef DEBUG
NSLog(@"About to call %@ with data: %@", AuXCallNames[call_no], (call_no == AuUploadPicture ? [call_data objectForKey:@"site"] : call_data));
#endif
call_fns[call_no](self, call_data);
// XXX: iPhone specific
#if TARGET_OS_IPHONE
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
#endif
}
@end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment