- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Slots | Signals | Public Member Functions

# QFtp Class Reference

Search for all occurrences

## Detailed Description

Definition at line 59 of file qftp.h.

`#include <qftp.h>`

Inheritance diagram for QFtp:
[legend]

List of all members.

## Public Types
enum | State { Unconnected, HostLookup, Connecting, Connected, LoggedIn, Closing }
enum | Error { NoError, UnknownError, HostNotFound, ConnectionRefused, NotConnected }
enum | Command { None, SetTransferMode, SetProxy, ConnectToHost, Login, Close, List, Cd, Get, Put, Remove, Mkdir, Rmdir, Rename, RawCommand }
enum | TransferMode { Active, Passive }
enum | TransferType { Binary, Ascii }
## Public Slots
void | abort ()
## Signals
void | stateChanged (int)
void | listInfo (const QUrlInfo &)
void | readyRead ()
void | dataTransferProgress (qint64, qint64)
void | rawCommandReply (int, const QString &)
void | commandStarted (int)
void | commandFinished (int, bool)
void | done (bool)
## Public Member Functions
| QFtp (QObject *parent=0)
virtual | ~QFtp ()
int | setProxy (const QString &host, quint16 port)
int | connectToHost (const QString &host, quint16 port=21)
int | login (const QString &user=QString(), const QString &password=QString())
int | close ()
int | setTransferMode (TransferMode mode)
int | list (const QString &dir=QString())
int | cd (const QString &dir)
int | get (const QString &file, QIODevice *dev=0, TransferType type=Binary)
int | put (const QByteArray &data, const QString &file, TransferType type=Binary)
int | put (QIODevice *dev, const QString &file, TransferType type=Binary)
int | remove (const QString &file)
int | mkdir (const QString &dir)
int | rmdir (const QString &dir)
int | rename (const QString &oldname, const QString &newname)
int | rawCommand (const QString &command)
qint64 | bytesAvailable () const
qint64 | read (char *data, qint64 maxlen)
QByteArray | readAll ()
int | currentId () const
QIODevice * | currentDevice () const
Command | currentCommand () const
bool | hasPendingCommands () const
void | clearPendingCommands ()
State | state () const
Error | error () const
QString | errorString () const

## Member Enumeration Documentation

enum State

Search for all occurrences

Enumerator:

  Unconnected | Search for all occurrences
  HostLookup | Search for all occurrences
  Connecting | Search for all occurrences
  Connected | Search for all occurrences
  LoggedIn | Search for all occurrences
  Closing | Search for all occurrences

Definition at line 67 of file qftp.h.

                   {
            Unconnected,
            HostLookup,
            Connecting,
            Connected,
            LoggedIn,
            Closing
        };

enum Error

Search for all occurrences

Enumerator:

  NoError | Search for all occurrences
  UnknownError | Search for all occurrences
  HostNotFound | Search for all occurrences
  ConnectionRefused | Search for all occurrences
  NotConnected | Search for all occurrences

Definition at line 75 of file qftp.h.

                   {
            NoError,
            UnknownError,
            HostNotFound,
            ConnectionRefused,
            NotConnected
        };

enum Command

Search for all occurrences

Enumerator:

  None | Search for all occurrences
  SetTransferMode | Search for all occurrences
  SetProxy | Search for all occurrences
  ConnectToHost | Search for all occurrences
  Login | Search for all occurrences
  Close | Search for all occurrences
  List | Search for all occurrences
  Cd | Search for all occurrences
  Get | Search for all occurrences
  Put | Search for all occurrences
  Remove | Search for all occurrences
  Mkdir | Search for all occurrences
  Rmdir | Search for all occurrences
  Rename | Search for all occurrences
  RawCommand | Search for all occurrences

Definition at line 82 of file qftp.h.

                     {
            None,
            SetTransferMode,
            SetProxy,
            ConnectToHost,
            Login,
            Close,
            List,
            Cd,
            Get,
            Put,
            Remove,
            Mkdir,
            Rmdir,
            Rename,
            RawCommand
        };

enum TransferMode

Search for all occurrences

Enumerator:

  Active | Search for all occurrences
  Passive | Search for all occurrences

Definition at line 99 of file qftp.h.

                          {
            Active,
            Passive
        };

enum TransferType

Search for all occurrences

Enumerator:

  Binary | Search for all occurrences
  Ascii | Search for all occurrences

Definition at line 103 of file qftp.h.

                          {
            Binary,
            Ascii
        };

## Constructor & Destructor Documentation

QFtp | ( | QObject * | parent = `0` | ) | `[explicit]`

virtual ~QFtp | ( |  | ) | `[virtual]`

## Member Function Documentation

int setProxy | ( | const QString & | host,
|  | quint16 | port
| ) |  |

Search for all occurrences

int connectToHost | ( | const QString & | host,
|  | quint16 | port = `21`
| ) |  |

Search for all occurrences

int login | ( | const QString & | user = `QString()`,
|  | const QString & | password = `QString()`
| ) |  |

Search for all occurrences

int close | ( |  | ) |

Search for all occurrences

int setTransferMode | ( | TransferMode | mode | ) |

Search for all occurrences

int list | ( | const QString & | dir = `QString()` | ) |

Search for all occurrences

int cd | ( | const QString & | dir | ) |

Search for all occurrences

int get | ( | const QString & | file,
|  | QIODevice * | dev = `0`,
|  | TransferType | type = `Binary`
| ) |  |

Search for all occurrences

int put | ( | const QByteArray & | data,
|  | const QString & | file,
|  | TransferType | type = `Binary`
| ) |  |

Search for all occurrences

int put | ( | QIODevice * | dev,
|  | const QString & | file,
|  | TransferType | type = `Binary`
| ) |  |

Search for all occurrences

int remove | ( | const QString & | file | ) |

Search for all occurrences

int mkdir | ( | const QString & | dir | ) |

Search for all occurrences

int rmdir | ( | const QString & | dir | ) |

Search for all occurrences

int rename | ( | const QString & | oldname,
|  | const QString & | newname
| ) |  |

Search for all occurrences

int rawCommand | ( | const QString & | command | ) |

Search for all occurrences

qint64 bytesAvailable | ( |  | ) | const

Search for all occurrences

qint64 read | ( | char * | data,
|  | qint64 | maxlen
| ) |  |

Search for all occurrences

QByteArray readAll | ( |  | ) |

Search for all occurrences

int currentId | ( |  | ) | const

Search for all occurrences

QIODevice* currentDevice | ( |  | ) | const

Search for all occurrences

Command currentCommand | ( |  | ) | const

Search for all occurrences

bool hasPendingCommands | ( |  | ) | const

Search for all occurrences

void clearPendingCommands | ( |  | ) |

Search for all occurrences

State state | ( |  | ) | const

Search for all occurrences

Error error | ( |  | ) | const

Search for all occurrences

QString errorString | ( |  | ) | const

Search for all occurrences

void abort | ( |  | ) | `[slot]`

Search for all occurrences

void stateChanged | ( | int |  | ) | `[signal]`

Search for all occurrences

void listInfo | ( | const QUrlInfo & |  | ) | `[signal]`

Search for all occurrences

void readyRead | ( |  | ) | `[signal]`

Search for all occurrences

void dataTransferProgress | ( | qint64 | ,
|  | qint64 |
| ) |  | `[signal]`

Search for all occurrences

void rawCommandReply | ( | int | ,
|  | const QString & |
| ) |  | `[signal]`

Search for all occurrences

void commandStarted | ( | int |  | ) | `[signal]`

Search for all occurrences

void commandFinished | ( | int | ,
|  | bool |
| ) |  | `[signal]`

Search for all occurrences

void done | ( | bool |  | ) | `[signal]`

Search for all occurrences

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

- QtNetwork/qftp.h

QFtp QFtp QFtp QFtp QFtp QFtp QFtp QFtp QFtp QFtp
QFtp QFtp QFtp QFtp QFtp QFtp QFtp QFtp QFtp QFtp