summaryrefslogtreecommitdiffstats
path: root/src/network/qdns.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-06-17 17:28:28 -0500
committerTimothy Pearson <[email protected]>2012-06-17 17:28:28 -0500
commit6dec101d43dcbd4195c47d54bd388db1a8d7230e (patch)
tree7c336cbed3a93807a34cd4df39b2f92a7d48a141 /src/network/qdns.cpp
parentf27c2533f735d53c6b555f387c6390c0690cc246 (diff)
downloadtqt3-6dec101d43dcbd4195c47d54bd388db1a8d7230e.tar.gz
tqt3-6dec101d43dcbd4195c47d54bd388db1a8d7230e.zip
Automated update from Qt3
Diffstat (limited to 'src/network/qdns.cpp')
-rw-r--r--src/network/qdns.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/network/qdns.cpp b/src/network/qdns.cpp
index ac5ced853..7a4c534fb 100644
--- a/src/network/qdns.cpp
+++ b/src/network/qdns.cpp
@@ -84,14 +84,14 @@
//#define TQDNS_DEBUG
-static Q_UINT16 id; // ### seeded started by now()
+static TQ_UINT16 id; // ### seeded started by now()
static TQDateTime * originOfTime = 0;
static TQCleanupHandler<TQDateTime> qdns_cleanup_time;
-static Q_UINT32 now()
+static TQ_UINT32 now()
{
if ( originOfTime )
return originOfTime->secsTo( TQDateTime::currentDateTime() );
@@ -175,18 +175,18 @@ public:
TQDns::RecordType t;
bool nxdomain;
bool current;
- Q_UINT32 expireTime;
- Q_UINT32 deleteTime;
+ TQ_UINT32 expireTime;
+ TQ_UINT32 deleteTime;
// somewhat space-wasting per-type data
// a / aaaa
TQHostAddress address;
// cname / mx / srv / ptr
TQString target;
// mx / srv
- Q_UINT16 priority;
+ TQ_UINT16 priority;
// srv
- Q_UINT16 weight;
- Q_UINT16 port;
+ TQ_UINT16 weight;
+ TQ_UINT16 port;
// txt
TQString text; // could be overloaded into target...
private:
@@ -204,7 +204,7 @@ public:
void take( TQDnsRR * );
- void sweep( Q_UINT32 thisSweep );
+ void sweep( TQ_UINT32 thisSweep );
bool isEmpty() const { return rrs == 0 || rrs->isEmpty(); }
@@ -222,12 +222,12 @@ public:
id( 0 ), t( TQDns::None ), step(0), started(0),
dns( new TQPtrDict<void>(17) ) {}
~TQDnsQuery() { delete dns; }
- Q_UINT16 id;
+ TQ_UINT16 id;
TQDns::RecordType t;
TQString l;
uint step;
- Q_UINT32 started;
+ TQ_UINT32 started;
TQPtrDict<void> * dns;
};
@@ -248,7 +248,7 @@ public:
private:
TQDnsQuery * query;
- Q_UINT8 * answer;
+ TQ_UINT8 * answer;
int size;
int pp;
@@ -320,7 +320,7 @@ TQDnsAnswer::TQDnsAnswer( const TQByteArray& answer_,
{
ok = TRUE;
- answer = (Q_UINT8 *)(answer_.data());
+ answer = (TQ_UINT8 *)(answer_.data());
size = (int)answer_.size();
query = query_;
pp = 0;
@@ -351,7 +351,7 @@ TQString TQDnsAnswer::readString(bool multipleLabels)
{
int p = pp;
TQString r = TQString::null;
- Q_UINT8 b;
+ TQ_UINT8 b;
for( ;; ) {
b = 128;
// Read one character
@@ -1026,14 +1026,14 @@ TQDnsManager::~TQDnsManager()
#endif
}
-static Q_UINT32 lastSweep = 0;
+static TQ_UINT32 lastSweep = 0;
void TQDnsManager::cleanCache()
{
bool again = FALSE;
TQDictIterator<TQDnsDomain> it( cache );
TQDnsDomain * d;
- Q_UINT32 thisSweep = now();
+ TQ_UINT32 thisSweep = now();
#if defined(TQDNS_DEBUG)
tqDebug( "TQDnsManager::cleanCache(: Called, time is %u, last was %u",
thisSweep, lastSweep );
@@ -1094,7 +1094,7 @@ void TQDnsManager::answer()
// of our name servers...
a.resize( r );
- Q_UINT16 aid = (((Q_UINT8)a[0]) << 8) + ((Q_UINT8)a[1]);
+ TQ_UINT16 aid = (((TQ_UINT8)a[0]) << 8) + ((TQ_UINT8)a[1]);
uint i = 0;
while( i < queries.size() &&
!( queries[i] && queries[i]->id == aid ) )
@@ -1108,7 +1108,7 @@ void TQDnsManager::answer()
// at this point queries[i] is whatever we asked for.
- if ( ( (Q_UINT8)(a[2]) & 0x80 ) == 0 ) {
+ if ( ( (TQ_UINT8)(a[2]) & 0x80 ) == 0 ) {
#if defined(TQDNS_DEBUG)
tqDebug( "DNS Manager: received a query" );
#endif
@@ -1527,7 +1527,7 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
}
-void TQDnsDomain::sweep( Q_UINT32 thisSweep )
+void TQDnsDomain::sweep( TQ_UINT32 thisSweep )
{
if ( !rrs )
return;
@@ -1920,7 +1920,7 @@ TQString TQDns::toInAddrArpaDomain( const TQHostAddress &address )
// if the address isn't valid, neither of the other two make
// cases make sense. better to just return.
} else if ( address.isIp4Addr() ) {
- Q_UINT32 i = address.ip4Addr();
+ TQ_UINT32 i = address.ip4Addr();
s.sprintf( "%d.%d.%d.%d.IN-ADDR.ARPA",
i & 0xff, (i >> 8) & 0xff, (i>>16) & 0xff, (i>>24) & 0xff );
} else {
@@ -1976,7 +1976,7 @@ bool TQDns::isWorking() const
#endif
TQPtrList<TQDnsRR> * ll = TQDnsDomain::cached( this );
- Q_LONG queries = n.count();
+ TQ_LONG queries = n.count();
while( ll->current() != 0 ) {
if ( ll->current()->nxdomain ) {
queries--;
@@ -2056,7 +2056,7 @@ TQValueList<TQHostAddress> TQDns::addresses() const
class \c TQDns::MailServer contains the following public variables:
\list
\i TQString TQDns::MailServer::name
- \i Q_UINT16 TQDns::MailServer::priority
+ \i TQ_UINT16 TQDns::MailServer::priority
\endlist
Note that if you want to iterate over the list, you should iterate
@@ -2112,9 +2112,9 @@ TQValueList<TQDns::MailServer> TQDns::mailServers() const
\c TQDns::Server contains the following public variables:
\list
\i TQString TQDns::Server::name
- \i Q_UINT16 TQDns::Server::priority
- \i Q_UINT16 TQDns::Server::weight
- \i Q_UINT16 TQDns::Server::port
+ \i TQ_UINT16 TQDns::Server::priority
+ \i TQ_UINT16 TQDns::Server::weight
+ \i TQ_UINT16 TQDns::Server::port
\endlist
Note that if you want to iterate over the list, you should iterate
@@ -2461,7 +2461,7 @@ void TQDns::doResInit()
last = nameServer.length();
TQDns tmp( nameServer.mid( first, last-first ), TQDns::A );
TQValueList<TQHostAddress> address = tmp.addresses();
- Q_LONG i = address.count();
+ TQ_LONG i = address.count();
while( i )
ns->append( new TQHostAddress(address[--i]) );
first = last+1;