Logo Search packages:      
Sourcecode: qt4-x11 version File versions

int Q3Ftp::login ( const QString user = QString(),
const QString password = QString() 

Logs in to the FTP server with the username user and the password password.

The stateChanged() signal is emitted when the state of the connecting process changes, e.g. to LoggedIn.

The function does not block and returns immediately. The command is scheduled, and its execution is performed asynchronously. The function returns a unique identifier which is passed by commandStarted() and commandFinished().

When the command is started the commandStarted() signal is emitted. When it is finished the commandFinished() signal is emitted.

See also:
commandStarted() commandFinished()

Definition at line 1430 of file q3ftp.cpp.

References QString::isNull().

Referenced by checkConnection().

    QStringList cmds;
    cmds << ( QString(QLatin1String("USER ")) + ( user.isNull() ? QString(QLatin1String("anonymous")) : user ) + QLatin1String("\r\n") );
    cmds << ( QString(QLatin1String("PASS ")) + ( password.isNull() ? QString(QLatin1String("anonymous@")) : password ) + QLatin1String("\r\n") );
    return addCommand( new Q3FtpCommand( Login, cmds ) );

Generated by  Doxygen 1.6.0   Back to index