diff options
Diffstat (limited to 'doc/html/networkprotocol-example.html')
-rw-r--r-- | doc/html/networkprotocol-example.html | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/doc/html/networkprotocol-example.html b/doc/html/networkprotocol-example.html index a3f22e7fb..133efa036 100644 --- a/doc/html/networkprotocol-example.html +++ b/doc/html/networkprotocol-example.html @@ -110,8 +110,8 @@ protected slots: #include <<a href="tqregexp-h.html">tqregexp.h</a>> <a name="f288"></a>Nntp::Nntp() - : <a href="tqnetworkprotocol.html">TQNetworkProtocol</a>(), connectionReady( FALSE ), - readGroups( FALSE ), readArticle( FALSE ) + : <a href="tqnetworkprotocol.html">TQNetworkProtocol</a>(), connectionReady( false ), + readGroups( false ), readArticle( false ) { // create the command socket and connect to its signals commandSocket = new <a href="tqsocket.html">TQSocket</a>( this ); @@ -151,7 +151,7 @@ Nntp::~Nntp() // write the command to the socket <a name="x693"></a><a name="x692"></a><a name="x689"></a> commandSocket-><a href="tqsocket.html#writeBlock">writeBlock</a>( cmd.<a href="tqstring.html#latin1">latin1</a>(), cmd.<a href="tqstring.html#length">length</a>() ); - readGroups = TRUE; + readGroups = true; } <a name="x674"></a>void Nntp::<a href="tqnetworkprotocol.html#operationGet">operationGet</a>( <a href="tqnetworkoperation.html">TQNetworkOperation</a> *op ) @@ -170,28 +170,28 @@ Nntp::~Nntp() // read the head of the article cmd = "article " + file + "\r\n"; commandSocket-><a href="tqsocket.html#writeBlock">writeBlock</a>( cmd.<a href="tqstring.html#latin1">latin1</a>(), cmd.<a href="tqstring.html#length">length</a>() ); - readArticle = TRUE; + readArticle = true; } <a name="x673"></a>bool Nntp::<a href="tqnetworkprotocol.html#checkConnection">checkConnection</a>( <a href="tqnetworkoperation.html">TQNetworkOperation</a> * ) { - // we are connected, return TRUE + // we are connected, return true <a name="x670"></a> if ( commandSocket-><a href="tqiodevice.html#isOpen">isOpen</a>() && connectionReady ) - return TRUE; + return true; // seems that there is no chance to connect if ( commandSocket-><a href="tqiodevice.html#isOpen">isOpen</a>() ) - return FALSE; + return false; // don't call connectToHost() if we are already trying to connect <a name="x688"></a> if ( commandSocket-><a href="tqsocket.html#state">state</a>() == TQSocket::Connecting ) - return FALSE; + return false; // start connecting - connectionReady = FALSE; + connectionReady = false; <a name="x680"></a> commandSocket-><a href="tqsocket.html#connectToHost">connectToHost</a>( <a href="tqnetworkprotocol.html#url">url</a>()->host(), <a href="tqnetworkprotocol.html#url">url</a>()->port() != -1 ? url()->port() : 119 ); - return FALSE; + return false; } void <a name="f289"></a>Nntp::close() @@ -260,7 +260,7 @@ void <a name="f293"></a>Nntp::readyRead() // of the code of the server response was 200, we know that the // server is ready to get commands from us now <a name="x664"></a> if ( s.<a href="tqcstring.html#left">left</a>( 3 ) == "200" ) - connectionReady = TRUE; + connectionReady = true; } void <a name="f294"></a>Nntp::parseGroups() @@ -275,7 +275,7 @@ void <a name="f294"></a>Nntp::parseGroups() // if the line starts with a dot, all groups or articles have been listed, // so we finished processing the listChildren() command if ( s[ 0 ] == '.' ) { - readGroups = FALSE; + readGroups = false; <a href="tqnetworkprotocol.html#operationInProgress">operationInProgress</a>()->setState( StDone ); emit finished( <a href="tqnetworkprotocol.html#operationInProgress">operationInProgress</a>() ); return; @@ -298,10 +298,10 @@ void <a name="f294"></a>Nntp::parseGroups() <a name="x700"></a> inf.<a href="tqurlinfo.html#setName">setName</a>( group ); <a href="tqstring.html">TQString</a> path = <a href="tqnetworkprotocol.html#url">url</a>()->path(); <a name="x698"></a> inf.<a href="tqurlinfo.html#setDir">setDir</a>( path.<a href="tqstring.html#isEmpty">isEmpty</a>() || path == "/" ); -<a name="x702"></a> inf.<a href="tqurlinfo.html#setSymLink">setSymLink</a>( FALSE ); +<a name="x702"></a> inf.<a href="tqurlinfo.html#setSymLink">setSymLink</a>( false ); <a name="x699"></a><a name="x697"></a> inf.<a href="tqurlinfo.html#setFile">setFile</a>( !inf.<a href="tqurlinfo.html#isDir">isDir</a>() ); -<a name="x703"></a> inf.<a href="tqurlinfo.html#setWritable">setWritable</a>( FALSE ); -<a name="x701"></a> inf.<a href="tqurlinfo.html#setReadable">setReadable</a>( TRUE ); +<a name="x703"></a> inf.<a href="tqurlinfo.html#setWritable">setWritable</a>( false ); +<a name="x701"></a> inf.<a href="tqurlinfo.html#setReadable">setReadable</a>( true ); // let others know about our new child emit newChild( inf, operationInProgress() ); @@ -320,7 +320,7 @@ void <a name="f295"></a>Nntp::parseArticle() // if the line starts with a dot, we finished reading something if ( s[ 0 ] == '.' ) { - readArticle = FALSE; + readArticle = false; <a href="tqnetworkprotocol.html#operationInProgress">operationInProgress</a>()->setState( StDone ); emit finished( <a href="tqnetworkprotocol.html#operationInProgress">operationInProgress</a>() ); return; |