summaryrefslogtreecommitdiffstats
path: root/doc/html/networkprotocol-example.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/networkprotocol-example.html')
-rw-r--r--doc/html/networkprotocol-example.html34
1 files changed, 17 insertions, 17 deletions
diff --git a/doc/html/networkprotocol-example.html b/doc/html/networkprotocol-example.html
index 926f4f3c1..b511608dd 100644
--- a/doc/html/networkprotocol-example.html
+++ b/doc/html/networkprotocol-example.html
@@ -107,7 +107,7 @@ protected slots:
#include &lt;<a href="qurlinfo-h.html">ntqurlinfo.h</a>&gt;
#include &lt;stdlib.h&gt;
#include &lt;<a href="qurloperator-h.html">ntqurloperator.h</a>&gt;
-#include &lt;<a href="qstringlist-h.html">ntqstringlist.h</a>&gt;
+#include &lt;<a href="tqstringlist-h.html">tqstringlist.h</a>&gt;
#include &lt;<a href="qregexp-h.html">ntqregexp.h</a>&gt;
<a name="f288"></a>Nntp::Nntp()
@@ -137,21 +137,21 @@ Nntp::~Nntp()
<a name="x675"></a>void Nntp::<a href="ntqnetworkprotocol.html#operationListChildren">operationListChildren</a>( <a href="qnetworkoperation.html">TQNetworkOperation</a> * )
{
// create a command
- <a href="ntqstring.html">TQString</a> path = <a href="ntqnetworkprotocol.html#url">url</a>()-&gt;path(), cmd;
-<a name="x691"></a> if ( path.<a href="ntqstring.html#isEmpty">isEmpty</a>() || path == "/" ) {
+ <a href="tqstring.html">TQString</a> path = <a href="ntqnetworkprotocol.html#url">url</a>()-&gt;path(), cmd;
+<a name="x691"></a> if ( path.<a href="tqstring.html#isEmpty">isEmpty</a>() || path == "/" ) {
// if the path is empty or we are in the root dir,
// we want to read the list of available newsgroups
cmd = "list newsgroups\r\n";
} else if ( <a href="ntqnetworkprotocol.html#url">url</a>()-&gt;isDir() ) {
// if the path is a directory (in our case a news group)
// we want to list the articles of this group
-<a name="x694"></a> path = path.<a href="ntqstring.html#replace">replace</a>( "/", "" );
+<a name="x694"></a> path = path.<a href="tqstring.html#replace">replace</a>( "/", "" );
cmd = "listgroup " + path + "\r\n";
} else
return;
// write the command to the socket
-<a name="x693"></a><a name="x692"></a><a name="x689"></a> commandSocket-&gt;<a href="ntqsocket.html#writeBlock">writeBlock</a>( cmd.<a href="ntqstring.html#latin1">latin1</a>(), cmd.<a href="ntqstring.html#length">length</a>() );
+<a name="x693"></a><a name="x692"></a><a name="x689"></a> commandSocket-&gt;<a href="ntqsocket.html#writeBlock">writeBlock</a>( cmd.<a href="tqstring.html#latin1">latin1</a>(), cmd.<a href="tqstring.html#length">length</a>() );
readGroups = TRUE;
}
@@ -160,17 +160,17 @@ Nntp::~Nntp()
// get the dirPath of the URL (this is our news group)
// and the filename (which is the article we want to read)
<a name="x672"></a> <a href="ntqurl.html">TQUrl</a> u( op-&gt;<a href="qnetworkoperation.html#arg">arg</a>( 0 ) );
-<a name="x696"></a><a name="x695"></a> <a href="ntqstring.html">TQString</a> dirPath = u.<a href="ntqurl.html#dirPath">dirPath</a>(), file = u.<a href="ntqurl.html#fileName">fileName</a>();
- dirPath = dirPath.<a href="ntqstring.html#replace">replace</a>( "/", "" );
+<a name="x696"></a><a name="x695"></a> <a href="tqstring.html">TQString</a> dirPath = u.<a href="ntqurl.html#dirPath">dirPath</a>(), file = u.<a href="ntqurl.html#fileName">fileName</a>();
+ dirPath = dirPath.<a href="tqstring.html#replace">replace</a>( "/", "" );
// go to the group in which the article is
- <a href="ntqstring.html">TQString</a> cmd;
+ <a href="tqstring.html">TQString</a> cmd;
cmd = "group " + dirPath + "\r\n";
- commandSocket-&gt;<a href="ntqsocket.html#writeBlock">writeBlock</a>( cmd.<a href="ntqstring.html#latin1">latin1</a>(), cmd.<a href="ntqstring.html#length">length</a>() );
+ commandSocket-&gt;<a href="ntqsocket.html#writeBlock">writeBlock</a>( cmd.<a href="tqstring.html#latin1">latin1</a>(), cmd.<a href="tqstring.html#length">length</a>() );
// read the head of the article
cmd = "article " + file + "\r\n";
- commandSocket-&gt;<a href="ntqsocket.html#writeBlock">writeBlock</a>( cmd.<a href="ntqstring.html#latin1">latin1</a>(), cmd.<a href="ntqstring.html#length">length</a>() );
+ commandSocket-&gt;<a href="ntqsocket.html#writeBlock">writeBlock</a>( cmd.<a href="tqstring.html#latin1">latin1</a>(), cmd.<a href="tqstring.html#length">length</a>() );
readArticle = TRUE;
}
@@ -271,7 +271,7 @@ void <a name="f294"></a>Nntp::parseGroups()
// read one line after the other
while ( commandSocket-&gt;<a href="ntqsocket.html#canReadLine">canReadLine</a>() ) {
-<a name="x686"></a> <a href="ntqstring.html">TQString</a> s = commandSocket-&gt;<a href="ntqsocket.html#readLine">readLine</a>();
+<a name="x686"></a> <a href="tqstring.html">TQString</a> s = commandSocket-&gt;<a href="ntqsocket.html#readLine">readLine</a>();
// if the line starts with a dot, all groups or articles have been listed,
// so we finished processing the listChildren() command
@@ -294,11 +294,11 @@ 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="ntqstring.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="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 href="ntqurlinfo.html">TQUrlInfo</a> inf;
<a name="x700"></a> inf.<a href="ntqurlinfo.html#setName">setName</a>( group );
- <a href="ntqstring.html">TQString</a> path = <a href="ntqnetworkprotocol.html#url">url</a>()-&gt;path();
-<a name="x698"></a> inf.<a href="ntqurlinfo.html#setDir">setDir</a>( path.<a href="ntqstring.html#isEmpty">isEmpty</a>() || path == "/" );
+ <a href="tqstring.html">TQString</a> path = <a href="ntqnetworkprotocol.html#url">url</a>()-&gt;path();
+<a name="x698"></a> inf.<a href="ntqurlinfo.html#setDir">setDir</a>( path.<a href="tqstring.html#isEmpty">isEmpty</a>() || path == "/" );
<a name="x702"></a> inf.<a href="ntqurlinfo.html#setSymLink">setSymLink</a>( FALSE );
<a name="x699"></a><a name="x697"></a> inf.<a href="ntqurlinfo.html#setFile">setFile</a>( !inf.<a href="ntqurlinfo.html#isDir">isDir</a>() );
<a name="x703"></a> inf.<a href="ntqurlinfo.html#setWritable">setWritable</a>( FALSE );
@@ -317,7 +317,7 @@ void <a name="f295"></a>Nntp::parseArticle()
// read an article one line after the other
while ( commandSocket-&gt;<a href="ntqsocket.html#canReadLine">canReadLine</a>() ) {
- <a href="ntqstring.html">TQString</a> s = commandSocket-&gt;<a href="ntqsocket.html#readLine">readLine</a>();
+ <a href="tqstring.html">TQString</a> s = commandSocket-&gt;<a href="ntqsocket.html#readLine">readLine</a>();
// if the line starts with a dot, we finished reading something
if ( s[ 0 ] == '.' ) {
@@ -331,7 +331,7 @@ void <a name="f295"></a>Nntp::parseArticle()
<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 );
// emit the new data of the article which we read
-<a name="x690"></a> emit data( TQCString( s.<a href="ntqstring.html#ascii">ascii</a>() ), operationInProgress() );
+<a name="x690"></a> emit data( TQCString( s.<a href="tqstring.html#ascii">ascii</a>() ), operationInProgress() );
}
}
@@ -341,7 +341,7 @@ void <a name="f296"></a>Nntp::error( int code )
code == TQSocket::ErrConnectionRefused ) {
// this signal is called if connecting to the server failed
if ( <a href="ntqnetworkprotocol.html#operationInProgress">operationInProgress</a>() ) {
- <a href="ntqstring.html">TQString</a> msg = <a href="tqobject.html#tr">tr</a>( "Host not found or couldn't connect to: \n" + url()-&gt;host() );
+ <a href="tqstring.html">TQString</a> msg = <a href="tqobject.html#tr">tr</a>( "Host not found or couldn't connect to: \n" + url()-&gt;host() );
<a href="ntqnetworkprotocol.html#operationInProgress">operationInProgress</a>()-&gt;setState( StFailed );
<a href="ntqnetworkprotocol.html#operationInProgress">operationInProgress</a>()-&gt;setProtocolDetail( msg );
<a href="ntqnetworkprotocol.html#operationInProgress">operationInProgress</a>()-&gt;setErrorCode( (int)ErrHostNotFound );