Added file transmission started, failed and complete notification #4745

This commit is contained in:
Jerry (Xinyu Hou) 2015-06-01 15:33:06 -07:00
parent 5006adedfe
commit e7f358afb2
3 changed files with 4 additions and 3 deletions

View File

@ -69,7 +69,8 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
{ {
synergyDisconnected, synergyDisconnected,
synergyConnecting, synergyConnecting,
synergyConnected synergyConnected,
synergyTransfering
}; };
enum qSynergyType enum qSynergyType

View File

@ -866,7 +866,6 @@ ServerProxy::fileChunkReceived()
} }
else if (result == kStart) { else if (result == kStart) {
String filename = m_client->getDragFileList().at(0).getFilename(); String filename = m_client->getDragFileList().at(0).getFilename();
LOG((CLOG_INFO "receiving file: %s", filename.c_str()));
} }
} }

View File

@ -37,12 +37,13 @@ DropHelper::writeToDir(const String& destination, DragFileList& fileList, String
dropTarget.append(fileList.at(0).getFilename()); dropTarget.append(fileList.at(0).getFilename());
file.open(dropTarget.c_str(), std::ios::out | std::ios::binary); file.open(dropTarget.c_str(), std::ios::out | std::ios::binary);
if (!file.is_open()) { if (!file.is_open()) {
LOG((CLOG_DEBUG "drop file failed: can not open %s", dropTarget.c_str())); LOG((CLOG_ERR "drop file failed: can not open %s", dropTarget.c_str()));
} }
file.write(data.c_str(), data.size()); file.write(data.c_str(), data.size());
file.close(); file.close();
fileList.clear(); fileList.clear();
} }
else { else {