MCPcopy Create free account
hub / github.com/ashkulz/NppFTP / OnDataSent

Method OnDataSent

src/FTPQueue.cpp:243–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243int 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
262int FTPQueue::QueueThread(FTPQueue* queue) {
263 return queue->QueueLoop();

Callers 2

SendFileStatusMethod · 0.80
SendFileMethod · 0.80

Calls 4

EnterMethod · 0.80
ExitMethod · 0.80
SetProgressMethod · 0.80
SendNotificationMethod · 0.80

Tested by

no test coverage detected