From 4ede7a3fbf5146f4eff4e7eb5293ca5696d4d1c7 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 22 Feb 2011 18:11:25 -0800 Subject: [PATCH] Export CydiaProgressEvent to JavaScript. --- MobileCydia.mm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/MobileCydia.mm b/MobileCydia.mm index 88efb14f..67c87148 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -1366,6 +1366,23 @@ typedef std::map< unsigned long, _H > 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; -- 2.47.2