]> git.saurik.com Git - cydia.git/commitdiff
Add cydia.isReachable().
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 23 Mar 2011 01:25:27 +0000 (18:25 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 23 Mar 2011 01:25:27 +0000 (18:25 -0700)
MobileCydia.mm

index a2d4333487ac43c5392ee2c8887c75b88c5048d3..1b58d398b950743bdaef26534070211ee5d78880 100644 (file)
@@ -4127,6 +4127,8 @@ static _H<NSMutableSet> 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<NSMutableSet> 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];
 }