summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/yahoo/libkyahoo/bytestream.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/yahoo/libkyahoo/bytestream.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/yahoo/libkyahoo/bytestream.cpp')
-rw-r--r--kopete/protocols/yahoo/libkyahoo/bytestream.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/kopete/protocols/yahoo/libkyahoo/bytestream.cpp b/kopete/protocols/yahoo/libkyahoo/bytestream.cpp
index ad299bf8..8ca3a4cd 100644
--- a/kopete/protocols/yahoo/libkyahoo/bytestream.cpp
+++ b/kopete/protocols/yahoo/libkyahoo/bytestream.cpp
@@ -36,7 +36,7 @@
//!
//! The signals connectionClosed(), delayedCloseFinished(), readyRead(),
//! bytesWritten(), and error() serve the exact same function as those from
-//! <A HREF="http://doc.trolltech.com/3.1/qsocket.html">QSocket</A>.
+//! <A HREF="http://doc.trolltech.com/3.1/tqsocket.html">TQSocket</A>.
//!
//! The simplest way to create a ByteStream is to reimplement isOpen(), close(),
//! and tryWrite(). Call appendRead() whenever you want to make data available for
@@ -60,13 +60,13 @@ class ByteStream::Private
public:
Private() {}
- QByteArray readBuf, writeBuf;
+ TQByteArray readBuf, writeBuf;
};
//!
//! Constructs a ByteStream object with parent \a parent.
-ByteStream::ByteStream(QObject *parent)
-:QObject(parent)
+ByteStream::ByteStream(TQObject *parent)
+:TQObject(parent)
{
// kdDebug(14181) << k_funcinfo << endl;
d = new Private;
@@ -97,7 +97,7 @@ void ByteStream::close()
//!
//! Writes array \a a to the stream.
-void ByteStream::write(const QByteArray &a)
+void ByteStream::write(const TQByteArray &a)
{
// kdDebug(14181) << k_funcinfo << "[data size: " << a.size() << "]" << endl;
@@ -115,7 +115,7 @@ void ByteStream::write(const QByteArray &a)
//!
//! Reads bytes \a bytes of data from the stream and returns them as an array. If \a bytes is 0, then
//! \a read will return all available data.
-QByteArray ByteStream::read(int bytes)
+TQByteArray ByteStream::read(int bytes)
{
// kdDebug(14181) << k_funcinfo << " " << bytes <<" [bytes]"<< endl;
return takeRead(bytes);
@@ -138,11 +138,11 @@ int ByteStream::bytesToWrite() const
//!
//! Writes string \a cs to the stream.
-void ByteStream::write(const QCString &cs)
+void ByteStream::write(const TQCString &cs)
{
// kdDebug(14181) << k_funcinfo << "[data size: " << cs.length() << "]" << endl;
- QByteArray block(cs.length());
+ TQByteArray block(cs.length());
memcpy(block.data(), cs.data(), block.size());
write(block);
}
@@ -163,7 +163,7 @@ void ByteStream::clearWriteBuffer()
//!
//! Appends \a block to the end of the read buffer.
-void ByteStream::appendRead(const QByteArray &block)
+void ByteStream::appendRead(const TQByteArray &block)
{
// kdDebug(14181) << k_funcinfo << endl;
appendArray(&d->readBuf, block);
@@ -171,7 +171,7 @@ void ByteStream::appendRead(const QByteArray &block)
//!
//! Appends \a block to the end of the write buffer.
-void ByteStream::appendWrite(const QByteArray &block)
+void ByteStream::appendWrite(const TQByteArray &block)
{
// kdDebug(14181) << k_funcinfo << "[data size: " << block.size() << "]" << endl;
@@ -182,7 +182,7 @@ void ByteStream::appendWrite(const QByteArray &block)
//! Returns \a size bytes from the start of the read buffer.
//! If \a size is 0, then all available data will be returned.
//! If \a del is TRUE, then the bytes are also removed.
-QByteArray ByteStream::takeRead(int size, bool del)
+TQByteArray ByteStream::takeRead(int size, bool del)
{
// kdDebug(14181) << k_funcinfo << "[data size: " << size << "][ delete :" << del << " ]" << endl;
return takeArray(&d->readBuf, size, del);
@@ -192,7 +192,7 @@ QByteArray ByteStream::takeRead(int size, bool del)
//! Returns \a size bytes from the start of the write buffer.
//! If \a size is 0, then all available data will be returned.
//! If \a del is TRUE, then the bytes are also removed.
-QByteArray ByteStream::takeWrite(int size, bool del)
+TQByteArray ByteStream::takeWrite(int size, bool del)
{
// kdDebug(14181) << k_funcinfo << "[data size: " << size << "][ delete :" << del << " ]" << endl;
return takeArray(&d->writeBuf, size, del);
@@ -200,14 +200,14 @@ QByteArray ByteStream::takeWrite(int size, bool del)
//!
//! Returns a reference to the read buffer.
-QByteArray & ByteStream::readBuf()
+TQByteArray & ByteStream::readBuf()
{
return d->readBuf;
}
//!
//! Returns a reference to the write buffer.
-QByteArray & ByteStream::writeBuf()
+TQByteArray & ByteStream::writeBuf()
{
// kdDebug(14181) << k_funcinfo << endl;
return d->writeBuf;
@@ -224,7 +224,7 @@ int ByteStream::tryWrite()
//!
//! Append array \a b to the end of the array pointed to by \a a.
-void ByteStream::appendArray(QByteArray *a, const QByteArray &b)
+void ByteStream::appendArray(TQByteArray *a, const TQByteArray &b)
{
// kdDebug(14181) << k_funcinfo << endl;
int oldsize = a->size();
@@ -236,11 +236,11 @@ void ByteStream::appendArray(QByteArray *a, const QByteArray &b)
//! Returns \a size bytes from the start of the array pointed to by \a from.
//! If \a size is 0, then all available data will be returned.
//! If \a del is TRUE, then the bytes are also removed.
-QByteArray ByteStream::takeArray(QByteArray *from, int size, bool del)
+TQByteArray ByteStream::takeArray(TQByteArray *from, int size, bool del)
{
// kdDebug(14181) << k_funcinfo << "[int size] : " << size << " [bool del] " << del << endl;
- QByteArray a;
+ TQByteArray a;
if(size == 0) {
a = from->copy();
if(del)