summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2015-07-11 22:09:58 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2015-07-11 22:09:58 -0700
commit375a4481b21835983ea4f32bd1847a46c1038c68 (patch)
treef4c134e0149e997c3845fad316019eb4810057e1 /MobileCydia.mm
parent19cd1e0dd593ae7738eda5f6a3ba90cea4524e2a (diff)
Add some info on installed applications to bridge.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm15
1 files changed, 15 insertions, 0 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 8038ce5..fc3598b 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -4461,6 +4461,10 @@ static _H<NSMutableSet> Diversions_;
return @"getAllSources";
else if (selector == @selector(getApplicationInfo:value:))
return @"getApplicationInfoValue";
+ else if (selector == @selector(getDisplayIdentifiers))
+ return @"getDisplayIdentifiers";
+ else if (selector == @selector(getLocalizedNameForDisplayIdentifier:))
+ return @"getLocalizedNameForDisplayIdentifier";
else if (selector == @selector(getKernelNumber:))
return @"getKernelNumber";
else if (selector == @selector(getKernelString:))
@@ -4577,6 +4581,17 @@ static _H<NSMutableSet> Diversions_;
return [info objectForKey:key];
}
+- (NSArray *) getDisplayIdentifiers {
+ NSSet *set([SBSCopyDisplayIdentifiers() autorelease]);
+ if (set == nil || ![set isKindOfClass:[NSSet class]])
+ return [NSArray array];
+ return [set allObjects];
+}
+
+- (NSString *) getLocalizedNameForDisplayIdentifier:(NSString *)identifier {
+ return [SBSCopyLocalizedApplicationNameForDisplayIdentifier(identifier) autorelease] ?: (id) [NSNull null];
+}
+
- (NSNumber *) getKernelNumber:(NSString *)name {
const char *string([name UTF8String]);