Sophie

Sophie

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

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" />
<!-- q3networkprotocol.cpp -->
  <title>Qt 4.8: Q3NetworkProtocol 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>Q3NetworkProtocol</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="#signals">Signals</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</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">Q3NetworkProtocol Class Reference</h1>
<!-- $$$Q3NetworkProtocol-brief -->
<p>The Q3NetworkProtocol class provides a common API for network protocols. <a href="#details">More...</a></p>
<!-- @@@Q3NetworkProtocol -->
<pre class="cpp"> <span class="preprocessor">#include &lt;Q3NetworkProtocol&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#qnetworkprotocol">Porting to Qt 4</a> for more information.</p>
<p><b>Inherits: </b><a href="qobject.html">QObject</a>.</p>
<p><b>Inherited by: </b><a href="q3ftp.html">Q3Ftp</a>, <a href="q3http.html">Q3Http</a>, and <a href="q3localfs.html">Q3LocalFs</a>.</p>
<ul>
<li><a href="q3networkprotocol-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="q3networkprotocol.html#ConnectionState-enum">ConnectionState</a></b> { ConHostFound, ConConnected, ConClosed }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3networkprotocol.html#Error-enum">Error</a></b> { NoError, ErrValid, ErrUnknownProtocol, ErrUnsupported, ..., ErrPermissionDenied }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3networkprotocol.html#Operation-enum">Operation</a></b> { OpListChildren, OpMkDir, OpRemove, OpRename, OpGet, OpPut }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3networkprotocol.html#State-enum">State</a></b> { StWaiting, StInProgress, StDone, StFailed, StStopped }</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="q3networkprotocol.html#Q3NetworkProtocol">Q3NetworkProtocol</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="q3networkprotocol.html#dtor.Q3NetworkProtocol">~Q3NetworkProtocol</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3networkprotocol.html#addOperation">addOperation</a></b> ( Q3NetworkOperation * <i>op</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3networkprotocol.html#autoDelete">autoDelete</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3networkprotocol.html#clearOperationQueue">clearOperationQueue</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3NetworkOperation * </td><td class="memItemRight bottomAlign"><b><a href="q3networkprotocol.html#operationInProgress">operationInProgress</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3networkprotocol.html#setAutoDelete">setAutoDelete</a></b> ( bool <i>b</i>, int <i>i</i> = 10000 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3networkprotocol.html#setUrl">setUrl</a></b> ( Q3UrlOperator * <i>u</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3networkprotocol.html#stop">stop</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="q3networkprotocol.html#supportedOperations">supportedOperations</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3UrlOperator * </td><td class="memItemRight bottomAlign"><b><a href="q3networkprotocol.html#url">url</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">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="q3networkprotocol.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="q3networkprotocol.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="q3networkprotocol.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="q3networkprotocol.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="q3networkprotocol.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="q3networkprotocol.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="q3networkprotocol.html#newChild">newChild</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="q3networkprotocol.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="q3networkprotocol.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="q3networkprotocol.html#start">start</a></b> ( Q3NetworkOperation * <i>op</i> )</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Q3NetworkProtocol * </td><td class="memItemRight bottomAlign"><b><a href="q3networkprotocol.html#getNetworkProtocol">getNetworkProtocol</a></b> ( const QString &amp; <i>protocol</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3networkprotocol.html#hasOnlyLocalFileSystem">hasOnlyLocalFileSystem</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3networkprotocol.html#registerNetworkProtocol">registerNetworkProtocol</a></b> ( const QString &amp; <i>protocol</i>, Q3NetworkProtocolFactoryBase * <i>protocolFactory</i> )</td></tr>
</table>
<ul>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="q3networkprotocol.html#checkConnection">checkConnection</a></b> ( Q3NetworkOperation * <i>op</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3networkprotocol.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="q3networkprotocol.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="q3networkprotocol.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="q3networkprotocol.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="q3networkprotocol.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="q3networkprotocol.html#operationRename">operationRename</a></b> ( Q3NetworkOperation * <i>op</i> )</td></tr>
</table>
<ul>
<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">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$Q3NetworkProtocol-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The Q3NetworkProtocol class provides a common API for network protocols.</p>
<p>This is a base class which should be used for network protocols implementations that can then be used in Qt (e.g&#x2e; in the file dialog) together with the <a href="q3urloperator.html">Q3UrlOperator</a>.</p>
<p>The easiest way to implement a new network protocol is to reimplement the operation*() methods, e.g&#x2e; <a href="q3networkprotocol.html#operationGet">operationGet</a>(), etc. Only the supported operations should be reimplemented. To specify which operations are supported, also reimplement <a href="q3networkprotocol.html#supportedOperations">supportedOperations</a>() and return an int that is OR'd together using the supported operations from the <a href="q3networkprotocol.html#Operation-enum">Q3NetworkProtocol::Operation</a> enum.</p>
<p>When you implement a network protocol this way, it is important to emit the correct signals. Also, always emit the <a href="q3networkprotocol.html#finished">finished</a>() signal when an operation is done (on success <i>and</i> on failure). Qt relies on correctly emitted <a href="q3networkprotocol.html#finished">finished</a>() signals.</p>
</div>
<!-- @@@Q3NetworkProtocol -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ConnectionState$$$ConHostFound$$$ConConnected$$$ConClosed -->
<h3 class="fn"><a name="ConnectionState-enum"></a>enum Q3NetworkProtocol::<span class="name">ConnectionState</span></h3>
<p>When the connection state of a network protocol changes it emits the signal <a href="q3networkprotocol.html#connectionStateChanged">connectionStateChanged</a>(). The first argument is one of the following values:</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>Q3NetworkProtocol::ConHostFound</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Host has been found.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::ConConnected</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Connection to the host has been established.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::ConClosed</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Connection has been closed.</td></tr>
</table>
<!-- @@@ConnectionState -->
<!-- $$$Error$$$NoError$$$ErrValid$$$ErrUnknownProtocol$$$ErrUnsupported$$$ErrParse$$$ErrLoginIncorrect$$$ErrHostNotFound$$$ErrListChildren$$$ErrListChlidren$$$ErrMkDir$$$ErrMkdir$$$ErrRemove$$$ErrRename$$$ErrGet$$$ErrPut$$$ErrFileNotExisting$$$ErrPermissionDenied -->
<h3 class="fn"><a name="Error-enum"></a>enum Q3NetworkProtocol::<span class="name">Error</span></h3>
<p>When an operation fails (finishes unsuccessfully), the <a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a> of the operation returns an error code which has one of the following values:</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>Q3NetworkProtocol::NoError</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">No error occurred.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::ErrValid</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The URL you are operating on is not valid.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::ErrUnknownProtocol</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">There is no protocol implementation available for the protocol of the URL you are operating on (e.g&#x2e; if the protocol is http and no http implementation has been registered).</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::ErrUnsupported</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The operation is not supported by the protocol.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::ErrParse</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">The URL could not be parsed correctly.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::ErrLoginIncorrect</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">You needed to login but the username or password is wrong.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::ErrHostNotFound</tt></td><td class="topAlign"><tt>6</tt></td><td class="topAlign">The specified host (in the URL) couldn't be found.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::ErrListChildren</tt></td><td class="topAlign"><tt>7</tt></td><td class="topAlign">An error occurred while listing the children (files).</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::ErrMkDir</tt></td><td class="topAlign">?</td><td class="topAlign">An error occurred when creating a directory.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::ErrRemove</tt></td><td class="topAlign">?</td><td class="topAlign">An error occurred when removing a child (file).</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::ErrRename</tt></td><td class="topAlign">?</td><td class="topAlign">An error occurred when renaming a child (file).</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::ErrGet</tt></td><td class="topAlign">?</td><td class="topAlign">An error occurred while getting (retrieving) data.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::ErrPut</tt></td><td class="topAlign">?</td><td class="topAlign">An error occurred while putting (uploading) data.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::ErrFileNotExisting</tt></td><td class="topAlign">?</td><td class="topAlign">A file which is needed by the operation doesn't exist.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::ErrPermissionDenied</tt></td><td class="topAlign">?</td><td class="topAlign">Permission for doing the operation has been denied.</td></tr>
</table>
<p>You should also use these error codes when implementing custom network protocols. If this is not possible, you can define your own error codes by using integer values that don't conflict with any of these values.</p>
<!-- @@@Error -->
<!-- $$$Operation$$$OpListChildren$$$OpMkDir$$$OpMkdir$$$OpRemove$$$OpRename$$$OpGet$$$OpPut -->
<h3 class="fn"><a name="Operation-enum"></a>enum Q3NetworkProtocol::<span class="name">Operation</span></h3>
<p>This enum lists the possible operations that a network protocol can support. <a href="q3networkprotocol.html#supportedOperations">supportedOperations</a>() returns an int of these that is OR'd together. Also, the type() of a <a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a> is always one of these values.</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>Q3NetworkProtocol::OpListChildren</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">List the children of a URL, e.g&#x2e; of a directory.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::OpMkDir</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Create a directory.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::OpRemove</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">Remove a child (e.g&#x2e; a file).</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::OpRename</tt></td><td class="topAlign"><tt>8</tt></td><td class="topAlign">Rename a child (e.g&#x2e; a file).</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::OpGet</tt></td><td class="topAlign"><tt>32</tt></td><td class="topAlign">Get data from a location.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::OpPut</tt></td><td class="topAlign"><tt>64</tt></td><td class="topAlign">Put data to a location.</td></tr>
</table>
<!-- @@@Operation -->
<!-- $$$State$$$StWaiting$$$StInProgress$$$StDone$$$StFailed$$$StStopped -->
<h3 class="fn"><a name="State-enum"></a>enum Q3NetworkProtocol::<span class="name">State</span></h3>
<p>This enum contains the state that a <a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a> can have.</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>Q3NetworkProtocol::StWaiting</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The operation is in the <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a>'s queue waiting to be prcessed.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::StInProgress</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The operation is being processed.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::StDone</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The operation has been processed successfully.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::StFailed</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The operation has been processed but an error occurred.</td></tr>
<tr><td class="topAlign"><tt>Q3NetworkProtocol::StStopped</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">The operation has been processed but has been stopped before it finished, and is waiting to be processed.</td></tr>
</table>
<!-- @@@State -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3NetworkProtocol[overload1]$$$Q3NetworkProtocol -->
<h3 class="fn"><a name="Q3NetworkProtocol"></a>Q3NetworkProtocol::<span class="name">Q3NetworkProtocol</span> ()</h3>
<p>Constructor of the network protocol base class. Does some initialization and connecting of signals and slots.</p>
<!-- @@@Q3NetworkProtocol -->
<!-- $$$~Q3NetworkProtocol[overload1]$$$~Q3NetworkProtocol -->
<h3 class="fn"><a name="dtor.Q3NetworkProtocol"></a>Q3NetworkProtocol::<span class="name">~Q3NetworkProtocol</span> ()<tt> [virtual]</tt></h3>
<p>Destructor.</p>
<!-- @@@~Q3NetworkProtocol -->
<!-- $$$addOperation[overload1]$$$addOperationQ3NetworkOperation* -->
<h3 class="fn"><a name="addOperation"></a><span class="type">void</span> Q3NetworkProtocol::<span class="name">addOperation</span> ( <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [virtual]</tt></h3>
<p>Adds the operation <i>op</i> to the operation queue. The operation will be processed as soon as possible. This method returns immediately.</p>
<!-- @@@addOperation -->
<!-- $$$autoDelete[overload1]$$$autoDelete -->
<h3 class="fn"><a name="autoDelete"></a><span class="type">bool</span> Q3NetworkProtocol::<span class="name">autoDelete</span> () const</h3>
<p>Returns true if auto-deleting is enabled; otherwise returns false.</p>
<p><b>See also </b><a href="q3networkprotocol.html#setAutoDelete">Q3NetworkProtocol::setAutoDelete</a>().</p>
<!-- @@@autoDelete -->
<!-- $$$checkConnection[overload1]$$$checkConnectionQ3NetworkOperation* -->
<h3 class="fn"><a name="checkConnection"></a><span class="type">bool</span> Q3NetworkProtocol::<span class="name">checkConnection</span> ( <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [virtual protected]</tt></h3>
<p>For processing operations the network protocol base class calls this method quite often. This should be reimplemented by new network protocols. It should return true if the connection is OK (open); otherwise it should return false. If the connection is not open the protocol should open it.</p>
<p>If the connection can't be opened (e.g&#x2e; because you already tried but the host couldn't be found), set the state of <i>op</i> to <a href="q3networkprotocol.html#State-enum">Q3NetworkProtocol::StFailed</a> and emit the <a href="q3networkprotocol.html#finished">finished</a>() signal with this <a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a> as argument.</p>
<p><i>op</i> is the operation that needs an open connection.</p>
<!-- @@@checkConnection -->
<!-- $$$clearOperationQueue[overload1]$$$clearOperationQueue -->
<h3 class="fn"><a name="clearOperationQueue"></a><span class="type">void</span> Q3NetworkProtocol::<span class="name">clearOperationQueue</span> ()<tt> [virtual]</tt></h3>
<p>Clears the operation queue.</p>
<!-- @@@clearOperationQueue -->
<!-- $$$connectionStateChanged[overload1]$$$connectionStateChangedintconstQString& -->
<h3 class="fn"><a name="connectionStateChanged"></a><span class="type">void</span> Q3NetworkProtocol::<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 state of the connection of the network protocol is changed. <i>state</i> describes the new state, which is one of, <tt>ConHostFound</tt>, <tt>ConConnected</tt> or <tt>ConClosed</tt>. <i>data</i> is a message text.</p>
<!-- @@@connectionStateChanged -->
<!-- $$$createdDirectory[overload1]$$$createdDirectoryconstQUrlInfo&Q3NetworkOperation* -->
<h3 class="fn"><a name="createdDirectory"></a><span class="type">void</span> Q3NetworkProtocol::<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 mkdir() has been successful and the directory has been created. <i>i</i> holds the information about the new directory. <i>op</i> is the pointer to the operation object which contains all the information about the operation, including the state, etc. Using op-&gt;arg( 0 ), you can get the file name of the new directory.</p>
<p>When a protocol emits this signal, <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a> is smart enough to let the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a>, which is used by the network protocol, emit its corresponding signal.</p>
<!-- @@@createdDirectory -->
<!-- $$$data[overload1]$$$dataconstQByteArray&Q3NetworkOperation* -->
<h3 class="fn"><a name="data"></a><span class="type">void</span> Q3NetworkProtocol::<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 get() or put(). <i>op</i> holds the name of the file from which data is retrieved or uploaded in its first argument, and the (raw) data in its second argument. You can get them with op-&gt;arg( 0 ) and op-&gt;rawArg( 1 ). <i>op</i> is the pointer to the operation object, which contains all the information about the operation, including the state, etc.</p>
<p>When a protocol emits this signal, <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a> is smart enough to let the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a> (which is used by the network protocol) emit its corresponding signal.</p>
<!-- @@@data -->
<!-- $$$dataTransferProgress[overload1]$$$dataTransferProgressintintQ3NetworkOperation* -->
<h3 class="fn"><a name="dataTransferProgress"></a><span class="type">void</span> Q3NetworkProtocol::<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 the transfer of data (using put() or get()). <i>bytesDone</i> is how many bytes of <i>bytesTotal</i> have been transferred. <i>bytesTotal</i> may be -1, which means that the total number of bytes is not known. <i>op</i> is the pointer to the operation object which contains all the information about the operation, including the state, etc.</p>
<p>When a protocol emits this signal, <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a> is smart enough to let the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a>, which is used by the network protocol, emit its corresponding signal.</p>
<!-- @@@dataTransferProgress -->
<!-- $$$finished[overload1]$$$finishedQ3NetworkOperation* -->
<h3 class="fn"><a name="finished"></a><span class="type">void</span> Q3NetworkProtocol::<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 finishes. This signal is always emitted, for both success and failure. <i>op</i> is the pointer to the operation object which contains all the information about the operation, including the state, etc. Check the state and error code of the operation object to determine whether or not the operation was successful.</p>
<p>When a protocol emits this signal, <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a> is smart enough to let the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a>, which is used by the network protocol, emit its corresponding signal.</p>
<!-- @@@finished -->
<!-- $$$getNetworkProtocol[overload1]$$$getNetworkProtocolconstQString& -->
<h3 class="fn"><a name="getNetworkProtocol"></a><span class="type">Q3NetworkProtocol</span> * Q3NetworkProtocol::<span class="name">getNetworkProtocol</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>protocol</i> )<tt> [static]</tt></h3>
<p>Static method to get a new instance of the network protocol <i>protocol</i>. For example, if you need to do some FTP operations, do the following:</p>
<pre class="cpp"> <span class="type"><a href="q3ftp.html">Q3Ftp</a></span> <span class="operator">*</span>ftp <span class="operator">=</span> <span class="type"><a href="q3networkprotocol.html">Q3NetworkProtocol</a></span><span class="operator">::</span>getNetworkProtocol( <span class="string">&quot;ftp&quot;</span> );</pre>
<p>This returns a pointer to a new instance of an ftp implementation or null if no protocol for ftp was registered. The ownership of the pointer is transferred to you, so you must delete it if you don't need it anymore.</p>
<p>Normally you should not work directly with network protocols, so you will not need to call this method yourself. Instead, use <a href="q3urloperator.html" class="compat">Q3UrlOperator</a>, which makes working with network protocols much more convenient.</p>
<p><b>See also </b><a href="q3urloperator.html" class="compat">Q3UrlOperator</a>.</p>
<!-- @@@getNetworkProtocol -->
<!-- $$$hasOnlyLocalFileSystem[overload1]$$$hasOnlyLocalFileSystem -->
<h3 class="fn"><a name="hasOnlyLocalFileSystem"></a><span class="type">bool</span> Q3NetworkProtocol::<span class="name">hasOnlyLocalFileSystem</span> ()<tt> [static]</tt></h3>
<p>Returns true if the only protocol registered is for working on the local filesystem; returns false if other network protocols are also registered.</p>
<!-- @@@hasOnlyLocalFileSystem -->
<!-- $$$itemChanged[overload1]$$$itemChangedQ3NetworkOperation* -->
<h3 class="fn"><a name="itemChanged"></a><span class="type">void</span> Q3NetworkProtocol::<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 this URL has been changed, e.g&#x2e; by successfully calling rename(). <i>op</i> holds the original and the new file names in the first and second arguments, accessible with op-&gt;arg( 0 ) and op-&gt;arg( 1 ) respectively. <i>op</i> is the pointer to the operation object which contains all the information about the operation, including the state, etc.</p>
<p>When a protocol emits this signal, <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a> is smart enough to let the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a>, which is used by the network protocol, emit its corresponding signal.</p>
<!-- @@@itemChanged -->
<!-- $$$newChild[overload1]$$$newChildconstQUrlInfo&Q3NetworkOperation* -->
<h3 class="fn"><a name="newChild"></a><span class="type">void</span> Q3NetworkProtocol::<span class="name">newChild</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 if a new child (file) has been read. <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a> automatically connects it to a slot which creates a list of <a href="qurlinfo.html">QUrlInfo</a> objects (with just one <a href="qurlinfo.html">QUrlInfo</a> <i>i</i>) and emits the <a href="q3networkprotocol.html#newChildren">newChildren</a>() signal with this list. <i>op</i> is the pointer to the operation object which contains all the information about the operation that has finished, including the state, etc.</p>
<p>This is just a convenience signal useful for implementing your own network protocol. In all other cases connect to the <a href="q3networkprotocol.html#newChildren">newChildren</a>() signal with its list of <a href="qurlinfo.html">QUrlInfo</a> objects.</p>
<!-- @@@newChild -->
<!-- $$$newChildren[overload1]$$$newChildrenconstQ3ValueList<QUrlInfo>&Q3NetworkOperation* -->
<h3 class="fn"><a name="newChildren"></a><span class="type">void</span> Q3NetworkProtocol::<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 listChildren() was called and new children (files) have been read from the list of files. <i>i</i> holds the information about the new children. <i>op</i> is the pointer to the operation object which contains all the information about the operation, including the state, etc.</p>
<p>When a protocol emits this signal, <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a> is smart enough to let the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a>, which is used by the network protocol, emit its corresponding signal.</p>
<p>When implementing your own network protocol and reading children, you usually don't read one child at once, but rather a list of them. That's why this signal takes a list of <a href="qurlinfo.html">QUrlInfo</a> objects. If you prefer to read just one child at a time you can use the convenience signal <a href="q3networkprotocol.html#newChild">newChild</a>(), which takes a single <a href="qurlinfo.html">QUrlInfo</a> object.</p>
<!-- @@@newChildren -->
<!-- $$$operationGet[overload1]$$$operationGetQ3NetworkOperation* -->
<h3 class="fn"><a name="operationGet"></a><span class="type">void</span> Q3NetworkProtocol::<span class="name">operationGet</span> ( <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [virtual protected]</tt></h3>
<p>When implementing a new network protocol, this method should be reimplemented if the protocol supports getting data; this method should then process the <a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a>.</p>
<p><i>op</i> is the pointer to the operation object which contains all the information on the operation that has finished, including the state, etc.</p>
<!-- @@@operationGet -->
<!-- $$$operationInProgress[overload1]$$$operationInProgress -->
<h3 class="fn"><a name="operationInProgress"></a><span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * Q3NetworkProtocol::<span class="name">operationInProgress</span> () const</h3>
<p>Returns the operation, which is being processed, or 0 of no operation is being processed at the moment.</p>
<!-- @@@operationInProgress -->
<!-- $$$operationListChildren[overload1]$$$operationListChildrenQ3NetworkOperation* -->
<h3 class="fn"><a name="operationListChildren"></a><span class="type">void</span> Q3NetworkProtocol::<span class="name">operationListChildren</span> ( <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [virtual protected]</tt></h3>
<p>When implementing a new network protocol, this method should be reimplemented if the protocol supports listing children (files); this method should then process this <a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a>.</p>
<p><i>op</i> is the pointer to the operation object which contains all the information on the operation that has finished, including the state, etc.</p>
<!-- @@@operationListChildren -->
<!-- $$$operationMkDir[overload1]$$$operationMkDirQ3NetworkOperation* -->
<h3 class="fn"><a name="operationMkDir"></a><span class="type">void</span> Q3NetworkProtocol::<span class="name">operationMkDir</span> ( <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [virtual protected]</tt></h3>
<p>When implementing a new network protocol, this method should be reimplemented if the protocol supports making directories; this method should then process this <a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a>.</p>
<p><i>op</i> is the pointer to the operation object which contains all the information on the operation that has finished, including the state, etc.</p>
<!-- @@@operationMkDir -->
<!-- $$$operationPut[overload1]$$$operationPutQ3NetworkOperation* -->
<h3 class="fn"><a name="operationPut"></a><span class="type">void</span> Q3NetworkProtocol::<span class="name">operationPut</span> ( <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [virtual protected]</tt></h3>
<p>When implementing a new network protocol, this method should be reimplemented if the protocol supports putting (uploading) data; this method should then process the <a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a>.</p>
<p><i>op</i> is the pointer to the operation object which contains all the information on the operation that has finished, including the state, etc.</p>
<!-- @@@operationPut -->
<!-- $$$operationRemove[overload1]$$$operationRemoveQ3NetworkOperation* -->
<h3 class="fn"><a name="operationRemove"></a><span class="type">void</span> Q3NetworkProtocol::<span class="name">operationRemove</span> ( <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [virtual protected]</tt></h3>
<p>When implementing a new network protocol, this method should be reimplemented if the protocol supports removing children (files); this method should then process this <a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a>.</p>
<p><i>op</i> is the pointer to the operation object which contains all the information on the operation that has finished, including the state, etc.</p>
<!-- @@@operationRemove -->
<!-- $$$operationRename[overload1]$$$operationRenameQ3NetworkOperation* -->
<h3 class="fn"><a name="operationRename"></a><span class="type">void</span> Q3NetworkProtocol::<span class="name">operationRename</span> ( <span class="type"><a href="q3networkoperation.html">Q3NetworkOperation</a></span> * <i>op</i> )<tt> [virtual protected]</tt></h3>
<p>When implementing a new network protocol, this method should be reimplemented if the protocol supports renaming children (files); this method should then process this <a href="q3networkoperation.html" class="compat">Q3NetworkOperation</a>.</p>
<p><i>op</i> is the pointer to the operation object which contains all the information on the operation that has finished, including the state, etc.</p>
<!-- @@@operationRename -->
<!-- $$$registerNetworkProtocol[overload1]$$$registerNetworkProtocolconstQString&Q3NetworkProtocolFactoryBase* -->
<h3 class="fn"><a name="registerNetworkProtocol"></a><span class="type">void</span> Q3NetworkProtocol::<span class="name">registerNetworkProtocol</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>protocol</i>, <span class="type">Q3NetworkProtocolFactoryBase</span> * <i>protocolFactory</i> )<tt> [static]</tt></h3>
<p>Static method to register a network protocol for Qt. For example, if you have an implementation of NNTP (called Nntp) which is derived from <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a>, call:</p>
<pre class="cpp"> <span class="type"><a href="q3networkprotocol.html">Q3NetworkProtocol</a></span><span class="operator">::</span>registerNetworkProtocol( <span class="string">&quot;nntp&quot;</span><span class="operator">,</span> <span class="keyword">new</span> <span class="type">Q3NetworkProtocolFactory</span><span class="operator">&lt;</span>Nntp<span class="operator">&gt;</span> );</pre>
<p>after which your implementation is registered for future nntp operations.</p>
<p>The name of the protocol is given in <i>protocol</i> and a pointer to the protocol factory is given in <i>protocolFactory</i>.</p>
<!-- @@@registerNetworkProtocol -->
<!-- $$$removed[overload1]$$$removedQ3NetworkOperation* -->
<h3 class="fn"><a name="removed"></a><span class="type">void</span> Q3NetworkProtocol::<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 remove() has been succesiisful and the file has been removed. <i>op</i> holds the file name of the removed file in the first argument, accessible with op-&gt;arg( 0 ). <i>op</i> is the pointer to the operation object which contains all the information about the operation, including the state, etc.</p>
<p>When a protocol emits this signal, <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a> is smart enough to let the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a>, which is used by the network protocol, emit its corresponding signal.</p>
<!-- @@@removed -->
<!-- $$$setAutoDelete[overload1]$$$setAutoDeleteboolint -->
<h3 class="fn"><a name="setAutoDelete"></a><span class="type">void</span> Q3NetworkProtocol::<span class="name">setAutoDelete</span> ( <span class="type">bool</span> <i>b</i>, <span class="type">int</span> <i>i</i> = 10000 )<tt> [virtual]</tt></h3>
<p>Because it's sometimes hard to take care of removing network protocol instances, <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a> provides an auto-delete mechanism. If you set <i>b</i> to true, the network protocol instance is removed after it has been inactive for <i>i</i> milliseconds (i.e&#x2e; <i>i</i> milliseconds after the last operation has been processed). If you set <i>b</i> to false the auto-delete mechanism is switched off.</p>
<p>If you switch on auto-delete, the <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a> also deletes its <a href="q3urloperator.html" class="compat">Q3UrlOperator</a>.</p>
<p><b>See also </b><a href="q3networkprotocol.html#autoDelete">autoDelete</a>().</p>
<!-- @@@setAutoDelete -->
<!-- $$$setUrl[overload1]$$$setUrlQ3UrlOperator* -->
<h3 class="fn"><a name="setUrl"></a><span class="type">void</span> Q3NetworkProtocol::<span class="name">setUrl</span> ( <span class="type"><a href="q3urloperator.html">Q3UrlOperator</a></span> * <i>u</i> )<tt> [virtual]</tt></h3>
<p>Sets the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a>, on which the protocol works, to <i>u</i>.</p>
<p><b>See also </b><a href="q3networkprotocol.html#url">url</a>() and <a href="q3urloperator.html" class="compat">Q3UrlOperator</a>.</p>
<!-- @@@setUrl -->
<!-- $$$start[overload1]$$$startQ3NetworkOperation* -->
<h3 class="fn"><a name="start"></a><span class="type">void</span> Q3NetworkProtocol::<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 listChildren()) emit this signal when they start processing the operation. <i>op</i> is the pointer to the operation object which contains all the information about the operation, including the state, etc.</p>
<p>When a protocol emits this signal, <a href="q3networkprotocol.html" class="compat">Q3NetworkProtocol</a> is smart enough to let the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a>, which is used by the network protocol, emit its corresponding signal.</p>
<!-- @@@start -->
<!-- $$$stop[overload1]$$$stop -->
<h3 class="fn"><a name="stop"></a><span class="type">void</span> Q3NetworkProtocol::<span class="name">stop</span> ()<tt> [virtual]</tt></h3>
<p>Stops the current operation that is being processed and clears all waiting operations.</p>
<!-- @@@stop -->
<!-- $$$supportedOperations[overload1]$$$supportedOperations -->
<h3 class="fn"><a name="supportedOperations"></a><span class="type">int</span> Q3NetworkProtocol::<span class="name">supportedOperations</span> () const<tt> [virtual]</tt></h3>
<p>Returns an int that is OR'd together using the enum values of <a href="q3networkprotocol.html#Operation-enum">Q3NetworkProtocol::Operation</a>, which describes which operations are supported by the network protocol. Should be reimplemented by new network protocols.</p>
<!-- @@@supportedOperations -->
<!-- $$$url[overload1]$$$url -->
<h3 class="fn"><a name="url"></a><span class="type"><a href="q3urloperator.html">Q3UrlOperator</a></span> * Q3NetworkProtocol::<span class="name">url</span> () const</h3>
<p>Returns the <a href="q3urloperator.html" class="compat">Q3UrlOperator</a> on which the protocol works.</p>
<p><b>See also </b><a href="q3networkprotocol.html#setUrl">setUrl</a>().</p>
<!-- @@@url -->
</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>