diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-07-10 18:56:16 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-07-10 18:56:16 +0900 |
commit | 252a2ec8b0f0f9cf20c947737087b24a8185b588 (patch) | |
tree | b48be8863db3bc1c223ac270a258b5c1124cb0e3 /doc/html/mail-example.html | |
parent | 87d29563e3ccdeb7fea0197e262e667ef323ff9c (diff) | |
download | tqt-252a2ec8.tar.gz tqt-252a2ec8.zip |
Rename IO and network class nt* related files to equivalent tq*
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/html/mail-example.html')
-rw-r--r-- | doc/html/mail-example.html | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/doc/html/mail-example.html b/doc/html/mail-example.html index d58645c54..b2e4dee5b 100644 --- a/doc/html/mail-example.html +++ b/doc/html/mail-example.html @@ -33,7 +33,7 @@ body { background: #ffffff; color: black; } <p> -<p> This example shows how to use the <a href="ntqsocket.html">TQSocket</a> class. The client can only be +<p> This example shows how to use the <a href="tqsocket.html">TQSocket</a> class. The client can only be used to send mails. The interesting part is the implementation of the SMTP protocol. <p> <hr> @@ -89,11 +89,11 @@ private: <a href="tqstring.html">TQString</a> message; <a href="tqstring.html">TQString</a> from; <a href="tqstring.html">TQString</a> rcpt; - <a href="ntqsocket.html">TQSocket</a> *socket; + <a href="tqsocket.html">TQSocket</a> *socket; <a href="tqtextstream.html">TQTextStream</a> * t; int state; <a href="tqstring.html">TQString</a> response; - <a href="ntqdns.html">TQDns</a> * mxLookup; + <a href="tqdns.html">TQDns</a> * mxLookup; }; #endif @@ -114,8 +114,8 @@ private: #include "smtp.h" #include <<a href="tqtextstream-h.html">tqtextstream.h</a>> -#include <<a href="qsocket-h.html">ntqsocket.h</a>> -#include <<a href="qdns-h.html">ntqdns.h</a>> +#include <<a href="tqsocket-h.html">tqsocket.h</a>> +#include <<a href="tqdns-h.html">tqdns.h</a>> #include <<a href="tqtimer-h.html">tqtimer.h</a>> #include <<a href="qapplication-h.html">ntqapplication.h</a>> #include <<a href="qmessagebox-h.html">ntqmessagebox.h</a>> @@ -126,14 +126,14 @@ private: const <a href="tqstring.html">TQString</a> &subject, const <a href="tqstring.html">TQString</a> &body ) { - socket = new <a href="ntqsocket.html">TQSocket</a>( this ); -<a name="x714"></a> <a href="tqobject.html#connect">connect</a> ( socket, TQ_SIGNAL( <a href="ntqsocket.html#readyRead">readyRead</a>() ), + socket = new <a href="tqsocket.html">TQSocket</a>( this ); +<a name="x714"></a> <a href="tqobject.html#connect">connect</a> ( socket, TQ_SIGNAL( <a href="tqsocket.html#readyRead">readyRead</a>() ), this, TQ_SLOT( readyRead() ) ); -<a name="x711"></a> <a href="tqobject.html#connect">connect</a> ( socket, TQ_SIGNAL( <a href="ntqsocket.html#connected">connected</a>() ), +<a name="x711"></a> <a href="tqobject.html#connect">connect</a> ( socket, TQ_SIGNAL( <a href="tqsocket.html#connected">connected</a>() ), this, TQ_SLOT( connected() ) ); -<a name="x717"></a><a name="x715"></a> mxLookup = new <a href="ntqdns.html">TQDns</a>( to.<a href="tqstring.html#mid">mid</a>( to.<a href="tqstring.html#find">find</a>( '@' )+1 ), TQDns::Mx ); -<a name="x707"></a> <a href="tqobject.html#connect">connect</a>( mxLookup, TQ_SIGNAL(<a href="ntqdns.html#resultsReady">resultsReady</a>()), +<a name="x717"></a><a name="x715"></a> mxLookup = new <a href="tqdns.html">TQDns</a>( to.<a href="tqstring.html#mid">mid</a>( to.<a href="tqstring.html#find">find</a>( '@' )+1 ), TQDns::Mx ); +<a name="x707"></a> <a href="tqobject.html#connect">connect</a>( mxLookup, TQ_SIGNAL(<a href="tqdns.html#resultsReady">resultsReady</a>()), this, TQ_SLOT(dnsLookupHelper()) ); <a name="x716"></a> message = TQString::<a href="tqstring.html#fromLatin1">fromLatin1</a>( "From: " ) + from + @@ -161,36 +161,36 @@ Smtp::~Smtp() void <a name="f298"></a>Smtp::dnsLookupHelper() { -<a name="x706"></a> <a href="tqvaluelist.html">TQValueList</a><TQDns::MailServer> s = mxLookup-><a href="ntqdns.html#mailServers">mailServers</a>(); +<a name="x706"></a> <a href="tqvaluelist.html">TQValueList</a><TQDns::MailServer> s = mxLookup-><a href="tqdns.html#mailServers">mailServers</a>(); <a name="x720"></a> if ( s.<a href="tqvaluelist.html#isEmpty">isEmpty</a>() ) { -<a name="x705"></a> if ( !mxLookup-><a href="ntqdns.html#isWorking">isWorking</a>() ) +<a name="x705"></a> if ( !mxLookup-><a href="tqdns.html#isWorking">isWorking</a>() ) emit status( <a href="tqobject.html#tr">tr</a>( "Error in MX record lookup" ) ); return; } <a name="x719"></a> emit status( <a href="tqobject.html#tr">tr</a>( "Connecting to %1" ).arg( s.<a href="tqvaluelist.html#first">first</a>().name ) ); -<a name="x710"></a> socket-><a href="ntqsocket.html#connectToHost">connectToHost</a>( s.<a href="tqvaluelist.html#first">first</a>().name, 25 ); +<a name="x710"></a> socket-><a href="tqsocket.html#connectToHost">connectToHost</a>( s.<a href="tqvaluelist.html#first">first</a>().name, 25 ); t = new <a href="tqtextstream.html">TQTextStream</a>( socket ); } void <a name="f299"></a>Smtp::connected() { -<a name="x712"></a> emit status( <a href="tqobject.html#tr">tr</a>( "Connected to %1" ).arg( socket-><a href="ntqsocket.html#peerName">peerName</a>() ) ); +<a name="x712"></a> emit status( <a href="tqobject.html#tr">tr</a>( "Connected to %1" ).arg( socket-><a href="tqsocket.html#peerName">peerName</a>() ) ); } void <a name="f300"></a>Smtp::readyRead() { // SMTP is line-oriented -<a name="x709"></a> if ( !socket-><a href="ntqsocket.html#canReadLine">canReadLine</a>() ) +<a name="x709"></a> if ( !socket-><a href="tqsocket.html#canReadLine">canReadLine</a>() ) return; <a href="tqstring.html">TQString</a> responseLine; do { -<a name="x713"></a> responseLine = socket-><a href="ntqsocket.html#readLine">readLine</a>(); +<a name="x713"></a> responseLine = socket-><a href="tqsocket.html#readLine">readLine</a>(); response += responseLine; - } while( socket-><a href="ntqsocket.html#canReadLine">canReadLine</a>() && responseLine[3] != ' ' ); + } while( socket-><a href="tqsocket.html#canReadLine">canReadLine</a>() && responseLine[3] != ' ' ); <a name="x718"></a> responseLine.<a href="tqstring.html#truncate">truncate</a>( 3 ); if ( state == Init && responseLine[0] == '2' ) { |