From 491da292f856cdcf53a3bb55da97186a32603935 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Wed, 18 Jul 2007 02:57:44 +0000 Subject: [PATCH] set another ipc method --- macosx/Controller.m | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index 2629e0329..bb294650e 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -3224,15 +3224,16 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy return [fTorrents count] > oldCount; } -- (BOOL) ipcAddTorrentFile: (NSString *) path - directory: (NSString *) dir +- (BOOL) ipcAddTorrentFile: (NSString *) path directory: (NSString *) directory { - return NO; + int oldCount = [fTorrents count]; + + [self openFiles: [NSArray arrayWithObject: path] forcePath: directory ignoreDownloadFolder: NO forceDeleteTorrent: NO]; + + return [fTorrents count] > oldCount; } -- (BOOL) ipcAddTorrentFileAutostart: (NSString *) path - directory: (NSString *) dir - autostart: (BOOL) autostart +- (BOOL) ipcAddTorrentFileAutostart: (NSString *) path directory: (NSString *) directory autostart: (BOOL) autostart { /* 'path' is path to torrent file, 'dir' is the directory it should download it's files to and may be nil, 'autostart' is a @@ -3242,20 +3243,17 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy return NO; } -- (BOOL) ipcAddTorrentData: (NSData *) data - directory: (NSString *) dir +- (BOOL) ipcAddTorrentData: (NSData *) data directory: (NSString *) directory { - /* 'data' is the contents of a torrent file, 'dir' is the + /* 'data' is the contents of a torrent file, 'directory' is the directory it should download it's files to and may be nil, should return NO if torrent fails to load */ return NO; } -- (BOOL) ipcAddTorrentDataAutostart: (NSData *) path - directory: (NSString *) dir - autostart: (BOOL) autostart +- (BOOL) ipcAddTorrentDataAutostart: (NSData *) path directory: (NSString *) directory autostart: (BOOL) autostart { - /* 'data' is the contents of a torrent file, 'dir' is the + /* 'data' is the contents of a torrent file, 'directory' is the directory it should download it's files to and may be nil, 'autostart' is a boolean indicating if the torrent should be automatically started (or queued to start, I guess), should