Rabbit Remote Control 0.1.0-bate14
Loading...
Searching...
No Matches
CBackendFileTransfer Class Reference
Inheritance diagram for CBackendFileTransfer:
Collaboration diagram for CBackendFileTransfer:

Signals

void sigGetDir (CRemoteFileSystem *pRemoteFileSystem, QVector< QSharedPointer< CRemoteFileSystem > > contents, bool bEnd)
void sigFileTransferUpdate (QSharedPointer< CFileTransfer > f)
Signals inherited from CBackend
void sigRunning ()
 Emitted when the plugin is successfully started.
void sigStop ()
 Notify the user to stop.
void sigFinished ()
 Successful stopped signal.
void sigError (const int nError, const QString &szError=QString())
 Triggered when an error is generated.
void sigInformation (const QString &szInfo)
 Triggering from a background thread displays information in the main thread without blocking the background thread.
void sigShowMessageBox (const QString &szTitle, const QString &szMessage, const QMessageBox::Icon &icon=QMessageBox::Information)
 Trigger the display of a message dialog (QMessageBox) in the main thread from a background thread without blocking the background thread.
void sigBlockShowMessageBox (const QString &szTitle, const QString &szMessage, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton &nRet, bool &checkBox, QString checkBoxContext=QString())
 Block background threads and display message dialogs in foreground threads (QMessageBox).
void sigBlockInputDialog (const QString &szTitle, const QString &szLable, const QString &szMessage, QString &szText)
 Block background threads and display input dialogs in foreground threads (QInputDialog).
void sigBlockShowWidget (const QString &className, int &nRet, void *pContext)
 Blocks the background thread and displays the window in the foreground thread.
void sigSecurityLevel (CSecurityLevel::Levels level)
 Triggered when the security level changes.

Public Member Functions

 CBackendFileTransfer (COperateFileTransfer *pOperate)
virtual int WakeUp () override
 Wake up backend thread(background thread).
virtual bool event (QEvent *event) override
Public Member Functions inherited from CBackend
 CBackend (COperate *pOperate=nullptr, bool bStopSignal=true)
 CBackend.
virtual int Start ()
 Start.
virtual int Stop ()
 Stop.

Protected Member Functions

virtual OnInitReturnValue OnInit () override
 Initialization.
virtual int OnClean () override
 Clean.
virtual int OnProcess () override
 Specific operation processing of plug-in.

Private Slots

void slotMakeDir (const QString &szDir)
void slotRemoveDir (const QString &szDir)
void slotGetDir (CRemoteFileSystem *pRemoteFileSystem)
void slotRemoveFile (const QString &szFile)
void slotRename (const QString &oldName, const QString &newName)
void slotStartFileTransfer (QSharedPointer< CFileTransfer > f)
void slotStopFileTransfer (QSharedPointer< CFileTransfer > f)

Private Member Functions

int SetConnect (COperateFileTransfer *pOperate)
OnInitReturnValue InitSFTP ()

Private Attributes

COperateFileTransferm_pOperate
CParameterFileTransferm_pPara

Additional Inherited Members

Protected Types inherited from CBackend
enum class  OnInitReturnValue { Fail = -1 , Success = 0 , UseOnProcess = Success , NotUseOnProcess = 1 }
Protected Slots inherited from CBackend
virtual void slotTimeOut ()
 a non-Qt event loop (that is, normal loop processing), It call OnProcess(), and start timer.

Detailed Description

Definition at line 14 of file BackendFileTransfer.h.

Constructor & Destructor Documentation

◆ CBackendFileTransfer()

CBackendFileTransfer::CBackendFileTransfer ( COperateFileTransfer * pOperate)

Definition at line 44 of file BackendFileTransfer.cpp.

◆ ~CBackendFileTransfer()

CBackendFileTransfer::~CBackendFileTransfer ( )
virtual

Definition at line 58 of file BackendFileTransfer.cpp.

Member Function Documentation

◆ event()

bool CBackendFileTransfer::event ( QEvent * event)
overridevirtual

Definition at line 68 of file BackendFileTransfer.cpp.

◆ InitSFTP()

CBackendFileTransfer::OnInitReturnValue CBackendFileTransfer::InitSFTP ( )
private

Definition at line 196 of file BackendFileTransfer.cpp.

◆ OnClean()

int CBackendFileTransfer::OnClean ( )
overrideprotectedvirtual

Clean.

See also
Stop()

Implements CBackend.

Definition at line 136 of file BackendFileTransfer.cpp.

◆ OnInit()

CBackend::OnInitReturnValue CBackendFileTransfer::OnInit ( )
overrideprotectedvirtual

Initialization.

Returns
CBackend::OnInitReturnValue
  • OnInitReturnValue::Fail: error
  • OnInitReturnValue::Success/OnInitReturnValue::UseOnProcess: Use OnProcess() (non-Qt event loop)
  • OnInitReturnValue::NotUseOnProcess: Don't use OnProcess() (qt event loop)
See also
Start()

Implements CBackend.

Definition at line 128 of file BackendFileTransfer.cpp.

◆ OnProcess()

int CBackendFileTransfer::OnProcess ( )
overrideprotectedvirtual

Specific operation processing of plug-in.

Returns
  • >= 0: continue, Interval call time (msec)
  • = -1: stop
  • < -1: error code
See also
Start() slotTimeOut()

Reimplemented from CBackend.

Definition at line 149 of file BackendFileTransfer.cpp.

◆ SetConnect()

int CBackendFileTransfer::SetConnect ( COperateFileTransfer * pOperate)
private

Definition at line 159 of file BackendFileTransfer.cpp.

◆ slotGetDir

void CBackendFileTransfer::slotGetDir ( CRemoteFileSystem * pRemoteFileSystem)
privateslot

Definition at line 253 of file BackendFileTransfer.cpp.

◆ slotMakeDir

void CBackendFileTransfer::slotMakeDir ( const QString & szDir)
privateslot

Definition at line 217 of file BackendFileTransfer.cpp.

◆ slotRemoveDir

void CBackendFileTransfer::slotRemoveDir ( const QString & szDir)
privateslot

Definition at line 226 of file BackendFileTransfer.cpp.

◆ slotRemoveFile

void CBackendFileTransfer::slotRemoveFile ( const QString & szFile)
privateslot

Definition at line 235 of file BackendFileTransfer.cpp.

◆ slotRename

void CBackendFileTransfer::slotRename ( const QString & oldName,
const QString & newName )
privateslot

Definition at line 244 of file BackendFileTransfer.cpp.

◆ slotStartFileTransfer

void CBackendFileTransfer::slotStartFileTransfer ( QSharedPointer< CFileTransfer > f)
privateslot

Definition at line 265 of file BackendFileTransfer.cpp.

◆ slotStopFileTransfer

void CBackendFileTransfer::slotStopFileTransfer ( QSharedPointer< CFileTransfer > f)
privateslot

Definition at line 275 of file BackendFileTransfer.cpp.

◆ WakeUp()

int CBackendFileTransfer::WakeUp ( )
overridevirtual

Wake up backend thread(background thread).

When it is block(a non-Qt event loop)

Note
The caller is main thread(UI thread)

Implements CBackend.

Definition at line 63 of file BackendFileTransfer.cpp.

Member Data Documentation

◆ m_pOperate

COperateFileTransfer* CBackendFileTransfer::m_pOperate
private

Definition at line 51 of file BackendFileTransfer.h.

◆ m_pPara

CParameterFileTransfer* CBackendFileTransfer::m_pPara
private

Definition at line 55 of file BackendFileTransfer.h.


The documentation for this class was generated from the following files: