summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/yahoo/libkyahoo/client.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/protocols/yahoo/libkyahoo/client.cpp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/yahoo/libkyahoo/client.cpp')
-rw-r--r--kopete/protocols/yahoo/libkyahoo/client.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/kopete/protocols/yahoo/libkyahoo/client.cpp b/kopete/protocols/yahoo/libkyahoo/client.cpp
index d2a4b8dd..df261869 100644
--- a/kopete/protocols/yahoo/libkyahoo/client.cpp
+++ b/kopete/protocols/yahoo/libkyahoo/client.cpp
@@ -95,10 +95,10 @@ public:
TQString yCookie;
TQString tCookie;
TQString cCookie;
- Yahoo::Status status;
- Yahoo::Status statusOnConnect;
+ Yahoo::tqStatus status;
+ Yahoo::tqStatus statusOnConnect;
TQString statusMessageOnConnect;
- Yahoo::PictureStatus pictureFlag;
+ Yahoo::PicturetqStatus pictureFlag;
int pictureChecksum;
bool buddyListReady;
TQStringList pictureRequestQueue;
@@ -112,7 +112,7 @@ Client::Client(TQObject *par) :TQObject(par, "yahooclient")
d->root = new Task(this, true);
d->statusOnConnect = Yahoo::StatusAvailable;
- setStatus( Yahoo::StatusDisconnected );
+ settqStatus( Yahoo::StatusDisconnected );
d->tasksInitialized = false;
d->stream = 0L;
d->iconLoader = 0L;
@@ -132,8 +132,8 @@ Client::Client(TQObject *par) :TQObject(par, "yahooclient")
TQObject::connect( d->loginTask, TQT_SIGNAL( haveCookies() ), TQT_SLOT( slotGotCookies() ) );
TQObject::connect( d->listTask, TQT_SIGNAL( gotBuddy(const TQString &, const TQString &, const TQString &) ),
TQT_SIGNAL( gotBuddy(const TQString &, const TQString &, const TQString &) ) );
- TQObject::connect( d->listTask, TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthStatus ) ),
- TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthStatus ) ) );
+ TQObject::connect( d->listTask, TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthtqStatus ) ),
+ TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthtqStatus ) ) );
}
Client::~Client()
@@ -151,7 +151,7 @@ void Client::connect( const TQString &host, const uint port, const TQString &use
d->port = port;
d->user = userId;
d->pass = pass;
- setStatus( Yahoo::StatusConnecting );
+ settqStatus( Yahoo::StatusConnecting );
m_connector = new KNetworkConnector;
m_connector->setOptHostPort( host, port );
@@ -272,9 +272,9 @@ void Client::slotLoginResponse( int response, const TQString &msg )
if( !(d->statusOnConnect == Yahoo::StatusAvailable ||
d->statusOnConnect == Yahoo::StatusInvisible) ||
!d->statusMessageOnConnect.isEmpty() )
- changeStatus( d->statusOnConnect, d->statusMessageOnConnect, Yahoo::StatusTypeAway );
- d->statusMessageOnConnect = TQString::null;
- setStatus( d->statusOnConnect );
+ changetqStatus( d->statusOnConnect, d->statusMessageOnConnect, Yahoo::StatusTypeAway );
+ d->statusMessageOnConnect = TQString();
+ settqStatus( d->statusOnConnect );
/* only send a ping every hour. we get disconnected otherwise */
m_pingTimer->start( 60 * 60 * 1000 );
initTasks();
@@ -344,7 +344,7 @@ void Client::sendBuzz( const TQString &to )
{
SendMessageTask *smt = new SendMessageTask( d->root );
smt->setTarget( to );
- smt->setText( TQString::fromLatin1( "<ding>" ) );
+ smt->setText( TQString::tqfromLatin1( "<ding>" ) );
smt->setPicureFlag( pictureFlag() );
smt->go( true );
}
@@ -404,13 +404,13 @@ void Client::cancelFileTransfer( unsigned int transferId )
emit fileTransferCanceled( transferId );
}
-void Client::changeStatus( Yahoo::Status status, const TQString &message, Yahoo::StatusType type )
+void Client::changetqStatus( Yahoo::tqStatus status, const TQString &message, Yahoo::StatusType type )
{
kdDebug(YAHOO_RAW_DEBUG) << "status: " << status
<< " message: " << message
<< " type: " << type << endl;
ChangeStatusTask *cst = new ChangeStatusTask( d->root );
- cst->setStatus( status );
+ cst->settqStatus( status );
cst->setMessage( message );
cst->setType( type );
cst->go( true );
@@ -418,7 +418,7 @@ void Client::changeStatus( Yahoo::Status status, const TQString &message, Yahoo:
if( status == Yahoo::StatusInvisible )
stealthContact( TQString(), Yahoo::StealthOnline, Yahoo::StealthClear );
- setStatus( status );
+ settqStatus( status );
}
void Client::sendAuthReply( const TQString &userId, bool accept, const TQString &msg )
@@ -444,7 +444,7 @@ void Client::sendPing()
// ***** Contactlist handling *****
-void Client::stealthContact(TQString const &userId, Yahoo::StealthMode mode, Yahoo::StealthStatus state)
+void Client::stealthContact(TQString const &userId, Yahoo::StealthMode mode, Yahoo::StealthtqStatus state)
{
StealthTask *st = new StealthTask( d->root );
st->setTarget( userId );
@@ -575,16 +575,16 @@ void Client::sendPictureInformation( const TQString &userId, const TQString &url
spt->go( true );
}
-void Client::setPictureStatus( Yahoo::PictureStatus status )
+void Client::setPicturetqStatus( Yahoo::PicturetqStatus status )
{
if( d->pictureFlag == status )
return;
- kdDebug(YAHOO_RAW_DEBUG) << "Setting PictureStatus to: " << status << endl;
+ kdDebug(YAHOO_RAW_DEBUG) << "Setting PicturetqStatus to: " << status << endl;
d->pictureFlag = status;
SendPictureTask *spt = new SendPictureTask( d->root );
- spt->setType( SendPictureTask::SendStatus );
- spt->setStatus( status );
+ spt->setType( SendPictureTask::SendtqStatus );
+ spt->settqStatus( status );
spt->go( true );
}
@@ -710,8 +710,8 @@ void Client::leaveChat()
// ***** other *****
void Client::notifyError( const TQString &info, const TQString & errorString, LogLevel level )
{
- kdDebug(YAHOO_RAW_DEBUG) << TQString::fromLatin1("\nThe following error occurred: %1\n Reason: %2\n LogLevel: %3")
- .arg(info).arg(errorString).arg(level) << endl;
+ kdDebug(YAHOO_RAW_DEBUG) << TQString::tqfromLatin1("\nThe following error occurred: %1\n Reason: %2\n LogLevel: %3")
+ .tqarg(info).tqarg(errorString).tqarg(level) << endl;
d->errorString = errorString;
d->errorInformation = info;
emit error( level );
@@ -727,18 +727,18 @@ void Client::setUserId( const TQString & userId )
d->user = userId;
}
-Yahoo::Status Client::status()
+Yahoo::tqStatus Client::status()
{
return d->status;
}
-void Client::setStatus( Yahoo::Status status )
+void Client::settqStatus( Yahoo::tqStatus status )
{
d->status = status;
}
-void Client::setStatusOnConnect( Yahoo::Status status )
+void Client::setStatusOnConnect( Yahoo::tqStatus status )
{
d->statusOnConnect = status;
}
@@ -841,8 +841,8 @@ void Client::initTasks()
d->statusTask = new StatusNotifierTask( d->root );
TQObject::connect( d->statusTask, TQT_SIGNAL( statusChanged(const TQString&,int,const TQString&,int,int,int) ),
TQT_SIGNAL( statusChanged(const TQString&,int,const TQString&,int,int,int) ) );
- TQObject::connect( d->statusTask, TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthStatus ) ),
- TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthStatus ) ) );
+ TQObject::connect( d->statusTask, TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthtqStatus ) ),
+ TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthtqStatus ) ) );
TQObject::connect( d->statusTask, TQT_SIGNAL( loginResponse( int, const TQString& ) ),
TQT_SLOT( slotLoginResponse( int, const TQString& ) ) );
TQObject::connect( d->statusTask, TQT_SIGNAL( authorizationRejected( const TQString&, const TQString& ) ),