| 241 | } |
| 242 | |
| 243 | int FTPQueue::OnDataSent(long sent, long total) { |
| 244 | m_monitor->Enter(); |
| 245 | if (!m_performing || !m_activeOp) { //not called from performing thread? |
| 246 | m_monitor->Exit(); |
| 247 | return -1; |
| 248 | } |
| 249 | m_monitor->Exit(); |
| 250 | |
| 251 | |
| 252 | if (total == -1) { |
| 253 | m_activeOp->SetProgress(-1.0f); |
| 254 | } else { |
| 255 | float percentage = (float)sent/(float)total * 100.0f; |
| 256 | m_activeOp->SetProgress(percentage); |
| 257 | } |
| 258 | m_activeOp->SendNotification(QueueOperation::QueueEventProgress); |
| 259 | return 0; |
| 260 | } |
| 261 | |
| 262 | int FTPQueue::QueueThread(FTPQueue* queue) { |
| 263 | return queue->QueueLoop(); |
no test coverage detected