Changeset 5820


Ignore:
Timestamp:
May 12, 2008, 4:39:32 PM (14 years ago)
Author:
livings124
Message:

mac build compiles

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/PrefsController.m

    r5742 r5820  
    249249    int port = [sender intValue];
    250250    [fDefaults setInteger: port forKey: @"BindPort"];
    251     tr_setBindPort(fHandle, port);
     251    tr_sessionSetPublicPort(fHandle, port);
    252252   
    253253    fPublicPort = -1;
     
    257257- (void) setNat: (id) sender
    258258{
    259     tr_natTraversalEnable(fHandle, [fDefaults boolForKey: @"NatTraversal"]);
     259    tr_sessionSetPortForwardingEnabled(fHandle, [fDefaults boolForKey: @"NatTraversal"]);
    260260   
    261261    fNatStatus = -1;
     
    351351    int count = [sender intValue];
    352352    [fDefaults setInteger: count forKey: @"PeersTotal"];
    353     tr_setGlobalPeerLimit(fHandle, count);
     353    tr_sessionSetPeerLimit(fHandle, count);
    354354}
    355355
     
    362362- (void) setPEX: (id) sender
    363363{
    364     tr_setPexEnabled(fHandle, [fDefaults boolForKey: @"PEXGlobal"]);
     364    tr_sessionSetPexEnabled(fHandle, [fDefaults boolForKey: @"PEXGlobal"]);
    365365}
    366366
    367367- (void) setEncryptionMode: (id) sender
    368368{
    369     tr_setEncryptionMode(fHandle, [fDefaults boolForKey: @"EncryptionPrefer"] ?
     369    tr_sessionSetEncryption(fHandle, [fDefaults boolForKey: @"EncryptionPrefer"] ?
    370370        ([fDefaults boolForKey: @"EncryptionRequire"] ? TR_ENCRYPTION_REQUIRED : TR_ENCRYPTION_PREFERRED) : TR_PLAINTEXT_PREFERRED);
    371371}
     
    410410    if ([fDefaults boolForKey: @"SpeedLimit"])
    411411    {
    412         tr_setUseGlobalSpeedLimit(fHandle, TR_UP, 1);
    413         tr_setGlobalSpeedLimit(fHandle, TR_UP, [fDefaults integerForKey: @"SpeedLimitUploadLimit"]);
    414        
    415         tr_setUseGlobalSpeedLimit(fHandle, TR_DOWN, 1);
    416         tr_setGlobalSpeedLimit(fHandle, TR_DOWN, [fDefaults integerForKey: @"SpeedLimitDownloadLimit"]);
     412        tr_sessionSetSpeedLimitEnabled(fHandle, TR_UP, 1);
     413        tr_sessionSetSpeedLimit(fHandle, TR_UP, [fDefaults integerForKey: @"SpeedLimitUploadLimit"]);
     414       
     415        tr_sessionSetSpeedLimitEnabled(fHandle, TR_DOWN, 1);
     416        tr_sessionSetSpeedLimit(fHandle, TR_DOWN, [fDefaults integerForKey: @"SpeedLimitDownloadLimit"]);
    417417    }
    418418    else
    419419    {
    420         tr_setUseGlobalSpeedLimit(fHandle, TR_UP, [fDefaults boolForKey: @"CheckUpload"]);
    421         tr_setGlobalSpeedLimit(fHandle, TR_UP, [fDefaults integerForKey: @"UploadLimit"]);
    422        
    423         tr_setUseGlobalSpeedLimit(fHandle, TR_DOWN, [fDefaults boolForKey: @"CheckDownload"]);
    424         tr_setGlobalSpeedLimit(fHandle, TR_DOWN, [fDefaults integerForKey: @"DownloadLimit"]);
     420        tr_sessionSetSpeedLimitEnabled(fHandle, TR_UP, [fDefaults boolForKey: @"CheckUpload"]);
     421        tr_sessionSetSpeedLimit(fHandle, TR_UP, [fDefaults integerForKey: @"UploadLimit"]);
     422       
     423        tr_sessionSetSpeedLimitEnabled(fHandle, TR_DOWN, [fDefaults boolForKey: @"CheckDownload"]);
     424        tr_sessionSetSpeedLimit(fHandle, TR_DOWN, [fDefaults integerForKey: @"DownloadLimit"]);
    425425    }
    426426}
  • trunk/macosx/Torrent.m

    r5814 r5820  
    421421{
    422422    if (count > 0)
    423         tr_torrentSetMaxConnectedPeers(fHandle, count);
     423        tr_torrentSetPeerLimit(fHandle, count);
    424424}
    425425
    426426- (uint16_t) maxPeerConnect
    427427{
    428     return tr_torrentGetMaxConnectedPeers(fHandle);
     428    return tr_torrentGetPeerLimit(fHandle);
    429429}
    430430
     
    15691569    tr_ctor * ctor = tr_ctorNew(lib);
    15701570    tr_ctorSetPaused(ctor, TR_FORCE, YES);
    1571     tr_ctorSetMaxConnectedPeers(ctor, TR_FALLBACK, [fDefaults integerForKey: @"PeersTorrent"]);
     1571    tr_ctorSetPeerLimit(ctor, TR_FALLBACK, [fDefaults integerForKey: @"PeersTorrent"]);
    15721572   
    15731573    tr_info info;
Note: See TracChangeset for help on using the changeset viewer.