From 518a552a416971e57e565b3942104a988294c3fd Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 22 Mar 2011 18:25:27 -0700 Subject: Add cydia.isReachable(). --- MobileCydia.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MobileCydia.mm b/MobileCydia.mm index a2d4333..1b58d39 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -4127,6 +4127,8 @@ static _H Diversions_; return @"getSessionValue"; else if (selector == @selector(installPackages:)) return @"installPackages"; + else if (selector == @selector(isReachable:)) + return @"isReachable"; else if (selector == @selector(localizedStringForKey:value:table:)) return @"localize"; else if (selector == @selector(popViewController:)) @@ -4437,6 +4439,10 @@ static _H Diversions_; [indirect_ performSelectorOnMainThread:@selector(close) withObject:nil waitUntilDone:NO]; } +- (NSNumber *) isReachable:(NSString *)name { + return [NSNumber numberWithBool:IsReachable([name UTF8String])]; +} + - (void) installPackages:(NSArray *)packages { [delegate_ performSelectorOnMainThread:@selector(installPackages:) withObject:packages waitUntilDone:NO]; } -- cgit v1.2.3