Rabbit Remote Control 0.1.0-alpha
Loading...
Searching...
No Matches
BackendFileTransfer.h
1// Copyright Copyright (c) Kang Lin studio, All Rights Reserved
2// Author Kang Lin <kl222@126.com>
3
4#pragma once
5
6#include <QEvent>
7#include "Backend.h"
8#include "OperateFileTransfer.h"
9
10#if HAVE_LIBSSH
11#include "ChannelSFTP.h"
12#endif
13
15{
16 Q_OBJECT
17
18public:
20 virtual ~CBackendFileTransfer();
21
22 virtual bool event(QEvent *event) override;
23
24protected:
25 virtual OnInitReturnValue OnInit() override;
26 virtual int OnClean() override;
27 virtual int OnProcess() override;
28
29private Q_SLOTS:
30 void slotMakeDir(const QString& szDir);
31 void slotRemoveDir(const QString& szDir);
32 void slotGetDir(CRemoteFileSystem*);
33 void slotRemoveFile(const QString& szFile);
34 void slotRename(const QString& oldName, const QString& newName);
35Q_SIGNALS:
36 void sigGetDir(CRemoteFileSystem*, QVector<QSharedPointer<CRemoteFileSystem> > contents, bool bEnd);
37private Q_SLOTS:
38 void slotStartFileTransfer(QSharedPointer<CFileTransfer> f);
39 void slotStopFileTransfer(QSharedPointer<CFileTransfer> f);
40Q_SIGNALS:
41 void sigFileTransferUpdate(QSharedPointer<CFileTransfer> f);
42
43private:
44 int SetConnect(COperateFileTransfer *pOperate);
45 OnInitReturnValue InitSFTP();
46
47private:
48 COperateFileTransfer* m_pOperate;
49#if HAVE_LIBSSH
50 CChannelSFTP* m_pSFTP;
51#endif
53};
virtual OnInitReturnValue OnInit() override
Initialization.
virtual int OnClean() override
Clean.
virtual int OnProcess() override
Specific operation processing of plug-in.
Backend interface.
Definition Backend.h:42
File transfer operate interface.