Changeset 6010


Ignore:
Timestamp:
Jun 3, 2008, 4:20:21 PM (14 years ago)
Author:
livings124
Message:

mac: implement rpc started, stopped, and updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r5982 r6010  
    16821682   
    16831683    [self updateTorrentsInQueue];
     1684   
     1685    #warning perhaps check if torrent is selected in inspector
    16841686    [fInfoController updateInfoStats];
    16851687    [fInfoController updateOptions];
     
    41794181                [[NSValue valueWithPointer: torrentStruct] retain] waitUntilDone: NO];
    41804182            break;
     4183       
     4184        case TR_RPC_TORRENT_REMOVING:
     4185            [self performSelectorOnMainThread: @selector(rpcStartedStoppedTorrent:) withObject: torrent waitUntilDone: NO];
     4186            break;
     4187       
    41814188        case TR_RPC_TORRENT_STARTED:
    4182             break;
    41834189        case TR_RPC_TORRENT_STOPPED:
    4184             break;
    4185         case TR_RPC_TORRENT_REMOVING:
    41864190            [self performSelectorOnMainThread: @selector(rpcRemoveTorrent:) withObject: torrent waitUntilDone: NO];
    41874191            break;
     4192       
    41884193        case TR_RPC_TORRENT_CHANGED:
     4194            [self performSelectorOnMainThread: @selector(rpcChangedTorrent:) withObject: torrent waitUntilDone: NO];
    41894195            break;
     4196       
    41904197        case TR_RPC_SESSION_CHANGED:
    41914198            break;
     4199       
     4200        default:
     4201            NSLog(@"Unknown RPC command received!");
    41924202    }
    41934203   
     
    42214231}
    42224232
     4233- (void) rpcStartedStoppedTorrent: (Torrent *) torrent
     4234{
     4235    [torrent update];
     4236    [torrent release];
     4237   
     4238    [self updateUI];
     4239    [self applyFilter: nil];
     4240    [self updateTorrentHistory];
     4241}
     4242
     4243- (void) rpcChangedTorrent: (Torrent *) torrent
     4244{
     4245    [torrent update];
     4246    [torrent release];
     4247   
     4248    #warning check if torrent is selected?
     4249    [fInfoController updateInfoStats];
     4250    [fInfoController updateOptions];
     4251}
     4252
    42234253@end
Note: See TracChangeset for help on using the changeset viewer.