From: Jay Freeman (saurik) Date: Sat, 19 Feb 2011 14:19:23 +0000 (-0800) Subject: Add JavaScript interface to get sources. X-Git-Tag: v1.1.0%b1~294 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/5c32f89eceebdb0cc215134529145762a9951f51 Add JavaScript interface to get sources. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 22c6db49..17fbf39d 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -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]);