summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MobileCydia.mm15
-rw-r--r--iPhonePrivate.h2
2 files changed, 17 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]);
diff --git a/iPhonePrivate.h b/iPhonePrivate.h
index 06aff31..2c9239c 100644
--- a/iPhonePrivate.h
+++ b/iPhonePrivate.h
@@ -438,6 +438,8 @@ extern float const UIWebViewScalesToFitScale;
extern "C" void *reboot2(uint64_t flags);
extern "C" mach_port_t SBSSpringBoardServerPort();
extern "C" int SBBundlePathForDisplayIdentifier(mach_port_t port, const char *identifier, char *path);
+extern "C" NSSet *SBSCopyDisplayIdentifiers();
+extern "C" NSString *SBSCopyLocalizedApplicationNameForDisplayIdentifier(NSString *);
extern "C" UIImage *_UIImageWithName(NSString *name);
extern "C" void UISetColor(CGColorRef color);
// }}}