summaryrefslogtreecommitdiffstats
path: root/libktorrent/torrent
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
commit936370a6413e14b322ce808be07c6c66714941b6 (patch)
tree31b9f37bb64beac5eddafef05312da5b48736bd6 /libktorrent/torrent
parent2a99db3ebc4c211e436f95fde24b5ac6826d0267 (diff)
downloadktorrent-936370a6413e14b322ce808be07c6c66714941b6.tar.gz
ktorrent-936370a6413e14b322ce808be07c6c66714941b6.zip
rename the following methods:
tqparent parent tqmask mask git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktorrent@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libktorrent/torrent')
-rw-r--r--libktorrent/torrent/cachefile.cpp2
-rw-r--r--libktorrent/torrent/ipblocklist.cpp86
-rw-r--r--libktorrent/torrent/ipblocklist.h8
-rw-r--r--libktorrent/torrent/torrentcreator.cpp2
4 files changed, 49 insertions, 49 deletions
diff --git a/libktorrent/torrent/cachefile.cpp b/libktorrent/torrent/cachefile.cpp
index da5ecae..678124a 100644
--- a/libktorrent/torrent/cachefile.cpp
+++ b/libktorrent/torrent/cachefile.cpp
@@ -46,7 +46,7 @@
// Not all systems have an O_LARGEFILE - Solaris depending
// on command-line defines, FreeBSD never - so in those cases,
-// make it a zero bittqmask. As long as it's only OR'ed into
+// make it a zero bitmask. As long as it's only OR'ed into
// open(2) flags, that's fine.
//
#ifndef O_LARGEFILE
diff --git a/libktorrent/torrent/ipblocklist.cpp b/libktorrent/torrent/ipblocklist.cpp
index 632f42c..547b6ad 100644
--- a/libktorrent/torrent/ipblocklist.cpp
+++ b/libktorrent/torrent/ipblocklist.cpp
@@ -75,7 +75,7 @@ namespace bt
Uint32 ipi = toUint32(ip, &ok);
if(!ok)
return;
- IPKey key(ipi,0xFFFFFFFF); //-- you can test ranges here. Just specify your tqmask.
+ IPKey key(ipi,0xFFFFFFFF); //-- you can test ranges here. Just specify your mask.
insertRangeIP(key, state);
Out(SYS_IPF|LOG_NOTICE) << "IP " << ip << " banned." << endl;
}
@@ -85,13 +85,13 @@ namespace bt
bool ok;
int tmp = 0;
Uint32 addr = 0;
- Uint32 tqmask = 0xFFFFFFFF;
+ Uint32 mask = 0xFFFFFFFF;
tmp = ip.section('.',0,0).toInt(&ok);
if(!ok)
{
if(ip.section('.',0,0) == "*")
- tqmask &= 0x00FFFFFF;
+ mask &= 0x00FFFFFF;
else return; //illegal character
}
else
@@ -102,7 +102,7 @@ namespace bt
{
addr <<= 8;
if(ip.section('.',1,1) == "*")
- tqmask &= 0xFF00FFFF;
+ mask &= 0xFF00FFFF;
else return; //illegal character
}
else
@@ -116,7 +116,7 @@ namespace bt
{
addr <<= 8;
if(ip.section('.',2,2) == "*")
- tqmask &= 0xFFFF00FF;
+ mask &= 0xFFFF00FF;
else return; //illegal character
}
else
@@ -130,7 +130,7 @@ namespace bt
{
addr <<= 8;
if(ip.section('.',3,3) == "*")
- tqmask &=0xFFFFFF00;
+ mask &=0xFFFFFF00;
else return; //illegal character
}
else
@@ -139,21 +139,21 @@ namespace bt
addr |= tmp;
}
- IPKey key(addr, tqmask);
+ IPKey key(addr, mask);
this->insertRangeIP(key);
}
void IPBlocklist::insertRangeIP(IPKey& key, int state)
{
-// Out() << "Blocked range: " << key.m_ip << " - " << key.m_tqmask << endl;
+// Out() << "Blocked range: " << key.m_ip << " - " << key.m_mask << endl;
TQMap<IPKey, int>::iterator it;
if ((it = m_peers.find(key)) != m_peers.end())
{
- if(it.key().m_tqmask != key.m_tqmask)
+ if(it.key().m_mask != key.m_mask)
{
int st = it.data();
- IPKey key1(key.m_ip, it.key().m_tqmask | key.m_tqmask);
+ IPKey key1(key.m_ip, it.key().m_mask | key.m_mask);
m_peers.insert(key1, state+st);
return;
}
@@ -168,13 +168,13 @@ namespace bt
bool ok;
int tmp = 0;
Uint32 addr = 0;
- Uint32 tqmask = 0xFFFFFFFF;
+ Uint32 mask = 0xFFFFFFFF;
tmp = ip.section('.',0,0).toInt(&ok);
if(!ok)
{
if(ip.section('.',0,0) == "*")
- tqmask &= 0x00FFFFFF;
+ mask &= 0x00FFFFFF;
else return; //illegal character
}
else
@@ -185,7 +185,7 @@ namespace bt
{
addr <<= 8;
if(ip.section('.',1,1) == "*")
- tqmask &= 0xFF00FFFF;
+ mask &= 0xFF00FFFF;
else return; //illegal character
}
else
@@ -199,7 +199,7 @@ namespace bt
{
addr <<= 8;
if(ip.section('.',2,2) == "*")
- tqmask &= 0xFFFF00FF;
+ mask &= 0xFFFF00FF;
else return; //illegal character
}
else
@@ -213,7 +213,7 @@ namespace bt
{
addr <<= 8;
if(ip.section('.',3,3) == "*")
- tqmask &=0xFFFFFF00;
+ mask &=0xFFFFFF00;
else return; //illegal character
}
else
@@ -222,7 +222,7 @@ namespace bt
addr |= tmp;
}
- IPKey key(addr, tqmask);
+ IPKey key(addr, mask);
TQMap<IPKey, int>::iterator it = m_peers.find(key);
if (it == m_peers.end())
@@ -304,11 +304,11 @@ namespace bt
IPKey::IPKey()
{
m_ip = 0;
- m_tqmask = 0xFFFFFFFF;
+ m_mask = 0xFFFFFFFF;
}
- IPKey::IPKey(TQString& ip, Uint32 tqmask)
- : m_tqmask(tqmask)
+ IPKey::IPKey(TQString& ip, Uint32 mask)
+ : m_mask(mask)
{
bool ok;
this->m_ip = toUint32(ip, &ok);
@@ -317,55 +317,55 @@ namespace bt
IPKey::IPKey(const IPKey& ip)
{
m_ip = ip.m_ip;
- m_tqmask = ip.m_tqmask;
+ m_mask = ip.m_mask;
}
- IPKey::IPKey(Uint32 ip, Uint32 tqmask)
- : m_ip(ip), m_tqmask(tqmask)
+ IPKey::IPKey(Uint32 ip, Uint32 mask)
+ : m_ip(ip), m_mask(mask)
{}
TQString IPKey::toString()
{
- Uint32 tmp, tmptqmask;
+ Uint32 tmp, tmpmask;
Uint32 ip = m_ip;
- Uint32 tqmask = m_tqmask;
+ Uint32 mask = m_mask;
TQString out;
tmp = ip;
- tmptqmask = tqmask;
+ tmpmask = mask;
tmp &= 0x000000FF;
- tmptqmask &= 0x000000FF;
- if(tmptqmask == 0)
+ tmpmask &= 0x000000FF;
+ if(tmpmask == 0)
out.prepend("*");
else
out.prepend(TQString("%1").tqarg(tmp));
ip >>= 8;
- tqmask >>= 8;
+ mask >>= 8;
tmp = ip;
- tmptqmask = tqmask;
+ tmpmask = mask;
tmp &= 0x000000FF;
- tmptqmask &= 0x000000FF;
- if(tmptqmask == 0)
+ tmpmask &= 0x000000FF;
+ if(tmpmask == 0)
out.prepend("*.");
else
out.prepend(TQString("%1.").tqarg(tmp));
ip >>= 8;
- tqmask >>= 8;
+ mask >>= 8;
tmp = ip;
- tmptqmask = tqmask;
+ tmpmask = mask;
tmp &= 0x000000FF;
- tmptqmask &= 0x000000FF;
- if(tmptqmask == 0)
+ tmpmask &= 0x000000FF;
+ if(tmpmask == 0)
out.prepend("*.");
else
out.prepend(TQString("%1.").tqarg(tmp));
ip >>= 8;
- tqmask >>= 8;
+ mask >>= 8;
tmp = ip;
- tmptqmask = tqmask;
+ tmpmask = mask;
tmp &= 0x000000FF;
- tmptqmask &= 0x000000FF;
- if(tmptqmask == 0)
+ tmpmask &= 0x000000FF;
+ if(tmpmask == 0)
out.prepend("*.");
else
out.prepend(TQString("%1.").tqarg(tmp));
@@ -375,23 +375,23 @@ namespace bt
bool IPKey::operator ==(const IPKey& ip) const
{
- return (m_ip & m_tqmask) == m_tqmask & ip.m_ip;
+ return (m_ip & m_mask) == m_mask & ip.m_ip;
}
bool IPKey::operator !=(const IPKey& ip) const
{
- return (m_ip & m_tqmask) != m_tqmask & ip.m_ip;
+ return (m_ip & m_mask) != m_mask & ip.m_ip;
}
bool IPKey::operator < (const IPKey& ip) const
{
- return (m_ip & m_tqmask) < (m_tqmask & ip.m_ip);
+ return (m_ip & m_mask) < (m_mask & ip.m_ip);
}
IPKey& IPKey::operator =(const IPKey& ip)
{
m_ip = ip.m_ip;
- m_tqmask = ip.m_tqmask;
+ m_mask = ip.m_mask;
return *this;
}
diff --git a/libktorrent/torrent/ipblocklist.h b/libktorrent/torrent/ipblocklist.h
index 51e5aa5..6439972 100644
--- a/libktorrent/torrent/ipblocklist.h
+++ b/libktorrent/torrent/ipblocklist.h
@@ -35,8 +35,8 @@ namespace bt
{
public:
IPKey();
- IPKey(TQString& ip, Uint32 tqmask = 0xFFFFFFFF);
- IPKey(Uint32 ip, Uint32 tqmask = 0xFFFFFFFF);
+ IPKey(TQString& ip, Uint32 mask = 0xFFFFFFFF);
+ IPKey(Uint32 ip, Uint32 mask = 0xFFFFFFFF);
IPKey(const IPKey& ip);
~IPKey();
@@ -48,7 +48,7 @@ namespace bt
TQString toString();
Uint32 m_ip;
- Uint32 m_tqmask;
+ Uint32 m_mask;
};
/**
@@ -143,7 +143,7 @@ namespace bt
kt::IPBlockingInterface* pluginInterface;
/**
- * @param IPKey - Key: Peer IP address and bit tqmask if it is a range
+ * @param IPKey - Key: Peer IP address and bit mask if it is a range
* @param int - Number of bad chunks sent.
**/
TQMap<IPKey, int> m_peers;
diff --git a/libktorrent/torrent/torrentcreator.cpp b/libktorrent/torrent/torrentcreator.cpp
index 6ccbd63..5538b9e 100644
--- a/libktorrent/torrent/torrentcreator.cpp
+++ b/libktorrent/torrent/torrentcreator.cpp
@@ -350,7 +350,7 @@ namespace bt
TorrentControl* tc = new TorrentControl();
try
{
- // get the tqparent dir of target
+ // get the parent dir of target
TQFileInfo fi = TQFileInfo(target);
TQString odir;