当前位置: 首页>>代码示例>>C++>>正文


C++ RemoteFileInfo类代码示例

本文整理汇总了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));
}
开发者ID:Jactry,项目名称:codelite,代码行数:7,代码来源:sftp.cpp

示例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)
{
}
开发者ID:srini2174,项目名称:codelite,代码行数:9,代码来源:sftp_worker_thread.cpp

示例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;
}
开发者ID:lpc1996,项目名称:codelite,代码行数:15,代码来源:SFTPTreeView.cpp

示例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();
    }
}
开发者ID:lpc1996,项目名称:codelite,代码行数:17,代码来源:SFTPTreeView.cpp

示例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);
    }
}
开发者ID:Jactry,项目名称:codelite,代码行数:21,代码来源:SFTPTreeView.cpp

示例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);
    }
}
开发者ID:capturePointer,项目名称:codelite,代码行数:21,代码来源:SFTPTreeView.cpp

示例7: DoSaveRemoteFile

void SFTP::DoSaveRemoteFile(const RemoteFileInfo& remoteFile)
{
    SFTPWorkerThread::Instance()->Add(
        new SFTPThreadRequet(remoteFile.GetAccount(), remoteFile.GetRemoteFile(), remoteFile.GetLocalFile()));
}
开发者ID:Jactry,项目名称:codelite,代码行数:5,代码来源:sftp.cpp


注:本文中的RemoteFileInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。