Expose the package downloading to js. Todo: cancel support, status callbacks.

This commit is contained in:
Paul Chote
2010-11-19 11:17:47 +13:00
parent cb93955cc5
commit c3521a2490
6 changed files with 83 additions and 18 deletions

View File

@@ -90,6 +90,12 @@
[game launchMod:mod];
}
- (BOOL)downloadUrl:(NSString *)url intoCache:(NSString *)filename withId:(NSString *)key
{
id path = [[@"~/Library/Application Support/OpenRA/Downloads/" stringByAppendingPathComponent:filename] stringByExpandingTildeInPath];
return [game downloadUrl:url toPath:path withId:key];
}
#pragma mark Sidebar Datasource and Delegate
- (int)outlineView:(NSOutlineView *)anOutlineView numberOfChildrenOfItem:(id)item
{