++ (CydiaProgressEvent *) eventWithMessage:(NSString *)message ofType:(NSString *)type forItem:(pkgAcquire::ItemDesc &)item {
+ CydiaProgressEvent *event([self eventWithMessage:message ofType:type]);
+
+ NSString *description([NSString stringWithUTF8String:item.Description.c_str()]);
+ NSArray *fields([description componentsSeparatedByString:@" "]);
+ [event setItem:fields];
+
+ if ([fields count] > 3) {
+ [event setPackage:[fields objectAtIndex:2]];
+ [event setVersion:[fields objectAtIndex:3]];
+ }
+
+ [event setURL:[NSString stringWithUTF8String:item.URI.c_str()]];
+
+ return event;
+}
+