diff options
Diffstat (limited to 'doc/html/networkprotocol-example.html')
-rw-r--r-- | doc/html/networkprotocol-example.html | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/doc/html/networkprotocol-example.html b/doc/html/networkprotocol-example.html index b511608dd..e47d8020d 100644 --- a/doc/html/networkprotocol-example.html +++ b/doc/html/networkprotocol-example.html @@ -108,7 +108,7 @@ protected slots: #include <stdlib.h> #include <<a href="qurloperator-h.html">ntqurloperator.h</a>> #include <<a href="tqstringlist-h.html">tqstringlist.h</a>> -#include <<a href="qregexp-h.html">ntqregexp.h</a>> +#include <<a href="tqregexp-h.html">tqregexp.h</a>> <a name="f288"></a>Nntp::Nntp() : <a href="ntqnetworkprotocol.html">TQNetworkProtocol</a>(), connectionReady( FALSE ), @@ -251,16 +251,16 @@ void <a name="f293"></a>Nntp::readyRead() } // read the new data from the socket - <a href="ntqcstring.html">TQCString</a> s; -<a name="x677"></a><a name="x668"></a> s.<a href="ntqcstring.html#resize">resize</a>( commandSocket-><a href="ntqsocket.html#bytesAvailable">bytesAvailable</a>() + 1 ); -<a name="x685"></a><a name="x671"></a> commandSocket-><a href="ntqsocket.html#readBlock">readBlock</a>( s.<a href="ntqmemarray.html#data">data</a>(), commandSocket-><a href="ntqsocket.html#bytesAvailable">bytesAvailable</a>() ); + <a href="tqcstring.html">TQCString</a> s; +<a name="x677"></a><a name="x668"></a> s.<a href="tqcstring.html#resize">resize</a>( commandSocket-><a href="ntqsocket.html#bytesAvailable">bytesAvailable</a>() + 1 ); +<a name="x685"></a><a name="x671"></a> commandSocket-><a href="ntqsocket.html#readBlock">readBlock</a>( s.<a href="tqmemarray.html#data">data</a>(), commandSocket-><a href="ntqsocket.html#bytesAvailable">bytesAvailable</a>() ); if ( !url() ) return; // 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="ntqcstring.html#left">left</a>( 3 ) == "200" ) +<a name="x664"></a> if ( s.<a href="tqcstring.html#left">left</a>( 3 ) == "200" ) connectionReady = TRUE; } @@ -285,7 +285,7 @@ void <a name="f294"></a>Nntp::parseGroups() // if the code of the server response is 215 or 211 // the next line will be the first group or article (depending on what we read). // So let others know that we start reading now... - if ( s.<a href="ntqcstring.html#left">left</a>( 3 ) == "215" || s.<a href="ntqcstring.html#left">left</a>( 3 ) == "211" ) { + if ( s.<a href="tqcstring.html#left">left</a>( 3 ) == "215" || s.<a href="tqcstring.html#left">left</a>( 3 ) == "211" ) { <a href="ntqnetworkprotocol.html#operationInProgress">operationInProgress</a>()->setState( StInProgress ); emit start( <a href="ntqnetworkprotocol.html#operationInProgress">operationInProgress</a>() ); continue; @@ -293,8 +293,8 @@ void <a name="f294"></a>Nntp::parseGroups() // parse the line and create a TQUrlInfo object // which describes the child (group or article) -<a name="x663"></a> bool tab = s.<a href="ntqcstring.html#find">find</a>( '\t' ) != -1; -<a name="x666"></a> <a href="tqstring.html">TQString</a> group = s.<a href="ntqcstring.html#mid">mid</a>( 0, s.<a href="ntqcstring.html#find">find</a>( tab ? '\t' : ' ' ) ); +<a name="x663"></a> bool tab = s.<a href="tqcstring.html#find">find</a>( '\t' ) != -1; +<a name="x666"></a> <a href="tqstring.html">TQString</a> group = s.<a href="tqcstring.html#mid">mid</a>( 0, s.<a href="tqcstring.html#find">find</a>( tab ? '\t' : ' ' ) ); <a href="ntqurlinfo.html">TQUrlInfo</a> inf; <a name="x700"></a> inf.<a href="ntqurlinfo.html#setName">setName</a>( group ); <a href="tqstring.html">TQString</a> path = <a href="ntqnetworkprotocol.html#url">url</a>()->path(); @@ -327,8 +327,8 @@ void <a name="f295"></a>Nntp::parseArticle() return; } -<a name="x669"></a> if ( s.<a href="ntqcstring.html#right">right</a>( 1 ) == "\n" ) -<a name="x667"></a><a name="x665"></a> s.<a href="ntqcstring.html#remove">remove</a>( s.<a href="ntqcstring.html#length">length</a>() - 1, 1 ); +<a name="x669"></a> if ( s.<a href="tqcstring.html#right">right</a>( 1 ) == "\n" ) +<a name="x667"></a><a name="x665"></a> s.<a href="tqcstring.html#remove">remove</a>( s.<a href="tqcstring.html#length">length</a>() - 1, 1 ); // emit the new data of the article which we read <a name="x690"></a> emit data( TQCString( s.<a href="tqstring.html#ascii">ascii</a>() ), operationInProgress() ); |