| 179 | |
| 180 | |
| 181 | void CDownloadQueue::CopyFileList(std::vector<CPartFile*>& out_list, bool includeCompleted) const |
| 182 | { |
| 183 | wxMutexLocker lock(m_mutex); |
| 184 | uint32 reserve = m_filelist.size(); |
| 185 | if (includeCompleted) { |
| 186 | reserve += m_completedDownloads.size(); |
| 187 | } |
| 188 | out_list.reserve(reserve); |
| 189 | for (FileQueue::const_iterator it = m_filelist.begin(); it != m_filelist.end(); ++it) { |
| 190 | out_list.push_back(*it); |
| 191 | } |
| 192 | if (includeCompleted) { |
| 193 | for (FileList::const_iterator it = m_completedDownloads.begin(); it != m_completedDownloads.end(); ++it) { |
| 194 | out_list.push_back(*it); |
| 195 | } |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | |
| 200 | CServer* CDownloadQueue::GetUDPServer() const |
no test coverage detected