void bit::shutdown_session() { HAL_DEV_MSG(L"Commence shutdown_session()"); pimpl_.reset(); HAL_DEV_MSG(L"End shutdown_session()"); }
LRESULT HaliteDialog::DialogListView::OnGetDispInfo(int, LPNMHDR pnmh, BOOL&) { hal::mutex_t::scoped_lock l(list_class_t::mutex_); NMLVDISPINFO* pdi = (NMLVDISPINFO*)pnmh; HAL_DEV_MSG(hal::wform(L"OnGetDispInfo index = %1% size = %2%") % pdi->item.iItem % peer_details_.size()); if (pdi->item.iItem >= 0 && peer_details_.size() >= numeric_cast<unsigned>(pdi->item.iItem)) { hal::peer_details_vec::optional_type pd = peer_details_.find_peer(key_from_index(pdi->item.iItem)); if (pd && pdi->item.mask & LVIF_TEXT) { wstring str = pd->to_wstring(pdi->item.iSubItem); size_t len = str.copy(pdi->item.pszText, min(pdi->item.cchTextMax - 1, static_cast<int>(str.size()))); pdi->item.pszText[len] = '\0'; } } return 0; }
bool remove_empty_directories_recur(const fs::path& p, std::vector<fs::path>& dirs) { if (!fs::exists(p)) return false; bool ret = true; for (fs::directory_iterator i = fs::directory_iterator(p), e = fs::directory_iterator(); i != e; ++i) { if (!fs::is_directory(*i)) ret = false; else { if (!remove_empty_directories(*i)) ret = false; } } if (ret) { HAL_DEV_MSG(wform(L"Removing directory: %1%") % p.wstring()); dirs.push_back(p); } return ret; }
void AdvTrackerDialog::onLoginApply(UINT, int, HWND) { DoDataExchange(true); HAL_DEV_MSG(hal::wform(L"Apply Tracker Login User: %1%, Pass: %2%") % username_ % password_ ); if (hal::bit::torrent t = hal::bittorrent().get(focused_torrent())) t.set_tracker_login(username_, password_); }