本文整理汇总了C++中RemoteFileInfo类的典型用法代码示例。如果您正苦于以下问题:C++ RemoteFileInfo类的具体用法?C++ RemoteFileInfo怎么用?C++ RemoteFileInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了RemoteFileInfo类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddRemoteFile
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));
}
示例2:
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)
{
}
示例3: GetItemData
bool SFTPTreeView::DoOpenFile(const wxTreeItemId& item)
{
MyClientData* cd = GetItemData(item);
if(!cd || cd->IsFolder()) { return false; }
RemoteFileInfo remoteFile;
remoteFile.SetAccount(m_account);
remoteFile.SetRemoteFile(cd->GetFullPath());
SFTPThreadRequet* req = new SFTPThreadRequet(remoteFile);
SFTPWorkerThread::Instance()->Add(req);
m_plugin->AddRemoteFile(remoteFile);
return true;
}
示例4: DoOpenFile
void SFTPTreeView::DoOpenFile(const wxString& path)
{
RemoteFileInfo remoteFile;
remoteFile.SetAccount(m_account);
remoteFile.SetRemoteFile(path);
SFTPThreadRequet* req = new SFTPThreadRequet(remoteFile);
SFTPWorkerThread::Instance()->Add(req);
m_plugin->AddRemoteFile(remoteFile);
// Update the session
SFTPSessionInfo& sess = GetSession(false);
if(sess.IsOk()) {
sess.AddFile(path);
m_sessions.Save();
}
}
示例5: GetItemData
void SFTPTreeView::OnItemActivated(wxTreeListEvent& event)
{
event.Skip();
MyClientData* cd = GetItemData(event.GetItem());
CHECK_PTR_RET(cd);
if(cd->IsFolder()) {
m_treeListCtrl->Expand(event.GetItem());
} else {
RemoteFileInfo remoteFile;
remoteFile.SetAccount(m_account);
remoteFile.SetRemoteFile(cd->GetFullPath());
SFTPThreadRequet* req = new SFTPThreadRequet(remoteFile);
SFTPWorkerThread::Instance()->Add(req);
m_plugin->AddRemoteFile(remoteFile);
}
}
示例6: GetItemData
void SFTPTreeView::OnMenuOpenWithDefaultApplication(wxCommandEvent& event)
{
wxTreeListItems items;
m_treeListCtrl->GetSelections(items);
if(items.empty()) return;
for(size_t i = 0; i < items.size(); ++i) {
MyClientData* cd = GetItemData(items.at(i));
if(!cd || cd->IsFolder()) {
continue;
}
RemoteFileInfo remoteFile;
remoteFile.SetAccount(m_account);
remoteFile.SetRemoteFile(cd->GetFullPath());
SFTPThreadRequet* req = new SFTPThreadRequet(remoteFile);
req->SetDirection(SFTPThreadRequet::kDownloadAndOpenWithDefaultApp);
SFTPWorkerThread::Instance()->Add(req);
}
}
示例7: DoSaveRemoteFile
void SFTP::DoSaveRemoteFile(const RemoteFileInfo& remoteFile)
{
SFTPWorkerThread::Instance()->Add(
new SFTPThreadRequet(remoteFile.GetAccount(), remoteFile.GetRemoteFile(), remoteFile.GetLocalFile()));
}