diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-19 06:19:23 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-19 06:19:23 -0800 |
commit | 5c32f89eceebdb0cc215134529145762a9951f51 (patch) | |
tree | 316a9a417e4abdb0efe224110e0f1dbf6cf2a392 | |
parent | a1d85d421fcc2a6eca784ddbcef8a03280189f9c (diff) |
Add JavaScript interface to get sources.
-rw-r--r-- | MobileCydia.mm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 22c6db4..17fbf39 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]); |