Qt Toolkit - QFtp Class

| Classes - Annotated - Tree - Functions - Home - Structure

# QFtp Class Reference
[ network module ]

The QFtp class implements the FTP protocol More...

`#include <qftp.h>`

Inherits QNetworkProtocol.

List of all member functions.

## Public Members

- QFtp ()
- virtual ~QFtp ()

## Protected Members

- void parseDir ( const QString & buffer, QUrlInfo & info )

## Protected Slots

- void hostFound () (internal)
- void connected () (internal)
- void closed () (internal)
- void readyRead ()
- void dataHostFound () (internal)
- void dataConnected ()
- void dataClosed ()
- void dataReadyRead ()
- void dataBytesWritten ( int nbytes )

## Detailed Description

The QFtp class implements the FTP protocol

The QFtp class implements the FTP protocol. This class is derived from QNetworkProtocol and can be used with QUrlOperator. In fact, you normally will not use the QFtp class directly, but rather use it through the QUrlOperator like

      QUrlOperator op( "ftp://ftp.trolltech.com" );
      op.listChildren();

If you really need to use QFtp directly, don't forget to set the QUrlOperator on which it works using setUrl().

See also the Qt Network Documentation

See also QNetworkProtocol and QUrlOperator.

## Member Function Documentation

### QFtp::QFtp ()

Constructs a QFtp object.

### QFtp::~QFtp () `[virtual]`

Destructor.

### void QFtp::dataBytesWritten ( int nbytes ) `[protected slot]`

This method is called, when nbytes have been successfully written to the data socket.

### void QFtp::dataClosed () `[protected slot]`

Called when the data connection has been closed.

### void QFtp::dataConnected () `[protected slot]`

Some operations require a data connection to the server. If this connection could be opened, this method handles the rest.

### void QFtp::dataReadyRead () `[protected slot]`

This method is called when new data arrived on the data socket.

### void QFtp::error ( int code ) `[protected slot]`

Reimplemented for internal reasons; the API is not affected.

### void QFtp::operationGet ( QNetworkOperation * ) `[virtual protected]`

Reimplemented for internal reasons; the API is not affected.

### void QFtp::operationListChildren ( QNetworkOperation * ) `[virtual protected]`

Reimplemented for internal reasons; the API is not affected.

### void QFtp::operationMkDir ( QNetworkOperation * op ) `[virtual protected]`

Reimplemented for internal reasons; the API is not affected.

### void QFtp::operationPut ( QNetworkOperation * ) `[virtual protected]`

Reimplemented for internal reasons; the API is not affected.

### void QFtp::operationRemove ( QNetworkOperation * ) `[virtual protected]`

Reimplemented for internal reasons; the API is not affected.

### void QFtp::operationRename ( QNetworkOperation * ) `[virtual protected]`

Reimplemented for internal reasons; the API is not affected.

### void QFtp::parseDir ( const QString & buffer, QUrlInfo & info ) `[protected]`

Parses buffer, which is one line of a directory list which came from the FTP server, and sets the values which have been parsed to info.

### void QFtp::readyRead () `[protected slot]`

If data arrived on the command socket, this slot is called. It looks at the data and passes it to the correct method which can handle it.

### int QFtp::supportedOperations () const `[virtual]`

Reimplemented for internal reasons; the API is not affected.

### void QFtp::closed () `[protected slot]`

For internal use only.

### void QFtp::connected () `[protected slot]`

For internal use only.

### void QFtp::dataHostFound () `[protected slot]`

For internal use only.

### void QFtp::hostFound () `[protected slot]`

For internal use only.

Search the documentation, FAQ, qt-interest archive and more (uses www.trolltech.com):

This file is part of the Qt toolkit, copyright © 1995-2000 Trolltech, all rights reserved.