void SFTP::AddRemoteFile(const RemoteFileInfo& remoteFile) { if(m_remoteFiles.count(remoteFile.GetLocalFile())) { m_remoteFiles.erase(remoteFile.GetLocalFile()); } m_remoteFiles.insert(std::make_pair(remoteFile.GetLocalFile(), remoteFile)); }
SFTPThreadRequet::SFTPThreadRequet(const RemoteFileInfo& remoteFile) : m_account(remoteFile.GetAccount()) , m_remoteFile(remoteFile.GetRemoteFile()) , m_localFile(remoteFile.GetLocalFile()) , m_retryCounter(0) , m_uploadSuccess(false) , m_direction(kDownload) { }
void SFTP::DoSaveRemoteFile(const RemoteFileInfo& remoteFile) { SFTPWorkerThread::Instance()->Add( new SFTPThreadRequet(remoteFile.GetAccount(), remoteFile.GetRemoteFile(), remoteFile.GetLocalFile())); }