Ignore:
Timestamp:
05/22/08 17:19:57 (12 years ago)
Author:
Eoin
Message:

Refactoring trackers and file_priorities to properties.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/halTorrent.hpp

    r455 r456  
    3636 
    3737 
     38//#if BOOST_VERSION < 103500 
    3839#include <asio/ip/tcp.hpp> 
    3940#include <asio/ip/udp.hpp> 
     41//#else 
     42//#include <boost/asio/ip/tcp.hpp> 
     43//#include <boost/asio/ip/udp.hpp> 
     44//#endif 
    4045 
    4146#include "halTypes.hpp" 
     
    415420typedef std::pair<float, float> float_pair; 
    416421typedef std::pair<int, int> int_pair; 
     422typedef std::pair<std::vector<int>, int> vec_int_pair; 
    417423 
    418424class bit_impl; 
     
    491497                void set_tracker_login(const std::pair<wstring, wstring>&); 
    492498 
     499                std::vector<tracker_detail> get_trackers() const; 
     500                void set_trackers(const std::vector<tracker_detail>&); 
     501 
    493502                bool get_is_active() const; 
    494503                bool get_in_session() const; 
     504 
     505                void set_file_priorities(const vec_int_pair&); 
    495506 
    496507        public: 
     
    516527                        get_in_session, in_session); 
    517528 
     529                STLSOFT_METHOD_PROPERTY_GETSET_EXTERNAL(std::vector<tracker_detail>, const std::vector<tracker_detail>&,  
     530                        class_type, get_trackers, set_trackers, trackers); 
     531 
     532                STLSOFT_METHOD_PROPERTY_SET_EXTERNAL(const vec_int_pair&, class_type,  
     533                        set_file_priorities, file_priorities); 
     534 
     535                void reset_trackers(); 
     536 
    518537                bool is_open() const; 
     538 
    519539 
    520540        private: 
     
    618638        void removeTorrentWipeFiles(const std::string& filename); 
    619639        void removeTorrentWipeFiles(const std::wstring&  filename); 
    620          
     640/*       
    621641        void setTorrentTrackers(const std::string& filename, const std::vector<tracker_detail>& trackers); 
    622642        void setTorrentTrackers(const std::wstring& filename, const std::vector<tracker_detail>& trackers); 
     
    628648        void setTorrentFilePriorities(const std::string& filename, std::vector<int> fileIndices, int priority); 
    629649        void setTorrentFilePriorities(const std::wstring& filename, std::vector<int> fileIndices, int priority); 
    630  
     650*/ 
    631651        void startEventReceiver(); 
    632652        void stopEventReceiver(); 
Note: See TracChangeset for help on using the changeset viewer.