summaryrefslogtreecommitdiffstats
path: root/tdecore/network
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-25 13:15:51 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-25 13:15:51 -0600
commitd1bd46309ad2bee123bdf9081ae5b4e0aa7ccc7e (patch)
treeecd8c94dc36cb35dd4810a2b05d1b78bb969e143 /tdecore/network
parent703fb0c89c2eee56a1e613e67a446db9d4287929 (diff)
downloadtdelibs-d1bd46309ad2bee123bdf9081ae5b4e0aa7ccc7e.tar.gz
tdelibs-d1bd46309ad2bee123bdf9081ae5b4e0aa7ccc7e.zip
Rename KServer, KSocket, KIO_EXPORT, KIOInput, KIOJob, KIOConfig, KIOBuffer, and KBuffer to avoid conflicts with KDE4
Diffstat (limited to 'tdecore/network')
-rw-r--r--tdecore/network/kbufferedsocket.cpp64
-rw-r--r--tdecore/network/kbufferedsocket.h24
-rw-r--r--tdecore/network/kclientsocketbase.h2
-rw-r--r--tdecore/network/kiobuffer.h14
-rw-r--r--tdecore/network/kserversocket.cpp10
-rw-r--r--tdecore/network/kserversocket.h8
-rw-r--r--tdecore/network/kstreamsocket.h8
-rw-r--r--tdecore/network/tdesocketbuffer.cpp4
-rw-r--r--tdecore/network/tdesocketbuffer_p.h4
9 files changed, 69 insertions, 69 deletions
diff --git a/tdecore/network/kbufferedsocket.cpp b/tdecore/network/kbufferedsocket.cpp
index 1b08d121e..3e9462922 100644
--- a/tdecore/network/kbufferedsocket.cpp
+++ b/tdecore/network/kbufferedsocket.cpp
@@ -35,28 +35,28 @@
using namespace KNetwork;
using namespace KNetwork::Internal;
-class KNetwork::KBufferedSocketPrivate
+class KNetwork::TDEBufferedSocketPrivate
{
public:
mutable TDESocketBuffer *input, *output;
- KBufferedSocketPrivate()
+ TDEBufferedSocketPrivate()
{
input = 0L;
output = 0L;
}
};
-KBufferedSocket::KBufferedSocket(const TQString& host, const TQString& service,
+TDEBufferedSocket::TDEBufferedSocket(const TQString& host, const TQString& service,
TQObject *parent, const char *name)
: KStreamSocket(host, service, parent, name),
- d(new KBufferedSocketPrivate)
+ d(new TDEBufferedSocketPrivate)
{
setInputBuffering(true);
setOutputBuffering(true);
}
-KBufferedSocket::~KBufferedSocket()
+TDEBufferedSocket::~TDEBufferedSocket()
{
closeNow();
delete d->input;
@@ -64,13 +64,13 @@ KBufferedSocket::~KBufferedSocket()
delete d;
}
-void KBufferedSocket::setSocketDevice(TDESocketDevice* device)
+void TDEBufferedSocket::setSocketDevice(TDESocketDevice* device)
{
KStreamSocket::setSocketDevice(device);
device->setBlocking(false);
}
-bool KBufferedSocket::setSocketOptions(int opts)
+bool TDEBufferedSocket::setSocketOptions(int opts)
{
if (opts == Blocking)
return false;
@@ -79,7 +79,7 @@ bool KBufferedSocket::setSocketOptions(int opts)
return KStreamSocket::setSocketOptions(opts);
}
-void KBufferedSocket::close()
+void TDEBufferedSocket::close()
{
if (!d->output || d->output->isEmpty())
closeNow();
@@ -94,10 +94,10 @@ void KBufferedSocket::close()
}
#ifdef USE_QT3
-TQ_LONG KBufferedSocket::bytesAvailable() const
+TQ_LONG TDEBufferedSocket::bytesAvailable() const
#endif
#ifdef USE_QT4
-qint64 KBufferedSocket::bytesAvailable() const
+qint64 TDEBufferedSocket::bytesAvailable() const
#endif
{
if (!d->input)
@@ -106,7 +106,7 @@ qint64 KBufferedSocket::bytesAvailable() const
return d->input->length();
}
-TQ_LONG KBufferedSocket::waitForMore(int msecs, bool *timeout)
+TQ_LONG TDEBufferedSocket::waitForMore(int msecs, bool *timeout)
{
TQ_LONG retval = KStreamSocket::waitForMore(msecs, timeout);
if (d->input)
@@ -118,7 +118,7 @@ TQ_LONG KBufferedSocket::waitForMore(int msecs, bool *timeout)
return retval;
}
-TQT_TQIO_LONG KBufferedSocket::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen)
+TQT_TQIO_LONG TDEBufferedSocket::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen)
{
if (d->input)
{
@@ -134,13 +134,13 @@ TQT_TQIO_LONG KBufferedSocket::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen)
return KStreamSocket::tqreadBlock(data, maxlen);
}
-TQT_TQIO_LONG KBufferedSocket::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, TDESocketAddress& from)
+TQT_TQIO_LONG TDEBufferedSocket::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, TDESocketAddress& from)
{
from = peerAddress();
return tqreadBlock(data, maxlen);
}
-TQ_LONG KBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen)
+TQ_LONG TDEBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen)
{
if (d->input)
{
@@ -156,13 +156,13 @@ TQ_LONG KBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen)
return KStreamSocket::peekBlock(data, maxlen);
}
-TQ_LONG KBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& from)
+TQ_LONG TDEBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen, TDESocketAddress& from)
{
from = peerAddress();
return peekBlock(data, maxlen);
}
-TQT_TQIO_LONG KBufferedSocket::tqwriteBlock(const char *data, TQT_TQIO_ULONG len)
+TQT_TQIO_LONG TDEBufferedSocket::tqwriteBlock(const char *data, TQT_TQIO_ULONG len)
{
if (state() != Connected)
{
@@ -192,14 +192,14 @@ TQT_TQIO_LONG KBufferedSocket::tqwriteBlock(const char *data, TQT_TQIO_ULONG len
return KStreamSocket::tqwriteBlock(data, len);
}
-TQT_TQIO_LONG KBufferedSocket::tqwriteBlock(const char *data, TQT_TQIO_ULONG maxlen,
+TQT_TQIO_LONG TDEBufferedSocket::tqwriteBlock(const char *data, TQT_TQIO_ULONG maxlen,
const TDESocketAddress&)
{
// ignore the third parameter
return tqwriteBlock(data, maxlen);
}
-void KBufferedSocket::enableRead(bool enable)
+void TDEBufferedSocket::enableRead(bool enable)
{
KStreamSocket::enableRead(enable);
if (!enable && d->input)
@@ -216,7 +216,7 @@ void KBufferedSocket::enableRead(bool enable)
TQTimer::singleShot(0, this, TQT_SLOT(slotReadActivity()));
}
-void KBufferedSocket::enableWrite(bool enable)
+void TDEBufferedSocket::enableWrite(bool enable)
{
KStreamSocket::enableWrite(enable);
if (!enable && d->output && !d->output->isEmpty())
@@ -228,7 +228,7 @@ void KBufferedSocket::enableWrite(bool enable)
}
}
-void KBufferedSocket::stateChanging(SocketState newState)
+void TDEBufferedSocket::stateChanging(SocketState newState)
{
if (newState == Connecting || newState == Connected)
{
@@ -246,7 +246,7 @@ void KBufferedSocket::stateChanging(SocketState newState)
KStreamSocket::stateChanging(newState);
}
-void KBufferedSocket::setInputBuffering(bool enable)
+void TDEBufferedSocket::setInputBuffering(bool enable)
{
TQMutexLocker locker(mutex());
if (!enable)
@@ -260,12 +260,12 @@ void KBufferedSocket::setInputBuffering(bool enable)
}
}
-KIOBufferBase* KBufferedSocket::inputBuffer()
+TDEIOBufferBase* TDEBufferedSocket::inputBuffer()
{
return d->input;
}
-void KBufferedSocket::setOutputBuffering(bool enable)
+void TDEBufferedSocket::setOutputBuffering(bool enable)
{
TQMutexLocker locker(mutex());
if (!enable)
@@ -279,16 +279,16 @@ void KBufferedSocket::setOutputBuffering(bool enable)
}
}
-KIOBufferBase* KBufferedSocket::outputBuffer()
+TDEIOBufferBase* TDEBufferedSocket::outputBuffer()
{
return d->output;
}
#ifdef USE_QT3
-TQ_ULONG KBufferedSocket::bytesToWrite() const
+TQ_ULONG TDEBufferedSocket::bytesToWrite() const
#endif
#ifdef USE_QT4
-qint64 KBufferedSocket::bytesToWrite() const
+qint64 TDEBufferedSocket::bytesToWrite() const
#endif
{
if (!d->output)
@@ -297,14 +297,14 @@ qint64 KBufferedSocket::bytesToWrite() const
return d->output->length();
}
-void KBufferedSocket::closeNow()
+void TDEBufferedSocket::closeNow()
{
KStreamSocket::close();
if (d->output)
d->output->clear();
}
-bool KBufferedSocket::canReadLine() const
+bool TDEBufferedSocket::canReadLine() const
{
if (!d->input)
return false;
@@ -312,12 +312,12 @@ bool KBufferedSocket::canReadLine() const
return d->input->canReadLine();
}
-TQCString KBufferedSocket::readLine()
+TQCString TDEBufferedSocket::readLine()
{
return d->input->readLine();
}
-void KBufferedSocket::waitForConnect()
+void TDEBufferedSocket::waitForConnect()
{
if (state() != Connecting)
return; // nothing to be waited on
@@ -327,7 +327,7 @@ void KBufferedSocket::waitForConnect()
KStreamSocket::setSocketOptions(socketOptions() & ~Blocking);
}
-void KBufferedSocket::slotReadActivity()
+void TDEBufferedSocket::slotReadActivity()
{
if (d->input && state() == Connected)
{
@@ -374,7 +374,7 @@ void KBufferedSocket::slotReadActivity()
}
}
-void KBufferedSocket::slotWriteActivity()
+void TDEBufferedSocket::slotWriteActivity()
{
if (d->output && !d->output->isEmpty() &&
(state() == Connected || state() == Closing))
diff --git a/tdecore/network/kbufferedsocket.h b/tdecore/network/kbufferedsocket.h
index 158a5a434..60ad3e81d 100644
--- a/tdecore/network/kbufferedsocket.h
+++ b/tdecore/network/kbufferedsocket.h
@@ -31,12 +31,12 @@
#include "kstreamsocket.h"
#include <tdelibs_export.h>
-class KIOBufferBase;
+class TDEIOBufferBase;
namespace KNetwork {
-class KBufferedSocketPrivate;
-/** @class KBufferedSocket kbufferedsocket.h kbufferedsocket.h
+class TDEBufferedSocketPrivate;
+/** @class TDEBufferedSocket kbufferedsocket.h kbufferedsocket.h
* @brief Buffered stream sockets.
*
* This class allows the user to create and operate buffered stream sockets
@@ -55,7 +55,7 @@ class KBufferedSocketPrivate;
* @see KNetwork::KStreamSocket, KNetwork::TDEServerSocket
* @author Thiago Macieira <thiago@kde.org>
*/
-class TDECORE_EXPORT KBufferedSocket: public KStreamSocket
+class TDECORE_EXPORT TDEBufferedSocket: public KStreamSocket
{
Q_OBJECT
@@ -68,13 +68,13 @@ public:
* @param parent the parent object for this object
* @param name the internal name for this object
*/
- KBufferedSocket(const TQString& node = TQString::null, const TQString& service = TQString::null,
+ TDEBufferedSocket(const TQString& node = TQString::null, const TQString& service = TQString::null,
TQObject* parent = 0L, const char *name = 0L);
/**
* Destructor.
*/
- virtual ~KBufferedSocket();
+ virtual ~TDEBufferedSocket();
/**
* Be sure to catch new devices.
@@ -168,7 +168,7 @@ public:
/**
* Retrieves the input buffer object.
*/
- KIOBufferBase* inputBuffer();
+ TDEIOBufferBase* inputBuffer();
/**
* Sets the use of output buffering.
@@ -178,7 +178,7 @@ public:
/**
* Retrieves the output buffer object.
*/
- KIOBufferBase* outputBuffer();
+ TDEIOBufferBase* outputBuffer();
/**
* Returns the length of the output buffer.
@@ -240,10 +240,10 @@ signals:
void bytesWritten(int bytes);
private:
- KBufferedSocket(const KBufferedSocket&);
- KBufferedSocket& operator=(const KBufferedSocket&);
+ TDEBufferedSocket(const TDEBufferedSocket&);
+ TDEBufferedSocket& operator=(const TDEBufferedSocket&);
- KBufferedSocketPrivate *d;
+ TDEBufferedSocketPrivate *d;
public:
// KDE4: remove this function
@@ -253,7 +253,7 @@ public:
*
* This function is provided to ease porting from KExtendedSocket,
* which required a call to reset() in order to be able to connect again
- * using the same device. This is not necessary in KBufferedSocket any more.
+ * using the same device. This is not necessary in TDEBufferedSocket any more.
*/
#ifdef USE_QT3
inline void reset()
diff --git a/tdecore/network/kclientsocketbase.h b/tdecore/network/kclientsocketbase.h
index 68c45dd28..27da219a9 100644
--- a/tdecore/network/kclientsocketbase.h
+++ b/tdecore/network/kclientsocketbase.h
@@ -46,7 +46,7 @@ class KClientSocketBasePrivate;
* such as, and especially, name resolution and signals.
*
* @note This class is abstract. If you're looking for a normal,
- * client socket class, see @ref KStreamSocket and KBufferedSocket
+ * client socket class, see @ref KStreamSocket and TDEBufferedSocket
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
diff --git a/tdecore/network/kiobuffer.h b/tdecore/network/kiobuffer.h
index ac1352a4d..c79daaa70 100644
--- a/tdecore/network/kiobuffer.h
+++ b/tdecore/network/kiobuffer.h
@@ -32,41 +32,41 @@
class TQIODevice;
/**
- * @class KIOBufferBase kiobuffer.h kiobuffer.h
+ * @class TDEIOBufferBase kiobuffer.h kiobuffer.h
* @brief base for I/O buffer implementation
*
* This class declares the base methods to interface with an I/O buffer.
* Most applications will not need to access this class directly, since
- * it is all handled by @ref KNetwork::KBufferedSocket and other buffering
+ * it is all handled by @ref KNetwork::TDEBufferedSocket and other buffering
* classes.
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class KIOBufferBase
+class TDEIOBufferBase
{
public:
/**
* Default constructor. Does nothing.
*/
- KIOBufferBase()
+ TDEIOBufferBase()
{ }
/**
* Copy constructor. Does nothing here.
*/
- KIOBufferBase(const KIOBufferBase& )
+ TDEIOBufferBase(const TDEIOBufferBase& )
{ }
/**
* Virtual destructor. Does nothing.
*/
- virtual ~KIOBufferBase()
+ virtual ~TDEIOBufferBase()
{ }
/**
* Assignment operator. Does nothing.
*/
- KIOBufferBase& operator=(const KIOBufferBase& )
+ TDEIOBufferBase& operator=(const TDEIOBufferBase& )
{ return *this; }
/**
diff --git a/tdecore/network/kserversocket.cpp b/tdecore/network/kserversocket.cpp
index d5a1b90bb..16a48cdf2 100644
--- a/tdecore/network/kserversocket.cpp
+++ b/tdecore/network/kserversocket.cpp
@@ -47,11 +47,11 @@ public:
int backlog;
int timeout;
- bool bindWhenFound : 1, listenWhenBound : 1, useKBufferedSocket : 1;
+ bool bindWhenFound : 1, listenWhenBound : 1, useTDEBufferedSocket : 1;
TDEServerSocketPrivate()
: state(None), timeout(0), bindWhenFound(false), listenWhenBound(false),
- useKBufferedSocket(true)
+ useTDEBufferedSocket(true)
{
resolver.setFlags(KResolver::Passive);
resolver.setFamily(KResolver::KnownFamily);
@@ -277,7 +277,7 @@ void TDEServerSocket::close()
void TDEServerSocket::setAcceptBuffered(bool enable)
{
- d->useKBufferedSocket = enable;
+ d->useTDEBufferedSocket = enable;
}
KActiveSocketBase* TDEServerSocket::accept()
@@ -319,8 +319,8 @@ KActiveSocketBase* TDEServerSocket::accept()
}
KStreamSocket* streamsocket;
- if (d->useKBufferedSocket)
- streamsocket = new KBufferedSocket();
+ if (d->useTDEBufferedSocket)
+ streamsocket = new TDEBufferedSocket();
else
streamsocket = new KStreamSocket();
streamsocket->setSocketDevice(accepted);
diff --git a/tdecore/network/kserversocket.h b/tdecore/network/kserversocket.h
index 6821a886a..edb86d0b2 100644
--- a/tdecore/network/kserversocket.h
+++ b/tdecore/network/kserversocket.h
@@ -95,13 +95,13 @@ class TDEServerSocketPrivate;
*
* It is important to note that @ref accept can return either an
* object of type KNetwork::KStreamSocket or
- * KNetwork::KBufferedSocket (default). If you want to accept a
+ * KNetwork::TDEBufferedSocket (default). If you want to accept a
* non-buffered socket, you must first call setAcceptBuffered.
*
* @warning If you use TDEServerSocket in an auxiliary (non-GUI) thread,
* you need to accept only KNetwork::KStreamSocket objects.
*
- * @see KNetwork::KStreamSocket, KNetwork::KBufferedSocket
+ * @see KNetwork::KStreamSocket, KNetwork::TDEBufferedSocket
* @author Thiago Macieira <thiago@kde.org>
*/
class TDECORE_EXPORT TDEServerSocket: public TQObject, public KPassiveSocketBase
@@ -338,7 +338,7 @@ public:
* Toggles whether the accepted socket will be buffered or not.
* That is, the @ref accept function will always return a KStreamSocket
* object or descended from it. If buffering is enabled, the class
- * to be returned will be KBufferedSocket.
+ * to be returned will be TDEBufferedSocket.
*
* By default, this flag is set to true.
*
@@ -361,7 +361,7 @@ public:
* the base class for active sockets, but it is guaranteed
* that the object will be a KStreamSocket or derived from it.
*
- * @sa KBufferedSocket
+ * @sa TDEBufferedSocket
* @sa setAcceptBuffered
*/
virtual KActiveSocketBase* accept();
diff --git a/tdecore/network/kstreamsocket.h b/tdecore/network/kstreamsocket.h
index d077296c1..c1f9e5848 100644
--- a/tdecore/network/kstreamsocket.h
+++ b/tdecore/network/kstreamsocket.h
@@ -35,7 +35,7 @@ namespace KNetwork {
class KResolverEntry;
class KResolverResults;
class TDEServerSocket;
-class KBufferedSocket;
+class TDEBufferedSocket;
class KStreamSocketPrivate;
/** @class KStreamSocket kstreamsocket.h kstreamsocket.h
@@ -50,7 +50,7 @@ class KStreamSocketPrivate;
*
* KStreamSocket objects are thread-safe and can be used in auxiliary
* threads (i.e., not the thread in which the Qt event loop runs in).
- * Note that KBufferedSocket cannot be used reliably in an auxiliary thread.
+ * Note that TDEBufferedSocket cannot be used reliably in an auxiliary thread.
*
* Sample usage:
* \code
@@ -91,7 +91,7 @@ class KStreamSocketPrivate;
* }
* \endcode
*
- * @see KNetwork::KBufferedSocket, KNetwork::TDEServerSocket
+ * @see KNetwork::TDEBufferedSocket, KNetwork::TDEServerSocket
* @author Thiago Macieira <thiago@kde.org>
*/
class TDECORE_EXPORT KStreamSocket: public KClientSocketBase
@@ -242,7 +242,7 @@ private:
KStreamSocketPrivate *d;
friend class TDEServerSocket;
- friend class KBufferedSocket;
+ friend class TDEBufferedSocket;
};
} // namespace KNetwork
diff --git a/tdecore/network/tdesocketbuffer.cpp b/tdecore/network/tdesocketbuffer.cpp
index 52988d344..33b8fe776 100644
--- a/tdecore/network/tdesocketbuffer.cpp
+++ b/tdecore/network/tdesocketbuffer.cpp
@@ -39,7 +39,7 @@ TDESocketBuffer::TDESocketBuffer(TQ_LONG size)
}
TDESocketBuffer::TDESocketBuffer(const TDESocketBuffer& other)
- : KIOBufferBase(other), m_mutex(true)
+ : TDEIOBufferBase(other), m_mutex(true)
{
*this = other;
}
@@ -54,7 +54,7 @@ TDESocketBuffer& TDESocketBuffer::operator=(const TDESocketBuffer& other)
TQMutexLocker locker1(&m_mutex);
TQMutexLocker locker2(&other.m_mutex);
- KIOBufferBase::operator=(other);
+ TDEIOBufferBase::operator=(other);
m_list = other.m_list; // copy-on-write
m_offset = other.m_offset;
diff --git a/tdecore/network/tdesocketbuffer_p.h b/tdecore/network/tdesocketbuffer_p.h
index be71f462e..0fa5d4e37 100644
--- a/tdecore/network/tdesocketbuffer_p.h
+++ b/tdecore/network/tdesocketbuffer_p.h
@@ -41,11 +41,11 @@ class KActiveSocketBase;
* @class TDESocketBuffer tdesocketbuffer_p.h tdesocketbuffer_p.h
* @brief generic socket buffering code
*
- * This class implements generic buffering used by @ref KBufferedSocket.
+ * This class implements generic buffering used by @ref TDEBufferedSocket.
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class TDESocketBuffer: public KIOBufferBase
+class TDESocketBuffer: public TDEIOBufferBase
{
public:
/**