]> git.saurik.com Git - cydia.git/commitdiff
Add JavaScript interface to get sources.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 19 Feb 2011 14:19:23 +0000 (06:19 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 19 Feb 2011 14:19:23 +0000 (06:19 -0800)
MobileCydia.mm

index 22c6db4948e36e6a634f98f3e1791590eb7cdd41..17fbf39d2baa9051e0eb48a08f7a279c535bbd3b 100644 (file)
@@ -3912,6 +3912,8 @@ static NSString *Warning_;
         return @"du";
     else if (selector == @selector(stringWithFormat:arguments:))
         return @"format";
+    else if (selector == @selector(getAllSources))
+        return @"getAllSourcs";
     else if (selector == @selector(getInstalledPackages))
         return @"getInstalledPackages";
     else if (selector == @selector(getPackageById:))
@@ -3958,6 +3960,10 @@ static NSString *Warning_;
     [delegate_ performSelectorOnMainThread:@selector(syncData) withObject:nil waitUntilDone:NO];
 }
 
+- (NSArray *) getAllSources {
+    return [[Database sharedInstance] sources];
+}
+
 - (NSArray *) getInstalledPackages {
     NSArray *packages([[Database sharedInstance] packages]);
     NSMutableArray *installed([NSMutableArray arrayWithCapacity:1024]);