diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-26 23:32:43 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-26 23:32:43 -0600 |
commit | ea318d1431c89e647598c510c4245c6571aa5f46 (patch) | |
tree | 996d29b80c30d453dda86d1a23162d441628f169 /doc/html/network.html | |
parent | aaf89d4b48f69c9293feb187db26362e550b5561 (diff) | |
download | tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.tar.gz tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.zip |
Update to latest tqt3 automated conversion
Diffstat (limited to 'doc/html/network.html')
-rw-r--r-- | doc/html/network.html | 150 |
1 files changed, 75 insertions, 75 deletions
diff --git a/doc/html/network.html b/doc/html/network.html index 5d395af9c..c7bd4013b 100644 --- a/doc/html/network.html +++ b/doc/html/network.html @@ -53,34 +53,34 @@ body { background: #ffffff; color: black; } </h2> <a name="1"></a><p> The network module offers classes to make network programming easier and portable. Essentially, there are three sets of classes, first low -level classes like <a href="qsocket.html">TQSocket</a>, <a href="qserversocket.html">TQServerSocket</a>, <a href="qdns.html">TQDns</a>, etc. which +level classes like <a href="ntqsocket.html">TQSocket</a>, <a href="ntqserversocket.html">TQServerSocket</a>, <a href="ntqdns.html">TQDns</a>, etc. which allow you to work in a portable way with TCP/IP sockets. In addition, -there are classes like <a href="qnetworkprotocol.html">TQNetworkProtocol</a>, <a href="qnetworkoperation.html">TQNetworkOperation</a> in +there are classes like <a href="ntqnetworkprotocol.html">TQNetworkProtocol</a>, <a href="qnetworkoperation.html">TQNetworkOperation</a> in the TQt base library, which provide an abstract layer for implementing -network protocols and <a href="qurloperator.html">TQUrlOperator</a> which operates on such network +network protocols and <a href="ntqurloperator.html">TQUrlOperator</a> which operates on such network protocols. Finally the third set of network classes are the passive -ones, specifically <a href="qurl.html">TQUrl</a> and <a href="qurlinfo.html">TQUrlInfo</a> which do URL parsing and +ones, specifically <a href="ntqurl.html">TQUrl</a> and <a href="ntqurlinfo.html">TQUrlInfo</a> which do URL parsing and similar. -<p> The first set of classes (<a href="qsocket.html">TQSocket</a>, <a href="qserversocket.html">TQServerSocket</a>, <a href="qdns.html">TQDns</a>, <a href="qftp.html">TQFtp</a>, etc.) are included in TQt's "network" module. -<p> The <a href="qsocket.html">TQSocket</a> classes are not directly related to the TQNetwork classes, +<p> The first set of classes (<a href="ntqsocket.html">TQSocket</a>, <a href="ntqserversocket.html">TQServerSocket</a>, <a href="ntqdns.html">TQDns</a>, <a href="ntqftp.html">TQFtp</a>, etc.) are included in TQt's "network" module. +<p> The <a href="ntqsocket.html">TQSocket</a> classes are not directly related to the TQNetwork classes, but TQSocket should and will be used for implementing network protocols, which are directly related to the TQNetwork classes. For -example, the <a href="qftp.html">TQFtp</a> class (which implements the FTP protocol) uses +example, the <a href="ntqftp.html">TQFtp</a> class (which implements the FTP protocol) uses TQSockets. But TQSockets don't need to be used for protocol -implementations, e.g. <a href="qlocalfs.html">TQLocalFs</a> (which is an implementation of the -local filesystem as network protocol) uses <a href="qdir.html">TQDir</a> and doesn't use +implementations, e.g. <a href="ntqlocalfs.html">TQLocalFs</a> (which is an implementation of the +local filesystem as network protocol) uses <a href="ntqdir.html">TQDir</a> and doesn't use TQSocket. Using TQNetworkProtocols you can implement everything which fits into a hierarchical structure and can be accessed using URLs. This could be, for example, a protocol which can read pictures from a digital camera using a serial connection. -<p> <h2> Working Network Protocol independently with <a href="qurloperator.html">TQUrlOperator</a> and <a href="qnetworkoperation.html">TQNetworkOperation</a> +<p> <h2> Working Network Protocol independently with <a href="ntqurloperator.html">TQUrlOperator</a> and <a href="qnetworkoperation.html">TQNetworkOperation</a> </h2> <a name="2"></a><p> It is quite easy to just use existing network protocol implementations and operate on URLs. For example, downloading a file from an FTP server to the local filesystem can be done with following code: <p> <pre> - <a href="qurloperator.html">TQUrlOperator</a> op; - op.<a href="qurloperator.html#copy">copy</a>( "ftp://ftp.trolltech.com/qt/source/qt-2.1.0.tar.gz", "file:/tmp", FALSE ); + <a href="ntqurloperator.html">TQUrlOperator</a> op; + op.<a href="ntqurloperator.html#copy">copy</a>( "ftp://ftp.trolltech.com/qt/source/qt-2.1.0.tar.gz", "file:/tmp", FALSE ); </pre> <p> And that's all! Of course an implementation of the FTP protocol has to @@ -90,11 +90,11 @@ later. renaming, etc. For example, to create a folder on a private FTP account do <p> <pre> - <a href="qurloperator.html">TQUrlOperator</a> op( "ftp://username:password@host.domain.no/home/username" ); - op.<a href="qurloperator.html#mkdir">mkdir</a>( "New Directory" ); + <a href="ntqurloperator.html">TQUrlOperator</a> op( "ftp://username:password@host.domain.no/home/username" ); + op.<a href="ntqurloperator.html#mkdir">mkdir</a>( "New Directory" ); </pre> -<p> To see all available operations, look at the <a href="qurloperator.html">TQUrlOperator</a> class +<p> To see all available operations, look at the <a href="ntqurloperator.html">TQUrlOperator</a> class documentation. <p> Since networking works asynchronously, the function call for an operation will normally return before the operation has been @@ -105,12 +105,12 @@ all the information about the operation. <p> For example, <a href="qnetworkoperation.html">TQNetworkOperation</a> has a method which returns the state of this operation. Using this you can find out the state of the operation at any time. The object also makes available the arguments -you passed to the <a href="qurloperator.html">TQUrlOperator</a> method, the type of the operation +you passed to the <a href="ntqurloperator.html">TQUrlOperator</a> method, the type of the operation and some more information. For more details see the class documentation of <a href="qnetworkoperation.html">TQNetworkOperation</a>. -<p> The <a href="qurloperator.html">TQUrlOperator</a> emits signals to inform you about the progress of -the operations. As you can call many methods which operate on a <a href="qurloperator.html">TQUrlOperator</a>'s URL, it queues up all the operations. So you can't know -which operation the <a href="qurloperator.html">TQUrlOperator</a> just processed. Clearly you will +<p> The <a href="ntqurloperator.html">TQUrlOperator</a> emits signals to inform you about the progress of +the operations. As you can call many methods which operate on a <a href="ntqurloperator.html">TQUrlOperator</a>'s URL, it queues up all the operations. So you can't know +which operation the <a href="ntqurloperator.html">TQUrlOperator</a> just processed. Clearly you will want to know which operation just took place, so each signal's last argument is a pointer to the <a href="qnetworkoperation.html">TQNetworkOperation</a> object which was just processed and which caused the signal to be emitted. @@ -119,8 +119,8 @@ this makes sense), and some of them send some signals during processing. All operations send a <tt>finished()</tt> signal after they are done. To find that out if an operation finished successfully you can use the <a href="qnetworkoperation.html">TQNetworkOperation</a> pointer you got with the <tt>finished()</tt> -signal. If <a href="qnetworkoperation.html#state">TQNetworkOperation::state</a>() equals <a href="qnetworkprotocol.html#State-enum">TQNetworkProtocol::StDone</a> the operation finished successfully, if it is -<a href="qnetworkprotocol.html#State-enum">TQNetworkProtocol::StFailed</a> the operation failed. +signal. If <a href="qnetworkoperation.html#state">TQNetworkOperation::state</a>() equals <a href="ntqnetworkprotocol.html#State-enum">TQNetworkProtocol::StDone</a> the operation finished successfully, if it is +<a href="ntqnetworkprotocol.html#State-enum">TQNetworkProtocol::StFailed</a> the operation failed. <p> Example: A slot which you might connect to the <tt>TQUrlOperator::finished( TQNetworkOperation * )</tt> <pre> @@ -129,9 +129,9 @@ void MyClass::slotOperationFinished( <a href="qnetworkoperation.html">TQNetworkO switch ( op-><a href="qnetworkoperation.html#operation">operation</a>() ) { case TQNetworkProtocol::OpMkDir: if ( op-><a href="qnetworkoperation.html#state">state</a>() == TQNetworkProtocol::StFailed ) - <a href="qapplication.html#qDebug">qDebug</a>( "Couldn't create directory %s", op-><a href="qnetworkoperation.html#arg">arg</a>( 0 ).latin1() ); + <a href="ntqapplication.html#qDebug">qDebug</a>( "Couldn't create directory %s", op-><a href="qnetworkoperation.html#arg">arg</a>( 0 ).latin1() ); else - <a href="qapplication.html#qDebug">qDebug</a>( "Successfully created directory %s", op-><a href="qnetworkoperation.html#arg">arg</a>( 0 ).latin1() ); + <a href="ntqapplication.html#qDebug">qDebug</a>( "Successfully created directory %s", op-><a href="qnetworkoperation.html#arg">arg</a>( 0 ).latin1() ); break; // ... and so on } @@ -144,49 +144,49 @@ on a FTP server): <p> <pre> TQUrlOperator op; -MyClass::MyClass() : <a href="qobject.html">TQObject</a>(), op( "ftp://ftp.trolltech.com" ) +MyClass::MyClass() : <a href="ntqobject.html">TQObject</a>(), op( "ftp://ftp.trolltech.com" ) { - connect( &op, SIGNAL( newChildren( const <a href="qvaluelist.html">TQValueList</a><TQUrlInfo> &, TQNetworkOperation * ) ), - this, SLOT( slotInsertEntries( const <a href="qvaluelist.html">TQValueList</a><TQUrlInfo> &, TQNetworkOperation * ) ) ); + connect( &op, SIGNAL( newChildren( const <a href="ntqvaluelist.html">TQValueList</a><TQUrlInfo> &, TQNetworkOperation * ) ), + this, SLOT( slotInsertEntries( const <a href="ntqvaluelist.html">TQValueList</a><TQUrlInfo> &, TQNetworkOperation * ) ) ); connect( &op, SIGNAL( start( <a href="qnetworkoperation.html">TQNetworkOperation</a> * ) ), this, SLOT( slotStart( <a href="qnetworkoperation.html">TQNetworkOperation</a> *) ) ); connect( &op, SIGNAL( finished( <a href="qnetworkoperation.html">TQNetworkOperation</a> * ) ), this, SLOT( slotFinished( <a href="qnetworkoperation.html">TQNetworkOperation</a> *) ) ); } -void MyClass::slotInsertEntries( const <a href="qvaluelist.html">TQValueList</a><TQUrlInfo> &info, TQNetworkOperation * ) +void MyClass::slotInsertEntries( const <a href="ntqvaluelist.html">TQValueList</a><TQUrlInfo> &info, TQNetworkOperation * ) { - TQValueList<TQUrlInfo>::ConstIterator it = info.<a href="qvaluelist.html#begin">begin</a>(); - for ( ; it != info.<a href="qvaluelist.html#end">end</a>(); ++it ) { - const <a href="qurlinfo.html">TQUrlInfo</a> &inf = *it; - <a href="qapplication.html#qDebug">qDebug</a>( "Name: %s, Size: %d, Last Modified: %s", - inf.<a href="qurlinfo.html#name">name</a>().latin1(), inf.<a href="qurlinfo.html#size">size</a>(), inf.<a href="qurlinfo.html#lastModified">lastModified</a>().toString().latin1() ); + TQValueList<TQUrlInfo>::ConstIterator it = info.<a href="ntqvaluelist.html#begin">begin</a>(); + for ( ; it != info.<a href="ntqvaluelist.html#end">end</a>(); ++it ) { + const <a href="ntqurlinfo.html">TQUrlInfo</a> &inf = *it; + <a href="ntqapplication.html#qDebug">qDebug</a>( "Name: %s, Size: %d, Last Modified: %s", + inf.<a href="ntqurlinfo.html#name">name</a>().latin1(), inf.<a href="ntqurlinfo.html#size">size</a>(), inf.<a href="ntqurlinfo.html#lastModified">lastModified</a>().toString().latin1() ); } } void MyClass::slotStart( <a href="qnetworkoperation.html">TQNetworkOperation</a> * ) { - <a href="qapplication.html#qDebug">qDebug</a>( "Start reading '%s'", op.toString().latin1() ); + <a href="ntqapplication.html#qDebug">qDebug</a>( "Start reading '%s'", op.toString().latin1() ); } void MyClass::slotFinished( <a href="qnetworkoperation.html">TQNetworkOperation</a> *operation ) { if ( operation-><a href="qnetworkoperation.html#operation">operation</a>() == TQNetworkProtocol::OpListChildren ) { if ( operation-><a href="qnetworkoperation.html#state">state</a>() == TQNetworkProtocol::StFailed ) - <a href="qapplication.html#qDebug">qDebug</a>( "Couldn't read '%s'! Following error occurred: %s", + <a href="ntqapplication.html#qDebug">qDebug</a>( "Couldn't read '%s'! Following error occurred: %s", op.toString().latin1(), operation-><a href="qnetworkoperation.html#protocolDetail">protocolDetail</a>().latin1() ); else - <a href="qapplication.html#qDebug">qDebug</a>( "Finished reading '%s'!", op.toString().latin1() ); + <a href="ntqapplication.html#qDebug">qDebug</a>( "Finished reading '%s'!", op.toString().latin1() ); } } </pre> -<p> These examples demonstrate now how to use the <a href="qurloperator.html">TQUrlOperator</a> and <tt>TQNetworkOperations</tt>. The network extension also contains useful example +<p> These examples demonstrate now how to use the <a href="ntqurloperator.html">TQUrlOperator</a> and <tt>TQNetworkOperations</tt>. The network extension also contains useful example code. <p> <h3> Implementing your own Network Protocol </h3> -<a name="2-1"></a><p> <a href="qnetworkprotocol.html">TQNetworkProtocol</a> provides a base class for implementations +<a name="2-1"></a><p> <a href="ntqnetworkprotocol.html">TQNetworkProtocol</a> provides a base class for implementations of network protocols and an architecture for the a dynamic registration and de-registration of network protocols. If you use this architecture you don't need to care about asynchronous programming, as @@ -199,7 +199,7 @@ hierarchical structure and accessed via URLs, can be implemented as network protocol and easily used in TQt. This is not limited to filesystems only! <p> To implement a network protocol create a class derived from -<a href="qnetworkprotocol.html">TQNetworkProtocol</a>. +<a href="ntqnetworkprotocol.html">TQNetworkProtocol</a>. <p> Other classes will use this network protocol implementation to operate on it. So you should reimplement following protected members <p> <pre> @@ -214,9 +214,9 @@ to operate on it. So you should reimplement following protected members <p> Some notes on reimplementing these methods: You always get a pointer to a <a href="qnetworkoperation.html">TQNetworkOperation</a> as argument. This pointer holds all the information about the operation in the current state. If you start -processing such an operation, set the state to <a href="qnetworkprotocol.html#State-enum">TQNetworkProtocol::StInProgress</a>. If you finished processing the -operation, set the state to <a href="qnetworkprotocol.html#State-enum">TQNetworkProtocol::StDone</a> if it was -successful or <a href="qnetworkprotocol.html#State-enum">TQNetworkProtocol::StFailed</a> if an error occurred. If +processing such an operation, set the state to <a href="ntqnetworkprotocol.html#State-enum">TQNetworkProtocol::StInProgress</a>. If you finished processing the +operation, set the state to <a href="ntqnetworkprotocol.html#State-enum">TQNetworkProtocol::StDone</a> if it was +successful or <a href="ntqnetworkprotocol.html#State-enum">TQNetworkProtocol::StFailed</a> if an error occurred. If an error occurred you must set an error code (see <a href="qnetworkoperation.html#setErrorCode">TQNetworkOperation::setErrorCode</a>()) and if you know some details (e.g. an error message) you can also set this message to the operation @@ -269,10 +269,10 @@ to the user. </ul> </ul> <p> And remember, always emit the <tt>finished()</tt> signal at the end! -<p> For more details about these signals' arguments look at the <a href="qnetworkprotocol.html">TQNetworkProtocol</a> class documentation. +<p> For more details about these signals' arguments look at the <a href="ntqnetworkprotocol.html">TQNetworkProtocol</a> class documentation. <p> Here is a list of which <a href="qnetworkoperation.html">TQNetworkOperation</a> arguments you can get and which you must set in which function: -<p> (To get the URL on which you should work, use the <a href="qnetworkprotocol.html#url">TQNetworkProtocol::url</a>() method which returns a pointer to the URL +<p> (To get the URL on which you should work, use the <a href="ntqnetworkprotocol.html#url">TQNetworkProtocol::url</a>() method which returns a pointer to the URL operator. Using that you can get the path, host, name filter, etc.) <p> <ul> <li> In <tt>operationListChildren</tt>: @@ -287,7 +287,7 @@ operator. Using that you can get the path, host, name filter, etc.) <ul> <li> <tt>TQNetworkOperation::arg( 0 )</tt> contains the name of the file which should be removed. Normally this is a relative name. But -it could be absolute. Use <a href="qurl.html">TQUrl</a>( op->arg( 0 ) ).fileName() +it could be absolute. Use <a href="ntqurl.html">TQUrl</a>( op->arg( 0 ) ).fileName() to get the filename. </ul> <li> In <tt>operationRename</tt>: @@ -326,7 +326,7 @@ reimplementing <p> In your implementation of this method return an <tt>int</tt> value which is constructed by OR-ing together the correct values -(supported operations) of the following enum (of <a href="qnetworkprotocol.html">TQNetworkProtocol</a>): +(supported operations) of the following enum (of <a href="ntqnetworkprotocol.html">TQNetworkProtocol</a>): <p> <ul> <li> <tt>OpListChildren</tt> <li> <tt>OpMkDir</tt> @@ -350,74 +350,74 @@ them, your implementation of <tt>supportedOperations()</tt> should do this: operations on the protocol can be done). If the connection is not okay, return FALSE and start to try opening it. If you cannot open the connection at all (e.g. because the host is not found), emit a <tt>finished()</tt> -signal and set an error code and the <a href="qnetworkprotocol.html#State-enum">TQNetworkProtocol::StFailed</a> state to +signal and set an error code and the <a href="ntqnetworkprotocol.html#State-enum">TQNetworkProtocol::StFailed</a> state to the <a href="qnetworkoperation.html">TQNetworkOperation</a> pointer you get here. <p> Now, you never need to check before doing an operation yourself, if the connection is okay. The network architecture does this, which means it uses <tt>checkConnection()</tt> to see if an operation can be done and if not, it tries it again and again for some time, only calling an operation function if the connection is okay. -<p> To be able to use a network protocol with a <a href="qurloperator.html">TQUrlOperator</a> (and so, for -example, in the <a href="qfiledialog.html">TQFileDialog</a>), you must register the network +<p> To be able to use a network protocol with a <a href="ntqurloperator.html">TQUrlOperator</a> (and so, for +example, in the <a href="ntqfiledialog.html">TQFileDialog</a>), you must register the network protocol implementation. This can be done like this: <p> <pre> - TQNetworkProtocol::<a href="qnetworkprotocol.html#registerNetworkProtocol">registerNetworkProtocol</a>( "myprot", new TQNetworkProtocolFactory<MyProtocol> ); + TQNetworkProtocol::<a href="ntqnetworkprotocol.html#registerNetworkProtocol">registerNetworkProtocol</a>( "myprot", new TQNetworkProtocolFactory<MyProtocol> ); </pre> <p> In this case <tt>MyProtocol</tt> would be a class you implemented as -described here (derived from <a href="qnetworkprotocol.html">TQNetworkProtocol</a>) and the name of the +described here (derived from <a href="ntqnetworkprotocol.html">TQNetworkProtocol</a>) and the name of the protocol would be "myprot". So to use it, you would do something like <p> <pre> - <a href="qurloperator.html">TQUrlOperator</a> op( "myprot://host/path" ); - op.<a href="qurloperator.html#listChildren">listChildren</a>(); + <a href="ntqurloperator.html">TQUrlOperator</a> op( "myprot://host/path" ); + op.<a href="ntqurloperator.html#listChildren">listChildren</a>(); </pre> <p> Finally, as example of a network protocol implementation you could -look at the implementation of <a href="qlocalfs.html">TQLocalFs</a>. The network extension also +look at the implementation of <a href="ntqlocalfs.html">TQLocalFs</a>. The network extension also contains an example implementation of a network protocol. <p> <h3> Error Handling </h3> <a name="2-2"></a><p> Error handling is important for both implementing new network -protocols for and using them (through <a href="qurloperator.html">TQUrlOperator</a>). +protocols for and using them (through <a href="ntqurloperator.html">TQUrlOperator</a>). <p> After processing an operation has been finished the network operation -the <a href="qurloperator.html">TQUrlOperator</a> emits the <tt>finished()</tt> signal. This has as argument +the <a href="ntqurloperator.html">TQUrlOperator</a> emits the <tt>finished()</tt> signal. This has as argument a pointer to the processed <a href="qnetworkoperation.html">TQNetworkOperation</a>. If the state of this -operation is <a href="qnetworkprotocol.html#State-enum">TQNetworkProtocol::StFailed</a>, the operation contains +operation is <a href="ntqnetworkprotocol.html#State-enum">TQNetworkProtocol::StFailed</a>, the operation contains some more information about this error. The following error codes are -defined in <a href="qnetworkprotocol.html">TQNetworkProtocol</a>: +defined in <a href="ntqnetworkprotocol.html">TQNetworkProtocol</a>: <p> <center><table cellpadding="4" cellspacing="2" border="0"> <tr bgcolor="#a2c511"> <th valign="top">Error <th valign="top">Meaning -<tr bgcolor="#f0f0f0"> <td valign="top"><a href="qnetworkprotocol.html#Error-enum">TQNetworkProtocol::NoError</a> +<tr bgcolor="#f0f0f0"> <td valign="top"><a href="ntqnetworkprotocol.html#Error-enum">TQNetworkProtocol::NoError</a> <td valign="top">No error occurred -<tr bgcolor="#d0d0d0"> <td valign="top"><a href="qnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrValid</a> +<tr bgcolor="#d0d0d0"> <td valign="top"><a href="ntqnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrValid</a> <td valign="top">The URL you are operating on is not valid -<tr bgcolor="#f0f0f0"> <td valign="top"><a href="qnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrUnknownProtocol</a> +<tr bgcolor="#f0f0f0"> <td valign="top"><a href="ntqnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrUnknownProtocol</a> <td valign="top">There is no protocol implementation available for the protocol of the URL you are operating on (e.g. if the protocol is http and no http implementation has been registered) -<tr bgcolor="#d0d0d0"> <td valign="top"><a href="qnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrUnsupported</a> +<tr bgcolor="#d0d0d0"> <td valign="top"><a href="ntqnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrUnsupported</a> <td valign="top">The operation is not supported by the protocol -<tr bgcolor="#f0f0f0"> <td valign="top"><a href="qnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrParse</a> +<tr bgcolor="#f0f0f0"> <td valign="top"><a href="ntqnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrParse</a> <td valign="top">Parse error of the URL -<tr bgcolor="#d0d0d0"> <td valign="top"><a href="qnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrLoginIncorrect</a> +<tr bgcolor="#d0d0d0"> <td valign="top"><a href="ntqnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrLoginIncorrect</a> <td valign="top">You needed to login but the username or password are wrong -<tr bgcolor="#f0f0f0"> <td valign="top"><a href="qnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrHostNotFound</a> +<tr bgcolor="#f0f0f0"> <td valign="top"><a href="ntqnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrHostNotFound</a> <td valign="top">The specified host (in the URL) couldn't be found -<tr bgcolor="#d0d0d0"> <td valign="top"><a href="qnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrListChildren</a> +<tr bgcolor="#d0d0d0"> <td valign="top"><a href="ntqnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrListChildren</a> <td valign="top">An error occurred while listing the children -<tr bgcolor="#f0f0f0"> <td valign="top"><a href="qnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrMkDir</a> +<tr bgcolor="#f0f0f0"> <td valign="top"><a href="ntqnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrMkDir</a> <td valign="top">An error occurred when creating a directory -<tr bgcolor="#d0d0d0"> <td valign="top"><a href="qnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrRemove</a> +<tr bgcolor="#d0d0d0"> <td valign="top"><a href="ntqnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrRemove</a> <td valign="top">An error occurred while removing a child -<tr bgcolor="#f0f0f0"> <td valign="top"><a href="qnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrRename</a> +<tr bgcolor="#f0f0f0"> <td valign="top"><a href="ntqnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrRename</a> <td valign="top">An error occurred while renaming a child -<tr bgcolor="#d0d0d0"> <td valign="top"><a href="qnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrGet</a> +<tr bgcolor="#d0d0d0"> <td valign="top"><a href="ntqnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrGet</a> <td valign="top">An error occurred while getting (retrieving) data -<tr bgcolor="#f0f0f0"> <td valign="top"><a href="qnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrPut</a> +<tr bgcolor="#f0f0f0"> <td valign="top"><a href="ntqnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrPut</a> <td valign="top">An error occurred while putting (uploading) data -<tr bgcolor="#d0d0d0"> <td valign="top"><a href="qnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrFileNotExisting</a> +<tr bgcolor="#d0d0d0"> <td valign="top"><a href="ntqnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrFileNotExisting</a> <td valign="top">A file which is needed by the operation doesn't exist -<tr bgcolor="#f0f0f0"> <td valign="top"><a href="qnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrPermissionDenied</a> +<tr bgcolor="#f0f0f0"> <td valign="top"><a href="ntqnetworkprotocol.html#Error-enum">TQNetworkProtocol::ErrPermissionDenied</a> <td valign="top">The permission for doing the operation has been denied </table></center> <p> <a href="qnetworkoperation.html#errorCode">TQNetworkOperation::errorCode</a>() returns one of these codes or @@ -442,18 +442,18 @@ moment. } </pre> -<p> That's all. The connection to the <a href="qurloperator.html">TQUrlOperator</a> and so on is done +<p> That's all. The connection to the <a href="ntqurloperator.html">TQUrlOperator</a> and so on is done automatically. Additionally, if the error was really bad so that no more operations can be done in the current state (e.g. if the host couldn't be found), call <tt>TQNetworkProtocol::clearOperationStack()</tt> <em>before</em> emitting <tt>finished()</tt>. -<p> Ideally you should use one of the predefined error codes of <a href="qnetworkprotocol.html">TQNetworkProtocol</a>. If this is not possible, you can add own error codes +<p> Ideally you should use one of the predefined error codes of <a href="ntqnetworkprotocol.html">TQNetworkProtocol</a>. If this is not possible, you can add own error codes - they are just normal <tt>int</tt>s. Just be careful that the value of the error code doesn't conflict with an existing one. <p> An example to look at is in qt/examples/network/ftpclient. This is the implementation of a fairly complete FTP client, which supports uploading and downloading files, making directories, etc., all done using <tt>TQUrlOperators</tt>. -<p> You might also like to look at <a href="qftp.html">TQFtp</a> (in qt/src/network/qftp.cpp) or at +<p> You might also like to look at <a href="ntqftp.html">TQFtp</a> (in qt/src/network/qftp.cpp) or at the example in qt/examples/network/networkprotocol/nntp.cpp. <p> <!-- eof --> |