Rabbit Remote Control 0.1.0-de
Loading...
Searching...
No Matches
Classes | Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
CChannelSFTP Class Reference
Inheritance diagram for CChannelSFTP:
Inheritance graph
[legend]
Collaboration diagram for CChannelSFTP:
Collaboration graph
[legend]

Classes

struct  _AFILE
 
struct  _AIO
 
struct  DIR_READER
 

Public Slots

void slotGetDir (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
 

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 537 of file ChannelSFTP.cpp.

◆ AsyncReadDir()

int CChannelSFTP::AsyncReadDir ( )
private

Definition at line 406 of file ChannelSFTP.cpp.

◆ CleanFileAIO()

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

Definition at line 887 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 ( 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 499 of file ChannelSFTP.cpp.

◆ slotStopFileTransfer

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

Definition at line 517 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 105 of file ChannelSFTP.h.

◆ m_vDirs

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

Definition at line 106 of file ChannelSFTP.h.

◆ m_vFiles

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

Definition at line 107 of file ChannelSFTP.h.


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