diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-22 18:11:25 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-22 18:21:11 -0800 |
commit | 4ede7a3fbf5146f4eff4e7eb5293ca5696d4d1c7 (patch) | |
tree | af5f1c28af20a8096ff75c26a8fa5f5860900ee2 /MobileCydia.mm | |
parent | 83b78e5f9642d8a57b6ff3549815e57fd8e1ed40 (diff) |
Export CydiaProgressEvent to JavaScript.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 88efb14..67c8714 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -1366,6 +1366,23 @@ typedef std::map< unsigned long, _H<Source> > SourceMap; return event; } ++ (NSArray *) _attributeKeys { + return [NSArray arrayWithObjects: + @"message", + @"package", + @"type", + @"uri", + nil]; +} + +- (NSArray *) attributeKeys { + return [[self class] _attributeKeys]; +} + ++ (BOOL) isKeyExcludedFromWebScript:(const char *)name { + return ![[self _attributeKeys] containsObject:[NSString stringWithUTF8String:name]] && [super isKeyExcludedFromWebScript:name]; +} + - (id) initWithMessage:(NSString *)message ofType:(NSString *)type { if ((self = [super init]) != nil) { message_ = message; |