Sophie

Sophie

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

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" />
<!-- q3urloperator.cpp -->
  <title>Qt 4.8: Q3UrlOperator 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>Qt3SupportLight</li>
<li>Q3UrlOperator</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-functions">Public Functions</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="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">Q3UrlOperator Class Reference</h1>
<!-- $$$Q3UrlOperator-brief -->
<p>The Q3UrlOperator class provides common operations on URLs. <a href="#details">More...</a></p>
<!-- @@@Q3UrlOperator -->
<pre class="cpp"> <span class="preprocessor">#include &lt;Q3UrlOperator&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#qurloperator">Porting to Qt 4</a> for more information.</p>
<p><b>Inherits: </b><a href="qobject.html">QObject</a> and <a href="q3url.html">Q3Url</a>.</p>
<ul>
<li><a href="q3urloperator-members.html">List of all members, including inherited members</a></li>
</ul>
<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="q3urloperator.html#Q3UrlOperator">Q3UrlOperator</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#Q3UrlOperator-2">Q3UrlOperator</a></b> ( const QString &amp; <i>url</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#Q3UrlOperator-3">Q3UrlOperator</a></b> ( const Q3UrlOperator &amp; <i>url</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#Q3UrlOperator-4">Q3UrlOperator</a></b> ( const Q3UrlOperator &amp; <i>url</i>, const QString &amp; <i>relUrl</i>, bool <i>checkSlash</i> = false )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#dtor.Q3UrlOperator">~Q3UrlOperator</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual Q3PtrList&lt;Q3NetworkOperation&gt; </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#copy">copy</a></b> ( const QString &amp; <i>from</i>, const QString &amp; <i>to</i>, bool <i>move</i> = false, bool <i>toPath</i> = true )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#copy-2">copy</a></b> ( const QStringList &amp; <i>files</i>, const QString &amp; <i>dest</i>, bool <i>move</i> = false )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual const Q3NetworkOperation * </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#get">get</a></b> ( const QString &amp; <i>location</i> = QString() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QUrlInfo </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#info">info</a></b> ( const QString &amp; <i>entry</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#isDir">isDir</a></b> ( bool * <i>ok</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual const Q3NetworkOperation * </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#listChildren">listChildren</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual const Q3NetworkOperation * </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#mkdir">mkdir</a></b> ( const QString &amp; <i>dirname</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#nameFilter">nameFilter</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual const Q3NetworkOperation * </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#put">put</a></b> ( const QByteArray &amp; <i>data</i>, const QString &amp; <i>location</i> = QString() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual const Q3NetworkOperation * </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#remove">remove</a></b> ( const QString &amp; <i>filename</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual const Q3NetworkOperation * </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.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"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#setNameFilter">setNameFilter</a></b> ( const QString &amp; <i>nameFilter</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#stop">stop</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3UrlOperator &amp; </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#operator-eq">operator=</a></b> ( const Q3UrlOperator &amp; <i>url</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3UrlOperator &amp; </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#operator-eq-2">operator=</a></b> ( const QString &amp; <i>url</i> )</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#setPath">setPath</a></b> ( const QString &amp; <i>path</i> )</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li class="fn">37 public functions inherited from <a href="q3url.html#public-functions">Q3Url</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="q3urloperator.html#connectionStateChanged">connectionStateChanged</a></b> ( int <i>state</i>, const QString &amp; <i>data</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#createdDirectory">createdDirectory</a></b> ( const QUrlInfo &amp; <i>i</i>, Q3NetworkOperation * <i>op</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#data">data</a></b> ( const QByteArray &amp; <i>data</i>, Q3NetworkOperation * <i>op</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#dataTransferProgress">dataTransferProgress</a></b> ( int <i>bytesDone</i>, int <i>bytesTotal</i>, Q3NetworkOperation * <i>op</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#finished">finished</a></b> ( Q3NetworkOperation * <i>op</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#itemChanged">itemChanged</a></b> ( Q3NetworkOperation * <i>op</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#newChildren">newChildren</a></b> ( const Q3ValueList&lt;QUrlInfo&gt; &amp; <i>i</i>, Q3NetworkOperation * <i>op</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#removed">removed</a></b> ( Q3NetworkOperation * <i>op</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#start">start</a></b> ( Q3NetworkOperation * <i>op</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#startedNextCopy">startedNextCopy</a></b> ( const Q3PtrList&lt;Q3NetworkOperation&gt; &amp; <i>lst</i> )</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#clearEntries">clearEntries</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#deleteNetworkProtocol">deleteNetworkProtocol</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#getNetworkProtocol">getNetworkProtocol</a></b> ()</td></tr>
</table>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#parse">parse</a></b> ( const QString &amp; <i>url</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#reset">reset</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">2 protected functions inherited from <a href="q3url.html#protected-functions">Q3Url</a></li>
</ul>
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3urloperator.html#q3InitNetworkProtocols">q3InitNetworkProtocols</a></b> ()</td></tr>
</table>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">3 static public members inherited from <a href="q3url.html#static-public-members">Q3Url</a></li>
</ul>
<a name="details"></a>
<!-- $$$Q3UrlOperator-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The Q3UrlOperator class provides common operations on URLs.</p>
<p>This class operates on hierarchical structures (such as filesystems) using URLs. Its API facilitates all the common operations:</p>
<table class="generic">
<thead><tr class="qt-style"><th >Operation</th><th >Function</th></tr></thead>
<tr valign="top" class="odd"><td >List files</td><td ><a href="q3urloperator.html#listChildren">listChildren</a>()</td></tr>
<tr valign="top" class="even"><td >Make a directory</td><td ><a href="q3urloperator.html#mkdir">mkdir</a>()</td></tr>
<tr valign="top" class="odd"><td >Remove a file</td><td ><a href="q3urloperator.html#remove">remove</a>()</td></tr>
<tr valign="top" class="even"><td >Rename a file</td><td ><a href="q3urloperator.html#rename">rename</a>()</td></tr>
<tr valign="top" class="odd"><td >Get a file</td><td ><a href="q3urloperator.html#get">get</a>()</td></tr>
<tr valign="top" class="even"><td >Put a file</td><td ><a href="q3urloperator.html#put">put</a>()</td></tr>
<tr valign="top" class="odd"><td >Copy a file</td><td ><a href="q3urloperator.html#copy">copy</a>()</td></tr>
</table>
<p>You can obtain additional information about the URL with <a href="q3urloperator.html#isDir">isDir</a>() and <a href="q3urloperator.html#info">info</a>(). If a directory is to be traversed using <a href="q3urloperator.html#listChildren">listChildren</a>(), a name filter can be set with <a href="q3urloperator.html#setNameFilter">setNameFilter</a>().</p>
<p>A Q3UrlOperator can be used like this, for example to download a file (and assuming that the FTP protocol is registered):</p>
<pre class="cpp"> <span class="type">Q3UrlOperator</span> <span class="operator">*</span>op <span class="operator">=</span> <span class="keyword">new</span> <span class="type">Q3UrlOperator</span>();
 op<span class="operator">-</span><span class="operator">&gt;</span><a href="q3urloperator.html#copy">copy</a>( <span class="type"><a href="qstring.html">QString</a></span>(<span class="string">&quot;ftp://ftp.qt.nokia.com/qt/source/qt-2.1.0.tar.gz&quot;</span>)<span class="operator">,</span>
          <span class="string">&quot;file:///tmp&quot;</span> );</pre>
<p>If you want to be notified about success/failure, progress, etc., you can connect to Q3UrlOperator's signals, e.g&#x2e; to <a href="q3urloperator.html#start">start</a>(), <a href="q3urloperator.html#newChildren">newChildren</a>(), <a href="q3urloperator.html#createdDirectory">createdDirectory</a>(), <a href="q3urloperator.html#removed">removed</a>(), <a href="q3urloperator.html#data">data</a>(), <a href="q3urloperator.html#dataTransferProgress">dataTransferProgress</a>(), <a href="q3urloperator.html#startedNextCopy">startedNextCopy</a>(), <a href="q3urloperator.html#connectionStateChanged">connectionStateChanged</a>(), <a href="q3urloperator.html#finished">finished</a>(), etc. A network operation can be stopped with <a href="q3urloperator.html#stop">stop</a>().</p>
<p>The class uses the functionality of registered network protocols to perform these operations. Depending of the protocol of the URL, it uses an appropriate network protocol class for the operations. Each of the operation functions of Q3UrlOperator creates a <a href="q3networkoperation.html">Q3NetworkOperation</a> object that describes the operation and puts it into the operation queue for the network protocol used. If no suitable protocol could be found (because no implementation of the necessary network protocol is registered), the URL operator emits errors. Not every protocol supports every operation, but error handling deals with this problem.</p>
<p>To register the available network protocols, use the qInitNetworkProtocols() function. The protocols currently supported are:</p>
<ul>
<li><a href="q3ftp.html">FTP</a>,</li>
<li><a href="q3http.html">HTTP</a>,</li>
<li><a href="q3localfs.html">local file system</a>.</li>
</ul>
</div>
<p><b>See also </b><a href="q3networkprotocol.html">Q3NetworkProtocol</a> and <a href="q3networkoperation.html">Q3NetworkOperation</a>.</p>
<!-- @@@Q3UrlOperator -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3UrlOperator[overload1]$$$Q3UrlOperator -->
<h3 class="fn"><a name="Q3UrlOperator"></a>Q3UrlOperator::<span class="name">Q3UrlOperator</span> ()</h3>
<p>Constructs a <a href="q3urloperator.html" class="compat">Q3UrlOperator</a> with an empty (i.e&#x2e; invalid) URL.</p>
<!-- @@@Q3UrlOperator -->
<!-- $$$Q3UrlOperator$$$Q3UrlOperatorconstQString& -->
<h3 class="fn"><a name="Q3UrlOperator-2"></a>Q3UrlOperator::<span class="name">Q3UrlOperator</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>url</i> )</h3>
<p>Constructs a <a href="q3urloperator.html" class="compat">Q3UrlOperator</a> using <i>url</i> and parses this string.</p>
<p>If you pass strings like &quot;/home/qt&quot; the &quot;file&quot; protocol is assumed.</p>
<!-- @@@Q3UrlOperator -->
<!-- $$$Q3UrlOperator$$$Q3UrlOperatorconstQ3UrlOperator& -->
<h3 class="fn"><a name="Q3UrlOperator-3"></a>Q3UrlOperator::<span class="name">Q3UrlOperator</span> ( const <span class="type">Q3UrlOperator</span> &amp; <i>url</i> )</h3>
<p>Constructs a copy of <i>url</i>.</p>
<!-- @@@Q3UrlOperator -->
<!-- $$$Q3UrlOperator$$$Q3UrlOperatorconstQ3UrlOperator&constQString&bool -->
<h3 class="fn"><a name="Q3UrlOperator-4"></a>Q3UrlOperator::<span class="name">Q3UrlOperator</span> ( const <span class="type">Q3UrlOperator</span> &amp; <i>url</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>relUrl</i>, <span class="type">bool</span> <i>checkSlash</i> = false )</h3>
<p>Constructs a <a href="q3urloperator.html" class="compat">Q3UrlOperator</a>. The URL on which this <a href="q3urloperator.html" class="compat">Q3UrlOperator</a> operates is constructed out of the arguments <i>url</i>, <i>relUrl</i> and <i>checkSlash</i>: see the corresponding <a href="q3url.html" class="compat">Q3Url</a> constructor for an explanation of these arguments.</p>
<!-- @@@Q3UrlOperator -->
<!-- $$$~Q3UrlOperator[overload1]$$$~Q3UrlOperator -->
<h3 class="fn"><a name="dtor.Q3UrlOperator"></a>Q3UrlOperator::<span class="name">~Q3UrlOperator</span> ()<tt> [virtual]</tt></h3>
<p>Destructor.</p>
<!-- @@@~Q3UrlOperator -->
<!-- $$$clearEntries[overload1]$$$clearEntries -->
<h3 class="fn"><a name="clearEntries"></a><span class="type">void</span> Q3UrlOperator::<span class="name">clearEntries</span> ()<tt> [virtual protected]</tt></h3>
<p>Clears the cache of children.</p>
<!-- @@@clearEntries -->
<!-- $$$connectionStateChanged[overload1]$$$connectionStateChangedintconstQString& -->
<h3 class="fn"><a name="connectionStateChanged"></a><span class="type">void</span> Q3UrlOperator::<span class="name">connectionStateChanged</span> ( <span class="type">int</span> <i>state</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>data</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the URL operator's connection state changes. <i>state</i> describes the new state, which is a <a href="q3networkprotocol.html#ConnectionState-enum">Q3NetworkProtocol::ConnectionState</a> value.</p>
<p><i>data</i> is a string that describes the change of the connection. This can be used to display a message to the user.</p>
<!-- @@@connectionStateChanged -->
<!-- $$$copy[overload1]$$$copyconstQString&constQString&boolbool -->
<h3 class="fn"><a name="copy"></a><span class="type"><a href="q3ptrlist.html">Q3PtrList</a></span>&lt;<span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span>&gt; Q3UrlOperator::<span class="name">copy</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>from</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>to</i>, <span class="type">bool</span> <i>move</i> = false, <span class="type">bool</span> <i>toPath</i> = true )<tt> [virtual]</tt></h3>
<p>Copies the file <i>from</i> to <i>to</i>. If <i>move</i> is true, the file is moved (copied and removed). <i>from</i> must point to a file and <i>to</i> must point to a directory (into which <i>from</i> is copied) unless <i>toPath</i> is set to false. If <i>toPath</i> is set to false then the <i>to</i> variable is assumed to be the absolute file path (destination file path + file name). The copying is done using the <a href="q3urloperator.html#get">get</a>() and <a href="q3urloperator.html#put">put</a>() operations. If you want to be notified about the progress of the operation, connect to the <a href="q3urloperator.html#dataTransferProgress">dataTransferProgress</a>() signal. Bear in mind that the <a href="q3urloperator.html#get">get</a>() and <a href="q3urloperator.html#put">put</a>() operations emit this signal through the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a>. The number of transferred bytes and the total bytes that you receive as arguments in this signal do not relate to the whole copy operation; they relate first to the <a href="q3urloperator.html#get">get</a>() and then to the <a href="q3urloperator.html#put">put</a>() operation. Always check what type of operation the signal comes from; this is given in the signal's last argument.</p>
<p>At the end, <a href="q3urloperator.html#finished">finished</a>() (with success or failure) is emitted, so check the state of the network operation object to see whether or not the operation was successful.</p>
<p>Because a move or copy operation consists of multiple operations (<a href="q3urloperator.html#get">get</a>(), <a href="q3urloperator.html#put">put</a>() and maybe <a href="q3urloperator.html#remove">remove</a>()), this function doesn't return a single <a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a>, but rather a list of them. They are in the order: <a href="q3urloperator.html#get">get</a>(), <a href="q3urloperator.html#put">put</a>() and (if applicable) <a href="q3urloperator.html#remove">remove</a>().</p>
<p><b>See also </b><a href="q3urloperator.html#get">get</a>() and <a href="q3urloperator.html#put">put</a>().</p>
<!-- @@@copy -->
<!-- $$$copy$$$copyconstQStringList&constQString&bool -->
<h3 class="fn"><a name="copy-2"></a><span class="type">void</span> Q3UrlOperator::<span class="name">copy</span> ( const <span class="type"><a href="qstringlist.html">QStringList</a></span> &amp; <i>files</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>dest</i>, <span class="type">bool</span> <i>move</i> = false )<tt> [virtual]</tt></h3>
<p>This is an overloaded function.</p>
<p>Copies the <i>files</i> to the directory <i>dest</i>. If <i>move</i> is true the files are moved, not copied. <i>dest</i> must point to a directory.</p>
<p>This function calls <a href="q3urloperator.html#copy">copy</a>() for each entry in <i>files</i> in turn. You don't get a result from this function; each time a new copy begins, <a href="q3urloperator.html#startedNextCopy">startedNextCopy</a>() is emitted, with a list of Q3NetworkOperations that describe the new copy operation.</p>
<!-- @@@copy -->
<!-- $$$createdDirectory[overload1]$$$createdDirectoryconstQUrlInfo&Q3NetworkOperation* -->
<h3 class="fn"><a name="createdDirectory"></a><span class="type">void</span> Q3UrlOperator::<span class="name">createdDirectory</span> ( const <span class="type"><a href="qurlinfo.html">QUrlInfo</a></span> &amp; <i>i</i>, <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when <a href="q3urloperator.html#mkdir">mkdir</a>() succeeds and the directory has been created. <i>i</i> holds the information about the new directory.</p>
<p><i>op</i> is a pointer to the operation object, which contains all the information about the operation, including the state. <tt>op-&gt;arg(0)</tt> holds the new directory's name.</p>
<p><b>See also </b><a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a> and <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a>.</p>
<!-- @@@createdDirectory -->
<!-- $$$data[overload1]$$$dataconstQByteArray&Q3NetworkOperation* -->
<h3 class="fn"><a name="data"></a><span class="type">void</span> Q3UrlOperator::<span class="name">data</span> ( const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp; <i>data</i>, <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when new <i>data</i> has been received after calling <a href="q3urloperator.html#get">get</a>() or <a href="q3urloperator.html#put">put</a>(). <i>op</i> is a pointer to the operation object which contains all the information about the operation, including the state. <tt>op-&gt;arg(0)</tt> holds the name of the file whose data is retrieved and op-&gt;rawArg(1) holds the (raw) data.</p>
<p><b>See also </b><a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a> and <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a>.</p>
<!-- @@@data -->
<!-- $$$dataTransferProgress[overload1]$$$dataTransferProgressintintQ3NetworkOperation* -->
<h3 class="fn"><a name="dataTransferProgress"></a><span class="type">void</span> Q3UrlOperator::<span class="name">dataTransferProgress</span> ( <span class="type">int</span> <i>bytesDone</i>, <span class="type">int</span> <i>bytesTotal</i>, <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted during data transfer (using <a href="q3urloperator.html#put">put</a>() or <a href="q3urloperator.html#get">get</a>()). <i>bytesDone</i> specifies how many bytes of <i>bytesTotal</i> have been transferred. More information about the operation is stored in <i>op</i>, a pointer to the network operation that is processed. <i>bytesTotal</i> may be -1, which means that the total number of bytes is not known.</p>
<p><b>See also </b><a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a> and <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a>.</p>
<!-- @@@dataTransferProgress -->
<!-- $$$deleteNetworkProtocol[overload1]$$$deleteNetworkProtocol -->
<h3 class="fn"><a name="deleteNetworkProtocol"></a><span class="type">void</span> Q3UrlOperator::<span class="name">deleteNetworkProtocol</span> ()<tt> [protected]</tt></h3>
<p>Deletes the currently used network protocol.</p>
<!-- @@@deleteNetworkProtocol -->
<!-- $$$finished[overload1]$$$finishedQ3NetworkOperation* -->
<h3 class="fn"><a name="finished"></a><span class="type">void</span> Q3UrlOperator::<span class="name">finished</span> ( <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when an operation of some sort finishes, whether with success or failure. <i>op</i> is a pointer to the operation object, which contains all the information, including the state, of the operation which has been finished. Check the state and error code of the operation object to see whether or not the operation was successful.</p>
<p><b>See also </b><a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a> and <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a>.</p>
<!-- @@@finished -->
<!-- $$$get[overload1]$$$getconstQString& -->
<h3 class="fn"><a name="get"></a>const <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * Q3UrlOperator::<span class="name">get</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>location</i> = QString() )<tt> [virtual]</tt></h3>
<p>Tells the network protocol to get data from <i>location</i> or, if it is empty, to get data from the location to which this URL points (see <a href="q3url.html#fileName">Q3Url::fileName</a>() and <a href="q3url.html#encodedPathAndQuery">Q3Url::encodedPathAndQuery</a>()). What happens then depends on the network protocol. The <a href="q3urloperator.html#data">data</a>() signal is emitted when data comes in. Because it's unlikely that all data will come in at once, it is common for multiple <a href="q3urloperator.html#data">data</a>() signals to be emitted. The <a href="q3urloperator.html#dataTransferProgress">dataTransferProgress</a>() signal is emitted while processing the operation. At the end, <a href="q3urloperator.html#finished">finished</a>() (with success or failure) is emitted, so check the state of the network operation object to see whether or not the operation was successful.</p>
<p>If <i>location</i> is empty, the path of this <a href="q3urloperator.html" class="compat">Q3UrlOperator</a> should point to a file when you use this operation. If <i>location</i> is not empty, it can be a relative URL (a child of the path to which the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a> points) or an absolute URL.</p>
<p>For example, to get a web page you might do something like this:</p>
<pre class="cpp"> <span class="type"><a href="q3urloperator.html">Q3UrlOperator</a></span> op( <span class="string">&quot;http://www.whatever.org/cgi-bin/search.pl?cmd=Hello&quot;</span> );
 op<span class="operator">.</span>get();</pre>
<p>For most other operations, the path of the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a> must point to a directory. If you want to download a file you could do the following:</p>
<pre class="cpp"> <span class="type"><a href="q3urloperator.html">Q3UrlOperator</a></span> op( <span class="string">&quot;ftp://ftp.whatever.org/pub&quot;</span> );
 <span class="comment">// do some other stuff like op.listChildren() or op.mkdir( &quot;new_dir&quot; )</span>
 op<span class="operator">.</span>get( <span class="string">&quot;a_file.txt&quot;</span> );</pre>
<p>This will get the data of ftp://ftp.whatever.org/pub/a_file.txt.</p>
<p><i>Never</i> do anything like this:</p>
<pre class="cpp"> <span class="type"><a href="q3urloperator.html">Q3UrlOperator</a></span> op( <span class="string">&quot;http://www.whatever.org/cgi-bin&quot;</span> );
 op<span class="operator">.</span>get( <span class="string">&quot;search.pl?cmd=Hello&quot;</span> ); <span class="comment">// WRONG!</span></pre>
<p>If <i>location</i> is not empty and relative it must not contain any queries or references, just the name of a child. So if you need to specify a query or reference, do it as shown in the first example or specify the full URL (such as http://www.whatever.org/cgi-bin/search.pl?cmd=Hello) as <i>location</i>.</p>
<p><b>See also </b><a href="q3urloperator.html#copy">copy</a>().</p>
<!-- @@@get -->
<!-- $$$getNetworkProtocol[overload1]$$$getNetworkProtocol -->
<h3 class="fn"><a name="getNetworkProtocol"></a><span class="type">void</span> Q3UrlOperator::<span class="name">getNetworkProtocol</span> ()<tt> [protected]</tt></h3>
<p>Finds a network protocol for the URL and deletes the old network protocol.</p>
<!-- @@@getNetworkProtocol -->
<!-- $$$info[overload1]$$$infoconstQString& -->
<h3 class="fn"><a name="info"></a><span class="type"><a href="qurlinfo.html">QUrlInfo</a></span> Q3UrlOperator::<span class="name">info</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>entry</i> ) const<tt> [virtual]</tt></h3>
<p>Returns the URL information for the child <i>entry</i>, or returns an empty <a href="qurlinfo.html">QUrlInfo</a> object if there is no information available about <i>entry</i>. Information about <i>entry</i> is only available after a successfully finished <a href="q3urloperator.html#listChildren">listChildren</a>() operation.</p>
<!-- @@@info -->
<!-- $$$isDir[overload1]$$$isDirbool* -->
<h3 class="fn"><a name="isDir"></a><span class="type">bool</span> Q3UrlOperator::<span class="name">isDir</span> ( <span class="type">bool</span> * <i>ok</i> = 0 )<tt> [virtual]</tt></h3>
<p>Returns true if the URL is a directory; otherwise returns false. This may not always work correctly, if the protocol of the URL is something other than file (local filesystem). If you pass a bool pointer as the <i>ok</i> argument, *<i>ok</i> is set to true if the result of this function is known to be correct, and to false otherwise.</p>
<!-- @@@isDir -->
<!-- $$$itemChanged[overload1]$$$itemChangedQ3NetworkOperation* -->
<h3 class="fn"><a name="itemChanged"></a><span class="type">void</span> Q3UrlOperator::<span class="name">itemChanged</span> ( <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever a file which is a child of the URL has been changed, for example by successfully calling <a href="q3urloperator.html#rename">rename</a>(). <i>op</i> is a pointer to the operation object which contains all the information about the operation, including the state. <tt>op-&gt;arg(0)</tt> holds the original file name and <tt>op-&gt;arg(1)</tt> holds the new file name (if it was changed).</p>
<p><b>See also </b><a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a> and <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a>.</p>
<!-- @@@itemChanged -->
<!-- $$$listChildren[overload1]$$$listChildren -->
<h3 class="fn"><a name="listChildren"></a>const <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * Q3UrlOperator::<span class="name">listChildren</span> ()<tt> [virtual]</tt></h3>
<p>Starts listing the children of this URL (e.g&#x2e; the files in the directory). The <a href="q3urloperator.html#start">start</a>() signal is emitted before the first entry is listed and <a href="q3urloperator.html#finished">finished</a>() is emitted after the last one. The <a href="q3urloperator.html#newChildren">newChildren</a>() signal is emitted for each list of new entries. If an error occurs, the signal <a href="q3urloperator.html#finished">finished</a>() is emitted, so be sure to check the state of the network operation pointer.</p>
<p>Because the operation may not be executed immediately, a pointer to the <a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a> object created by this function is returned. This object contains all the data about the operation and is used to refer to this operation later (e.g&#x2e; in the signals that are emitted by the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a>). The return value can also be 0 if the operation object couldn't be created.</p>
<p>The path of this <a href="q3urloperator.html" class="compat">Q3UrlOperator</a> must to point to a directory (because the children of this directory will be listed), not to a file.</p>
<!-- @@@listChildren -->
<!-- $$$mkdir[overload1]$$$mkdirconstQString& -->
<h3 class="fn"><a name="mkdir"></a>const <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * Q3UrlOperator::<span class="name">mkdir</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>dirname</i> )<tt> [virtual]</tt></h3>
<p>Tries to create a directory (child) with the name <i>dirname</i>. If it is successful, a <a href="q3urloperator.html#newChildren">newChildren</a>() signal with the new child is emitted, and the <a href="q3urloperator.html#createdDirectory">createdDirectory</a>() signal with the information about the new child is also emitted. The <a href="q3urloperator.html#finished">finished</a>() signal (with success or failure) is emitted after the operation has been processed, so check the state of the network operation object to see whether or not the operation was successful.</p>
<p>Because the operation will not be executed immediately, a pointer to the <a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a> object created by this function is returned. This object contains all the data about the operation and is used to refer to this operation later (e.g&#x2e; in the signals that are emitted by the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a>). The return value can also be 0 if the operation object couldn't be created.</p>
<p>The path of this <a href="q3urloperator.html" class="compat">Q3UrlOperator</a> must to point to a directory (not a file) because the new directory will be created in this path.</p>
<!-- @@@mkdir -->
<!-- $$$nameFilter[overload1]$$$nameFilter -->
<h3 class="fn"><a name="nameFilter"></a><span class="type"><a href="qstring.html">QString</a></span> Q3UrlOperator::<span class="name">nameFilter</span> () const</h3>
<p>Returns the name filter of the URL.</p>
<p><b>See also </b><a href="q3urloperator.html#setNameFilter">Q3UrlOperator::setNameFilter</a>() and <a href="qdir-qt3.html#nameFilter" class="compat">QDir::nameFilter</a>().</p>
<!-- @@@nameFilter -->
<!-- $$$newChildren[overload1]$$$newChildrenconstQ3ValueList<QUrlInfo>&Q3NetworkOperation* -->
<h3 class="fn"><a name="newChildren"></a><span class="type">void</span> Q3UrlOperator::<span class="name">newChildren</span> ( const <span class="type"><a href="q3valuelist.html">Q3ValueList</a></span>&lt;<span class="type"><a href="qurlinfo.html">QUrlInfo</a></span>&gt; &amp; <i>i</i>, <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted after <a href="q3urloperator.html#listChildren">listChildren</a>() was called and new children (i.e&#x2e; files) have been read from a list of files. <i>i</i> holds the information about the new files. <i>op</i> is a pointer to the operation object which contains all the information about the operation, including the state.</p>
<p><b>See also </b><a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a> and <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a>.</p>
<!-- @@@newChildren -->
<!-- $$$parse[overload1]$$$parseconstQString& -->
<h3 class="fn"><a name="parse"></a><span class="type">bool</span> Q3UrlOperator::<span class="name">parse</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>url</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3url.html#parse">Q3Url::parse</a>().</p>
<!-- @@@parse -->
<!-- $$$put[overload1]$$$putconstQByteArray&constQString& -->
<h3 class="fn"><a name="put"></a>const <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * Q3UrlOperator::<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>location</i> = QString() )<tt> [virtual]</tt></h3>
<p>This function tells the network protocol to put <i>data</i> in <i>location</i>. If <i>location</i> is empty, it puts the <i>data</i> in the location to which the URL points. What happens depends on the network protocol. Depending on the network protocol, some data might come back after putting data, in which case the <a href="q3urloperator.html#data">data</a>() signal is emitted. The <a href="q3urloperator.html#dataTransferProgress">dataTransferProgress</a>() signal is emitted during processing of the operation. At the end, <a href="q3urloperator.html#finished">finished</a>() (with success or failure) is emitted, so check the state of the network operation object to see whether or not the operation was successful.</p>
<p>If <i>location</i> is empty, the path of this <a href="q3urloperator.html" class="compat">Q3UrlOperator</a> should point to a file when you use this operation. If <i>location</i> is not empty, it can be a relative (a child of the path to which the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a> points) or an absolute URL.</p>
<p>For putting some data to a file you can do the following:</p>
<pre class="cpp"> <span class="type"><a href="q3urloperator.html">Q3UrlOperator</a></span> op( <span class="string">&quot;ftp://ftp.whatever.com/home/me/filename.dat&quot;</span> );
 op<span class="operator">.</span>put( data );</pre>
<p>For most other operations, the path of the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a> must point to a directory. If you want to upload data to a file you could do the following:</p>
<pre class="cpp"> <span class="type"><a href="q3urloperator.html">Q3UrlOperator</a></span> op( <span class="string">&quot;ftp://ftp.whatever.com/home/me&quot;</span> );
 <span class="comment">// do some other stuff like op.listChildren() or op.mkdir( &quot;new_dir&quot; )</span>
 op<span class="operator">.</span>put( data<span class="operator">,</span> <span class="string">&quot;filename.dat&quot;</span> );</pre>
<p>This will upload the data to ftp://ftp.whatever.com/home/me/filename.dat.</p>
<p><b>See also </b><a href="q3urloperator.html#copy">copy</a>().</p>
<!-- @@@put -->
<!-- $$$remove[overload1]$$$removeconstQString& -->
<h3 class="fn"><a name="remove"></a>const <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * Q3UrlOperator::<span class="name">remove</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>filename</i> )<tt> [virtual]</tt></h3>
<p>Tries to remove the file (child) <i>filename</i>. If it succeeds the <a href="q3urloperator.html#removed">removed</a>() signal is emitted. <a href="q3urloperator.html#finished">finished</a>() (with success or failure) is also emitted after the operation has been processed, so check the state of the network operation object to see whether or not the operation was successful.</p>
<p>Because the operation will not be executed immediately, a pointer to the <a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a> object created by this function is returned. This object contains all the data about the operation and is used to refer to this operation later (e.g&#x2e; in the signals that are emitted by the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a>). The return value can also be 0 if the operation object couldn't be created.</p>
<p>The path of this <a href="q3urloperator.html" class="compat">Q3UrlOperator</a> must point to a directory; because if <i>filename</i> is relative, it will try to remove it in this directory.</p>
<!-- @@@remove -->
<!-- $$$removed[overload1]$$$removedQ3NetworkOperation* -->
<h3 class="fn"><a name="removed"></a><span class="type">void</span> Q3UrlOperator::<span class="name">removed</span> ( <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when <a href="q3urloperator.html#remove">remove</a>() has been successful and the file has been removed.</p>
<p><i>op</i> is a pointer to the operation object which contains all the information about the operation, including the state. <tt>op-&gt;arg(0)</tt> holds the name of the file that was removed.</p>
<p><b>See also </b><a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a> and <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a>.</p>
<!-- @@@removed -->
<!-- $$$rename[overload1]$$$renameconstQString&constQString& -->
<h3 class="fn"><a name="rename"></a>const <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * Q3UrlOperator::<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> )<tt> [virtual]</tt></h3>
<p>Tries to rename the file (child) called <i>oldname</i> to <i>newname</i>. If it succeeds, the <a href="q3urloperator.html#itemChanged">itemChanged</a>() signal is emitted. <a href="q3urloperator.html#finished">finished</a>() (with success or failure) is also emitted after the operation has been processed, so check the state of the network operation object to see whether or not the operation was successful.</p>
<p>Because the operation may not be executed immediately, a pointer to the <a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a> object created by this function is returned. This object contains all the data about the operation and is used to refer to this operation later (e.g&#x2e; in the signals that are emitted by the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a>). The return value can also be 0 if the operation object couldn't be created.</p>
<p>This path of this <a href="q3urloperator.html" class="compat">Q3UrlOperator</a> must to point to a directory because <i>oldname</i> and <i>newname</i> are handled relative to this directory.</p>
<!-- @@@rename -->
<!-- $$$reset[overload1]$$$reset -->
<h3 class="fn"><a name="reset"></a><span class="type">void</span> Q3UrlOperator::<span class="name">reset</span> ()<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3url.html#reset">Q3Url::reset</a>().</p>
<!-- @@@reset -->
<!-- $$$setNameFilter[overload1]$$$setNameFilterconstQString& -->
<h3 class="fn"><a name="setNameFilter"></a><span class="type">void</span> Q3UrlOperator::<span class="name">setNameFilter</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>nameFilter</i> )<tt> [virtual]</tt></h3>
<p>Sets the name filter of the URL to <i>nameFilter</i>.</p>
<p><b>See also </b><a href="q3urloperator.html#nameFilter">nameFilter</a>() and <a href="qdir-qt3.html#setNameFilter" class="compat">QDir::setNameFilter</a>().</p>
<!-- @@@setNameFilter -->
<!-- $$$setPath[overload1]$$$setPathconstQString& -->
<h3 class="fn"><a name="setPath"></a><span class="type">void</span> Q3UrlOperator::<span class="name">setPath</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>path</i> )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="q3url.html#setPath">Q3Url::setPath</a>().</p>
<!-- @@@setPath -->
<!-- $$$start[overload1]$$$startQ3NetworkOperation* -->
<h3 class="fn"><a name="start"></a><span class="type">void</span> Q3UrlOperator::<span class="name">start</span> ( <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [signal]</tt></h3>
<p>Some operations (such as <a href="q3urloperator.html#listChildren">listChildren</a>()) emit this signal when they start processing the operation. <i>op</i> is a pointer to the operation object which contains all the information about the operation, including the state.</p>
<p><b>See also </b><a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a> and <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a>.</p>
<!-- @@@start -->
<!-- $$$startedNextCopy[overload1]$$$startedNextCopyconstQ3PtrList<Q3NetworkOperation>& -->
<h3 class="fn"><a name="startedNextCopy"></a><span class="type">void</span> Q3UrlOperator::<span class="name">startedNextCopy</span> ( const <span class="type"><a href="q3ptrlist.html">Q3PtrList</a></span>&lt;<span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span>&gt; &amp; <i>lst</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted if <a href="q3urloperator.html#copy">copy</a>() starts a new copy operation. <i>lst</i> contains all Q3NetworkOperations related to this copy operation.</p>
<p><b>See also </b><a href="q3urloperator.html#copy">copy</a>().</p>
<!-- @@@startedNextCopy -->
<!-- $$$stop[overload1]$$$stop -->
<h3 class="fn"><a name="stop"></a><span class="type">void</span> Q3UrlOperator::<span class="name">stop</span> ()<tt> [virtual]</tt></h3>
<p>Stops the current network operation and removes all this <a href="q3urloperator.html" class="compat">Q3UrlOperator</a>'s waiting network operations.</p>
<!-- @@@stop -->
<!-- $$$operator=[overload1]$$$operator=constQ3UrlOperator& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">Q3UrlOperator</span> &amp; Q3UrlOperator::<span class="name">operator=</span> ( const <span class="type">Q3UrlOperator</span> &amp; <i>url</i> )</h3>
<p>Assigns <i>url</i> to this object.</p>
<!-- @@@operator= -->
<!-- $$$operator=$$$operator=constQString& -->
<h3 class="fn"><a name="operator-eq-2"></a><span class="type">Q3UrlOperator</span> &amp; Q3UrlOperator::<span class="name">operator=</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>url</i> )</h3>
<p>Assigns <i>url</i> to this object.</p>
<!-- @@@operator= -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$q3InitNetworkProtocols[overload1]$$$q3InitNetworkProtocols -->
<h3 class="fn"><a name="q3InitNetworkProtocols"></a><span class="type">void</span> <span class="name">q3InitNetworkProtocols</span> ()</h3>
<p>This function registers the network protocols for FTP and HTTP. You must call this function before you use <a href="porting4.html#qurloperator">QUrlOperator</a> for these protocols.</p>
<!-- @@@q3InitNetworkProtocols -->
</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>