Files
frelay/ClientCore/RemoteFile.cpp

32 lines
907 B
C++
Raw Normal View History

#include "RemoteFile.h"
2025-06-15 14:31:54 +08:00
#include <InfoPack.hpp>
2025-06-15 23:13:30 +08:00
2025-06-15 14:31:54 +08:00
#include "LocalFile.h"
RemoteFile::RemoteFile(QObject* parent) : DirFileHelper(parent)
{
}
2025-06-15 14:31:54 +08:00
void RemoteFile::setClientCore(ClientCore* cliCore)
{
cliCore_ = cliCore;
2025-11-09 18:10:54 +08:00
connect(cliCore_, &ClientCore::sigPath, this,
[this](const QString& path, const QStringList& drivers) { sigHome(path, drivers); });
connect(cliCore_, &ClientCore::sigFiles, this, [this](const DirFileInfoVec& files) { sigDirFile(files); });
2025-06-15 14:31:54 +08:00
}
bool RemoteFile::GetHome()
{
InfoMsg info;
auto frame = cliCore_->GetBuffer(info, FBT_CLI_ASK_HOME, cliCore_->GetRemoteID());
return ClientCore::syncInvoke(cliCore_, frame);
2025-06-15 14:31:54 +08:00
}
bool RemoteFile::GetDirFile(const QString& dir)
{
InfoMsg info;
info.msg = dir;
auto frame = cliCore_->GetBuffer(info, FBT_CLI_ASK_DIRFILE, cliCore_->GetRemoteID());
return ClientCore::syncInvoke(cliCore_, frame);
2025-06-15 14:31:54 +08:00
}