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

Classes

struct  DIR_READER
struct  _AIO
struct  _AFILE

Public Slots

void slotGetDir (const QString &szPath, CRemoteFileSystem *p)
 Get the directory asynchronously.
void slotStartFileTransfer (QSharedPointer< CFileTransfer > f)
void slotStopFileTransfer (QSharedPointer< CFileTransfer > f)

Signals

void sigGetDir (CRemoteFileSystem *p, QVector< QSharedPointer< CRemoteFileSystem > > contents, bool bEnd)
void sigFileTransferUpdate (QSharedPointer< CFileTransfer > f)
Signals inherited from CChannel
void sigConnected ()
 emit when the channel is connected.
void sigDisconnected ()
 emit when the channel is disconnected
void sigError (int nErr, const QString &szErr)
 emit when the channel is error
void sigSecurityLevel (CSecurityLevel::Levels level)
 Triggered when the security level changes.
void sigSend (quint64 counts)
 Send data counts.
void sigReceive (quint64 counts)
 Receive data counts.

Public Member Functions

 CChannelSFTP (CBackend *pBackend, CParameterSSH *pPara, bool bWakeUp=true, QObject *parent=nullptr)
int GetDir (CRemoteFileSystem *p)
 Synchronize to get the directory.
int MakeDir (const QString &dir)
int RemoveDir (const QString &dir)
int RemoveFile (const QString &file)
int Rename (const QString &oldPath, const QString &newPath)
int Process ()
Public Member Functions inherited from CChannelSSH
 CChannelSSH (CBackend *pBackend, CParameterSSH *pPara, bool bWakeUp=true, QObject *parent=nullptr)
virtual bool open (OpenMode mode) override
virtual void close () override
virtual int WakeUp ()
virtual QString GetDetails () override
 Depend on information.
Public Member Functions inherited from CChannel
 CChannel (QTcpSocket *pSocket, QObject *parent=nullptr)
 CChannel.

Protected Member Functions

virtual qint64 readData (char *data, qint64 maxlen) override
virtual qint64 writeData (const char *data, qint64 len) override
Protected Member Functions inherited from CChannel
 CChannel (QObject *parent=nullptr)
virtual bool isSequential () const override

Private Types

enum class  STATE {
  OPEN , READ , CLOSE , FINISH ,
  ERR
}

Private Member Functions

virtual int OnOpen (ssh_session session) override
virtual void OnClose () override
QSharedPointer< CRemoteFileSystemGetFileNode (const QString &szPath, sftp_attributes attributes)
int AsyncReadDir ()
int AsyncFile ()
int CleanFileAIO (QSharedPointer< _AFILE > aio)

Private Attributes

sftp_session m_SessionSftp
QVector< QSharedPointer< DIR_READER > > m_vDirs
QVector< QSharedPointer< _AFILE > > m_vFiles

Additional Inherited Members

Static Public Member Functions inherited from CChannel
static int InitTranslation ()
 Initial translation.
static int RemoveTranslation ()
 Remove translation.
Protected Attributes inherited from CChannelSSH
ssh_session m_Session
ssh_channel m_Channel
CBackendm_pBackend
CParameterSSHm_pParameter
Channel::CEventm_pEvent

Detailed Description

Definition at line 13 of file ChannelSFTP.h.

Member Enumeration Documentation

◆ STATE

enum class CChannelSFTP::STATE
strongprivate

Definition at line 53 of file ChannelSFTP.h.

Member Function Documentation

◆ AsyncFile()

int CChannelSFTP::AsyncFile ( )
private

Definition at line 535 of file ChannelSFTP.cpp.

◆ AsyncReadDir()

int CChannelSFTP::AsyncReadDir ( )
private

Definition at line 404 of file ChannelSFTP.cpp.

◆ CleanFileAIO()

int CChannelSFTP::CleanFileAIO ( QSharedPointer< _AFILE > aio)
private

Definition at line 888 of file ChannelSFTP.cpp.

◆ GetDir()

int CChannelSFTP::GetDir ( CRemoteFileSystem * p)

Synchronize to get the directory.

Parameters
szPath
Returns

Definition at line 142 of file ChannelSFTP.cpp.

◆ GetFileNode()

QSharedPointer< CRemoteFileSystem > CChannelSFTP::GetFileNode ( const QString & szPath,
sftp_attributes attributes )
private

Definition at line 101 of file ChannelSFTP.cpp.

◆ MakeDir()

int CChannelSFTP::MakeDir ( const QString & dir)

Definition at line 195 of file ChannelSFTP.cpp.

◆ OnClose()

void CChannelSFTP::OnClose ( )
overrideprivatevirtual

Reimplemented from CChannelSSH.

Definition at line 354 of file ChannelSFTP.cpp.

◆ OnOpen()

int CChannelSFTP::OnOpen ( ssh_session session)
overrideprivatevirtual

Reimplemented from CChannelSSH.

Definition at line 326 of file ChannelSFTP.cpp.

◆ Process()

int CChannelSFTP::Process ( )

Definition at line 44 of file ChannelSFTP.cpp.

◆ readData()

qint64 CChannelSFTP::readData ( char * data,
qint64 maxlen )
overrideprotectedvirtual

Reimplemented from CChannel.

Definition at line 312 of file ChannelSFTP.cpp.

◆ RemoveDir()

int CChannelSFTP::RemoveDir ( const QString & dir)

Definition at line 216 of file ChannelSFTP.cpp.

◆ RemoveFile()

int CChannelSFTP::RemoveFile ( const QString & file)

Definition at line 278 of file ChannelSFTP.cpp.

◆ Rename()

int CChannelSFTP::Rename ( const QString & oldPath,
const QString & newPath )

Definition at line 292 of file ChannelSFTP.cpp.

◆ slotGetDir

void CChannelSFTP::slotGetDir ( const QString & szPath,
CRemoteFileSystem * p )
slot

Get the directory asynchronously.

Definition at line 380 of file ChannelSFTP.cpp.

◆ slotStartFileTransfer

void CChannelSFTP::slotStartFileTransfer ( QSharedPointer< CFileTransfer > f)
slot

Definition at line 497 of file ChannelSFTP.cpp.

◆ slotStopFileTransfer

void CChannelSFTP::slotStopFileTransfer ( QSharedPointer< CFileTransfer > f)
slot

Definition at line 515 of file ChannelSFTP.cpp.

◆ writeData()

qint64 CChannelSFTP::writeData ( const char * data,
qint64 len )
overrideprotectedvirtual

Reimplemented from CChannel.

Definition at line 319 of file ChannelSFTP.cpp.

Member Data Documentation

◆ m_SessionSftp

sftp_session CChannelSFTP::m_SessionSftp
private

Definition at line 107 of file ChannelSFTP.h.

◆ m_vDirs

QVector<QSharedPointer<DIR_READER> > CChannelSFTP::m_vDirs
private

Definition at line 108 of file ChannelSFTP.h.

◆ m_vFiles

QVector<QSharedPointer<_AFILE> > CChannelSFTP::m_vFiles
private

Definition at line 109 of file ChannelSFTP.h.


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