Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 4541

qt-doc-4.8.5-10.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- q3ftp.cpp -->
  <title>Qt 4.8: Q3Ftp Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qt3support.html">Qt3Support</a></li>
<li>Q3Ftp</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">Q3Ftp Class Reference</h1>
<!-- $$$Q3Ftp-brief -->
<p>The Q3Ftp class provides an implementation of the FTP protocol. <a href="#details">More...</a></p>
<!-- @@@Q3Ftp -->
<pre class="cpp"> <span class="preprocessor">#include &lt;Q3Ftp&gt;</span></pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See <a href="porting4.html#qftp">Porting to Qt 4</a> for more information.</p>
<p><b>Inherits: </b><a href="q3networkprotocol.html">Q3NetworkProtocol</a>.</p>
<ul>
<li><a href="q3ftp-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#Command-enum">Command</a></b> { None, ConnectToHost, Login, Close, ..., RawCommand }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#Error-enum">Error</a></b> { NoError, HostNotFound, ConnectionRefused, NotConnected, UnknownError }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#State-enum">State</a></b> { Unconnected, HostLookup, Connecting, Connected, LoggedIn, Closing }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#Q3Ftp">Q3Ftp</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#Q3Ftp-2">Q3Ftp</a></b> ( QObject * <i>parent</i>, const char * <i>name</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#dtor.Q3Ftp">~Q3Ftp</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q_ULONG </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#bytesAvailable">bytesAvailable</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#cd">cd</a></b> ( const QString &amp; <i>dir</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#clearPendingCommands">clearPendingCommands</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#close">close</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#connectToHost">connectToHost</a></b> ( const QString &amp; <i>host</i>, Q_UINT16 <i>port</i> = 21 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Command </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#currentCommand">currentCommand</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QIODevice * </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#currentDevice">currentDevice</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#currentId">currentId</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Error </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#error">error</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#errorString">errorString</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#get">get</a></b> ( const QString &amp; <i>file</i>, QIODevice * <i>dev</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#hasPendingCommands">hasPendingCommands</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#list">list</a></b> ( const QString &amp; <i>dir</i> = QString() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#login">login</a></b> ( const QString &amp; <i>user</i> = QString(), const QString &amp; <i>password</i> = QString() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#mkdir">mkdir</a></b> ( const QString &amp; <i>dir</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#put">put</a></b> ( QIODevice * <i>dev</i>, const QString &amp; <i>file</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#put-2">put</a></b> ( const QByteArray &amp; <i>data</i>, const QString &amp; <i>file</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#rawCommand">rawCommand</a></b> ( const QString &amp; <i>command</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#readAll">readAll</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q_LONG </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#readBlock">readBlock</a></b> ( char * <i>data</i>, Q_ULONG <i>maxlen</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#remove">remove</a></b> ( const QString &amp; <i>file</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#rename">rename</a></b> ( const QString &amp; <i>oldname</i>, const QString &amp; <i>newname</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#rmdir">rmdir</a></b> ( const QString &amp; <i>dir</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> State </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#state">state</a></b> () const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#supportedOperations">supportedOperations</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">9 public functions inherited from <a href="q3networkprotocol.html#public-functions">Q3NetworkProtocol</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#abort">abort</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#commandFinished">commandFinished</a></b> ( int <i>id</i>, bool <i>error</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#commandStarted">commandStarted</a></b> ( int <i>id</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#dataTransferProgress">dataTransferProgress</a></b> ( int <i>done</i>, int <i>total</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#done">done</a></b> ( bool <i>error</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#listInfo">listInfo</a></b> ( const QUrlInfo &amp; <i>i</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#rawCommandReply">rawCommandReply</a></b> ( int <i>replyCode</i>, const QString &amp; <i>detail</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#readyRead">readyRead</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#stateChanged">stateChanged</a></b> ( int <i>state</i> )</td></tr>
</table>
<ul>
<li class="fn">10 signals inherited from <a href="q3networkprotocol.html#signals">Q3NetworkProtocol</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#operationGet">operationGet</a></b> ( Q3NetworkOperation * <i>op</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#operationListChildren">operationListChildren</a></b> ( Q3NetworkOperation * <i>op</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#operationMkDir">operationMkDir</a></b> ( Q3NetworkOperation * <i>op</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#operationPut">operationPut</a></b> ( Q3NetworkOperation * <i>op</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#operationRemove">operationRemove</a></b> ( Q3NetworkOperation * <i>op</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3ftp.html#operationRename">operationRename</a></b> ( Q3NetworkOperation * <i>op</i> )</td></tr>
</table>
<ul>
<li class="fn">7 protected functions inherited from <a href="q3networkprotocol.html#protected-functions">Q3NetworkProtocol</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li class="fn">3 static public members inherited from <a href="q3networkprotocol.html#static-public-members">Q3NetworkProtocol</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">7 protected functions inherited from <a href="q3networkprotocol.html#protected-functions">Q3NetworkProtocol</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$Q3Ftp-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The Q3Ftp class provides an implementation of the FTP protocol.</p>
<p>This class provides two different interfaces: one is the <a href="porting4.html#qnetworkprotocol">QNetworkProtocol</a> interface that allows you to use FTP through the <a href="porting4.html#qurloperator">QUrlOperator</a> abstraction. The other is a direct interface to FTP that gives you lower-level access to the FTP protocol for finer control. Using the direct interface you can also execute arbitrary FTP commands.</p>
<p>Don't mix the two interfaces, since the behavior is not well-defined.</p>
<p>If you want to use Q3Ftp with the <a href="porting4.html#qnetworkprotocol">QNetworkProtocol</a> interface, you do not use it directly, but rather through a <a href="porting4.html#qurloperator">QUrlOperator</a>, for example:</p>
<pre class="cpp"> <span class="type">QUrlOperator</span> op( <span class="string">&quot;ftp://ftp.qt.nokia.com&quot;</span> );
 op<span class="operator">.</span>listChildren(); <span class="comment">// Asks the server to provide a directory listing</span></pre>
<p>This code will only work if the Q3Ftp class is registered; to register the class, you must call <a href="q3urloperator.html#q3InitNetworkProtocols">q3InitNetworkProtocols</a>() before using a <a href="porting4.html#qurloperator">QUrlOperator</a> with Q3Ftp.</p>
<p>The rest of this descrption describes the direct interface to FTP.</p>
<p>The class works asynchronously, so there are no blocking functions. If an operation cannot be executed immediately, the function will still return straight away and the operation will be scheduled for later execution. The results of scheduled operations are reported via signals. This approach depends on the event loop being in operation.</p>
<p>The operations that can be scheduled (they are called &quot;commands&quot; in the rest of the documentation) are the following: <a href="q3ftp.html#connectToHost">connectToHost</a>(), <a href="q3ftp.html#login">login</a>(), <a href="q3ftp.html#close">close</a>(), <a href="q3ftp.html#list">list</a>(), <a href="q3ftp.html#cd">cd</a>(), <a href="q3ftp.html#get">get</a>(), <a href="q3ftp.html#put">put</a>(), <a href="q3ftp.html#remove">remove</a>(), <a href="q3ftp.html#mkdir">mkdir</a>(), <a href="q3ftp.html#rmdir">rmdir</a>(), <a href="q3ftp.html#rename">rename</a>() and <a href="q3ftp.html#rawCommand">rawCommand</a>().</p>
<p>All of these commands return a unique identifier that allows you to keep track of the command that is currently being executed. When the execution of a command starts, the <a href="q3ftp.html#commandStarted">commandStarted</a>() signal with the command's identifier is emitted. When the command is finished, the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal is emitted with the command's identifier and a bool that indicates whether the command finished with an error.</p>
<p>In some cases, you might want to execute a sequence of commands, e.g&#x2e; if you want to connect and login to a FTP server. This is simply achieved:</p>
<pre class="cpp"> <span class="type">Q3Ftp</span> <span class="operator">*</span>ftp <span class="operator">=</span> <span class="keyword">new</span> <span class="type">Q3Ftp</span>( <span class="keyword">this</span> ); <span class="comment">// this is an optional QObject parent</span>
 ftp<span class="operator">-</span><span class="operator">&gt;</span><a href="q3ftp.html#connectToHost">connectToHost</a>( <span class="string">&quot;ftp.qt.nokia.com&quot;</span> );
 ftp<span class="operator">-</span><span class="operator">&gt;</span><a href="q3ftp.html#login">login</a>();</pre>
<p>In this case two FTP commands have been scheduled. When the last scheduled command has finished, a <a href="q3ftp.html#done">done</a>() signal is emitted with a bool argument that tells you whether the sequence finished with an error.</p>
<p>If an error occurs during the execution of one of the commands in a sequence of commands, all the pending commands (i.e&#x2e; scheduled, but not yet executed commands) are cleared and no signals are emitted for them.</p>
<p>Some commands, e.g&#x2e; <a href="q3ftp.html#list">list</a>(), emit additional signals to report their results.</p>
<p>Example: If you want to download the INSTALL file from the Qt FTP server, you would write this:</p>
<pre class="cpp"> ftp<span class="operator">-</span><span class="operator">&gt;</span><a href="q3ftp.html#connectToHost">connectToHost</a>( <span class="string">&quot;ftp.qt.nokia.com&quot;</span> );   <span class="comment">// id == 1</span>
 ftp<span class="operator">-</span><span class="operator">&gt;</span><a href="q3ftp.html#login">login</a>();                               <span class="comment">// id == 2</span>
 ftp<span class="operator">-</span><span class="operator">&gt;</span><a href="q3ftp.html#cd">cd</a>( <span class="string">&quot;qt&quot;</span> );                            <span class="comment">// id == 3</span>
 ftp<span class="operator">-</span><span class="operator">&gt;</span><a href="q3ftp.html#get">get</a>( <span class="string">&quot;INSTALL&quot;</span> );                      <span class="comment">// id == 4</span>
 ftp<span class="operator">-</span><span class="operator">&gt;</span><a href="q3ftp.html#close">close</a>();                               <span class="comment">// id == 5</span></pre>
<p>For this example the following sequence of signals is emitted (with small variations, depending on network traffic, etc.):</p>
<pre class="cpp"> <a href="q3networkprotocol.html#start">start</a>( <span class="number">1</span> )
 <a href="q3ftp.html#stateChanged">stateChanged</a>( HostLookup )
 <a href="q3ftp.html#stateChanged">stateChanged</a>( Connecting )
 <a href="q3ftp.html#stateChanged">stateChanged</a>( Connected )
 <a href="q3networkprotocol.html#finished">finished</a>( <span class="number">1</span><span class="operator">,</span> <span class="keyword">false</span> )

 <a href="q3networkprotocol.html#start">start</a>( <span class="number">2</span> )
 <a href="q3ftp.html#stateChanged">stateChanged</a>( LoggedIn )
 <a href="q3networkprotocol.html#finished">finished</a>( <span class="number">2</span><span class="operator">,</span> <span class="keyword">false</span> )

 <a href="q3networkprotocol.html#start">start</a>( <span class="number">3</span> )
 <a href="q3networkprotocol.html#finished">finished</a>( <span class="number">3</span><span class="operator">,</span> <span class="keyword">false</span> )

 <a href="q3networkprotocol.html#start">start</a>( <span class="number">4</span> )
 <a href="q3ftp.html#dataTransferProgress">dataTransferProgress</a>( <span class="number">0</span><span class="operator">,</span> <span class="number">3798</span> )
 <a href="q3ftp.html#dataTransferProgress">dataTransferProgress</a>( <span class="number">2896</span><span class="operator">,</span> <span class="number">3798</span> )
 <a href="q3ftp.html#readyRead">readyRead</a>()
 <a href="q3ftp.html#dataTransferProgress">dataTransferProgress</a>( <span class="number">3798</span><span class="operator">,</span> <span class="number">3798</span> )
 <a href="q3ftp.html#readyRead">readyRead</a>()
 <a href="q3networkprotocol.html#finished">finished</a>( <span class="number">4</span><span class="operator">,</span> <span class="keyword">false</span> )

 <a href="q3networkprotocol.html#start">start</a>( <span class="number">5</span> )
 <a href="q3ftp.html#stateChanged">stateChanged</a>( Closing )
 <a href="q3ftp.html#stateChanged">stateChanged</a>( Unconnected )
 <a href="q3networkprotocol.html#finished">finished</a>( <span class="number">5</span><span class="operator">,</span> <span class="keyword">false</span> )

 <a href="q3ftp.html#done">done</a>( <span class="keyword">false</span> )</pre>
<p>The <a href="q3ftp.html#dataTransferProgress">dataTransferProgress</a>() signal in the above example is useful if you want to show a <a href="qprogressbar.html">progress bar</a> to inform the user about the progress of the download. The <a href="q3ftp.html#readyRead">readyRead</a>() signal tells you that there is data ready to be read. The amount of data can be queried then with the <a href="q3ftp.html#bytesAvailable">bytesAvailable</a>() function and it can be read with the <a href="q3ftp.html#readBlock">readBlock</a>() or <a href="q3ftp.html#readAll">readAll</a>() function.</p>
<p>If the login fails for the above example, the signals would look like this:</p>
<pre class="cpp"> <a href="q3networkprotocol.html#start">start</a>( <span class="number">1</span> )
 <a href="q3ftp.html#stateChanged">stateChanged</a>( HostLookup )
 <a href="q3ftp.html#stateChanged">stateChanged</a>( Connecting )
 <a href="q3ftp.html#stateChanged">stateChanged</a>( Connected )
 <a href="q3networkprotocol.html#finished">finished</a>( <span class="number">1</span><span class="operator">,</span> <span class="keyword">false</span> )

 <a href="q3networkprotocol.html#start">start</a>( <span class="number">2</span> )
 <a href="q3networkprotocol.html#finished">finished</a>( <span class="number">2</span><span class="operator">,</span> <span class="keyword">true</span> )

 <a href="q3ftp.html#done">done</a>( <span class="keyword">true</span> )</pre>
<p>You can then get details about the error with the <a href="q3ftp.html#error">error</a>() and <a href="q3ftp.html#errorString">errorString</a>() functions.</p>
<p>The functions <a href="q3ftp.html#currentId">currentId</a>() and <a href="q3ftp.html#currentCommand">currentCommand</a>() provide more information about the currently executing command.</p>
<p>The functions <a href="q3ftp.html#hasPendingCommands">hasPendingCommands</a>() and <a href="q3ftp.html#clearPendingCommands">clearPendingCommands</a>() allow you to query and clear the list of pending commands.</p>
<p>The safest and easiest way to use the FTP protocol is to use <a href="porting4.html#qurloperator">QUrlOperator</a>() or the FTP commands described above. If you are an experienced network programmer and want to have complete control you can use <a href="q3ftp.html#rawCommand">rawCommand</a>() to execute arbitrary FTP commands.</p>
</div>
<p><b>See also </b><a href="q3networkprotocol.html">Q3NetworkProtocol</a>, <a href="q3urloperator.html">Q3UrlOperator</a>, and <a href="q3http.html">Q3Http</a>.</p>
<!-- @@@Q3Ftp -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Command$$$None$$$ConnectToHost$$$Login$$$Close$$$List$$$Cd$$$Get$$$Put$$$Remove$$$Mkdir$$$Rmdir$$$Rename$$$RawCommand -->
<h3 class="fn"><a name="Command-enum"></a>enum Q3Ftp::<span class="name">Command</span></h3>
<p>This enum is used as the return value for the <a href="q3ftp.html#currentCommand">currentCommand</a>() function. This allows you to perform specific actions for particular commands, e.g&#x2e; in a FTP client, you might want to clear the directory view when a <a href="q3ftp.html#list">list</a>() command is started; in this case you can simply check in the slot connected to the <a href="q3networkprotocol.html#start">start</a>() signal if the <a href="q3ftp.html#currentCommand">currentCommand</a>() is <tt>List</tt>.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>Q3Ftp::None</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">No command is being executed.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::ConnectToHost</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign"><a href="q3ftp.html#connectToHost">connectToHost</a>() is being executed.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::Login</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign"><a href="q3ftp.html#login">login</a>() is being executed.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::Close</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign"><a href="q3ftp.html#close">close</a>() is being executed.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::List</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign"><a href="q3ftp.html#list">list</a>() is being executed.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::Cd</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign"><a href="q3ftp.html#cd">cd</a>() is being executed.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::Get</tt></td><td class="topAlign"><tt>6</tt></td><td class="topAlign"><a href="q3ftp.html#get">get</a>() is being executed.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::Put</tt></td><td class="topAlign"><tt>7</tt></td><td class="topAlign"><a href="q3ftp.html#put">put</a>() is being executed.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::Remove</tt></td><td class="topAlign"><tt>8</tt></td><td class="topAlign"><a href="q3ftp.html#remove">remove</a>() is being executed.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::Mkdir</tt></td><td class="topAlign"><tt>9</tt></td><td class="topAlign"><a href="q3ftp.html#mkdir">mkdir</a>() is being executed.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::Rmdir</tt></td><td class="topAlign"><tt>10</tt></td><td class="topAlign"><a href="q3ftp.html#rmdir">rmdir</a>() is being executed.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::Rename</tt></td><td class="topAlign"><tt>11</tt></td><td class="topAlign"><a href="q3ftp.html#rename">rename</a>() is being executed.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::RawCommand</tt></td><td class="topAlign"><tt>12</tt></td><td class="topAlign"><a href="q3ftp.html#rawCommand">rawCommand</a>() is being executed.</td></tr>
</table>
<p><b>See also </b><a href="q3ftp.html#currentCommand">currentCommand</a>().</p>
<!-- @@@Command -->
<!-- $$$Error$$$NoError$$$UnknownError$$$HostNotFound$$$ConnectionRefused$$$NotConnected -->
<h3 class="fn"><a name="Error-enum"></a>enum Q3Ftp::<span class="name">Error</span></h3>
<p>This enum identifies the error that occurred.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>Q3Ftp::NoError</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">No error occurred.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::HostNotFound</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The host name lookup failed.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::ConnectionRefused</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The server refused the connection.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::NotConnected</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">Tried to send a command, but there is no connection to a server.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::UnknownError</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">An error other than those specified above occurred.</td></tr>
</table>
<p><b>See also </b><a href="q3ftp.html#error">error</a>().</p>
<!-- @@@Error -->
<!-- $$$State$$$Unconnected$$$HostLookup$$$Connecting$$$Connected$$$LoggedIn$$$Closing -->
<h3 class="fn"><a name="State-enum"></a>enum Q3Ftp::<span class="name">State</span></h3>
<p>This enum defines the connection state:</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>Q3Ftp::Unconnected</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">There is no connection to the host.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::HostLookup</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">A host name lookup is in progress.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::Connecting</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">An attempt to connect to the host is in progress.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::Connected</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">Connection to the host has been achieved.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::LoggedIn</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">Connection and user login have been achieved.</td></tr>
<tr><td class="topAlign"><tt>Q3Ftp::Closing</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">The connection is closing down, but it is not yet closed. (The state will be <tt>Unconnected</tt> when the connection is closed.)</td></tr>
</table>
<p><b>See also </b><a href="q3ftp.html#stateChanged">stateChanged</a>() and <a href="q3ftp.html#state">state</a>().</p>
<!-- @@@State -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3Ftp[overload1]$$$Q3Ftp -->
<h3 class="fn"><a name="Q3Ftp"></a>Q3Ftp::<span class="name">Q3Ftp</span> ()</h3>
<p>Constructs a <a href="q3ftp.html" class="compat">Q3Ftp</a> object.</p>
<!-- @@@Q3Ftp -->
<!-- $$$Q3Ftp$$$Q3FtpQObject*constchar* -->
<h3 class="fn"><a name="Q3Ftp-2"></a>Q3Ftp::<span class="name">Q3Ftp</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i>, const <span class="type">char</span> * <i>name</i> = 0 )</h3>
<p>Constructs a <a href="q3ftp.html" class="compat">Q3Ftp</a> object. The <i>parent</i> and <i>name</i> parameters are passed to the <a href="qobject.html">QObject</a> constructor.</p>
<!-- @@@Q3Ftp -->
<!-- $$$~Q3Ftp[overload1]$$$~Q3Ftp -->
<h3 class="fn"><a name="dtor.Q3Ftp"></a>Q3Ftp::<span class="name">~Q3Ftp</span> ()<tt> [virtual]</tt></h3>
<p>Destructor.</p>
<!-- @@@~Q3Ftp -->
<!-- $$$abort[overload1]$$$abort -->
<h3 class="fn"><a name="abort"></a><span class="type">void</span> Q3Ftp::<span class="name">abort</span> ()<tt> [slot]</tt></h3>
<p>Aborts the current command and deletes all scheduled commands.</p>
<p>If there is an unfinished command (i.e&#x2e; a command for which the <a href="q3ftp.html#commandStarted">commandStarted</a>() signal has been emitted, but for which the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal has not been emitted), this function sends an <tt>ABORT</tt> command to the server. When the server replies that the command is aborted, the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal with the <tt>error</tt> argument set to <tt>true</tt> is emitted for the command. Due to timing issues, it is possible that the command had already finished before the abort request reached the server, in which case, the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal is emitted with the <tt>error</tt> argument set to <tt>false</tt>.</p>
<p>For all other commands that are affected by the abort(), no signals are emitted.</p>
<p>If you don't start further FTP commands directly after the abort(), there won't be any scheduled commands and the <a href="q3ftp.html#done">done</a>() signal is emitted.</p>
<p><b>Warning:</b> Some FTP servers, for example the BSD FTP daemon (version 0.3), wrongly return a positive reply even when an abort has occurred. For these servers the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal has its error flag set to <tt>false</tt>, even though the command did not complete successfully.</p>
<p><b>See also </b><a href="q3ftp.html#clearPendingCommands">clearPendingCommands</a>().</p>
<!-- @@@abort -->
<!-- $$$bytesAvailable[overload1]$$$bytesAvailable -->
<h3 class="fn"><a name="bytesAvailable"></a><span class="type"><a href="qtglobal-qt3.html#Q_ULONG-typedef">Q_ULONG</a></span> Q3Ftp::<span class="name">bytesAvailable</span> () const</h3>
<p>Returns the number of bytes that can be read from the data socket at the moment.</p>
<p><b>See also </b><a href="q3ftp.html#get">get</a>(), <a href="q3ftp.html#readyRead">readyRead</a>(), <a href="q3ftp.html#readBlock">readBlock</a>(), and <a href="q3ftp.html#readAll">readAll</a>().</p>
<!-- @@@bytesAvailable -->
<!-- $$$cd[overload1]$$$cdconstQString& -->
<h3 class="fn"><a name="cd"></a><span class="type">int</span> Q3Ftp::<span class="name">cd</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>dir</i> )</h3>
<p>Changes the working directory of the server to <i>dir</i>.</p>
<p>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 <a href="q3ftp.html#commandStarted">commandStarted</a>() and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<p>When the command is started the <a href="q3ftp.html#commandStarted">commandStarted</a>() signal is emitted. When it is finished the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal is emitted.</p>
<p><b>See also </b><a href="q3ftp.html#commandStarted">commandStarted</a>() and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<!-- @@@cd -->
<!-- $$$clearPendingCommands[overload1]$$$clearPendingCommands -->
<h3 class="fn"><a name="clearPendingCommands"></a><span class="type">void</span> Q3Ftp::<span class="name">clearPendingCommands</span> ()</h3>
<p>Deletes all pending commands from the list of scheduled commands. This does not affect the command that is being executed. If you want to stop this as well, use <a href="q3ftp.html#abort">abort</a>().</p>
<p><b>See also </b><a href="q3ftp.html#hasPendingCommands">hasPendingCommands</a>() and <a href="q3ftp.html#abort">abort</a>().</p>
<!-- @@@clearPendingCommands -->
<!-- $$$close[overload1]$$$close -->
<h3 class="fn"><a name="close"></a><span class="type">int</span> Q3Ftp::<span class="name">close</span> ()</h3>
<p>Closes the connection to the FTP server.</p>
<p>The <a href="q3ftp.html#stateChanged">stateChanged</a>() signal is emitted when the state of the connecting process changes, e.g&#x2e; to <tt>Closing</tt>, then <tt>Unconnected</tt>.</p>
<p>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 <a href="q3ftp.html#commandStarted">commandStarted</a>() and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<p>When the command is started the <a href="q3ftp.html#commandStarted">commandStarted</a>() signal is emitted. When it is finished the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal is emitted.</p>
<p><b>See also </b><a href="q3ftp.html#stateChanged">stateChanged</a>(), <a href="q3ftp.html#commandStarted">commandStarted</a>(), and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<!-- @@@close -->
<!-- $$$commandFinished[overload1]$$$commandFinishedintbool -->
<h3 class="fn"><a name="commandFinished"></a><span class="type">void</span> Q3Ftp::<span class="name">commandFinished</span> ( <span class="type">int</span> <i>id</i>, <span class="type">bool</span> <i>error</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when processing the command identified by <i>id</i> has finished. <i>error</i> is true if an error occurred during the processing; otherwise <i>error</i> is false.</p>
<p><b>See also </b><a href="q3ftp.html#commandStarted">commandStarted</a>(), <a href="q3ftp.html#done">done</a>(), <a href="q3ftp.html#error">error</a>(), and <a href="q3ftp.html#errorString">errorString</a>().</p>
<!-- @@@commandFinished -->
<!-- $$$commandStarted[overload1]$$$commandStartedint -->
<h3 class="fn"><a name="commandStarted"></a><span class="type">void</span> Q3Ftp::<span class="name">commandStarted</span> ( <span class="type">int</span> <i>id</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when processing the command identified by <i>id</i> starts.</p>
<p><b>See also </b><a href="q3ftp.html#commandFinished">commandFinished</a>() and <a href="q3ftp.html#done">done</a>().</p>
<!-- @@@commandStarted -->
<!-- $$$connectToHost[overload1]$$$connectToHostconstQString&Q_UINT16 -->
<h3 class="fn"><a name="connectToHost"></a><span class="type">int</span> Q3Ftp::<span class="name">connectToHost</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>host</i>, <span class="type"><a href="qtglobal-qt3.html#Q_UINT16-typedef">Q_UINT16</a></span> <i>port</i> = 21 )</h3>
<p>Connects to the FTP server <i>host</i> using port <i>port</i>.</p>
<p>The <a href="q3ftp.html#stateChanged">stateChanged</a>() signal is emitted when the state of the connecting process changes, e.g&#x2e; to <tt>HostLookup</tt>, then <tt>Connecting</tt>, then <tt>Connected</tt>.</p>
<p>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 <a href="q3ftp.html#commandStarted">commandStarted</a>() and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<p>When the command is started the <a href="q3ftp.html#commandStarted">commandStarted</a>() signal is emitted. When it is finished the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal is emitted.</p>
<p><b>See also </b><a href="q3ftp.html#stateChanged">stateChanged</a>(), <a href="q3ftp.html#commandStarted">commandStarted</a>(), and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<!-- @@@connectToHost -->
<!-- $$$currentCommand[overload1]$$$currentCommand -->
<h3 class="fn"><a name="currentCommand"></a><span class="type"><a href="q3ftp.html#Command-enum">Command</a></span> Q3Ftp::<span class="name">currentCommand</span> () const</h3>
<p>Returns the command type of the FTP command being executed or <tt>None</tt> if there is no command being executed.</p>
<p><b>See also </b><a href="q3ftp.html#currentId">currentId</a>().</p>
<!-- @@@currentCommand -->
<!-- $$$currentDevice[overload1]$$$currentDevice -->
<h3 class="fn"><a name="currentDevice"></a><span class="type"><a href="qiodevice.html">QIODevice</a></span> * Q3Ftp::<span class="name">currentDevice</span> () const</h3>
<p>Returns the <a href="qiodevice.html">QIODevice</a> pointer that is used by the FTP command to read data from or store data to. If there is no current FTP command being executed or if the command does not use an IO device, this function returns 0.</p>
<p>This function can be used to delete the <a href="qiodevice.html">QIODevice</a> in the slot connected to the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal.</p>
<p><b>See also </b><a href="q3ftp.html#get">get</a>() and <a href="q3ftp.html#put">put</a>().</p>
<!-- @@@currentDevice -->
<!-- $$$currentId[overload1]$$$currentId -->
<h3 class="fn"><a name="currentId"></a><span class="type">int</span> Q3Ftp::<span class="name">currentId</span> () const</h3>
<p>Returns the identifier of the FTP command that is being executed or 0 if there is no command being executed.</p>
<p><b>See also </b><a href="q3ftp.html#currentCommand">currentCommand</a>().</p>
<!-- @@@currentId -->
<!-- $$$dataTransferProgress[overload1]$$$dataTransferProgressintint -->
<h3 class="fn"><a name="dataTransferProgress"></a><span class="type">void</span> Q3Ftp::<span class="name">dataTransferProgress</span> ( <span class="type">int</span> <i>done</i>, <span class="type">int</span> <i>total</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted in response to a <a href="q3ftp.html#get">get</a>() or <a href="q3ftp.html#put">put</a>() request to indicate the current progress of the download or upload.</p>
<p><i>done</i> is the amount of data that has already been transferred and <i>total</i> is the total amount of data to be read or written. It is possible that the <a href="q3ftp.html" class="compat">Q3Ftp</a> class is not able to determine the total amount of data that should be transferred, in which case <i>total</i> is 0. (If you connect this signal to a <a href="qprogressbar.html">QProgressBar</a>, the progress bar shows a busy indicator if the total is 0).</p>
<p><b>Warning:</b> <i>done</i> and <i>total</i> are not necessarily the size in bytes, since for large files these values might need to be &quot;scaled&quot; to avoid overflow.</p>
<p><b>See also </b><a href="q3ftp.html#get">get</a>() and <a href="q3ftp.html#put">put</a>().</p>
<!-- @@@dataTransferProgress -->
<!-- $$$done[overload1]$$$donebool -->
<h3 class="fn"><a name="done"></a><span class="type">void</span> Q3Ftp::<span class="name">done</span> ( <span class="type">bool</span> <i>error</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the last pending command has finished; (it is emitted after the last command's <a href="q3ftp.html#commandFinished">commandFinished</a>() signal). <i>error</i> is true if an error occurred during the processing; otherwise <i>error</i> is false.</p>
<p><b>See also </b><a href="q3ftp.html#commandFinished">commandFinished</a>(), <a href="q3ftp.html#error">error</a>(), and <a href="q3ftp.html#errorString">errorString</a>().</p>
<!-- @@@done -->
<!-- $$$error[overload1]$$$error -->
<h3 class="fn"><a name="error"></a><span class="type"><a href="q3ftp.html#Error-enum">Error</a></span> Q3Ftp::<span class="name">error</span> () const</h3>
<p>Returns the last error that occurred. This is useful to find out what when wrong when receiving a <a href="q3ftp.html#commandFinished">commandFinished</a>() or a <a href="q3ftp.html#done">done</a>() signal with the <tt>error</tt> argument set to <tt>true</tt>.</p>
<p>If you start a new command, the error status is reset to <tt>NoError</tt>.</p>
<!-- @@@error -->
<!-- $$$errorString[overload1]$$$errorString -->
<h3 class="fn"><a name="errorString"></a><span class="type"><a href="qstring.html">QString</a></span> Q3Ftp::<span class="name">errorString</span> () const</h3>
<p>Returns a human-readable description of the last error that occurred. This is useful for presenting a error message to the user when receiving a <a href="q3ftp.html#commandFinished">commandFinished</a>() or a <a href="q3ftp.html#done">done</a>() signal with the <tt>error</tt> argument set to <tt>true</tt>.</p>
<p>The error string is often (but not always) the reply from the server, so it is not always possible to translate the string. If the message comes from Qt, the string has already passed through <a href="qobject.html#tr">tr</a>().</p>
<!-- @@@errorString -->
<!-- $$$get[overload1]$$$getconstQString&QIODevice* -->
<h3 class="fn"><a name="get"></a><span class="type">int</span> Q3Ftp::<span class="name">get</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>file</i>, <span class="type"><a href="qiodevice.html">QIODevice</a></span> * <i>dev</i> = 0 )</h3>
<p>Downloads the file <i>file</i> from the server.</p>
<p>If <i>dev</i> is 0, then the <a href="q3ftp.html#readyRead">readyRead</a>() signal is emitted when there is data available to read. You can then read the data with the <a href="q3ftp.html#readBlock">readBlock</a>() or <a href="q3ftp.html#readAll">readAll</a>() functions.</p>
<p>If <i>dev</i> is not 0, the data is written directly to the device <i>dev</i>. Make sure that the <i>dev</i> pointer is valid for the duration of the operation (it is safe to delete it when the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal is emitted). In this case the <a href="q3ftp.html#readyRead">readyRead</a>() signal is <i>not</i> emitted and you cannot read data with the <a href="q3ftp.html#readBlock">readBlock</a>() or <a href="q3ftp.html#readAll">readAll</a>() functions.</p>
<p>If you don't read the data immediately it becomes available, i.e&#x2e; when the <a href="q3ftp.html#readyRead">readyRead</a>() signal is emitted, it is still available until the next command is started.</p>
<p>For example, if you want to present the data to the user as soon as there is something available, connect to the <a href="q3ftp.html#readyRead">readyRead</a>() signal and read the data immediately. On the other hand, if you only want to work with the complete data, you can connect to the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal and read the data when the get() command is finished.</p>
<p>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 <a href="q3ftp.html#commandStarted">commandStarted</a>() and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<p>When the command is started the <a href="q3ftp.html#commandStarted">commandStarted</a>() signal is emitted. When it is finished the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal is emitted.</p>
<p><a href="q3ftp.html#commandFinished">commandFinished</a>()</p>
<p><b>See also </b><a href="q3ftp.html#readyRead">readyRead</a>(), <a href="q3ftp.html#dataTransferProgress">dataTransferProgress</a>(), and <a href="q3ftp.html#commandStarted">commandStarted</a>().</p>
<!-- @@@get -->
<!-- $$$hasPendingCommands[overload1]$$$hasPendingCommands -->
<h3 class="fn"><a name="hasPendingCommands"></a><span class="type">bool</span> Q3Ftp::<span class="name">hasPendingCommands</span> () const</h3>
<p>Returns true if there are any commands scheduled that have not yet been executed; otherwise returns false.</p>
<p>The command that is being executed is <i>not</i> considered as a scheduled command.</p>
<p><b>See also </b><a href="q3ftp.html#clearPendingCommands">clearPendingCommands</a>(), <a href="q3ftp.html#currentId">currentId</a>(), and <a href="q3ftp.html#currentCommand">currentCommand</a>().</p>
<!-- @@@hasPendingCommands -->
<!-- $$$list[overload1]$$$listconstQString& -->
<h3 class="fn"><a name="list"></a><span class="type">int</span> Q3Ftp::<span class="name">list</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>dir</i> = QString() )</h3>
<p>Lists the contents of directory <i>dir</i> on the FTP server. If <i>dir</i> is empty, it lists the contents of the current directory.</p>
<p>The <a href="q3ftp.html#listInfo">listInfo</a>() signal is emitted for each directory entry found.</p>
<p>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 <a href="q3ftp.html#commandStarted">commandStarted</a>() and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<p>When the command is started the <a href="q3ftp.html#commandStarted">commandStarted</a>() signal is emitted. When it is finished the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal is emitted.</p>
<p><b>See also </b><a href="q3ftp.html#listInfo">listInfo</a>(), <a href="q3ftp.html#commandStarted">commandStarted</a>(), and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<!-- @@@list -->
<!-- $$$listInfo[overload1]$$$listInfoconstQUrlInfo& -->
<h3 class="fn"><a name="listInfo"></a><span class="type">void</span> Q3Ftp::<span class="name">listInfo</span> ( const <span class="type"><a href="qurlinfo.html">QUrlInfo</a></span> &amp; <i>i</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted for each directory entry the <a href="q3ftp.html#list">list</a>() command finds. The details of the entry are stored in <i>i</i>.</p>
<p><b>See also </b><a href="q3ftp.html#list">list</a>().</p>
<!-- @@@listInfo -->
<!-- $$$login[overload1]$$$loginconstQString&constQString& -->
<h3 class="fn"><a name="login"></a><span class="type">int</span> Q3Ftp::<span class="name">login</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>user</i> = QString(), const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>password</i> = QString() )</h3>
<p>Logs in to the FTP server with the username <i>user</i> and the password <i>password</i>.</p>
<p>The <a href="q3ftp.html#stateChanged">stateChanged</a>() signal is emitted when the state of the connecting process changes, e.g&#x2e; to <tt>LoggedIn</tt>.</p>
<p>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 <a href="q3ftp.html#commandStarted">commandStarted</a>() and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<p>When the command is started the <a href="q3ftp.html#commandStarted">commandStarted</a>() signal is emitted. When it is finished the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal is emitted.</p>
<p><b>See also </b><a href="q3ftp.html#commandStarted">commandStarted</a>() and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<!-- @@@login -->
<!-- $$$mkdir[overload1]$$$mkdirconstQString& -->
<h3 class="fn"><a name="mkdir"></a><span class="type">int</span> Q3Ftp::<span class="name">mkdir</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>dir</i> )</h3>
<p>Creates a directory called <i>dir</i> on the server.</p>
<p>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 <a href="q3ftp.html#commandStarted">commandStarted</a>() and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<p>When the command is started the <a href="q3ftp.html#commandStarted">commandStarted</a>() signal is emitted. When it is finished the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal is emitted.</p>
<p><b>See also </b><a href="q3ftp.html#commandStarted">commandStarted</a>() and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<!-- @@@mkdir -->
<!-- $$$operationGet[overload1]$$$operationGetQ3NetworkOperation* -->
<h3 class="fn"><a name="operationGet"></a><span class="type">void</span> Q3Ftp::<span class="name">operationGet</span> ( <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3networkprotocol.html#operationGet">Q3NetworkProtocol::operationGet</a>().</p>
<!-- @@@operationGet -->
<!-- $$$operationListChildren[overload1]$$$operationListChildrenQ3NetworkOperation* -->
<h3 class="fn"><a name="operationListChildren"></a><span class="type">void</span> Q3Ftp::<span class="name">operationListChildren</span> ( <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3networkprotocol.html#operationListChildren">Q3NetworkProtocol::operationListChildren</a>().</p>
<!-- @@@operationListChildren -->
<!-- $$$operationMkDir[overload1]$$$operationMkDirQ3NetworkOperation* -->
<h3 class="fn"><a name="operationMkDir"></a><span class="type">void</span> Q3Ftp::<span class="name">operationMkDir</span> ( <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3networkprotocol.html#operationMkDir">Q3NetworkProtocol::operationMkDir</a>().</p>
<!-- @@@operationMkDir -->
<!-- $$$operationPut[overload1]$$$operationPutQ3NetworkOperation* -->
<h3 class="fn"><a name="operationPut"></a><span class="type">void</span> Q3Ftp::<span class="name">operationPut</span> ( <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3networkprotocol.html#operationPut">Q3NetworkProtocol::operationPut</a>().</p>
<!-- @@@operationPut -->
<!-- $$$operationRemove[overload1]$$$operationRemoveQ3NetworkOperation* -->
<h3 class="fn"><a name="operationRemove"></a><span class="type">void</span> Q3Ftp::<span class="name">operationRemove</span> ( <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3networkprotocol.html#operationRemove">Q3NetworkProtocol::operationRemove</a>().</p>
<!-- @@@operationRemove -->
<!-- $$$operationRename[overload1]$$$operationRenameQ3NetworkOperation* -->
<h3 class="fn"><a name="operationRename"></a><span class="type">void</span> Q3Ftp::<span class="name">operationRename</span> ( <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3networkprotocol.html#operationRename">Q3NetworkProtocol::operationRename</a>().</p>
<!-- @@@operationRename -->
<!-- $$$put[overload1]$$$putQIODevice*constQString& -->
<h3 class="fn"><a name="put"></a><span class="type">int</span> Q3Ftp::<span class="name">put</span> ( <span class="type"><a href="qiodevice.html">QIODevice</a></span> * <i>dev</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>file</i> )</h3>
<p>Reads the data from the IO device <i>dev</i>, and writes it to the file called <i>file</i> on the server. The data is read in chunks from the IO device, so this overload allows you to transmit large amounts of data without the need to read all the data into memory at once.</p>
<p>Make sure that the <i>dev</i> pointer is valid for the duration of the operation (it is safe to delete it when the <a href="q3ftp.html#commandFinished">commandFinished</a>() is emitted).</p>
<!-- @@@put -->
<!-- $$$put$$$putconstQByteArray&constQString& -->
<h3 class="fn"><a name="put-2"></a><span class="type">int</span> Q3Ftp::<span class="name">put</span> ( const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp; <i>data</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>file</i> )</h3>
<p>This is an overloaded function.</p>
<p>Writes the data <i>data</i> to the file called <i>file</i> on the server. The progress of the upload is reported by the <a href="q3ftp.html#dataTransferProgress">dataTransferProgress</a>() signal.</p>
<p>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 <a href="q3ftp.html#commandStarted">commandStarted</a>() and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<p>When the command is started the <a href="q3ftp.html#commandStarted">commandStarted</a>() signal is emitted. When it is finished the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal is emitted.</p>
<p><b>See also </b><a href="q3ftp.html#dataTransferProgress">dataTransferProgress</a>(), <a href="q3ftp.html#commandStarted">commandStarted</a>(), and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<!-- @@@put -->
<!-- $$$rawCommand[overload1]$$$rawCommandconstQString& -->
<h3 class="fn"><a name="rawCommand"></a><span class="type">int</span> Q3Ftp::<span class="name">rawCommand</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>command</i> )</h3>
<p>Sends the raw FTP command <i>command</i> to the FTP server. This is useful for low-level FTP access. If the operation you wish to perform has an equivalent <a href="q3ftp.html" class="compat">Q3Ftp</a> function, we recommend using the function instead of raw FTP commands since the functions are easier and safer.</p>
<p>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 <a href="q3ftp.html#commandStarted">commandStarted</a>() and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<p>When the command is started the <a href="q3ftp.html#commandStarted">commandStarted</a>() signal is emitted. When it is finished the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal is emitted.</p>
<p><b>See also </b><a href="q3ftp.html#rawCommandReply">rawCommandReply</a>(), <a href="q3ftp.html#commandStarted">commandStarted</a>(), and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<!-- @@@rawCommand -->
<!-- $$$rawCommandReply[overload1]$$$rawCommandReplyintconstQString& -->
<h3 class="fn"><a name="rawCommandReply"></a><span class="type">void</span> Q3Ftp::<span class="name">rawCommandReply</span> ( <span class="type">int</span> <i>replyCode</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>detail</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted in response to the <a href="q3ftp.html#rawCommand">rawCommand</a>() function. <i>replyCode</i> is the 3 digit reply code and <i>detail</i> is the text that follows the reply code.</p>
<p><b>See also </b><a href="q3ftp.html#rawCommand">rawCommand</a>().</p>
<!-- @@@rawCommandReply -->
<!-- $$$readAll[overload1]$$$readAll -->
<h3 class="fn"><a name="readAll"></a><span class="type"><a href="qbytearray.html">QByteArray</a></span> Q3Ftp::<span class="name">readAll</span> ()</h3>
<p>Reads all the bytes available from the data socket and returns them.</p>
<p><b>See also </b><a href="q3ftp.html#get">get</a>(), <a href="q3ftp.html#readyRead">readyRead</a>(), <a href="q3ftp.html#bytesAvailable">bytesAvailable</a>(), and <a href="q3ftp.html#readBlock">readBlock</a>().</p>
<!-- @@@readAll -->
<!-- $$$readBlock[overload1]$$$readBlockchar*Q_ULONG -->
<h3 class="fn"><a name="readBlock"></a><span class="type"><a href="qtglobal-qt3.html#Q_LONG-typedef">Q_LONG</a></span> Q3Ftp::<span class="name">readBlock</span> ( <span class="type">char</span> * <i>data</i>, <span class="type"><a href="qtglobal-qt3.html#Q_ULONG-typedef">Q_ULONG</a></span> <i>maxlen</i> )</h3>
<p>Reads <i>maxlen</i> bytes from the data socket into <i>data</i> and returns the number of bytes read. Returns -1 if an error occurred.</p>
<p><b>See also </b><a href="q3ftp.html#get">get</a>(), <a href="q3ftp.html#readyRead">readyRead</a>(), <a href="q3ftp.html#bytesAvailable">bytesAvailable</a>(), and <a href="q3ftp.html#readAll">readAll</a>().</p>
<!-- @@@readBlock -->
<!-- $$$readyRead[overload1]$$$readyRead -->
<h3 class="fn"><a name="readyRead"></a><span class="type">void</span> Q3Ftp::<span class="name">readyRead</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted in response to a <a href="q3ftp.html#get">get</a>() command when there is new data to read.</p>
<p>If you specify a device as the second argument in the <a href="q3ftp.html#get">get</a>() command, this signal is <i>not</i> emitted; instead the data is written directly to the device.</p>
<p>You can read the data with the <a href="q3ftp.html#readAll">readAll</a>() or <a href="q3ftp.html#readBlock">readBlock</a>() functions.</p>
<p>This signal is useful if you want to process the data in chunks as soon as it becomes available. If you are only interested in the complete data, just connect to the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal and read the data then instead.</p>
<p><b>See also </b><a href="q3ftp.html#get">get</a>(), <a href="q3ftp.html#readBlock">readBlock</a>(), <a href="q3ftp.html#readAll">readAll</a>(), and <a href="q3ftp.html#bytesAvailable">bytesAvailable</a>().</p>
<!-- @@@readyRead -->
<!-- $$$remove[overload1]$$$removeconstQString& -->
<h3 class="fn"><a name="remove"></a><span class="type">int</span> Q3Ftp::<span class="name">remove</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>file</i> )</h3>
<p>Deletes the file called <i>file</i> from the server.</p>
<p>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 <a href="q3ftp.html#commandStarted">commandStarted</a>() and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<p>When the command is started the <a href="q3ftp.html#commandStarted">commandStarted</a>() signal is emitted. When it is finished the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal is emitted.</p>
<p><b>See also </b><a href="q3ftp.html#commandStarted">commandStarted</a>() and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<!-- @@@remove -->
<!-- $$$rename[overload1]$$$renameconstQString&constQString& -->
<h3 class="fn"><a name="rename"></a><span class="type">int</span> Q3Ftp::<span class="name">rename</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>oldname</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>newname</i> )</h3>
<p>Renames the file called <i>oldname</i> to <i>newname</i> on the server.</p>
<p>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 <a href="q3ftp.html#commandStarted">commandStarted</a>() and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<p>When the command is started the <a href="q3ftp.html#commandStarted">commandStarted</a>() signal is emitted. When it is finished the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal is emitted.</p>
<p><b>See also </b><a href="q3ftp.html#commandStarted">commandStarted</a>() and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<!-- @@@rename -->
<!-- $$$rmdir[overload1]$$$rmdirconstQString& -->
<h3 class="fn"><a name="rmdir"></a><span class="type">int</span> Q3Ftp::<span class="name">rmdir</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>dir</i> )</h3>
<p>Removes the directory called <i>dir</i> from the server.</p>
<p>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 <a href="q3ftp.html#commandStarted">commandStarted</a>() and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<p>When the command is started the <a href="q3ftp.html#commandStarted">commandStarted</a>() signal is emitted. When it is finished the <a href="q3ftp.html#commandFinished">commandFinished</a>() signal is emitted.</p>
<p><b>See also </b><a href="q3ftp.html#commandStarted">commandStarted</a>() and <a href="q3ftp.html#commandFinished">commandFinished</a>().</p>
<!-- @@@rmdir -->
<!-- $$$state[overload1]$$$state -->
<h3 class="fn"><a name="state"></a><span class="type"><a href="q3ftp.html#State-enum">State</a></span> Q3Ftp::<span class="name">state</span> () const</h3>
<p>Returns the current state of the object. When the state changes, the <a href="q3ftp.html#stateChanged">stateChanged</a>() signal is emitted.</p>
<p><b>See also </b><a href="q3ftp.html#State-enum">State</a> and <a href="q3ftp.html#stateChanged">stateChanged</a>().</p>
<!-- @@@state -->
<!-- $$$stateChanged[overload1]$$$stateChangedint -->
<h3 class="fn"><a name="stateChanged"></a><span class="type">void</span> Q3Ftp::<span class="name">stateChanged</span> ( <span class="type">int</span> <i>state</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the state of the connection changes. The argument <i>state</i> is the new state of the connection; it is one of the <a href="q3ftp.html#State-enum">State</a> values.</p>
<p>It is usually emitted in response to a <a href="q3ftp.html#connectToHost">connectToHost</a>() or <a href="q3ftp.html#close">close</a>() command, but it can also be emitted &quot;spontaneously&quot;, e.g&#x2e; when the server closes the connection unexpectedly.</p>
<p><b>See also </b><a href="q3ftp.html#connectToHost">connectToHost</a>(), <a href="q3ftp.html#close">close</a>(), <a href="q3ftp.html#state">state</a>(), and <a href="q3ftp.html#State-enum">State</a>.</p>
<!-- @@@stateChanged -->
<!-- $$$supportedOperations[overload1]$$$supportedOperations -->
<h3 class="fn"><a name="supportedOperations"></a><span class="type">int</span> Q3Ftp::<span class="name">supportedOperations</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="q3networkprotocol.html#supportedOperations">Q3NetworkProtocol::supportedOperations</a>().</p>
<!-- @@@supportedOperations -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>