Changeset 460
- Timestamp:
- 05/29/08 13:01:39 (12 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/res/Halite.rc
r459 r460 265 265 END 266 266 267 IDD_NEWTORRENT DIALOGEX 0,0,229,132268 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILDWINDOW | WS_CLIPCHILDREN269 CAPTION "Files"270 FONT 8,"MS Shell Dlg",400,0,1271 BEGIN272 // PUSHBUTTON "Save",IDOK,130,114,45,14,BS_DEFPUSHBUTTON273 // PUSHBUTTON "Cancel",IDCANCEL,180,114,45,14274 LTEXT "Select a file or directory from which to construct the torrent.",IDC_NEWTORRENT_SELECT_TEXT,4,4,221,11,SS_WORDELLIPSIS|SS_CENTERIMAGE275 PUSHBUTTON "File",IDC_NEWT_FILE_BROWSE,212,14,40,13276 PUSHBUTTON "Dir.",IDC_NEWT_DIR_BROWSE,212,14,40,13277 LISTBOX IDC_NEWT_LISTTRACKERS,4,57,221,52,WS_TABSTOP|WS_VSCROLL|LBS_NOINTEGRALHEIGHT|LBS_SORT|NOT WS_VISIBLE278 CONTROL "",IDC_NEWT_LISTFILES,"SysListView32",WS_TABSTOP | WS_BORDER | LVS_ALIGNLEFT | LVS_REPORT,4,7,296,59279 LTEXT "Enter the tracker URLs for the torrent.",IDC_NEWTORRENT_TRACKERS_TEXT,4,32,221,11,NOT WS_VISIBLE280 EDITTEXT IDC_NEWT_TRACKER,4,42,193,12,ES_AUTOHSCROLL|NOT WS_VISIBLE281 // AUTOCHECKBOX "Have Halite acts a DHT node.",IDC_NEWT_DHTNODE,4,116,118,8,WS_DISABLED282 AUTOCHECKBOX "Private",IDC_NEWTORRENT_PRIVATE,4,116,118,8283 PUSHBUTTON "Add",IDC_NEWT_ADDTRACKER,202,41,23,13,NOT WS_VISIBLE284 LTEXT "Comment",IDC_NEWTORRENT_COMMENT_TEXT,4,4,50,11,SS_WORDELLIPSIS|SS_CENTERIMAGE285 EDITTEXT IDC_NEWTORRENT_COMMENT,4,15,203,12,ES_AUTOHSCROLL286 LTEXT "Creator",IDC_NEWTORRENT_CREATOR_TEXT,4,4,50,11,SS_WORDELLIPSIS|SS_CENTERIMAGE287 EDITTEXT IDC_NEWTORRENT_CREATOR,4,15,203,12,ES_AUTOHSCROLL288 LTEXT "Output File",IDC_NEWT_OUTFILE_TEXT,4,4,50,11,SS_WORDELLIPSIS|SS_CENTERIMAGE289 EDITTEXT IDC_NEWT_FILE,4,15,203,12,ES_AUTOHSCROLL290 PUSHBUTTON "...",IDC_NEWT_OUT_BROWSE,212,14,18,13291 END292 293 IDD_NEWT_TRACKERS DIALOGEX 0,0,229,132294 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILDWINDOW | WS_CLIPCHILDREN295 CAPTION "Trackers"296 FONT 8,"MS Shell Dlg",400,0,1297 BEGIN298 CONTROL "",IDC_NEWT_LISTTRACKERS,"SysListView32",WS_TABSTOP | WS_BORDER | LVS_ALIGNLEFT | LVS_REPORT,4,7,296,59299 // LISTBOX IDC_NEWT_LISTTRACKERS,4,57,221,52,WS_TABSTOP|WS_VSCROLL|LBS_NOINTEGRALHEIGHT|LBS_SORT300 LTEXT "Enter the tracker URLs for the torrent.",IDC_NEWTORRENT_TRACKERS_TEXT,4,32,221,11,SS_WORDELLIPSIS|SS_CENTERIMAGE301 EDITTEXT IDC_NEWT_TRACKER,4,42,160,12,ES_AUTOHSCROLL|NOT WS_VISIBLE302 EDITTEXT IDC_NEWT_TRACKERTIER,170,42,25,12,ES_AUTOHSCROLL|ES_NUMBER|NOT WS_VISIBLE303 PUSHBUTTON "Add",IDC_NEWT_ADDTRACKER,202,41,23,13,NOT WS_VISIBLE304 END305 306 IDD_NEWT_PEERS DIALOGEX 0,0,229,132307 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILDWINDOW | WS_CLIPCHILDREN308 CAPTION "Web Seeds and DHT Nodes"309 FONT 8,"MS Shell Dlg",400,0,1310 BEGIN311 CONTROL "",IDC_NEWT_LISTPEERS,"SysListView32",WS_TABSTOP | WS_BORDER | LVS_ALIGNLEFT | LVS_REPORT,4,7,296,59312 // LISTBOX IDC_NEWT_LISTTRACKERS,4,57,221,52,WS_TABSTOP|WS_VSCROLL|LBS_NOINTEGRALHEIGHT|LBS_SORT313 LTEXT "Enter any Web Seed URLs and DHT Nodes.",IDC_NEWTORRENT_PEERS_TEXT,4,32,221,11,SS_WORDELLIPSIS|SS_CENTERIMAGE314 END315 316 267 IDD_CLOSESPLASH DIALOGEX 0,0,191,74 317 268 STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_THICKFRAME … … 455 406 AUTOCHECKBOX "Log to file.",IDC_DEBUGFILECHECK,4,69,44,9 456 407 AUTOCHECKBOX "Log debug events.",IDC_DEBUGDEBUGCHECK,48,69,198,9 408 END 409 410 IDD_NEWTORRENT DIALOGEX 0,0,229,132 411 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILDWINDOW | WS_CLIPCHILDREN 412 CAPTION "Files" 413 FONT 8,"MS Shell Dlg",400,0,1 414 BEGIN 415 // PUSHBUTTON "Save",IDOK,130,114,45,14,BS_DEFPUSHBUTTON 416 // PUSHBUTTON "Cancel",IDCANCEL,180,114,45,14 417 LTEXT "Select a file or directory from which to construct the torrent.",IDC_NEWTORRENT_SELECT_TEXT,4,4,221,11,SS_WORDELLIPSIS|SS_CENTERIMAGE 418 PUSHBUTTON "File",IDC_NEWT_FILE_BROWSE,212,14,40,13 419 PUSHBUTTON "Dir.",IDC_NEWT_DIR_BROWSE,212,14,40,13 420 LISTBOX IDC_NEWT_LISTTRACKERS,4,57,221,52,WS_TABSTOP|WS_VSCROLL|LBS_NOINTEGRALHEIGHT|LBS_SORT|NOT WS_VISIBLE 421 CONTROL "",IDC_NEWT_LISTFILES,"SysListView32",WS_TABSTOP | WS_BORDER | LVS_ALIGNLEFT | LVS_REPORT,4,7,296,59 422 LTEXT "Enter the tracker URLs for the torrent.",IDC_NEWTORRENT_TRACKERS_TEXT,4,32,221,11,NOT WS_VISIBLE 423 EDITTEXT IDC_NEWT_TRACKER,4,42,193,12,ES_AUTOHSCROLL|NOT WS_VISIBLE 424 // AUTOCHECKBOX "Have Halite acts a DHT node.",IDC_NEWT_DHTNODE,4,116,118,8,WS_DISABLED 425 AUTOCHECKBOX "Private",IDC_NEWTORRENT_PRIVATE,4,116,118,8 426 PUSHBUTTON "Add",IDC_NEWT_ADDTRACKER,202,41,23,13,NOT WS_VISIBLE 427 LTEXT "Comment",IDC_NEWTORRENT_COMMENT_TEXT,4,4,50,11,SS_WORDELLIPSIS|SS_CENTERIMAGE 428 EDITTEXT IDC_NEWTORRENT_COMMENT,4,15,203,12,ES_AUTOHSCROLL 429 LTEXT "Creator",IDC_NEWTORRENT_CREATOR_TEXT,4,4,50,11,SS_WORDELLIPSIS|SS_CENTERIMAGE 430 EDITTEXT IDC_NEWTORRENT_CREATOR,4,15,203,12,ES_AUTOHSCROLL 431 LTEXT "Output File",IDC_NEWT_OUTFILE_TEXT,4,4,50,11,SS_WORDELLIPSIS|SS_CENTERIMAGE 432 EDITTEXT IDC_NEWT_FILE,4,15,203,12,ES_AUTOHSCROLL 433 PUSHBUTTON "...",IDC_NEWT_OUT_BROWSE,212,14,18,13 434 END 435 436 IDD_NEWT_FILES DIALOGEX 0,0,186,50 437 STYLE DS_SETFONT | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME 438 EXSTYLE WS_EX_TOOLWINDOW 439 CAPTION "Add New Tracker" 440 FONT 8,"MS Shell Dlg",400,0,1 441 BEGIN 442 LTEXT "Select a file or directory from which to construct the torrent.",IDC_NEWTORRENT_SELECT_TEXT,4,4,221,11,SS_WORDELLIPSIS|SS_CENTERIMAGE 443 PUSHBUTTON "File",IDC_NEWT_FILE_BROWSE,212,14,40,13 444 PUSHBUTTON "Dir.",IDC_NEWT_DIR_BROWSE,212,14,40,13 445 LISTBOX IDC_NEWT_LISTTRACKERS,4,57,221,52,WS_TABSTOP|WS_VSCROLL|LBS_NOINTEGRALHEIGHT|LBS_SORT|NOT WS_VISIBLE 446 CONTROL "",IDC_NEWT_LISTFILES,"SysListView32",WS_TABSTOP | WS_BORDER | LVS_ALIGNLEFT | LVS_REPORT,4,7,296,59 447 END 448 449 IDD_NEWT_TRACKERS DIALOGEX 0,0,229,132 450 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILDWINDOW | WS_CLIPCHILDREN 451 CAPTION "Trackers" 452 FONT 8,"MS Shell Dlg",400,0,1 453 BEGIN 454 CONTROL "",IDC_NEWT_LISTTRACKERS,"SysListView32",WS_TABSTOP | WS_BORDER | LVS_ALIGNLEFT | LVS_REPORT,4,7,296,59 455 // LISTBOX IDC_NEWT_LISTTRACKERS,4,57,221,52,WS_TABSTOP|WS_VSCROLL|LBS_NOINTEGRALHEIGHT|LBS_SORT 456 LTEXT "Enter the tracker URLs for the torrent.",IDC_NEWTORRENT_TRACKERS_TEXT,4,32,221,11,SS_WORDELLIPSIS|SS_CENTERIMAGE 457 EDITTEXT IDC_NEWT_TRACKER,4,42,160,12,ES_AUTOHSCROLL|NOT WS_VISIBLE 458 EDITTEXT IDC_NEWT_TRACKERTIER,170,42,25,12,ES_AUTOHSCROLL|ES_NUMBER|NOT WS_VISIBLE 459 PUSHBUTTON "Add",IDC_NEWT_ADDTRACKER,202,41,23,13,NOT WS_VISIBLE 460 END 461 462 IDD_NEWT_PEERS DIALOGEX 0,0,229,132 463 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILDWINDOW | WS_CLIPCHILDREN 464 CAPTION "Web Seeds and DHT Nodes" 465 FONT 8,"MS Shell Dlg",400,0,1 466 BEGIN 467 CONTROL "",IDC_NEWT_LISTPEERS,"SysListView32",WS_TABSTOP | WS_BORDER | LVS_ALIGNLEFT | LVS_REPORT,4,7,296,59 468 // LISTBOX IDC_NEWT_LISTTRACKERS,4,57,221,52,WS_TABSTOP|WS_VSCROLL|LBS_NOINTEGRALHEIGHT|LBS_SORT 469 LTEXT "Enter any Web Seed URLs and DHT Nodes.",IDC_NEWTORRENT_PEERS_TEXT,4,32,221,11,SS_WORDELLIPSIS|SS_CENTERIMAGE 457 470 END 458 471 -
trunk/res/resource.h
r425 r460 38 38 #define HAL_GENERIC_ADD_LV_MENU 136 39 39 #define IDD_PEEREDIT 137 40 #define IDD_NEWT_FILES 138 40 41 #define IDC_TRANS_SES 1004 41 42 #define IDC_TRANS_ETA 1005 -
trunk/src/HaliteListView.cpp
r459 r460 122 122 winstl::listview_sequence lv_seq(*this); 123 123 124 std::for_each(make_filter_iterator(&is_selected, lv_seq.begin(), lv_seq.end()),124 /* std::for_each(make_filter_iterator(&is_selected, lv_seq.begin(), lv_seq.end()), 125 125 make_filter_iterator(&is_selected, lv_seq.end(), lv_seq.end()), 126 126 bind((void (hal::bit::*)(const std::wstring&))&hal::bit::resumeTorrent, 127 127 &hal::bittorrent(), 128 128 bind(&hal::to_wstr_shim<const lv_val>, _1))); 129 129 */ 130 130 return 0; 131 131 } … … 136 136 winstl::listview_sequence lv_seq(*this); 137 137 138 std::for_each(make_filter_iterator(&is_selected, lv_seq.begin(), lv_seq.end()),138 /* std::for_each(make_filter_iterator(&is_selected, lv_seq.begin(), lv_seq.end()), 139 139 make_filter_iterator(&is_selected, lv_seq.end(), lv_seq.end()), 140 140 bind((void (hal::bit::*)(const std::wstring&))&hal::bit::pauseTorrent, 141 141 &hal::bittorrent(), 142 142 bind(&hal::to_wstr_shim<const lv_val>, _1))); 143 143 */ 144 144 return 0; 145 145 } … … 150 150 winstl::listview_sequence lv_seq(*this); 151 151 152 std::for_each(make_filter_iterator(&is_selected, lv_seq.begin(), lv_seq.end()),152 /* std::for_each(make_filter_iterator(&is_selected, lv_seq.begin(), lv_seq.end()), 153 153 make_filter_iterator(&is_selected, lv_seq.end(), lv_seq.end()), 154 154 bind((void (hal::bit::*)(const std::wstring&))&hal::bit::stopTorrent, 155 155 &hal::bittorrent(), 156 156 bind(&hal::to_wstr_shim<const lv_val>, _1))); 157 157 */ 158 158 return 0; 159 159 } … … 169 169 LRESULT HaliteListViewCtrl::OnRemove(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) 170 170 { 171 std::for_each(manager().allSelected().begin(), manager().allSelected().end(),171 /* std::for_each(manager().allSelected().begin(), manager().allSelected().end(), 172 172 bind((void (hal::bit::*)(const std::wstring&))&hal::bit::removeTorrent, 173 173 &hal::bittorrent(), _1)); 174 174 */ 175 175 clearSelected(); 176 176 return 0; … … 179 179 LRESULT HaliteListViewCtrl::OnRecheck(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) 180 180 { 181 std::for_each(manager().allSelected().begin(), manager().allSelected().end(),181 /* std::for_each(manager().allSelected().begin(), manager().allSelected().end(), 182 182 bind((void (hal::bit::*)(const std::wstring&))&hal::bit::recheckTorrent, 183 183 &hal::bittorrent(), _1)); 184 184 */ 185 185 return 0; 186 186 } … … 191 191 hal::app().res_wstr(HAL_HALITE).c_str(), MB_YESNO) == IDYES) 192 192 { 193 std::for_each(manager().allSelected().begin(), manager().allSelected().end(),193 /* std::for_each(manager().allSelected().begin(), manager().allSelected().end(), 194 194 bind((void (hal::bit::*)(const std::wstring&))&hal::bit::removeTorrentWipeFiles, 195 195 &hal::bittorrent(), _1)); 196 196 197 clearSelected();197 */ clearSelected(); 198 198 } 199 199 return 0; -
trunk/src/HaliteWindow.cpp
r459 r460 385 385 if (closeToTray && trayIcon_.IsHidden()) 386 386 { 387 ShowWindow(SW_MINIMIZE); 387 ShowWindow(SW_HIDE); 388 trayIcon_.Show(); 388 389 } 389 390 else … … 422 423 if (halite().showMessage()) 423 424 { 425 HAL_DEV_MSG(L"Showing SplashDialog"); 426 424 427 SplashDialog splDlg; 425 428 splDlg.DoModal(); 426 429 } 427 430 else 428 { 431 { 432 HAL_DEV_MSG(L"No SplashDialog"); 433 429 434 thread shutdown(bind(& HaliteWindow::ShutdownThread, this)); 430 435 shutdown.join(); 431 436 } 432 437 438 HAL_DEV_MSG(L"Posting Quit Message"); 433 439 PostQuitMessage(0); 434 440 } -
trunk/src/NewTorrentDialog.cpp
r438 r460 296 296 } 297 297 298 FilesSheet::CWindowMapStruct* FilesSheet::GetWindowMap() 299 { 300 BEGIN_WINDOW_MAP_INLINE(FilesSheet, 3, 3, 3, 3) 301 WMB_HEAD(WMB_COL(_exp)), 302 WMB_ROWNOMIN(_exp, NEWTORRENT_SELECT_LAYOUT), 303 WMB_END() 304 END_WINDOW_MAP_INLINE() 305 } 306 298 307 #define NEWTORRENT_TRACKERS_LAYOUT \ 299 308 WMB_HEAD(WMB_COLNOMIN(_exp), WMB_COL(_auto), WMB_COL(_auto)), \ -
trunk/src/NewTorrentDialog.hpp
r447 r460 179 179 }; 180 180 181 class FilesSheet : 182 public CPropertyPageImpl<FilesSheet>, 183 public CAutoSizeWindow<FilesSheet, false> 184 { 185 protected: 186 typedef FilesSheet thisClass; 187 typedef CPropertyPageImpl<thisClass> sheetClass; 188 typedef CAutoSizeWindow<thisClass, false> autosizeClass; 189 190 public: 191 enum { IDD = IDD_NEWT_TRACKERS }; 192 193 BEGIN_MSG_MAP_EX(thisClass) 194 MSG_WM_INITDIALOG(onInitDialog) 195 MSG_WM_DESTROY(OnDestroy) 196 197 CHAIN_MSG_MAP(autosizeClass) 198 CHAIN_MSG_MAP(sheetClass) 199 REFLECT_NOTIFICATIONS() 200 END_MSG_MAP() 201 202 static CWindowMapStruct* GetWindowMap(); 203 204 BOOL PreTranslateMessage(MSG* pMsg) 205 { 206 return this->IsDialogMessage(pMsg); 207 } 208 209 LRESULT onInitDialog(HWND, LPARAM) 210 { 211 trackerList_.Attach(GetDlgItem(IDC_NEWT_LISTTRACKERS)); 212 213 return 0; 214 } 215 216 void OnDestroy() {} 217 218 hal::tracker_details_t Trackers() const; 219 220 private: 221 NewTorrent_TrackerListViewCtrl trackerList_; 222 }; 223 181 224 class TrackerSheet : 182 225 public CPropertyPageImpl<TrackerSheet>, -
trunk/src/halTorrent.cpp
r459 r460 707 707 libt::file_pool f_pool; 708 708 709 scoped_ptr<libt::storage_interface> store(709 boost::scoped_ptr<libt::storage_interface> store( 710 710 libt::default_storage_constructor(t_info, to_utf8(params.root_path.string()), 711 711 f_pool)); … … 814 814 pimpl(new bit_impl()) 815 815 {} 816 817 #define HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH(FUNCTION) \ 818 catch (const libt::invalid_handle&) \ 819 {\ 820 event().post(shared_ptr<EventDetail>( \ 821 new EventInvalidTorrent(Event::critical, Event::invalidTorrent, name, std::string(FUNCTION)))); \ 822 }\ 823 catch (const invalidTorrent& t) \ 824 {\ 825 event().post(shared_ptr<EventDetail>( \ 826 new EventInvalidTorrent(Event::info, Event::invalidTorrent, t.who(), std::string(FUNCTION)))); \ 827 }\ 828 catch (const std::exception& e) \ 829 {\ 830 event().post(shared_ptr<EventDetail>( \ 831 new EventTorrentException(Event::critical, Event::torrentException, std::string(e.what()), name, std::string(FUNCTION)))); \ 832 } 816 833 817 834 #define HAL_GENERIC_TORRENT_EXCEPTION_CATCH(TORRENT, FUNCTION) \ … … 2016 2033 } 2017 2034 2035 const std::wstring bit::torrent::get_name() const 2036 { 2037 try { 2038 2039 return ptr->name(); 2040 2041 } HAL_GENERIC_TORRENT_EXCEPTION_CATCH(L"Torrent Unknown", "torrent::get_name()") 2042 2043 return 0; 2044 } 2045 2018 2046 float bit::torrent::get_ratio() const 2019 2047 { … … 2022 2050 return ptr->get_ratio(); 2023 2051 2024 } HAL_GENERIC_TORRENT_ EXCEPTION_CATCH(L"Me","torrent::get_ratio")2052 } HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH("torrent::get_ratio") 2025 2053 2026 2054 return 0; … … 2033 2061 ptr->set_ratio(r); 2034 2062 2035 } HAL_GENERIC_TORRENT_ EXCEPTION_CATCH(L"Me","torrent::set_ratio")2063 } HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH("torrent::set_ratio") 2036 2064 } 2037 2065 … … 2042 2070 return ptr->getConnectionLimit(); 2043 2071 2044 } HAL_GENERIC_TORRENT_ EXCEPTION_CATCH(L"Me","torrent::get_connection_limits")2072 } HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH("torrent::get_connection_limits") 2045 2073 2046 2074 return std::make_pair(-1, -1); … … 2053 2081 ptr->setConnectionLimit(l.first, l.second); 2054 2082 2055 } HAL_GENERIC_TORRENT_ EXCEPTION_CATCH(L"Me","torrent::set_connection_limits")2083 } HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH("torrent::set_connection_limits") 2056 2084 } 2057 2085 … … 2062 2090 return ptr->getTransferSpeed(); 2063 2091 2064 } HAL_GENERIC_TORRENT_ EXCEPTION_CATCH(L"Me","torrent::get_rate_limits")2092 } HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH("torrent::get_rate_limits") 2065 2093 2066 2094 return std::pair<float, float>(-1.0, -1.0); … … 2073 2101 ptr->setTransferSpeed(l.first, l.second); 2074 2102 2075 } HAL_GENERIC_TORRENT_ EXCEPTION_CATCH(L"Me","torrent::set_rate_limits")2103 } HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH("torrent::set_rate_limits") 2076 2104 } 2077 2105 … … 2082 2110 return ptr->get_save_directory(); 2083 2111 2084 } HAL_GENERIC_TORRENT_ EXCEPTION_CATCH(L"Me","torrent::get_save_directory")2112 } HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH("torrent::get_save_directory") 2085 2113 2086 2114 return L""; … … 2093 2121 ptr->set_save_directory(s); 2094 2122 2095 } HAL_GENERIC_TORRENT_ EXCEPTION_CATCH(L"Me","torrent::set_save_directory")2123 } HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH("torrent::set_save_directory") 2096 2124 } 2097 2125 … … 2102 2130 return ptr->get_move_to_directory(); 2103 2131 2104 } HAL_GENERIC_TORRENT_ EXCEPTION_CATCH(L"Me","torrent::get_save_directory")2132 } HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH("torrent::get_save_directory") 2105 2133 2106 2134 return L""; … … 2113 2141 ptr->set_move_to_directory(m); 2114 2142 2115 } HAL_GENERIC_TORRENT_ EXCEPTION_CATCH(L"Me","torrent::set_move_to_directory")2143 } HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH("torrent::set_move_to_directory") 2116 2144 } 2117 2145 … … 2122 2150 return ptr->getTrackerLogin(); 2123 2151 2124 } HAL_GENERIC_TORRENT_ EXCEPTION_CATCH(L"Me","get_tracker_login")2152 } HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH("get_tracker_login") 2125 2153 2126 2154 return std::make_pair(L"!!! exception thrown !!!", L"!!! exception thrown !!!"); … … 2133 2161 ptr->setTrackerLogin(p.first, p.second); 2134 2162 2135 } HAL_GENERIC_TORRENT_ EXCEPTION_CATCH(L"Me","torrent::set_tracker_login")2163 } HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH("torrent::set_tracker_login") 2136 2164 } 2137 2165 … … 2142 2170 return ptr->is_active(); 2143 2171 2144 } HAL_GENERIC_TORRENT_ EXCEPTION_CATCH(L"Me","torrent::get_is_active")2172 } HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH("torrent::get_is_active") 2145 2173 2146 2174 return L""; … … 2153 2181 return ptr->in_session(); 2154 2182 2155 } HAL_GENERIC_TORRENT_ EXCEPTION_CATCH(L"Me","torrent::get_in_session")2183 } HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH("torrent::get_in_session") 2156 2184 2157 2185 return L""; … … 2164 2192 return ptr->getTrackers(); 2165 2193 2166 } HAL_GENERIC_TORRENT_ EXCEPTION_CATCH(L"Me","torrent::get_trackers")2194 } HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH("torrent::get_trackers") 2167 2195 2168 2196 return std::vector<tracker_detail>(); … … 2175 2203 ptr->setTrackers(trackers); 2176 2204 2177 } HAL_GENERIC_TORRENT_ EXCEPTION_CATCH(L"Me","torrent::set_trackers")2205 } HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH("torrent::set_trackers") 2178 2206 } 2179 2207 … … 2184 2212 ptr->resetTrackers(); 2185 2213 2186 } HAL_GENERIC_TORRENT_ EXCEPTION_CATCH(L"Me","torrent::set_trackers")2214 } HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH("torrent::set_trackers") 2187 2215 } 2188 2216 2189 2217 void bit::torrent::set_file_priorities(const std::pair<std::vector<int>, int>& p) 2190 2218 { 2219 try { 2220 2191 2221 ptr->setFilePriorities(p.first, p.second); 2222 2223 } HAL_GENERIC_TORRENT_PROP_EXCEPTION_CATCH("torrent::set_trackers") 2192 2224 } 2193 2225 -
trunk/src/halTorrent.hpp
r459 r460 481 481 torrent(boost::shared_ptr<torrent_internal> p); 482 482 483 const std::wstring get_name() const; 484 483 485 float get_ratio() const; 484 486 void set_ratio(float new_ratio); … … 506 508 507 509 public: 510 STLSOFT_METHOD_PROPERTY_GET_EXTERNAL(const std::wstring, class_type, 511 get_name, name); 512 508 513 STLSOFT_METHOD_PROPERTY_GETSET_EXTERNAL(float, float, class_type, 509 514 get_ratio, set_ratio, ratio);
Note: See TracChangeset
for help on using the changeset viewer.