2025-06-15 14:31:54 +08:00
|
|
|
#include "RemoteFile.h"
|
|
|
|
|
|
|
|
|
|
#include <InfoPack.hpp>
|
2025-06-15 23:13:30 +08:00
|
|
|
|
2025-06-15 14:31:54 +08:00
|
|
|
#include "LocalFile.h"
|
|
|
|
|
|
|
|
|
|
void RemoteFile::setClientCore(ClientCore* cliCore)
|
|
|
|
|
{
|
|
|
|
|
cliCore_ = cliCore;
|
|
|
|
|
cliCore_->SetPathCall(pathCall_);
|
|
|
|
|
cliCore_->SetFileCall(fileCall_);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool RemoteFile::GetHome()
|
|
|
|
|
{
|
|
|
|
|
InfoMsg info;
|
2025-06-19 11:59:32 +08:00
|
|
|
auto frame = cliCore_->GetBuffer(info, FBT_CLI_ASK_HOME, cliCore_->GetRemoteID());
|
|
|
|
|
return ClientCore::asyncInvoke(cliCore_, [this, frame]() { return cliCore_->Send(frame); });
|
2025-06-15 14:31:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool RemoteFile::GetDirFile(const QString& dir)
|
|
|
|
|
{
|
|
|
|
|
InfoMsg info;
|
2025-06-19 11:59:32 +08:00
|
|
|
auto frame = cliCore_->GetBuffer(info, FBT_CLI_ASK_DIRFILE, cliCore_->GetRemoteID());
|
|
|
|
|
return ClientCore::asyncInvoke(cliCore_, [this, frame]() { return cliCore_->Send(frame); });
|
2025-06-15 14:31:54 +08:00
|
|
|
}
|