Ignore:
Timestamp:
08/15/08 15:50:02 (12 years ago)
Author:
Eoin
Message:

Updating halConfig serialization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/halTorrent.cpp

    r531 r541  
    157157} 
    158158 
    159 bool bit::ensure_dht_on() 
    160 { 
    161         return pimpl->ensure_dht_on(); 
     159bool bit::ensure_dht_on(const hal::dht_settings& dht) 
     160{ 
     161        return pimpl->ensure_dht_on(dht); 
    162162} 
    163163 
     
    165165{ 
    166166        pimpl->ensure_dht_off(); 
    167 } 
    168  
    169 void bit::set_dht_settings(int max_peers_reply, int search_branching,  
    170         int service_port, int max_fail_count) 
    171 { 
    172         pimpl->set_dht_settings(max_peers_reply, search_branching, service_port, max_fail_count); 
    173167} 
    174168 
     
    220214#ifndef TORRENT_DISABLE_ENCRYPTION       
    221215 
    222 void bit::ensure_pe_on(int enc_level, int in_enc_policy, int out_enc_policy, bool prefer_rc4) 
    223 { 
    224         pimpl->ensure_pe_on(enc_level, in_enc_policy, out_enc_policy, prefer_rc4); 
     216void bit::ensure_pe_on(const pe_settings& pe) 
     217{ 
     218        pimpl->ensure_pe_on(pe); 
    225219} 
    226220 
     
    286280} 
    287281 
    288 void bit::setTorrentDefaults(int maxConn, int maxUpload, float download, float upload) 
    289 { 
    290         pimpl->defTorrentMaxConn_ = maxConn; 
    291         pimpl->defTorrentMaxUpload_ = maxUpload; 
     282void bit::set_torrent_defaults(const connections& defaults) 
     283{ 
     284        pimpl->defTorrentMaxConn_ = defaults.total; 
     285        pimpl->defTorrentMaxUpload_ = defaults.uploads; 
    292286 
    293287        event_log.post(shared_ptr<EventDetail>(new EventMsg( 
    294                 hal::wform(L"Set torrent connections total %1% and uploads %2%.") % maxConn % maxUpload))); 
    295  
    296         pimpl->defTorrentDownload_ = download; 
    297         pimpl->defTorrentUpload_ = upload; 
     288                hal::wform(L"Set torrent connections total %1% and uploads %2%.")  
     289                        % defaults.total % defaults.uploads))); 
     290 
     291        pimpl->defTorrentDownload_ = defaults.download_rate; 
     292        pimpl->defTorrentUpload_ = defaults.upload_rate; 
    298293 
    299294        event_log.post(shared_ptr<EventDetail>(new EventMsg( 
    300                 hal::wform(L"Set torrent default rates at %1$.2fkb/s down and %2$.2fkb/s upload.") % download % upload))); 
     295                hal::wform(L"Set torrent default rates at %1$.2fkb/s down and %2$.2fkb/s upload.")  
     296                        % defaults.download_rate % defaults.upload_rate))); 
    301297} 
    302298 
Note: See TracChangeset for help on using the changeset viewer.