summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-03-24 23:39:26 +0100
committerPali Rohár <[email protected]>2017-12-22 09:10:24 +0100
commitf7a1cef9ca454d154a4bdc01e141cd39227c0c0b (patch)
tree6c3dfcc4d25569257f61a87b3c14677a21b6d07b
parent0a6d20c7c7c29a64dbc1e74fe90dc8101c547316 (diff)
Use qCDebug
-rw-r--r--protocols/yahoo/CMakeLists.txt2
-rw-r--r--protocols/yahoo/libkyahoo/CMakeLists.txt3
-rw-r--r--protocols/yahoo/libkyahoo/alivetask.cpp6
-rw-r--r--protocols/yahoo/libkyahoo/bytestream.cpp2
-rw-r--r--protocols/yahoo/libkyahoo/changestatustask.cpp6
-rw-r--r--protocols/yahoo/libkyahoo/changestatustask.h1
-rw-r--r--protocols/yahoo/libkyahoo/chatsessiontask.cpp6
-rw-r--r--protocols/yahoo/libkyahoo/client.cpp53
-rw-r--r--protocols/yahoo/libkyahoo/conferencetask.cpp26
-rw-r--r--protocols/yahoo/libkyahoo/connector.h1
-rw-r--r--protocols/yahoo/libkyahoo/coreprotocol.cpp45
-rw-r--r--protocols/yahoo/libkyahoo/filetransfernotifiertask.cpp15
-rw-r--r--protocols/yahoo/libkyahoo/inputprotocolbase.cpp2
-rw-r--r--protocols/yahoo/libkyahoo/libkyahoo_export.h1
-rw-r--r--protocols/yahoo/libkyahoo/libyahoo.c3
-rw-r--r--protocols/yahoo/libkyahoo/libyahoo.h1
-rw-r--r--protocols/yahoo/libkyahoo/listtask.cpp15
-rw-r--r--protocols/yahoo/libkyahoo/logintask.cpp57
-rw-r--r--protocols/yahoo/libkyahoo/logofftask.cpp6
-rw-r--r--protocols/yahoo/libkyahoo/logofftask.h1
-rw-r--r--protocols/yahoo/libkyahoo/mailnotifiertask.cpp6
-rw-r--r--protocols/yahoo/libkyahoo/md5.c1
-rw-r--r--protocols/yahoo/libkyahoo/messagereceivertask.cpp18
-rw-r--r--protocols/yahoo/libkyahoo/modifybuddytask.cpp6
-rw-r--r--protocols/yahoo/libkyahoo/modifyyabtask.cpp11
-rw-r--r--protocols/yahoo/libkyahoo/picturenotifiertask.cpp15
-rw-r--r--protocols/yahoo/libkyahoo/pingtask.cpp6
-rw-r--r--protocols/yahoo/libkyahoo/receivefiletask.cpp24
-rw-r--r--protocols/yahoo/libkyahoo/requestpicturetask.cpp5
-rw-r--r--protocols/yahoo/libkyahoo/safedelete.cpp1
-rw-r--r--protocols/yahoo/libkyahoo/sendauthresptask.cpp5
-rw-r--r--protocols/yahoo/libkyahoo/sendfiletask.cpp58
-rw-r--r--protocols/yahoo/libkyahoo/sendmessagetask.cpp8
-rw-r--r--protocols/yahoo/libkyahoo/sendnotifytask.cpp7
-rw-r--r--protocols/yahoo/libkyahoo/sendpicturetask.cpp34
-rw-r--r--protocols/yahoo/libkyahoo/sha1.c2
-rw-r--r--protocols/yahoo/libkyahoo/statusnotifiertask.cpp13
-rw-r--r--protocols/yahoo/libkyahoo/stealthtask.cpp2
-rw-r--r--protocols/yahoo/libkyahoo/stealthtask.h2
-rw-r--r--protocols/yahoo/libkyahoo/stream.h1
-rw-r--r--protocols/yahoo/libkyahoo/tests/logintest.cpp6
-rw-r--r--protocols/yahoo/libkyahoo/tests/logintest.h1
-rw-r--r--protocols/yahoo/libkyahoo/webcamimgformat.cpp26
-rw-r--r--protocols/yahoo/libkyahoo/webcamtask.cpp101
-rw-r--r--protocols/yahoo/libkyahoo/yabentry.cpp4
-rw-r--r--protocols/yahoo/libkyahoo/yabentry.h3
-rw-r--r--protocols/yahoo/libkyahoo/yabtask.cpp15
-rw-r--r--protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp13
-rw-r--r--protocols/yahoo/libkyahoo/yahoobytestream.cpp26
-rw-r--r--protocols/yahoo/libkyahoo/yahoobytestream.h2
-rw-r--r--protocols/yahoo/libkyahoo/yahoochattask.cpp40
-rw-r--r--protocols/yahoo/libkyahoo/yahooclientstream.cpp38
-rw-r--r--protocols/yahoo/libkyahoo/yahooconnector.cpp18
-rw-r--r--protocols/yahoo/libkyahoo/yahooconnector.h1
-rw-r--r--protocols/yahoo/libkyahoo/ymsgprotocol.cpp129
-rw-r--r--protocols/yahoo/libkyahoo/ymsgprotocol.h2
-rw-r--r--protocols/yahoo/libkyahoo/ymsgtransfer.cpp9
-rw-r--r--protocols/yahoo/libkyahoo/ymsgtransfer.h3
-rw-r--r--protocols/yahoo/ui/yahoochatselectordialog.cpp9
-rw-r--r--protocols/yahoo/ui/yahoochatselectordialog.h1
-rw-r--r--protocols/yahoo/ui/yahooinvitelistimpl.cpp28
-rw-r--r--protocols/yahoo/ui/yahooinvitelistimpl.h1
-rw-r--r--protocols/yahoo/ui/yahoouserinfodialog.cpp7
-rw-r--r--protocols/yahoo/ui/yahoouserinfodialog.h1
-rw-r--r--protocols/yahoo/ui/yahoowebcamdialog.cpp6
-rw-r--r--protocols/yahoo/ui/yahoowebcamdialog.h2
-rw-r--r--protocols/yahoo/yahooaccount.cpp222
-rw-r--r--protocols/yahoo/yahooaccount.h1
-rw-r--r--protocols/yahoo/yahooaddcontact.cpp13
-rw-r--r--protocols/yahoo/yahooaddcontact.h2
-rw-r--r--protocols/yahoo/yahoochatchatsession.cpp7
-rw-r--r--protocols/yahoo/yahoochatchatsession.h2
-rw-r--r--protocols/yahoo/yahoochatsession.cpp16
-rw-r--r--protocols/yahoo/yahoochatsession.h1
-rw-r--r--protocols/yahoo/yahooconferencemessagemanager.cpp7
-rw-r--r--protocols/yahoo/yahooconferencemessagemanager.h2
-rw-r--r--protocols/yahoo/yahoocontact.cpp55
-rw-r--r--protocols/yahoo/yahoocontact.h3
-rw-r--r--protocols/yahoo/yahooeditaccount.cpp11
-rw-r--r--protocols/yahoo/yahooeditaccount.h1
-rw-r--r--protocols/yahoo/yahooprotocol.cpp15
-rw-r--r--protocols/yahoo/yahooprotocol.h3
-rw-r--r--protocols/yahoo/yahooverifyaccount.cpp15
-rw-r--r--protocols/yahoo/yahooverifyaccount.h2
-rw-r--r--protocols/yahoo/yahoowebcam.cpp12
85 files changed, 607 insertions, 752 deletions
diff --git a/protocols/yahoo/CMakeLists.txt b/protocols/yahoo/CMakeLists.txt
index 0507f58..8dffe11 100644
--- a/protocols/yahoo/CMakeLists.txt
+++ b/protocols/yahoo/CMakeLists.txt
@@ -7,6 +7,7 @@ include_directories(
${KOPETE_INCLUDES}
${CMAKE_CURRENT_SOURCE_DIR}/ui
${CMAKE_CURRENT_SOURCE_DIR}/libkyahoo
+${CMAKE_CURRENT_BINARY_DIR}/
${JASPER_INCLUDE_DIR}
)
@@ -46,6 +47,7 @@ set(kopete_yahoo_PART_SRCS
yahooverifyaccount.cpp
yahoowebcam.cpp )
+ecm_qt_declare_logging_category(kopete_yahoo_PART_SRCS HEADER yahoo_protocol_debug.h IDENTIFIER YAHOO_PROTOCOL_LOG CATEGORY_NAME org.kde.kopete.yahoo)
add_library(kopete_yahoo MODULE ${kopete_yahoo_PART_SRCS})
diff --git a/protocols/yahoo/libkyahoo/CMakeLists.txt b/protocols/yahoo/libkyahoo/CMakeLists.txt
index f624c3f..088f2af 100644
--- a/protocols/yahoo/libkyahoo/CMakeLists.txt
+++ b/protocols/yahoo/libkyahoo/CMakeLists.txt
@@ -1,4 +1,4 @@
-include_directories( ${JASPER_INCLUDE_DIR} )
+include_directories( ${JASPER_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/../)
add_subdirectory( tests )
@@ -70,6 +70,7 @@ receivefiletask.cpp
yahoochattask.cpp
)
+ecm_qt_declare_logging_category(libkyahoo_SRCS HEADER yahoo_protocol_debug.h IDENTIFIER YAHOO_PROTOCOL_LOG CATEGORY_NAME org.kde.kopete.yahoo)
if(MINGW)
set_source_files_properties(yahoo_fn.c PROPERTIES COMPILE_FLAGS "--std=c99")
endif(MINGW)
diff --git a/protocols/yahoo/libkyahoo/alivetask.cpp b/protocols/yahoo/libkyahoo/alivetask.cpp
index 8a1694e..f6f2320 100644
--- a/protocols/yahoo/libkyahoo/alivetask.cpp
+++ b/protocols/yahoo/libkyahoo/alivetask.cpp
@@ -22,11 +22,11 @@
#include "yahootypes.h"
#include "client.h"
#include <qstring.h>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
AliveTask::AliveTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
AliveTask::~AliveTask()
@@ -35,7 +35,7 @@ AliveTask::~AliveTask()
void AliveTask::onGo()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServicePing7);
t->setParam( 0, client()->userId().toLocal8Bit() );
diff --git a/protocols/yahoo/libkyahoo/bytestream.cpp b/protocols/yahoo/libkyahoo/bytestream.cpp
index 4e2be79..97c4bc7 100644
--- a/protocols/yahoo/libkyahoo/bytestream.cpp
+++ b/protocols/yahoo/libkyahoo/bytestream.cpp
@@ -18,7 +18,7 @@
*
*/
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include"bytestream.h"
#include <QByteArray>
diff --git a/protocols/yahoo/libkyahoo/changestatustask.cpp b/protocols/yahoo/libkyahoo/changestatustask.cpp
index 546c2f7..8f04186 100644
--- a/protocols/yahoo/libkyahoo/changestatustask.cpp
+++ b/protocols/yahoo/libkyahoo/changestatustask.cpp
@@ -20,11 +20,11 @@
#include "yahootypes.h"
#include "client.h"
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
ChangeStatusTask::ChangeStatusTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
ChangeStatusTask::~ChangeStatusTask()
@@ -33,7 +33,7 @@ ChangeStatusTask::~ChangeStatusTask()
void ChangeStatusTask::onGo()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( m_status == Yahoo::StatusInvisible ) // status --> Invisible
{
diff --git a/protocols/yahoo/libkyahoo/changestatustask.h b/protocols/yahoo/libkyahoo/changestatustask.h
index caae351..0203999 100644
--- a/protocols/yahoo/libkyahoo/changestatustask.h
+++ b/protocols/yahoo/libkyahoo/changestatustask.h
@@ -22,7 +22,6 @@
class QString;
-
/**
@author André Duffeck
*/
diff --git a/protocols/yahoo/libkyahoo/chatsessiontask.cpp b/protocols/yahoo/libkyahoo/chatsessiontask.cpp
index 3796f99..8b7d5be 100644
--- a/protocols/yahoo/libkyahoo/chatsessiontask.cpp
+++ b/protocols/yahoo/libkyahoo/chatsessiontask.cpp
@@ -22,11 +22,11 @@
#include "yahootypes.h"
#include "client.h"
#include <qstring.h>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
ChatSessionTask::ChatSessionTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
ChatSessionTask::~ChatSessionTask()
@@ -35,7 +35,7 @@ ChatSessionTask::~ChatSessionTask()
void ChatSessionTask::onGo()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer( Yahoo::ServiceChatSession );
t->setId( client()->sessionID() );
diff --git a/protocols/yahoo/libkyahoo/client.cpp b/protocols/yahoo/libkyahoo/client.cpp
index 47cd4f0..609e44e 100644
--- a/protocols/yahoo/libkyahoo/client.cpp
+++ b/protocols/yahoo/libkyahoo/client.cpp
@@ -24,7 +24,7 @@
#include <QTimer>
#include <QPixmap>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <k3socketbase.h>
#include "yahooclientstream.h"
@@ -153,7 +153,7 @@ Client::~Client()
void Client::connect( const QString &host, const uint port, const QString &userId, const QString &pass )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
d->host = host;
d->port = port;
d->user = userId;
@@ -178,9 +178,9 @@ void Client::cancelConnect()
void Client::cs_connected()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
emit connected();
- kDebug(YAHOO_RAW_DEBUG) << " starting login task ... ";
+ qCDebug(YAHOO_PROTOCOL_LOG) << " starting login task ... ";
// Clear stealth settings
d->stealthedBuddies.clear();
@@ -192,7 +192,7 @@ void Client::cs_connected()
void Client::close()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
m_pingTimer->stop();
m_aliveTimer->stop();
if( d->active )
@@ -233,7 +233,7 @@ QString Client::errorInformation()
// SLOTS //
void Client::streamError( int error )
{
- kDebug(YAHOO_RAW_DEBUG) << "CLIENT ERROR (Error " << error << ")";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "CLIENT ERROR (Error " << error << ")";
QString msg;
d->active = false;
@@ -271,7 +271,7 @@ void Client::streamDisconnected()
void Client::lt_loginFinished()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
slotLoginResponse( d->loginTask->statusCode(), d->loginTask->statusString() );
}
@@ -301,19 +301,19 @@ void Client::slotLoginResponse( int response, const QString &msg )
close();
}
- kDebug(YAHOO_RAW_DEBUG) << "Emitting loggedIn";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Emitting loggedIn";
emit loggedIn( response, msg );
}
void Client::lt_gotSessionID( uint id )
{
- kDebug(YAHOO_RAW_DEBUG) << "Got SessionID: " << id;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Got SessionID: " << id;
d->sessionID = id;
}
void Client::slotGotCookies()
{
- kDebug(YAHOO_RAW_DEBUG) << "Y: " << d->loginTask->yCookie()
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Y: " << d->loginTask->yCookie()
<< " T: " << d->loginTask->tCookie()
<< " C: " << d->loginTask->cCookie() << endl;
d->yCookie = d->loginTask->yCookie();
@@ -424,7 +424,7 @@ void Client::cancelFileTransfer( unsigned int transferId )
void Client::changeStatus( Yahoo::Status status, const QString &message, Yahoo::StatusType type )
{
- kDebug(YAHOO_RAW_DEBUG) << "status: " << status
+ qCDebug(YAHOO_PROTOCOL_LOG) << "status: " << status
<< " message: " << message
<< " type: " << type << endl;
ChangeStatusTask *cst = new ChangeStatusTask( d->root );
@@ -452,10 +452,10 @@ void Client::sendPing()
{
if( !d->active )
{
- kDebug(YAHOO_RAW_DEBUG) << "Disconnected. NOT sending a PING.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Disconnected. NOT sending a PING.";
return;
}
- kDebug(YAHOO_RAW_DEBUG) << "Sending a PING.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Sending a PING.";
PingTask *pt = new PingTask( d->root );
pt->go( true );
}
@@ -464,10 +464,10 @@ void Client::sendAlive()
{
if( !d->active )
{
- kDebug(YAHOO_RAW_DEBUG) << "Disconnected. NOT sending a ALIVE.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Disconnected. NOT sending a ALIVE.";
return;
}
- kDebug(YAHOO_RAW_DEBUG) << "Sending a ALIVE.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Sending a ALIVE.";
AliveTask *at = new AliveTask( d->root );
at->go( true );
}
@@ -527,7 +527,7 @@ void Client::moveBuddy( const QString &userId, const QString &oldGroup, const QS
void Client::processPictureQueue()
{
- kDebug(YAHOO_RAW_DEBUG) << k_funcinfo << endl;
+ qCDebug(YAHOO_PROTOCOL_LOG) << endl;
d->buddyListReady = true;
if( d->pictureRequestQueue.isEmpty() )
{
@@ -537,7 +537,6 @@ void Client::processPictureQueue()
requestPicture( d->pictureRequestQueue.front() );
d->pictureRequestQueue.pop_front();
-
if( !d->pictureRequestQueue.isEmpty() )
{
QTimer::singleShot( 1000, this, SLOT(processPictureQueue()) );
@@ -571,7 +570,7 @@ void Client::downloadPicture( const QString &userId, KUrl url, int checksum )
void Client::uploadPicture( KUrl url )
{
- kDebug(YAHOO_RAW_DEBUG) << "URL: " << url.url();
+ qCDebug(YAHOO_PROTOCOL_LOG) << "URL: " << url.url();
SendPictureTask *spt = new SendPictureTask( d->root );
spt->setType( SendPictureTask::UploadPicture );
spt->setFilename( url.fileName() );
@@ -584,7 +583,7 @@ void Client::uploadPicture( KUrl url )
void Client::sendPictureChecksum( const QString &userId, int checksum )
{
- kDebug(YAHOO_RAW_DEBUG) << "checksum: " << checksum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "checksum: " << checksum;
SendPictureTask *spt = new SendPictureTask( d->root );
spt->setType( SendPictureTask::SendChecksum );
spt->setChecksum( checksum );
@@ -595,7 +594,7 @@ void Client::sendPictureChecksum( const QString &userId, int checksum )
void Client::sendPictureInformation( const QString &userId, const QString &url, int checksum )
{
- kDebug(YAHOO_RAW_DEBUG) << "checksum: " << checksum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "checksum: " << checksum;
SendPictureTask *spt = new SendPictureTask( d->root );
spt->setType( SendPictureTask::SendInformation );
spt->setChecksum( checksum );
@@ -609,7 +608,7 @@ void Client::setPictureStatus( Yahoo::PictureStatus status )
if( d->pictureFlag == status )
return;
- kDebug(YAHOO_RAW_DEBUG) << "Setting PictureStatus to: " << status;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Setting PictureStatus to: " << status;
d->pictureFlag = status;
SendPictureTask *spt = new SendPictureTask( d->root );
spt->setType( SendPictureTask::SendStatus );
@@ -639,7 +638,6 @@ void Client::closeOutgoingWebcam()
d->webcamTask->closeOutgoingWebcam();
}
-
void Client::grantWebcamAccess( const QString &userId )
{
d->webcamTask->grantAccess( userId );
@@ -739,7 +737,7 @@ void Client::leaveChat()
// ***** other *****
void Client::notifyError( const QString &info, const QString & errorString, LogLevel level )
{
- kDebug(YAHOO_RAW_DEBUG) << QStringLiteral("\nThe following error occurred: %1\n Reason: %2\n LogLevel: %3")
+ qCDebug(YAHOO_PROTOCOL_LOG) << QStringLiteral("\nThe following error occurred: %1\n Reason: %2\n LogLevel: %3")
.arg(info).arg(errorString).arg(level) << endl;
d->errorString = errorString;
d->errorInformation = info;
@@ -784,7 +782,6 @@ void Client::setStatus( Yahoo::Status status )
d->status = status;
}
-
void Client::setStatusOnConnect( Yahoo::Status status )
{
d->statusOnConnect = status;
@@ -852,18 +849,18 @@ QString Client::cCookie()
void Client::distribute( Transfer * transfer )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( !rootTask()->take( transfer ) )
- kDebug(YAHOO_RAW_DEBUG) << "CLIENT: root task refused transfer";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "CLIENT: root task refused transfer";
delete transfer;
}
void Client::send( Transfer* request )
{
- kDebug(YAHOO_RAW_DEBUG) << "CLIENT::send()";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "CLIENT::send()";
if( !d->stream )
{
- kDebug(YAHOO_RAW_DEBUG) << "CLIENT - NO STREAM TO SEND ON!";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "CLIENT - NO STREAM TO SEND ON!";
return;
}
diff --git a/protocols/yahoo/libkyahoo/conferencetask.cpp b/protocols/yahoo/libkyahoo/conferencetask.cpp
index ca8b4c3..13e9998 100644
--- a/protocols/yahoo/libkyahoo/conferencetask.cpp
+++ b/protocols/yahoo/libkyahoo/conferencetask.cpp
@@ -21,11 +21,11 @@
#include "client.h"
#include <qstring.h>
#include <qstringlist.h>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
ConferenceTask::ConferenceTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
ConferenceTask::~ConferenceTask()
@@ -75,7 +75,7 @@ bool ConferenceTask::forMe( const Transfer* transfer ) const
void ConferenceTask::parseInvitation( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
int i = 0;
QString who = t->firstParam( 50 );
@@ -101,7 +101,7 @@ void ConferenceTask::parseInvitation( YMSGTransfer *t )
void ConferenceTask::parseMessage( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString room = t->firstParam( 57 );
QString from = t->firstParam( 3 );
@@ -118,7 +118,7 @@ void ConferenceTask::parseMessage( YMSGTransfer *t )
void ConferenceTask::parseUserJoined( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString room = t->firstParam( 57 );
QString who = t->firstParam( 53 );
@@ -129,7 +129,7 @@ void ConferenceTask::parseUserJoined( YMSGTransfer *t )
void ConferenceTask::parseUserLeft( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString room = t->firstParam( 57 );
QString who = t->firstParam( 56 );
@@ -140,7 +140,7 @@ void ConferenceTask::parseUserLeft( YMSGTransfer *t )
void ConferenceTask::parseUserDeclined( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString room = t->firstParam( 57 );
QString who = t->firstParam( 54 );
@@ -152,7 +152,7 @@ void ConferenceTask::parseUserDeclined( YMSGTransfer *t )
void ConferenceTask::inviteConference( const QString &room, const QStringList &members, const QString &msg )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfInvite);
t->setId( client()->sessionID() );
@@ -170,7 +170,7 @@ void ConferenceTask::inviteConference( const QString &room, const QStringList &m
void ConferenceTask::addInvite( const QString &room, const QStringList &who, const QStringList &members, const QString &msg )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfAddInvite);
t->setId( client()->sessionID() );
@@ -196,7 +196,7 @@ void ConferenceTask::addInvite( const QString &room, const QStringList &who, con
void ConferenceTask::joinConference( const QString &room, const QStringList &members )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfLogon);
t->setId( client()->sessionID() );
@@ -210,7 +210,7 @@ void ConferenceTask::joinConference( const QString &room, const QStringList &mem
void ConferenceTask::declineConference( const QString &room, const QStringList &members, const QString &msg )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfDecline);
t->setId( client()->sessionID() );
@@ -225,7 +225,7 @@ void ConferenceTask::declineConference( const QString &room, const QStringList &
}
void ConferenceTask::leaveConference( const QString &room, const QStringList &members )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfLogoff);
t->setId( client()->sessionID() );
@@ -239,7 +239,7 @@ void ConferenceTask::leaveConference( const QString &room, const QStringList &me
void ConferenceTask::sendMessage( const QString &room, const QStringList &members, const QString &msg )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfMsg);
t->setId( client()->sessionID() );
diff --git a/protocols/yahoo/libkyahoo/connector.h b/protocols/yahoo/libkyahoo/connector.h
index 2f54baa..8578b1e 100644
--- a/protocols/yahoo/libkyahoo/connector.h
+++ b/protocols/yahoo/libkyahoo/connector.h
@@ -21,7 +21,6 @@
#ifndef LIBKYAHOO_CONNECTOR_H
#define LIBKYAHOO_CONNECTOR_H
-
#include <qobject.h>
#include "qhostaddress.h"
diff --git a/protocols/yahoo/libkyahoo/coreprotocol.cpp b/protocols/yahoo/libkyahoo/coreprotocol.cpp
index 58a3025..b884de4 100644
--- a/protocols/yahoo/libkyahoo/coreprotocol.cpp
+++ b/protocols/yahoo/libkyahoo/coreprotocol.cpp
@@ -29,8 +29,7 @@
#include <QTextStream>
#include <QByteArray>
-
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <kurl.h>
#include "ymsgprotocol.h"
@@ -55,7 +54,7 @@ void CoreProtocol::addIncomingData( const QByteArray & incomingBytes )
{
// store locally
int oldsize = m_in.size();
- kDebug(YAHOO_RAW_DEBUG) << incomingBytes.size() << " bytes. already had " << oldsize << " bytes";
+ qCDebug(YAHOO_PROTOCOL_LOG) << incomingBytes.size() << " bytes. already had " << oldsize << " bytes";
m_in.resize( oldsize + incomingBytes.size() );
memcpy( m_in.data() + oldsize, incomingBytes.data(), incomingBytes.size() );
@@ -70,11 +69,11 @@ void CoreProtocol::addIncomingData( const QByteArray & incomingBytes )
while ( m_in.size() && ( parsedBytes = wireToTransfer(m_in) ) )
{
transferCount++;
- kDebug(YAHOO_RAW_DEBUG) << " parsed transfer " << transferCount << " in chunk of "<< parsedBytes << " bytes";
+ qCDebug(YAHOO_PROTOCOL_LOG) << " parsed transfer " << transferCount << " in chunk of "<< parsedBytes << " bytes";
int size = m_in.size();
if ( parsedBytes < size )
{
- kDebug(YAHOO_RAW_DEBUG) << " more data in chunk! ( I have parsed " << parsedBytes << " and total data of " << size << ")";
+ qCDebug(YAHOO_PROTOCOL_LOG) << " more data in chunk! ( I have parsed " << parsedBytes << " and total data of " << size << ")";
// remove parsed bytes from the buffer
m_in.remove( 0, parsedBytes );
}
@@ -82,7 +81,7 @@ void CoreProtocol::addIncomingData( const QByteArray & incomingBytes )
m_in.truncate( 0 );
}
if ( m_state == NeedMore )
- kDebug(YAHOO_RAW_DEBUG) << " message was incomplete, waiting for more...";
+ qCDebug(YAHOO_PROTOCOL_LOG) << " message was incomplete, waiting for more...";
/*
if ( m_eventProtocol->state() == EventProtocol::OutOfSync )
{
@@ -90,23 +89,23 @@ void CoreProtocol::addIncomingData( const QByteArray & incomingBytes )
m_in.truncate( 0 );
}
*/
- kDebug(YAHOO_RAW_DEBUG) << " done processing chunk";
+ qCDebug(YAHOO_PROTOCOL_LOG) << " done processing chunk";
}
Transfer* CoreProtocol::incomingTransfer()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if ( m_state == Available )
{
-// kDebug(YAHOO_RAW_DEBUG) << " - got a transfer";
+// qCDebug(YAHOO_PROTOCOL_LOG) << " - got a transfer";
m_state = NoData;
return m_inTransfer;
m_inTransfer = 0;
}
else
{
- kDebug(YAHOO_RAW_DEBUG) << " no milk today";
+ qCDebug(YAHOO_PROTOCOL_LOG) << " no milk today";
return 0;
}
}
@@ -114,7 +113,7 @@ Transfer* CoreProtocol::incomingTransfer()
void cp_dump( const QByteArray &bytes )
{
#ifdef YAHOO_COREPROTOCOL_DEBUG
- kDebug(YAHOO_RAW_DEBUG) << " contains " << bytes.count() << " bytes";
+ qCDebug(YAHOO_PROTOCOL_LOG) << " contains " << bytes.count() << " bytes";
for ( uint i = 0; i < bytes.count(); ++i )
{
printf( "%02x ", bytes[ i ] );
@@ -127,10 +126,10 @@ void cp_dump( const QByteArray &bytes )
void CoreProtocol::outgoingTransfer( Transfer* outgoing )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if ( outgoing->type() == Transfer::YMSGTransfer )
{
- kDebug(YAHOO_RAW_DEBUG) << " got YMSGTransfer";
+ qCDebug(YAHOO_PROTOCOL_LOG) << " got YMSGTransfer";
YMSGTransfer *yt = (YMSGTransfer *) outgoing;
QByteArray bytesOut = yt->serialize();
@@ -138,7 +137,7 @@ void CoreProtocol::outgoingTransfer( Transfer* outgoing )
//dout.setEncoding( QTextStream::Latin1 );
//dout.setByteOrder( QDataStream::LittleEndian );
//dout << bytesOut;
- //kDebug(YAHOO_RAW_DEBUG) << " " << bytesOut;
+ //qCDebug(YAHOO_PROTOCOL_LOG) << " " << bytesOut;
emit outgoingData( bytesOut );
// now convert
//fieldsToWire( fields );
@@ -146,11 +145,9 @@ void CoreProtocol::outgoingTransfer( Transfer* outgoing )
delete outgoing;
}
-
-
int CoreProtocol::wireToTransfer( const QByteArray& wire )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
// processing incoming data and reassembling it into transfers
// may be an event or a response
@@ -170,9 +167,9 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire )
{
if ( (wire[0] == 'Y') && (wire[1] == 'M') && (wire[2] == 'S') && (wire[3] == 'G'))
{
-// kDebug(YAHOO_RAW_DEBUG) << " - looks like a valid YMSG packet";
+// qCDebug(YAHOO_PROTOCOL_LOG) << " - looks like a valid YMSG packet";
YMSGTransfer *t = static_cast<YMSGTransfer *>(m_YMSGProtocol->parse( wire, bytesParsed ));
-// kDebug(YAHOO_RAW_DEBUG) << " - YMSG Protocol parsed " << bytesParsed << " bytes";
+// qCDebug(YAHOO_PROTOCOL_LOG) << " - YMSG Protocol parsed " << bytesParsed << " bytes";
if ( t )
{
if( wire.size() < t->packetLength() )
@@ -182,7 +179,7 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire )
return 0;
}
m_inTransfer = t;
-// kDebug(YAHOO_RAW_DEBUG) << " - got a valid packet ";
+// qCDebug(YAHOO_PROTOCOL_LOG) << " - got a valid packet ";
m_state = Available;
emit incomingData();
@@ -192,18 +189,18 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire )
}
else
{
- kDebug(YAHOO_RAW_DEBUG) << " - not a valid YMSG packet. Trying to recover.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << " - not a valid YMSG packet. Trying to recover.";
QTextStream s( wire, QIODevice::ReadOnly );
QString remaining = s.readAll();
int pos = remaining.indexOf( QLatin1String("YMSG"), bytesParsed );
if( pos >= 0 )
{
- kDebug(YAHOO_RAW_DEBUG) << "Recover successful.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Recover successful.";
bytesParsed += pos;
}
else
{
- kDebug(YAHOO_RAW_DEBUG) << "Recover failed. Dump it!";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Recover failed. Dump it!";
bytesParsed = wire.size();
}
}
@@ -226,7 +223,7 @@ bool CoreProtocol::okToProceed( QDataStream &din)
if ( din.atEnd() )
{
m_state = NeedMore;
- kDebug(YAHOO_RAW_DEBUG) << " saved message prematurely";
+ qCDebug(YAHOO_PROTOCOL_LOG) << " saved message prematurely";
return false;
}
else
diff --git a/protocols/yahoo/libkyahoo/filetransfernotifiertask.cpp b/protocols/yahoo/libkyahoo/filetransfernotifiertask.cpp
index 2461c1a..e16df92 100644
--- a/protocols/yahoo/libkyahoo/filetransfernotifiertask.cpp
+++ b/protocols/yahoo/libkyahoo/filetransfernotifiertask.cpp
@@ -22,14 +22,14 @@
#include <QFile>
#include <QPixmap>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <kcodecs.h>
using namespace KYahoo;
FileTransferNotifierTask::FileTransferNotifierTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
FileTransferNotifierTask::~FileTransferNotifierTask()
@@ -50,7 +50,6 @@ bool FileTransferNotifierTask::take( Transfer* transfer )
parseFileTransfer7( t );
else if( t->service() == Yahoo::ServicePeerToPeer )
acceptFileTransfer( t );
-
return true;
}
@@ -62,7 +61,6 @@ bool FileTransferNotifierTask::forMe( const Transfer *transfer ) const
if (!t)
return false;
-
if( t->service() == Yahoo::ServiceP2PFileXfer ||
t->service() == Yahoo::ServicePeerToPeer ||
t->service() == Yahoo::ServiceFileTransfer ||
@@ -76,7 +74,7 @@ bool FileTransferNotifierTask::forMe( const Transfer *transfer ) const
void FileTransferNotifierTask::parseFileTransfer( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString from; /* key = 4 */
QString to; /* key = 5 */
@@ -94,8 +92,6 @@ void FileTransferNotifierTask::parseFileTransfer( YMSGTransfer *t )
filename = t->firstParam( 27 );
size = t->firstParam( 28 ).toULong();
-
-
if( from.startsWith( QLatin1String("FILE_TRANSFER_SYSTEM") ) )
{
client()->notifyError( QStringLiteral("Fileupload result received."), msg, Client::Notice );
@@ -104,7 +100,6 @@ void FileTransferNotifierTask::parseFileTransfer( YMSGTransfer *t )
if( url.isEmpty() )
return;
-
unsigned int left = url.lastIndexOf( '/' ) + 1;
unsigned int right = url.lastIndexOf( '?' );
@@ -115,7 +110,7 @@ void FileTransferNotifierTask::parseFileTransfer( YMSGTransfer *t )
void FileTransferNotifierTask::parseFileTransfer7( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString from; /* key = 4 */
QString to; /* key = 5 */
@@ -149,7 +144,7 @@ void FileTransferNotifierTask::parseFileTransfer7( YMSGTransfer *t )
void FileTransferNotifierTask::acceptFileTransfer( YMSGTransfer *transfer )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServicePeerToPeer);
t->setId( client()->sessionID() );
diff --git a/protocols/yahoo/libkyahoo/inputprotocolbase.cpp b/protocols/yahoo/libkyahoo/inputprotocolbase.cpp
index 7c50e02..242dd8f 100644
--- a/protocols/yahoo/libkyahoo/inputprotocolbase.cpp
+++ b/protocols/yahoo/libkyahoo/inputprotocolbase.cpp
@@ -26,7 +26,6 @@ InputProtocolBase::InputProtocolBase(QObject *parent)
{
}
-
InputProtocolBase::~InputProtocolBase()
{
}
@@ -46,7 +45,6 @@ bool InputProtocolBase::readString( QString &message )
return true;
}
-
bool InputProtocolBase::okToProceed()
{
if ( m_din )
diff --git a/protocols/yahoo/libkyahoo/libkyahoo_export.h b/protocols/yahoo/libkyahoo/libkyahoo_export.h
index 09ea87e..ade6065 100644
--- a/protocols/yahoo/libkyahoo/libkyahoo_export.h
+++ b/protocols/yahoo/libkyahoo/libkyahoo_export.h
@@ -1,7 +1,6 @@
#ifndef LIBKYAHOO_EXPORT_H
#define LIBKYAHOO_EXPORT_H
-
#include <kdemacros.h>
#if defined Q_OS_WIN
diff --git a/protocols/yahoo/libkyahoo/libyahoo.c b/protocols/yahoo/libkyahoo/libyahoo.c
index 441a66e..c81e5b4 100644
--- a/protocols/yahoo/libkyahoo/libyahoo.c
+++ b/protocols/yahoo/libkyahoo/libyahoo.c
@@ -255,8 +255,7 @@ void authresp_0x0b(const char *seed, const char *sn, const char *password, char
} while (x < 20);
/* Dump magic key into a char for SHA1 action. */
-
-
+
for(x = 0; x < 4; x++)
magic_key_char[x] = comparison_src[x];
diff --git a/protocols/yahoo/libkyahoo/libyahoo.h b/protocols/yahoo/libkyahoo/libyahoo.h
index b15f57a..58bc5a7 100644
--- a/protocols/yahoo/libkyahoo/libyahoo.h
+++ b/protocols/yahoo/libkyahoo/libyahoo.h
@@ -41,7 +41,6 @@
*
*/
-
#ifndef LIB_YAHOO_UTILS_H
#define LIB_YAHOO_UTILS_H
diff --git a/protocols/yahoo/libkyahoo/listtask.cpp b/protocols/yahoo/libkyahoo/listtask.cpp
index 6af342a..159eefa 100644
--- a/protocols/yahoo/libkyahoo/listtask.cpp
+++ b/protocols/yahoo/libkyahoo/listtask.cpp
@@ -22,11 +22,11 @@
#include "transfer.h"
#include "ymsgtransfer.h"
#include "client.h"
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
ListTask::ListTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
@@ -54,7 +54,6 @@ bool ListTask::forMe( const Transfer* transfer ) const
if (!t)
return false;
-
if ( t->service() == Yahoo::ServiceBuddyList )
return true;
else
@@ -63,15 +62,15 @@ bool ListTask::forMe( const Transfer* transfer ) const
void ListTask::parseBuddyList( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString group;
QString buddy;
// We need some low-level parsing here
foreach( const Param &p, t->paramList() )
{
- kDebug(YAHOO_RAW_DEBUG) << "1:" << p.first ;
- kDebug(YAHOO_RAW_DEBUG) << "2:" << p.second ;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "1:" << p.first ;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "2:" << p.second ;
switch( p.first )
{
case 65:
@@ -87,7 +86,7 @@ void ListTask::parseBuddyList( YMSGTransfer *t )
break;
case 317:
if( p.second == "2"){
- kDebug(YAHOO_RAW_DEBUG) << "Stealthed setting on" << buddy ;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Stealthed setting on" << buddy ;
emit stealthStatusChanged( buddy, Yahoo::StealthActive );
};
break;
@@ -109,5 +108,3 @@ void ListTask::parseBuddyList( YMSGTransfer *t )
*/
}
-
-
diff --git a/protocols/yahoo/libkyahoo/logintask.cpp b/protocols/yahoo/libkyahoo/logintask.cpp
index 56dc1a3..de613f8 100644
--- a/protocols/yahoo/libkyahoo/logintask.cpp
+++ b/protocols/yahoo/libkyahoo/logintask.cpp
@@ -18,15 +18,13 @@
*************************************************************************
*/
-
-
#include "logintask.h"
#include "transfer.h"
#include "ymsgtransfer.h"
#include "yahootypes.h"
#include "client.h"
#include <qstring.h>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <stdlib.h>
#include <QCryptographicHash>
@@ -41,7 +39,7 @@ using namespace KYahoo;
LoginTask::LoginTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
mState = InitialState;
}
@@ -72,7 +70,6 @@ bool LoginTask::take(Transfer* transfer)
YMSGTransfer *t = static_cast<YMSGTransfer *>(transfer);
-
if ( t->service() == Yahoo::ServicePing) {
emit buddyListReady();
return true;
@@ -141,7 +138,7 @@ bool LoginTask::forMe(const Transfer* transfer) const
void LoginTask::onGo()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
/* initial state, we have to send a ServiceVerify */
if (mState == InitialState)
sendVerify();
@@ -157,7 +154,7 @@ void LoginTask::reset()
void LoginTask::sendVerify()
{
/* send a ServiceVerify */
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceVerify);
send( t );
mState = SentVerify;
@@ -165,12 +162,12 @@ void LoginTask::sendVerify()
void LoginTask::sendAuth(YMSGTransfer* transfer)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
// transfer is the verify ack transfer, no useful data in it.
Q_UNUSED(transfer);
/* got ServiceVerify ACK, send a ServiceAuth with username */
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer( Yahoo::ServiceAuth );
t->setParam( 1 , client()->userId().toLocal8Bit() );
send(t);
@@ -179,7 +176,7 @@ void LoginTask::sendAuth(YMSGTransfer* transfer)
void LoginTask::sendAuthResp(YMSGTransfer* t)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString sn = t->firstParam( 1 );
QString seed = t->firstParam( 94 );
@@ -193,11 +190,11 @@ void LoginTask::sendAuthResp(YMSGTransfer* t)
case 0:
case 1:
case 2:
- kDebug(YAHOO_RAW_DEBUG) << "Using version 16 authorization" << endl;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Using version 16 authorization" << endl;
sendAuthSixteenStage1(sn, seed);
break;
default:
- kWarning(YAHOO_RAW_DEBUG) << "Unknown authentication method used!"
+ qCWarning(YAHOO_PROTOCOL_LOG) << "Unknown authentication method used!"
<< "Attempting current authentication anyways";
sendAuthSixteenStage1(sn, seed);
break;
@@ -210,7 +207,7 @@ void LoginTask::sendAuthResp(YMSGTransfer* t)
void LoginTask::sendAuthSixteenStage1(const QString& sn, const QString& seed)
{
const QString YahooTokenUrl = QStringLiteral("https://login.yahoo.com/config/pwtoken_get?src=ymsgr&ts=&login=%1&passwd=%2&chal=%3");
- kDebug(YAHOO_RAW_DEBUG) << "seed:" << seed;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "seed:" << seed;
m_stage1Data.clear();
/* construct a URL from the seed and request tokens */
QString encodedPassword(QUrl::toPercentEncoding(client()->password()));
@@ -226,7 +223,7 @@ void LoginTask::sendAuthSixteenStage1(const QString& sn, const QString& seed)
void LoginTask::handleAuthSixteenStage1Data(KIO::Job* /*job*/, const QByteArray& data)
{
- kDebug(YAHOO_RAW_DEBUG) << "data:" << data;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "data:" << data;
m_stage1Data.append(data);
}
@@ -235,7 +232,7 @@ void LoginTask::handleAuthSixteenStage1Result(KJob* job)
int responseNumber = -1;
QString token;
int error = job->error();
- kDebug(YAHOO_RAW_DEBUG) << "error:" << error;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "error:" << error;
if (error == 0)
{
QStringList responses = m_stage1Data.split(QStringLiteral("\r\n"));
@@ -244,8 +241,8 @@ void LoginTask::handleAuthSixteenStage1Result(KJob* job)
{
token = responses[1];
token.remove(QStringLiteral("ymsgr="));
- kDebug(YAHOO_RAW_DEBUG) << "response is:" << responseNumber;
- kDebug(YAHOO_RAW_DEBUG) << "token is:" << token;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "response is:" << responseNumber;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "token is:" << token;
}
if (responseNumber != 0)
{
@@ -254,12 +251,12 @@ void LoginTask::handleAuthSixteenStage1Result(KJob* job)
case -1:
/* error in the received stream */
emit loginResponse(Yahoo::LoginSock, QString());
- kDebug(YAHOO_RAW_DEBUG) << "unknown error logging in";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "unknown error logging in";
break;
case 1212:
/* password incorrect */
emit loginResponse(Yahoo::LoginPasswd, QString());
- kDebug(YAHOO_RAW_DEBUG) << "password incorrect";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "password incorrect";
break;
case 1213:
/* security lock */
@@ -268,7 +265,7 @@ void LoginTask::handleAuthSixteenStage1Result(KJob* job)
case 1235:
/* username does not exist */
emit loginResponse(Yahoo::LoginUname, QString());
- kDebug(YAHOO_RAW_DEBUG) << "user does not exist";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "user does not exist";
break;
case 1214:
case 1236:
@@ -293,7 +290,7 @@ void LoginTask::handleAuthSixteenStage1Result(KJob* job)
void LoginTask::sendAuthSixteenStage2(const QString& token)
{
const QString YahooLoginUrl = QStringLiteral("https://login.yahoo.com/config/pwtoken_login?src=ymsgr&ts=&token=%1");
- kDebug(YAHOO_RAW_DEBUG) << "token:" << token;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "token:" << token;
m_stage2Data.clear();
QString fullUrl = YahooLoginUrl.arg(token);
KUrl loginUrl(fullUrl);
@@ -306,7 +303,7 @@ void LoginTask::sendAuthSixteenStage2(const QString& token)
void LoginTask::handleAuthSixteenStage2Data(KIO::Job*, const QByteArray& data)
{
- kDebug(YAHOO_RAW_DEBUG) << "data:" << data;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "data:" << data;
m_stage2Data.append(data);
}
@@ -315,11 +312,11 @@ void LoginTask::handleAuthSixteenStage2Result(KJob* job)
QString crumb;
int responseNumber = -1;
int error = job->error();
- kDebug(YAHOO_RAW_DEBUG) << "error:" << error;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "error:" << error;
if (error == 0)
{
QStringList responses = m_stage2Data.split(QStringLiteral("\r\n"));
- kDebug(YAHOO_RAW_DEBUG) << responses;
+ qCDebug(YAHOO_PROTOCOL_LOG) << responses;
responseNumber = responses[0].toInt();
if (responseNumber == 0)
{
@@ -354,7 +351,7 @@ void LoginTask::handleAuthSixteenStage2Result(KJob* job)
void LoginTask::sendAuthSixteenStage3(const QString& cryptString)
{
- kDebug(YAHOO_RAW_DEBUG) << " with crypt string" << cryptString;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " with crypt string" << cryptString;
QByteArray cryptStringHash = QCryptographicHash::hash( cryptString.toAscii(),
QCryptographicHash::Md5 );
cryptStringHash = cryptStringHash.toBase64();
@@ -380,21 +377,21 @@ void LoginTask::sendAuthSixteenStage3(const QString& cryptString)
void LoginTask::sendAuthResp_pre_0x0b(const QString &/*sn*/, const QString &/*seed*/)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
void LoginTask::handleAuthResp(YMSGTransfer *t)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
switch( t->service() )
{
case( Yahoo::ServiceList ):
- kDebug(YAHOO_RAW_DEBUG) << "Emitting Signal";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Emitting Signal";
emit loginResponse( Yahoo::LoginOk, QString() );
break;
case( Yahoo::ServiceAuthResp ):
- kDebug(YAHOO_RAW_DEBUG) << "Emitting Signal";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Emitting Signal";
emit loginResponse( t->firstParam( 66 ).toInt(), t->firstParam( 20 ) );
break;
default:
@@ -410,7 +407,7 @@ void LoginTask::setStateOnConnect( Yahoo::Status status )
void LoginTask::parseCookies( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
for( int i = 0; i < t->paramCount( 59 ); ++i)
{
diff --git a/protocols/yahoo/libkyahoo/logofftask.cpp b/protocols/yahoo/libkyahoo/logofftask.cpp
index 99ba9d3..9b221be 100644
--- a/protocols/yahoo/libkyahoo/logofftask.cpp
+++ b/protocols/yahoo/libkyahoo/logofftask.cpp
@@ -20,11 +20,11 @@
#include "yahootypes.h"
#include "client.h"
#include <qstring.h>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
LogoffTask::LogoffTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
LogoffTask::~LogoffTask()
@@ -33,7 +33,7 @@ LogoffTask::~LogoffTask()
void LogoffTask::onGo()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceLogoff);
t->setId( client()->sessionID() );
diff --git a/protocols/yahoo/libkyahoo/logofftask.h b/protocols/yahoo/libkyahoo/logofftask.h
index da05f3c..b98e219 100644
--- a/protocols/yahoo/libkyahoo/logofftask.h
+++ b/protocols/yahoo/libkyahoo/logofftask.h
@@ -19,7 +19,6 @@
#include "task.h"
-
/**
@author André Duffeck
*/
diff --git a/protocols/yahoo/libkyahoo/mailnotifiertask.cpp b/protocols/yahoo/libkyahoo/mailnotifiertask.cpp
index 9216e29..c4e74da 100644
--- a/protocols/yahoo/libkyahoo/mailnotifiertask.cpp
+++ b/protocols/yahoo/libkyahoo/mailnotifiertask.cpp
@@ -22,11 +22,11 @@
#include "ymsgtransfer.h"
#include "yahootypes.h"
#include "client.h"
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
MailNotifierTask::MailNotifierTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
MailNotifierTask::~MailNotifierTask()
@@ -61,7 +61,7 @@ bool MailNotifierTask::forMe( const Transfer* transfer ) const
void MailNotifierTask::parseMail( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString count = t->firstParam( 9 );
QString mail = t->firstParam( 42 );
diff --git a/protocols/yahoo/libkyahoo/md5.c b/protocols/yahoo/libkyahoo/md5.c
index 9f93729..c403e5a 100644
--- a/protocols/yahoo/libkyahoo/md5.c
+++ b/protocols/yahoo/libkyahoo/md5.c
@@ -78,7 +78,6 @@ main()
}
#endif /* TEST */
-
/*
* For reference, here is the program that computed the T values.
*/
diff --git a/protocols/yahoo/libkyahoo/messagereceivertask.cpp b/protocols/yahoo/libkyahoo/messagereceivertask.cpp
index 3630cc3..805a991 100644
--- a/protocols/yahoo/libkyahoo/messagereceivertask.cpp
+++ b/protocols/yahoo/libkyahoo/messagereceivertask.cpp
@@ -22,13 +22,13 @@
#include "ymsgtransfer.h"
#include "yahootypes.h"
#include "client.h"
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
using namespace KYahoo;
MessageReceiverTask::MessageReceiverTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
MessageReceiverTask::~MessageReceiverTask()
@@ -83,7 +83,7 @@ bool MessageReceiverTask::forMe( const Transfer* transfer ) const
void MessageReceiverTask::parseMessage( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
int cnt = t->paramCount( 5 );
for( int i = 0; i < cnt; ++i )
@@ -108,7 +108,7 @@ void MessageReceiverTask::parseMessage( YMSGTransfer *t )
if( msg.isEmpty() )
{
- kDebug(YAHOO_RAW_DEBUG) << "Got a empty message. Dropped.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Got a empty message. Dropped.";
continue;
}
@@ -130,7 +130,7 @@ void MessageReceiverTask::parseMessage( YMSGTransfer *t )
void MessageReceiverTask::parseAnimatedAudibleIcon( YMSGTransfer *t )
{
// added by michaelacole
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
int cnt = t->paramCount( 5 );
for( int i = 0; i < cnt; ++i )
@@ -149,7 +149,7 @@ void MessageReceiverTask::parseAnimatedAudibleIcon( YMSGTransfer *t )
if( msg.isEmpty() )
{
- kDebug(YAHOO_RAW_DEBUG) << "Got a empty message. Dropped.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Got a empty message. Dropped.";
continue;
}
@@ -168,7 +168,7 @@ void MessageReceiverTask::parseAnimatedAudibleIcon( YMSGTransfer *t )
void MessageReceiverTask::parseNotify( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString from = t->firstParam( 4 );
//QString to = t->firstParam( 5 );
@@ -184,12 +184,12 @@ void MessageReceiverTask::parseNotify( YMSGTransfer *t )
{
if( ind.startsWith(' ') )
{
- kDebug(YAHOO_RAW_DEBUG) << "Got a WebcamInvitation.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Got a WebcamInvitation.";
emit gotWebcamInvite( from );
}
else
{
- kDebug(YAHOO_RAW_DEBUG) << "Got a WebcamRequest-Response: " << ind.toInt();
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Got a WebcamRequest-Response: " << ind.toInt();
}
}
}
diff --git a/protocols/yahoo/libkyahoo/modifybuddytask.cpp b/protocols/yahoo/libkyahoo/modifybuddytask.cpp
index f840c05..3f9e49d 100644
--- a/protocols/yahoo/libkyahoo/modifybuddytask.cpp
+++ b/protocols/yahoo/libkyahoo/modifybuddytask.cpp
@@ -20,11 +20,11 @@
#include "yahootypes.h"
#include "client.h"
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
ModifyBuddyTask::ModifyBuddyTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
ModifyBuddyTask::~ModifyBuddyTask()
@@ -82,7 +82,7 @@ bool ModifyBuddyTask::forMe( const Transfer* transfer ) const
void ModifyBuddyTask::onGo()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
switch( m_type )
{
diff --git a/protocols/yahoo/libkyahoo/modifyyabtask.cpp b/protocols/yahoo/libkyahoo/modifyyabtask.cpp
index 8f77db6..523118d 100644
--- a/protocols/yahoo/libkyahoo/modifyyabtask.cpp
+++ b/protocols/yahoo/libkyahoo/modifyyabtask.cpp
@@ -35,7 +35,7 @@ using namespace KYahoo;
ModifyYABTask::ModifyYABTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
m_socket = 0;
}
@@ -46,7 +46,7 @@ ModifyYABTask::~ModifyYABTask()
void ModifyYABTask::onGo()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
m_socket = new KBufferedSocket( QStringLiteral("address.yahoo.com"), QString::number(80) );
connect( m_socket, SIGNAL(connected(KNetwork::KResolverEntry)), this, SLOT(connectSucceeded()) );
connect( m_socket, SIGNAL(gotError(int)), this, SLOT(connectFailed(int)) );
@@ -98,7 +98,7 @@ void ModifyYABTask::connectFailed( int i)
void ModifyYABTask::connectSucceeded()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
KBufferedSocket* socket = const_cast<KBufferedSocket*>( static_cast<const KBufferedSocket*>( sender() ) );
QString header = QString::fromLatin1("POST /yab/us?v=XM&prog=ymsgr&.intl=us&sync=1&tags=short&noclear=1& HTTP/1.1\r\n"
@@ -117,7 +117,7 @@ void ModifyYABTask::connectSucceeded()
stream.writeRawData( m_postData.toUtf8(), m_postData.toUtf8().size() );
if( socket->write( buffer, buffer.size() ) )
- kDebug(YAHOO_RAW_DEBUG) << "Upload Successful. Waiting for confirmation...";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Upload Successful. Waiting for confirmation...";
else
{
client()->notifyError( i18n( "An error occurred while saving the address book entry." ), m_socket->errorString(), Client::Error );
@@ -163,7 +163,7 @@ void ModifyYABTask::slotRead()
list = doc.elementsByTagName( QStringLiteral("ct") ); // Get records
for( it = 0; it < list.count(); it++ ) {
- kDebug(YAHOO_RAW_DEBUG) << "Parsing entry...";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Parsing entry...";
if( !list.item( it ).isElement() )
continue;
e = list.item( it ).toElement();
@@ -201,6 +201,5 @@ void ModifyYABTask::slotRead()
emit gotEntry( entry );
}
-
setSuccess();
}
diff --git a/protocols/yahoo/libkyahoo/picturenotifiertask.cpp b/protocols/yahoo/libkyahoo/picturenotifiertask.cpp
index a78698b..131348d 100644
--- a/protocols/yahoo/libkyahoo/picturenotifiertask.cpp
+++ b/protocols/yahoo/libkyahoo/picturenotifiertask.cpp
@@ -21,14 +21,14 @@
#include "client.h"
#include <QStringList>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <klocale.h>
using namespace KYahoo;
PictureNotifierTask::PictureNotifierTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
PictureNotifierTask::~PictureNotifierTask()
@@ -76,7 +76,6 @@ bool PictureNotifierTask::forMe( const Transfer* transfer ) const
if (!t)
return false;
-
if ( t->service() == Yahoo::ServicePictureChecksum ||
t->service() == Yahoo::ServicePicture ||
t->service() == Yahoo::ServicePictureUpdate ||
@@ -89,7 +88,7 @@ bool PictureNotifierTask::forMe( const Transfer* transfer ) const
void PictureNotifierTask::parsePictureStatus( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString nick; /* key = 4 */
int state; /* key = 213 */
@@ -102,7 +101,7 @@ void PictureNotifierTask::parsePictureStatus( YMSGTransfer *t )
void PictureNotifierTask::parsePictureChecksum( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
parsePicture( t );
QString nick; /* key = 4 */
int checksum; /* key = 192 */
@@ -116,7 +115,7 @@ void PictureNotifierTask::parsePictureChecksum( YMSGTransfer *t )
void PictureNotifierTask::parsePicture( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString nick; /* key = 4 */
int type; /* key = 13: 1 = request, 2 = notification, 0 = Just changed */
@@ -138,7 +137,7 @@ void PictureNotifierTask::parsePicture( YMSGTransfer *t )
void PictureNotifierTask::parsePictureUploadResponse( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString url;
QString error;
@@ -153,7 +152,7 @@ void PictureNotifierTask::parsePictureUploadResponse( YMSGTransfer *t )
if( !url.isEmpty() )
{
- kDebug(YAHOO_RAW_DEBUG) << "Emitting url: " << url << " Picture expires: " << expires;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Emitting url: " << url << " Picture expires: " << expires;
emit pictureUploaded( url, expires );
}
}
diff --git a/protocols/yahoo/libkyahoo/pingtask.cpp b/protocols/yahoo/libkyahoo/pingtask.cpp
index b20e7b4..e055337 100644
--- a/protocols/yahoo/libkyahoo/pingtask.cpp
+++ b/protocols/yahoo/libkyahoo/pingtask.cpp
@@ -22,11 +22,11 @@
#include "yahootypes.h"
#include "client.h"
#include <qstring.h>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
PingTask::PingTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
PingTask::~PingTask()
@@ -35,7 +35,7 @@ PingTask::~PingTask()
void PingTask::onGo()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServicePing);
t->setId( client()->sessionID() );
diff --git a/protocols/yahoo/libkyahoo/receivefiletask.cpp b/protocols/yahoo/libkyahoo/receivefiletask.cpp
index 9a76d76..d9dfc64 100644
--- a/protocols/yahoo/libkyahoo/receivefiletask.cpp
+++ b/protocols/yahoo/libkyahoo/receivefiletask.cpp
@@ -22,7 +22,7 @@
#include <QTimer>
#include <QFile>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <klocale.h>
#include <kio/global.h>
#include <kio/job.h>
@@ -30,7 +30,7 @@
ReceiveFileTask::ReceiveFileTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
m_transmitted = 0;
m_file = 0;
m_transferJob = 0;
@@ -44,7 +44,7 @@ ReceiveFileTask::~ReceiveFileTask()
void ReceiveFileTask::onGo()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceFileTransfer7);
switch( m_type )
{
@@ -87,7 +87,7 @@ void ReceiveFileTask::onGo()
bool ReceiveFileTask::take( Transfer* transfer )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if ( !forMe( transfer ) )
return false;
@@ -101,13 +101,12 @@ bool ReceiveFileTask::take( Transfer* transfer )
bool ReceiveFileTask::forMe( const Transfer *transfer ) const
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
const YMSGTransfer *t = 0L;
t = dynamic_cast<const YMSGTransfer*>(transfer);
if (!t)
return false;
-
if( t->service() == Yahoo::ServiceFileTransfer7Info )
{
// Only take this transfer if we are the corresponding task (in case of simultaneous file transfers)
@@ -123,7 +122,7 @@ bool ReceiveFileTask::forMe( const Transfer *transfer ) const
void ReceiveFileTask::slotData( KIO::Job *job, const QByteArray& data )
{
Q_UNUSED( job );
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
m_transmitted += data.size();
emit bytesProcessed( m_transferId, m_transmitted );
@@ -131,10 +130,9 @@ void ReceiveFileTask::slotData( KIO::Job *job, const QByteArray& data )
}
-
void ReceiveFileTask::slotHeadComplete( KJob *job )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
KIO::TransferJob *transfer = static_cast< KIO::TransferJob * >(job);
@@ -170,10 +168,9 @@ void ReceiveFileTask::slotHeadComplete( KJob *job )
m_mimetypeJob = 0;
}
-
void ReceiveFileTask::slotComplete( KJob *job )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
KIO::TransferJob *transfer = static_cast< KIO::TransferJob * >(job);
@@ -194,7 +191,7 @@ void ReceiveFileTask::slotComplete( KJob *job )
void ReceiveFileTask::parseFileTransfer7Info( YMSGTransfer *transfer )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( transfer->firstParam( 249 ).toInt() == 1 )
{
@@ -246,7 +243,6 @@ void ReceiveFileTask::parseFileTransfer7Info( YMSGTransfer *transfer )
}
}
-
void ReceiveFileTask::setCommonTransferMetaData(KIO::TransferJob* job)
{
job->addMetaData(QStringLiteral("accept"), QStringLiteral("*/*")); // Accept header
@@ -258,7 +254,6 @@ void ReceiveFileTask::setCommonTransferMetaData(KIO::TransferJob* job)
.arg(client()->tCookie()).arg(client()->yCookie()) );
}
-
void ReceiveFileTask::setRemoteUrl( KUrl url )
{
m_remoteUrl = url;
@@ -303,4 +298,3 @@ void ReceiveFileTask::canceled( unsigned int id )
setError();
}
-
diff --git a/protocols/yahoo/libkyahoo/requestpicturetask.cpp b/protocols/yahoo/libkyahoo/requestpicturetask.cpp
index 4353bb0..0629e4f 100644
--- a/protocols/yahoo/libkyahoo/requestpicturetask.cpp
+++ b/protocols/yahoo/libkyahoo/requestpicturetask.cpp
@@ -20,11 +20,11 @@
#include "yahootypes.h"
#include "client.h"
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
RequestPictureTask::RequestPictureTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
RequestPictureTask::~RequestPictureTask()
@@ -48,4 +48,3 @@ void RequestPictureTask::setTarget( const QString &target )
m_target = target;
}
-
diff --git a/protocols/yahoo/libkyahoo/safedelete.cpp b/protocols/yahoo/libkyahoo/safedelete.cpp
index 8c7ea6c..3c1abd9 100644
--- a/protocols/yahoo/libkyahoo/safedelete.cpp
+++ b/protocols/yahoo/libkyahoo/safedelete.cpp
@@ -138,4 +138,3 @@ void SafeDeleteLater::explode()
delete this;
}
-
diff --git a/protocols/yahoo/libkyahoo/sendauthresptask.cpp b/protocols/yahoo/libkyahoo/sendauthresptask.cpp
index 8199228..3ca3ee8 100644
--- a/protocols/yahoo/libkyahoo/sendauthresptask.cpp
+++ b/protocols/yahoo/libkyahoo/sendauthresptask.cpp
@@ -21,11 +21,11 @@
#include "yahootypes.h"
#include "client.h"
#include <qstring.h>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
SendAuthRespTask::SendAuthRespTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
SendAuthRespTask::~SendAuthRespTask()
@@ -69,4 +69,3 @@ void SendAuthRespTask::setMessage( const QString &msg )
m_msg = msg;
}
-
diff --git a/protocols/yahoo/libkyahoo/sendfiletask.cpp b/protocols/yahoo/libkyahoo/sendfiletask.cpp
index adcdaef..2980a06 100644
--- a/protocols/yahoo/libkyahoo/sendfiletask.cpp
+++ b/protocols/yahoo/libkyahoo/sendfiletask.cpp
@@ -23,7 +23,7 @@
#include <qstring.h>
#include <qtimer.h>
#include <QTime>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <klocale.h>
#include <k3streamsocket.h>
#include <kio/global.h>
@@ -32,16 +32,14 @@
using namespace KNetwork;
using namespace KYahoo;
-
/* Buffer size to send file data. Automatically resized. Won't grow up past BUFFER_SIZE_MAX. Code will try
to send as much data as it can in one shot */
static const int BUFFER_SIZE_INITIAL = 1024;
static const int BUFFER_SIZE_MAX = (64 * 1024);
-
SendFileTask::SendFileTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
m_transmitted = 0;
m_socket = 0;
@@ -79,7 +77,7 @@ bool SendFileTask::take(Transfer* transfer)
YMSGTransfer *t = static_cast<YMSGTransfer*>(transfer);
- kDebug(YAHOO_RAW_DEBUG) << t->service();
+ qCDebug(YAHOO_PROTOCOL_LOG) << t->service();
if(t->service() == Yahoo::ServiceFileTransfer7)
parseFileTransfer(t);
@@ -91,7 +89,7 @@ bool SendFileTask::take(Transfer* transfer)
void SendFileTask::parseFileTransfer( const Transfer *transfer )
{
- kDebug(YAHOO_RAW_DEBUG);
+ qCDebug(YAHOO_PROTOCOL_LOG);
const YMSGTransfer *t = static_cast<const YMSGTransfer*>(transfer);
@@ -115,7 +113,7 @@ void SendFileTask::parseFileTransfer( const Transfer *transfer )
void SendFileTask::onGo()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
m_file.setFileName( m_url.toLocalFile() );
@@ -141,7 +139,7 @@ void SendFileTask::onGo()
void SendFileTask::sendFileTransferInfo()
{
- kDebug(YAHOO_RAW_DEBUG);
+ qCDebug(YAHOO_PROTOCOL_LOG);
KResolverResults results = KResolver::resolve(QStringLiteral("relay.msg.yahoo.com"), QString::number(80));
if(results.count() > 0)
@@ -171,7 +169,7 @@ void SendFileTask::sendFileTransferInfo()
void SendFileTask::parseTransferAccept(const Transfer *transfer)
{
- kDebug(YAHOO_RAW_DEBUG);
+ qCDebug(YAHOO_PROTOCOL_LOG);
const YMSGTransfer *t = static_cast<const YMSGTransfer*>(transfer);
@@ -183,7 +181,7 @@ void SendFileTask::parseTransferAccept(const Transfer *transfer)
}
m_token = t->firstParam(251);
- kDebug(YAHOO_RAW_DEBUG) << "Token: " << m_token;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Token: " << m_token;
m_socket = new KStreamSocket( m_relayHost, QString::number(80) );
m_socket->setBlocking( false );
@@ -199,22 +197,22 @@ void SendFileTask::parseTransferAccept(const Transfer *transfer)
void SendFileTask::connectFailed( int i )
{
QString err = KSocketBase::errorString(m_socket->error());
- kDebug(YAHOO_RAW_DEBUG) << i << ": " << err;
+ qCDebug(YAHOO_PROTOCOL_LOG) << i << ": " << err;
emit error( m_transferId, i, err );
setError();
}
void SendFileTask::connectSucceeded()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if ( m_file.open(QIODevice::ReadOnly ) )
{
- kDebug(YAHOO_RAW_DEBUG) << "File successfully opened. Reading...";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "File successfully opened. Reading...";
}
else
{
- kDebug(YAHOO_RAW_DEBUG) << "Error opening file: " << m_file.errorString();
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Error opening file: " << m_file.errorString();
client()->notifyError( i18n( "An error occurred while sending the file." ), m_file.errorString(), Client::Error );
m_socket->close();
emit error( m_transferId, m_file.error(), m_file.errorString() );
@@ -222,7 +220,7 @@ void SendFileTask::connectSucceeded()
return;
}
- kDebug(YAHOO_RAW_DEBUG) << "Sizes: File (" << m_url << "): " << m_file.size();
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Sizes: File (" << m_url << "): " << m_file.size();
QString header = QLatin1String("POST /relay?token=") +
QUrl::toPercentEncoding(m_token) +
QString::fromLatin1("&sender=%1&recver=%2 HTTP/1.1\r\n"
@@ -241,7 +239,6 @@ void SendFileTask::connectSucceeded()
m_bufferInPos = m_buffer.size();
}
-
void SendFileTask::transmitHeader()
{
Q_ASSERT(m_bufferOutPos <= m_buffer.size());
@@ -260,11 +257,10 @@ void SendFileTask::transmitHeader()
return;
}
-
- kDebug(YAHOO_RAW_DEBUG) << "Trying to send header part: " << m_buffer.mid(m_bufferOutPos);
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Trying to send header part: " << m_buffer.mid(m_bufferOutPos);
const qint64 written = m_socket->write(m_buffer.constData() + m_bufferOutPos, remaining);
- kDebug(YAHOO_RAW_DEBUG) << " sent " << written << " bytes";
+ qCDebug(YAHOO_PROTOCOL_LOG) << " sent " << written << " bytes";
if (written <= 0)
{
@@ -277,13 +273,11 @@ void SendFileTask::transmitHeader()
m_bufferOutPos += written;
}
-
-
bool SendFileTask::checkTransferEnd()
{
if (m_transmitted >= m_file.size())
{
- kDebug(YAHOO_RAW_DEBUG) << "Upload Successful: " << m_transmitted;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Upload Successful: " << m_transmitted;
emit complete( m_transferId );
setSuccess();
m_socket->close();
@@ -292,8 +286,6 @@ bool SendFileTask::checkTransferEnd()
return false;
}
-
-
bool SendFileTask::fillSendBuffer()
{
if (checkTransferEnd())
@@ -313,7 +305,6 @@ bool SendFileTask::fillSendBuffer()
m_bufferOutPos = 0;
}
-
const int to_read = m_buffer.size() - m_bufferInPos;
if (to_read <= 0)
{
@@ -321,11 +312,11 @@ bool SendFileTask::fillSendBuffer()
}
const qint64 file_read = m_file.read(m_buffer.data() + m_bufferInPos, to_read);
- // kDebug(YAHOO_RAW_DEBUG) << "reading from file: want" << to_read << "got to read" << file_read << " bytes";
+ // qCDebug(YAHOO_PROTOCOL_LOG) << "reading from file: want" << to_read << "got to read" << file_read << " bytes";
if (file_read < 0)
{
- kDebug(YAHOO_RAW_DEBUG) << "Upload Failed (reading file)!";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Upload Failed (reading file)!";
m_buffer.clear();
m_buffer.reserve(0); // free memory until this task is reused or freed.
@@ -340,10 +331,9 @@ bool SendFileTask::fillSendBuffer()
return false;
}
-
void SendFileTask::transmitData()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if (fillSendBuffer())
return;
@@ -355,12 +345,12 @@ void SendFileTask::transmitData()
const qint64 written = m_socket->write(m_buffer.constData() + m_bufferOutPos, remaining);
if (written <= 0)
{
- kDebug(YAHOO_RAW_DEBUG) << "Upload Failed (sending data)! toSend=" << remaining << "sent=" << written;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Upload Failed (sending data)! toSend=" << remaining << "sent=" << written;
emit error( m_transferId, m_socket->error(), m_socket->errorString() );
setError();
return;
}
- // kDebug(YAHOO_RAW_DEBUG) << "sending file content: toSend=" << remaining << "sent=" << written;
+ // qCDebug(YAHOO_PROTOCOL_LOG) << "sending file content: toSend=" << remaining << "sent=" << written;
m_transmitted += written;
m_bufferOutPos += written;
@@ -374,11 +364,10 @@ void SendFileTask::transmitData()
// double its size
int oldC = m_buffer.size();
m_buffer.resize(MIN(2 * oldC, BUFFER_SIZE_MAX));
- // kDebug(YAHOO_RAW_DEBUG) << "buffer resized from " << oldC << " to " << m_buffer.size();
+ // qCDebug(YAHOO_PROTOCOL_LOG) << "buffer resized from " << oldC << " to " << m_buffer.size();
}
}
-
void SendFileTask::setTarget( const QString &to )
{
m_target = to;
@@ -431,9 +420,8 @@ QString SendFileTask::newYahooTransferId()
newId += QLatin1String("$$");
- kDebug() << "New Yahoo Transfer Id: " << newId;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "New Yahoo Transfer Id: " << newId;
return newId;
}
-
diff --git a/protocols/yahoo/libkyahoo/sendmessagetask.cpp b/protocols/yahoo/libkyahoo/sendmessagetask.cpp
index 677612e..ab89fa4 100644
--- a/protocols/yahoo/libkyahoo/sendmessagetask.cpp
+++ b/protocols/yahoo/libkyahoo/sendmessagetask.cpp
@@ -20,14 +20,14 @@
#include "yahootypes.h"
#include "client.h"
#include <qstring.h>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <klocale.h>
using namespace KYahoo;
SendMessageTask::SendMessageTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
SendMessageTask::~SendMessageTask()
@@ -36,11 +36,11 @@ SendMessageTask::~SendMessageTask()
void SendMessageTask::onGo()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( m_text.isEmpty() )
{
- kDebug(YAHOO_RAW_DEBUG) << "Text to send is empty.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Text to send is empty.";
client()->notifyError( i18n( "An error occurred while sending the message" ), i18n( "The message is empty." ), Client::Debug );
return;
}
diff --git a/protocols/yahoo/libkyahoo/sendnotifytask.cpp b/protocols/yahoo/libkyahoo/sendnotifytask.cpp
index de96455..28e98dc 100644
--- a/protocols/yahoo/libkyahoo/sendnotifytask.cpp
+++ b/protocols/yahoo/libkyahoo/sendnotifytask.cpp
@@ -20,11 +20,11 @@
#include "yahootypes.h"
#include "client.h"
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
SendNotifyTask::SendNotifyTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
SendNotifyTask::~SendNotifyTask()
@@ -53,7 +53,7 @@ void SendNotifyTask::onGo()
break;
case NotifyWebcamInvite:
- kDebug(YAHOO_RAW_DEBUG) << "send invitation set Param";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "send invitation set Param";
t->setParam( 1, client()->userId().toLocal8Bit() );
t->setParam( 5, m_target.toLocal8Bit() );
t->setParam( 13, 0 );
@@ -87,4 +87,3 @@ void SendNotifyTask::setState( State state)
m_state = state;
}
-
diff --git a/protocols/yahoo/libkyahoo/sendpicturetask.cpp b/protocols/yahoo/libkyahoo/sendpicturetask.cpp
index 97ecb8a..40c5aef 100644
--- a/protocols/yahoo/libkyahoo/sendpicturetask.cpp
+++ b/protocols/yahoo/libkyahoo/sendpicturetask.cpp
@@ -26,7 +26,7 @@
#include <kio/job.h>
#include <kio/jobclasses.h>
#include <k3bufferedsocket.h>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <klocale.h>
using namespace KNetwork;
@@ -34,7 +34,7 @@ using namespace KYahoo;
SendPictureTask::SendPictureTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
m_socket = 0;
}
@@ -64,7 +64,7 @@ void SendPictureTask::onGo()
void SendPictureTask::initiateUpload()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
m_socket = new KBufferedSocket( QStringLiteral("filetransfer.msg.yahoo.com"), QString::number(80) );
connect( m_socket, SIGNAL(connected(KNetwork::KResolverEntry)), this, SLOT(connectSucceeded()) );
connect( m_socket, SIGNAL(gotError(int)), this, SLOT(connectFailed(int)) );
@@ -75,7 +75,7 @@ void SendPictureTask::initiateUpload()
void SendPictureTask::connectFailed( int i)
{
- kDebug(YAHOO_RAW_DEBUG) << i << ": " << static_cast<const KBufferedSocket*>( sender() )->errorString();
+ qCDebug(YAHOO_PROTOCOL_LOG) << i << ": " << static_cast<const KBufferedSocket*>( sender() )->errorString();
client()->notifyError(i18n("The picture was not successfully uploaded"), QStringLiteral("%1 - %2").arg(i).arg(static_cast<const KBufferedSocket*>( sender() )->errorString()), Client::Error );
setError();
@@ -83,7 +83,7 @@ void SendPictureTask::connectFailed( int i)
void SendPictureTask::connectSucceeded()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer t(Yahoo::ServicePictureUpload);
QFile file( m_path );
@@ -101,17 +101,17 @@ void SendPictureTask::connectSucceeded()
if ( file.open(QIODevice::ReadOnly ) )
{
- kDebug(YAHOO_RAW_DEBUG) << "File successfully opened. Reading...";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "File successfully opened. Reading...";
}
else
{
- kDebug(YAHOO_RAW_DEBUG) << "Error opening file: " << file.errorString();
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Error opening file: " << file.errorString();
client()->notifyError(i18n("Error opening file: %1", m_path), file.errorString(), Client::Error );
return;
}
paket = t.serialize();
- kDebug(YAHOO_RAW_DEBUG) << "Sizes: File (" << m_path << "): " << file.size() << " - paket: " << paket.size();
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Sizes: File (" << m_path << "): " << file.size() << " - paket: " << paket.size();
QString header = QString::fromLatin1("POST /notifyft HTTP/1.1\r\n"
"Cookie: Y=%1; T=%2; C=%3 ;\r\n"
"User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)\r\n"
@@ -123,23 +123,23 @@ void SendPictureTask::connectSucceeded()
stream << (qint8)0x32 << (qint8)0x39 << (qint8)0xc0 << (qint8)0x80;
stream.writeRawData( file.readAll(), file.size() );
- kDebug(YAHOO_RAW_DEBUG) << "Buffersize: " << buffer.size();
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Buffersize: " << buffer.size();
if( m_socket->write( buffer, buffer.size() ) )
{
- kDebug(YAHOO_RAW_DEBUG) << "Upload Successful!";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Upload Successful!";
m_socket->enableRead( true );
// setSuccess();
}
else
{
- kDebug(YAHOO_RAW_DEBUG) << "Upload Failed!";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Upload Failed!";
setError();
}
}
void SendPictureTask::readResult()
{
- kDebug(YAHOO_RAW_DEBUG) << m_socket->bytesAvailable();
+ qCDebug(YAHOO_PROTOCOL_LOG) << m_socket->bytesAvailable();
m_socket->enableRead( false );
QByteArray buf;
buf.resize( m_socket->bytesAvailable() );
@@ -147,12 +147,12 @@ void SendPictureTask::readResult()
if( buf.indexOf( "error", 0 ) >= 0 )
{
- kDebug(YAHOO_RAW_DEBUG) << "Picture upload failed";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Picture upload failed";
setError();
}
else
{
- kDebug(YAHOO_RAW_DEBUG) << "Picture upload acknowledged.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Picture upload acknowledged.";
setSuccess();
}
@@ -160,7 +160,7 @@ void SendPictureTask::readResult()
void SendPictureTask::sendChecksum()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServicePictureChecksum);
t->setId( client()->sessionID() );
@@ -176,7 +176,7 @@ void SendPictureTask::sendChecksum()
void SendPictureTask::sendInformation()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServicePicture);
t->setId( client()->sessionID() );
@@ -193,7 +193,7 @@ void SendPictureTask::sendInformation()
void SendPictureTask::sendStatus()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServicePictureStatus);
t->setId( client()->sessionID() );
diff --git a/protocols/yahoo/libkyahoo/sha1.c b/protocols/yahoo/libkyahoo/sha1.c
index ae4fd34..6fcebda 100644
--- a/protocols/yahoo/libkyahoo/sha1.c
+++ b/protocols/yahoo/libkyahoo/sha1.c
@@ -96,8 +96,6 @@ static uint64_t _byteswap64(uint64_t x)
#define BYTESWAP64(x) _byteswap64(x)
-
-
#endif /* WORDS_BIGENDIAN */
#else /* !RUNTIME_ENDIAN */
diff --git a/protocols/yahoo/libkyahoo/statusnotifiertask.cpp b/protocols/yahoo/libkyahoo/statusnotifiertask.cpp
index 8a22a88..1440b34 100644
--- a/protocols/yahoo/libkyahoo/statusnotifiertask.cpp
+++ b/protocols/yahoo/libkyahoo/statusnotifiertask.cpp
@@ -21,14 +21,14 @@
#include "client.h"
#include <qstring.h>
#include <qstringlist.h>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <klocale.h>
using namespace KYahoo;
StatusNotifierTask::StatusNotifierTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
StatusNotifierTask::~StatusNotifierTask()
@@ -60,7 +60,6 @@ bool StatusNotifierTask::forMe( const Transfer* transfer ) const
if (!t)
return false;
-
if ( t->service() == Yahoo::ServiceLogon ||
t->service() == Yahoo::ServiceLogoff ||
t->service() == Yahoo::ServiceIsAway ||
@@ -81,7 +80,7 @@ bool StatusNotifierTask::forMe( const Transfer* transfer ) const
void StatusNotifierTask::parseStatus( YMSGTransfer* t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( t->status() == Yahoo::StatusDisconnected &&
t->service() == Yahoo::ServiceLogoff )
@@ -132,7 +131,7 @@ void StatusNotifierTask::parseStatus( YMSGTransfer* t )
void StatusNotifierTask::parseAuthorization( YMSGTransfer* t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString nick; /* key = 4 */
QString msg; /* key = 14 */
@@ -163,14 +162,14 @@ void StatusNotifierTask::parseAuthorization( YMSGTransfer* t )
if( !fname.isEmpty() || !lname.isEmpty() )
name = QStringLiteral("%1 %2").arg(fname).arg(lname);
- kDebug(YAHOO_RAW_DEBUG) << "Emitting gotAuthorizationRequest( " << nick<< ", " << msg << ", " << name << " )";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Emitting gotAuthorizationRequest( " << nick<< ", " << msg << ", " << name << " )";
emit gotAuthorizationRequest( nick, msg, name );
}
}
void StatusNotifierTask::parseStealthStatus( YMSGTransfer* t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString nick; /* key = 7 */
int state; /* key = 31 */
diff --git a/protocols/yahoo/libkyahoo/stealthtask.cpp b/protocols/yahoo/libkyahoo/stealthtask.cpp
index 54a49d4..1949ba6 100644
--- a/protocols/yahoo/libkyahoo/stealthtask.cpp
+++ b/protocols/yahoo/libkyahoo/stealthtask.cpp
@@ -23,7 +23,7 @@
StealthTask::StealthTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
StealthTask::~StealthTask()
diff --git a/protocols/yahoo/libkyahoo/stealthtask.h b/protocols/yahoo/libkyahoo/stealthtask.h
index 2984bba..b6fa401 100644
--- a/protocols/yahoo/libkyahoo/stealthtask.h
+++ b/protocols/yahoo/libkyahoo/stealthtask.h
@@ -19,7 +19,7 @@
#include "task.h"
#include "yahootypes.h"
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
class QString;
diff --git a/protocols/yahoo/libkyahoo/stream.h b/protocols/yahoo/libkyahoo/stream.h
index 3396ae2..7b910c3 100644
--- a/protocols/yahoo/libkyahoo/stream.h
+++ b/protocols/yahoo/libkyahoo/stream.h
@@ -63,7 +63,6 @@ public:
* Send a message to the server
*/
virtual void write( Transfer *request) = 0;
-
signals:
void connectionClosed();
diff --git a/protocols/yahoo/libkyahoo/tests/logintest.cpp b/protocols/yahoo/libkyahoo/tests/logintest.cpp
index 1189c91..aab3621 100644
--- a/protocols/yahoo/libkyahoo/tests/logintest.cpp
+++ b/protocols/yahoo/libkyahoo/tests/logintest.cpp
@@ -19,7 +19,7 @@
*/
#include "logintest.h"
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include "../ymsgtransfer.h"
#include "../yahootypes.h"
@@ -48,7 +48,7 @@ void LoginTest::slotDoTest()
{
QLatin1String server("scs.msg.yahoo.com");
// connect to server
- kDebug(14180) << " connecting to server";
+ qCDebug(YAHOO_PROTOCOL_LOG) << " connecting to server";
connect( myClient, SIGNAL(connected()), SLOT(slotConnected()) );
myClient->start( server, 5050, "duncanmacvicar", "**********" );
@@ -57,7 +57,7 @@ void LoginTest::slotDoTest()
void LoginTest::slotConnected()
{
- kDebug(14180) << " connection is up";
+ qCDebug(YAHOO_PROTOCOL_LOG) << " connection is up";
connected = true;
}
diff --git a/protocols/yahoo/libkyahoo/tests/logintest.h b/protocols/yahoo/libkyahoo/tests/logintest.h
index cac1184..76c0066 100644
--- a/protocols/yahoo/libkyahoo/tests/logintest.h
+++ b/protocols/yahoo/libkyahoo/tests/logintest.h
@@ -30,7 +30,6 @@
#include "yahooclientstream.h"
#include "yahooconnector.h"
-
#define QT_FATAL_ASSERT 1
class LoginTest : public QApplication
diff --git a/protocols/yahoo/libkyahoo/webcamimgformat.cpp b/protocols/yahoo/libkyahoo/webcamimgformat.cpp
index a88bd43..4b53b69 100644
--- a/protocols/yahoo/libkyahoo/webcamimgformat.cpp
+++ b/protocols/yahoo/libkyahoo/webcamimgformat.cpp
@@ -25,7 +25,7 @@
#include <QBuffer>
#include <QIODevice>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <jasper/jasper.h>
@@ -33,11 +33,11 @@ bool jasperConvert(jas_image_t* &image, jas_stream_t* &out, const char* data, un
{
jas_stream_t *in;
- // kDebug(YAHOO_RAW_DEBUG) << "Got data - size=" << size;
+ // qCDebug(YAHOO_PROTOCOL_LOG) << "Got data - size=" << size;
if(!(in = jas_stream_memopen(const_cast<char*>(data), size)))
{
- kDebug(YAHOO_RAW_DEBUG) << "Could not open jasper input stream";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Could not open jasper input stream";
return false;
}
@@ -47,31 +47,31 @@ bool jasperConvert(jas_image_t* &image, jas_stream_t* &out, const char* data, un
if (infmt < 0)
{
jas_stream_close(in);
- kDebug(YAHOO_RAW_DEBUG) << "Failed to recognize input webcam image format";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Failed to recognize input webcam image format";
return false;
}
if (!(image = jas_image_decode(in, infmt, 0)))
{
- kDebug(YAHOO_RAW_DEBUG) << "Unable to decode image";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Unable to decode image";
jas_stream_close(in);
return false;
}
- /* kDebug(YAHOO_RAW_DEBUG) << "jasper: decoded image: " << jas_image_width(image) << "x" << jas_image_height(image) << " bytes: " <<
+ /* qCDebug(YAHOO_PROTOCOL_LOG) << "jasper: decoded image: " << jas_image_width(image) << "x" << jas_image_height(image) << " bytes: " <<
jas_image_rawsize(image) << " components:" << jas_image_numcmpts(image);
*/
char* out_img = NULL;
if(!(out = jas_stream_memopen(out_img, 0)))
{
- kDebug(YAHOO_RAW_DEBUG) << "Could not open output stream";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Could not open output stream";
jas_stream_close(in);
return false;
}
if (jas_image_encode(image, out, outfmt, const_cast<char*>(outopts)))
{
- kDebug(YAHOO_RAW_DEBUG) << "Unable to convert image";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Unable to convert image";
jas_stream_close(in);
jas_stream_close(out);
jas_image_destroy(image);
@@ -88,7 +88,7 @@ WebcamImgFormat::WebcamImgFormat()
int err = jas_init();
if (err)
{
- kDebug(YAHOO_RAW_DEBUG) << "Unable to initialize jasper library: code=" << err;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Unable to initialize jasper library: code=" << err;
return;
}
@@ -115,7 +115,7 @@ WebcamImgFormat::WebcamImgFormat()
fromYahooFmtID = fmt_id;
} else
{
- kDebug(YAHOO_RAW_DEBUG) << "Couldn't find a reasonable intermerdiary image format (ppm, png,jpg)";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Couldn't find a reasonable intermerdiary image format (ppm, png,jpg)";
return;
}
forYahooFmtQt[sizeof(forYahooFmtQt) / sizeof(forYahooFmtQt[0]) - 1] = '\0'; // due to the strncpy above
@@ -123,11 +123,11 @@ WebcamImgFormat::WebcamImgFormat()
jpcFmtID = jas_image_strtofmt(const_cast<char*>("jpc"));
if (jpcFmtID < 0)
{
- kDebug(YAHOO_RAW_DEBUG) << "library does not support the needed JPEG2000 format";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "library does not support the needed JPEG2000 format";
return;
}
- kDebug(YAHOO_RAW_DEBUG) << "Will use intermediary image format " << formats;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Will use intermediary image format " << formats;
initOk = true;
}
@@ -166,7 +166,7 @@ bool WebcamImgFormat::forYahoo(QByteArray& result, const QImage* src)
return false;
if (!src->save(&buffer, forYahooFmtQt, 100))
{
- kDebug(YAHOO_RAW_DEBUG) << "Failed to write intermediary " << forYahooFmtQt << " image";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Failed to write intermediary " << forYahooFmtQt << " image";
return false;
}
diff --git a/protocols/yahoo/libkyahoo/webcamtask.cpp b/protocols/yahoo/libkyahoo/webcamtask.cpp
index 462c9db..f374f3f 100644
--- a/protocols/yahoo/libkyahoo/webcamtask.cpp
+++ b/protocols/yahoo/libkyahoo/webcamtask.cpp
@@ -26,7 +26,7 @@
#include <QTimer>
#include <QPixmap>
#include <k3streamsocket.h>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <klocale.h>
using namespace KNetwork;
@@ -34,7 +34,7 @@ using namespace KYahoo;
WebcamTask::WebcamTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
transmittingData = false;
transmissionPending = false;
timestamp = 1;
@@ -74,7 +74,7 @@ bool WebcamTask::forMe( const Transfer* transfer ) const
void WebcamTask::requestWebcam( const QString &who )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceWebcam);
t->setId( client()->sessionID() );
@@ -89,7 +89,7 @@ void WebcamTask::requestWebcam( const QString &who )
void WebcamTask::parseWebcamInformation( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YahooWebcamInformation info;
if (!keysPending.isEmpty())
@@ -114,7 +114,7 @@ void WebcamTask::parseWebcamInformation( YMSGTransfer *t )
info.direction = Incoming;
}
- kDebug(YAHOO_RAW_DEBUG) << "Got WebcamInformation: Sender: " << info.sender << " Server: " << info.server << " Key: " << info.key;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Got WebcamInformation: Sender: " << info.sender << " Server: " << info.server << " Key: " << info.key;
KStreamSocket *socket = new KStreamSocket( info.server, QString::number(5100) );
socketMap[socket] = info;
@@ -132,11 +132,10 @@ void WebcamTask::slotConnectionStage1Established()
KStreamSocket* socket = const_cast<KStreamSocket*>( dynamic_cast<const KStreamSocket*>( sender() ) );
if( !socket )
return;
- kDebug(YAHOO_RAW_DEBUG) << "Webcam connection Stage1 to the user " << socketMap[socket].sender << " established.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Webcam connection Stage1 to the user " << socketMap[socket].sender << " established.";
disconnect( socket, SIGNAL(connected(KNetwork::KResolverEntry)), this, SLOT(slotConnectionStage1Established()) );
disconnect( socket, SIGNAL(gotError(int)), this, SLOT(slotConnectionFailed(int)) );
socketMap[socket].status = ConnectedStage1;
-
QByteArray buffer;
QDataStream stream( &buffer, QIODevice::WriteOnly );
@@ -165,7 +164,7 @@ void WebcamTask::slotConnectionStage2Established()
if( !socket )
return;
- kDebug(YAHOO_RAW_DEBUG) << "Webcam connection Stage2 to the user " << socketMap[socket].sender << " established.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Webcam connection Stage2 to the user " << socketMap[socket].sender << " established.";
disconnect( socket, SIGNAL(connected(KNetwork::KResolverEntry)), this, SLOT(slotConnectionStage2Established()) );
disconnect( socket, SIGNAL(gotError(int)), this, SLOT(slotConnectionFailed(int)) );
socketMap[socket].status = ConnectedStage2;
@@ -174,7 +173,6 @@ void WebcamTask::slotConnectionStage2Established()
QDataStream stream( &buffer, QIODevice::WriteOnly );
QString s;
-
if( socketMap[socket].direction == Incoming )
{
// Send <REQIMG>-Packet
@@ -203,7 +201,7 @@ void WebcamTask::slotConnectionStage2Established()
void WebcamTask::slotConnectionFailed( int error )
{
KStreamSocket* socket = const_cast<KStreamSocket*>( dynamic_cast<const KStreamSocket*>( sender() ) );
- kDebug(YAHOO_RAW_DEBUG) << "Webcam connection to the user " << socketMap[socket].sender << " failed. Error " << error << " - " << socket->errorString();
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Webcam connection to the user " << socketMap[socket].sender << " failed. Error " << error << " - " << socket->errorString();
client()->notifyError( i18n("Webcam connection to the user %1 could not be established.\n\nPlease relogin and try again.", socketMap[socket].sender), QStringLiteral("%1 - %2").arg(error).arg( socket->errorString()), Client::Error );
socketMap.remove( socket );
socket->deleteLater();
@@ -232,11 +230,11 @@ void WebcamTask::slotRead()
void WebcamTask::connectStage2( KStreamSocket *socket )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QByteArray data;
data.reserve( socket->bytesAvailable() );
data = socket->readAll();
- kDebug(YAHOO_RAW_DEBUG) << "Magic Byte:" << data[2];
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Magic Byte:" << data[2];
socketMap[socket].status = ConnectedStage2;
@@ -252,14 +250,14 @@ void WebcamTask::connectStage2( KStreamSocket *socket )
case (qint8)0x07:
while( (const char)data[i] != (qint8)0x00 )
server += data[i++];
- kDebug(YAHOO_RAW_DEBUG) << "Server:" << server;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Server:" << server;
if( server.isEmpty() )
{
emit webcamNotAvailable(socketMap[socket].sender);
break;
}
- kDebug(YAHOO_RAW_DEBUG) << "Connecting to " << server;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Connecting to " << server;
newSocket = new KStreamSocket( server, QString::number(5100) );
socketMap[newSocket] = socketMap[socket];
newSocket->enableRead( true );
@@ -289,7 +287,7 @@ void WebcamTask::processData( KStreamSocket *socket )
data = socket->readAll();
if( data.size() <= 0 )
{
- kDebug(YAHOO_RAW_DEBUG) << "No data read.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "No data read.";
return;
}
@@ -304,20 +302,20 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket )
if( !info->headerRead )
{
headerLength = data[0];
- kDebug(YAHOO_RAW_DEBUG) << "headerLength " << headerLength;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "headerLength " << headerLength;
if( data.size() < headerLength )
return;
if( headerLength >= 8 )
{
- kDebug() << data[0] << data[1] << data[2] << data[3] << data[4] << data[5] << data[6] << data[7];
+ qCDebug(YAHOO_PROTOCOL_LOG) << data[0] << data[1] << data[2] << data[3] << data[4] << data[5] << data[6] << data[7];
info->reason = data[1];
info->dataLength = yahoo_get32(data.data() + 4);
}
if( headerLength == 13 )
{
- kDebug() << data[8] << data[9] << data[10] << data[11] << data[12];
+ qCDebug(YAHOO_PROTOCOL_LOG) << data[8] << data[9] << data[10] << data[11] << data[12];
info->timestamp = yahoo_get32(data.data() + 9);
- kDebug(YAHOO_RAW_DEBUG) << "PacketType: " << data[8] << " reason: " << info->reason << " timestamp: " << info->timestamp;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "PacketType: " << data[8] << " reason: " << info->reason << " timestamp: " << info->timestamp;
QStringList::iterator it;
switch( data[8] )
{
@@ -347,7 +345,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket )
}
break;
case 0x05:
- kDebug(YAHOO_RAW_DEBUG) << "Ready for Transmission";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Ready for Transmission";
if( info->timestamp == 1 )
{
info->status = Sending;
@@ -363,7 +361,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket )
// Send very first Invitation packets
for(it = pendingInvitations.begin(); it != pendingInvitations.end(); it++)
{
- kDebug(YAHOO_RAW_DEBUG) << "send primary invitation";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "send primary invitation";
SendNotifyTask *snt = new SendNotifyTask( parent() );
snt->setTarget( *it );
snt->setType( SendNotifyTask::NotifyWebcamInvite );
@@ -396,7 +394,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket )
if( !info->headerRead && data.size() > headerLength )
{
// More headers to read
- kDebug(YAHOO_RAW_DEBUG) << "More data to read...";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "More data to read...";
QByteArray newData;
newData.reserve( data.size() - headerLength );
QDataStream stream( &newData, QIODevice::WriteOnly );
@@ -404,31 +402,31 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket )
parseData( newData, socket );
return;
}
- kDebug(YAHOO_RAW_DEBUG) << "Parsed Packet: HeaderLen: " << headerLength << " DataLen: " << info->dataLength;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Parsed Packet: HeaderLen: " << headerLength << " DataLen: " << info->dataLength;
}
if( info->dataLength <= 0 )
{
- kDebug(YAHOO_RAW_DEBUG) << "No data to read. (info->dataLength <= 0)";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "No data to read. (info->dataLength <= 0)";
if( info->headerRead )
info->headerRead = false;
return;
}
if( headerLength >= data.size() )
{
- kDebug(YAHOO_RAW_DEBUG) << "No data to read. (headerLength >= data.size())";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "No data to read. (headerLength >= data.size())";
return; //Nothing to read here...
}
if( !info->buffer )
{
- kDebug(YAHOO_RAW_DEBUG) << "Buffer created";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Buffer created";
info->buffer = new QBuffer();
info->buffer->open( QIODevice::WriteOnly );
}
- kDebug(YAHOO_RAW_DEBUG) << "data.size() " << data.size() << " headerLength " << headerLength << " buffersize " << info->buffer->size();
+ qCDebug(YAHOO_PROTOCOL_LOG) << "data.size() " << data.size() << " headerLength " << headerLength << " buffersize " << info->buffer->size();
read = headerLength + info->dataLength - info->buffer->size();
info->buffer->write( data.data() + headerLength, data.size() - headerLength );//info->dataLength - info->buffer->size() );
- kDebug(YAHOO_RAW_DEBUG) << "read " << data.size() - headerLength << " Bytes, Buffer is now " << info->buffer->size();
+ qCDebug(YAHOO_PROTOCOL_LOG) << "read " << data.size() - headerLength << " Bytes, Buffer is now " << info->buffer->size();
if( info->buffer->size() >= static_cast<uint>(info->dataLength) )
{
info->buffer->close();
@@ -439,7 +437,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket )
{
who.append( info->buffer->buffer() );
who = who.mid( 2, who.indexOf('\n') - 3);
- kDebug(YAHOO_RAW_DEBUG) << "User wants to view webcam: " << who << " len: " << who.length() << " Index: " << accessGranted.indexOf( who );
+ qCDebug(YAHOO_PROTOCOL_LOG) << "User wants to view webcam: " << who << " len: " << who.length() << " Index: " << accessGranted.indexOf( who );
if( accessGranted.indexOf( who ) >= 0 )
{
grantAccess( who );
@@ -451,13 +449,13 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket )
case NewWatcher:
who.append( info->buffer->buffer() );
who = who.left( who.length() - 1 );
- kDebug(YAHOO_RAW_DEBUG) << "New Watcher of webcam: " << who;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "New Watcher of webcam: " << who;
emit viewerJoined( who );
break;
case WatcherLeft:
who.append( info->buffer->buffer() );
who = who.left( who.length() - 1 );
- kDebug(YAHOO_RAW_DEBUG) << "A Watcher left: " << who << " len: " << who.length();
+ qCDebug(YAHOO_PROTOCOL_LOG) << "A Watcher left: " << who << " len: " << who.length();
accessGranted.removeAll( who );
emit viewerLeft( who );
break;
@@ -469,12 +467,12 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket )
{
if (WebcamImgFormat::instance()->fromYahoo(webcamImage, info->buffer->buffer().constData(), info->buffer->buffer().size()))
{
- kDebug(YAHOO_RAW_DEBUG) << "Image Received and converted. Size: " << webcamImage.size();
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Image Received and converted. Size: " << webcamImage.size();
emit webcamImageReceived( info->sender, webcamImage );
} else
- kDebug(YAHOO_RAW_DEBUG) << "Failed to convert incoming Yahoo webcam image";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Failed to convert incoming Yahoo webcam image";
} else
- kDebug(YAHOO_RAW_DEBUG) << "Failed to initialize WebcamImgFormat helper";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Failed to initialize WebcamImgFormat helper";
}
break;
default:
@@ -488,7 +486,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket )
if( data.size() > read )
{
// More headers to read
- kDebug(YAHOO_RAW_DEBUG) << "More data to read..." << data.size() - read;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "More data to read..." << data.size() - read;
QByteArray newData;
newData.reserve( data.size() - read );
QDataStream stream( &newData, QIODevice::WriteOnly );
@@ -509,27 +507,26 @@ void WebcamTask::cleanUpConnection( KStreamSocket *socket )
void WebcamTask::closeWebcam( const QString & who )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
SocketInfoMap::Iterator it;
for( it = socketMap.begin(); it != socketMap.end(); it++ )
{
- kDebug(YAHOO_RAW_DEBUG) << it.value().sender << " - " << who;
+ qCDebug(YAHOO_PROTOCOL_LOG) << it.value().sender << " - " << who;
if( it.value().sender == who )
{
cleanUpConnection( it.key() );
return;
}
}
- kDebug(YAHOO_RAW_DEBUG) << "Error. You tried to close a connection that did not exist.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Error. You tried to close a connection that did not exist.";
client()->notifyError( i18n( "An error occurred closing the webcam session. " ), i18n( "You tried to close a connection that did not exist." ), Client::Debug );
}
-
// Sending
void WebcamTask::registerWebcam()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceWebcam);
t->setId( client()->sessionID() );
@@ -541,7 +538,7 @@ void WebcamTask::registerWebcam()
void WebcamTask::addPendingInvitation( const QString &userId )
{
- kDebug(YAHOO_RAW_DEBUG) << "Inviting " << userId << " to watch the webcam.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Inviting " << userId << " to watch the webcam.";
pendingInvitations.append( userId );
accessGranted.append( userId );
@@ -549,7 +546,7 @@ void WebcamTask::addPendingInvitation( const QString &userId )
void WebcamTask::grantAccess( const QString &userId )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
KStreamSocket *socket = 0L;
SocketInfoMap::Iterator it;
for( it = socketMap.begin(); it != socketMap.end(); it++ )
@@ -562,7 +559,7 @@ void WebcamTask::grantAccess( const QString &userId )
}
if( !socket )
{
- kDebug(YAHOO_RAW_DEBUG) << "Error. No outgoing socket found.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Error. No outgoing socket found.";
return;
}
QByteArray ar;
@@ -577,7 +574,7 @@ void WebcamTask::grantAccess( const QString &userId )
void WebcamTask::closeOutgoingWebcam()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
KStreamSocket *socket = 0L;
SocketInfoMap::Iterator it;
for( it = socketMap.begin(); it != socketMap.end(); it++ )
@@ -590,7 +587,7 @@ void WebcamTask::closeOutgoingWebcam()
}
if( !socket )
{
- kDebug(YAHOO_RAW_DEBUG) << "Error. No outgoing socket found.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Error. No outgoing socket found.";
return;
}
@@ -600,7 +597,7 @@ void WebcamTask::closeOutgoingWebcam()
void WebcamTask::sendEmptyWebcamImage()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
KStreamSocket *socket = 0L;
SocketInfoMap::Iterator it;
@@ -614,7 +611,7 @@ void WebcamTask::sendEmptyWebcamImage()
}
if( !socket )
{
- kDebug(YAHOO_RAW_DEBUG) << "Error. No outgoing socket found.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Error. No outgoing socket found.";
return;
}
if( socketMap[socket].status != SendingEmpty )
@@ -632,7 +629,7 @@ void WebcamTask::doPendingInvitations()
QStringList::iterator itb;
for(itb = pendingInvitations.begin(); itb != pendingInvitations.end(); itb++)
{
- kDebug(YAHOO_RAW_DEBUG) << "send invitation when no users";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "send invitation when no users";
SendNotifyTask *snt = new SendNotifyTask( parent() );
snt->setTarget( *itb );
snt->setType( SendNotifyTask::NotifyWebcamInvite );
@@ -645,7 +642,7 @@ void WebcamTask::doPendingInvitations()
void WebcamTask::sendWebcamImage( const QByteArray &image )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
pictureBuffer = image;
transmissionPending = true;
KStreamSocket *socket = 0L;
@@ -661,7 +658,7 @@ void WebcamTask::sendWebcamImage( const QByteArray &image )
}
if( !socket )
{
- kDebug(YAHOO_RAW_DEBUG) << "Error. No outgoing socket found.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Error. No outgoing socket found.";
return;
}
@@ -672,7 +669,7 @@ void WebcamTask::transmitWebcamImage()
{
if( !transmissionPending )
return;
- kDebug(YAHOO_RAW_DEBUG) << "arraysize: " << pictureBuffer.size();
+ qCDebug(YAHOO_PROTOCOL_LOG) << "arraysize: " << pictureBuffer.size();
// Find outgoing socket
KStreamSocket *socket = 0L;
@@ -687,7 +684,7 @@ void WebcamTask::transmitWebcamImage()
}
if( !socket )
{
- kDebug(YAHOO_RAW_DEBUG) << "Error. No outgoing socket found.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Error. No outgoing socket found.";
return;
}
diff --git a/protocols/yahoo/libkyahoo/yabentry.cpp b/protocols/yahoo/libkyahoo/yabentry.cpp
index d5210ca..a0001c0 100644
--- a/protocols/yahoo/libkyahoo/yabentry.cpp
+++ b/protocols/yahoo/libkyahoo/yabentry.cpp
@@ -67,7 +67,7 @@ void YABEntry::fromQDomElement( const QDomElement &e )
void YABEntry::fromQDomDocument( const QDomDocument &d )
{
- kDebug() << d.toString() <<
+ qCDebug(YAHOO_PROTOCOL_LOG) << d.toString() <<
d.elementsByTagName(QStringLiteral("yi")).item(0).toElement().text();
yahooId = d.elementsByTagName(QStringLiteral("yi")).item(0).toElement().text();
firstName = d.elementsByTagName(QStringLiteral("fn")).item(0).toElement().text();
@@ -164,7 +164,7 @@ void YABEntry::fillQDomElement( QDomElement &e ) const
void YABEntry::dump() const
{
- kDebug() << "firstName: " << firstName << endl <<
+ qCDebug(YAHOO_PROTOCOL_LOG) << "firstName: " << firstName << endl <<
"secondName: " << secondName << endl <<
"lastName: " << lastName << endl <<
"nickName: " << nickName << endl <<
diff --git a/protocols/yahoo/libkyahoo/yabentry.h b/protocols/yahoo/libkyahoo/yabentry.h
index da04203..97ed206 100644
--- a/protocols/yahoo/libkyahoo/yabentry.h
+++ b/protocols/yahoo/libkyahoo/yabentry.h
@@ -16,7 +16,7 @@
#ifndef YABEntry_H
#define YABEntry_H
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <qdatetime.h>
#include <qdom.h>
@@ -80,7 +80,6 @@ struct YABEntry
QString additional3;
QString additional4;
-
void fromQDomElement( const QDomElement &e );
void fromQDomDocument( const QDomDocument &e );
void fillQDomElement( QDomElement &e ) const;
diff --git a/protocols/yahoo/libkyahoo/yabtask.cpp b/protocols/yahoo/libkyahoo/yabtask.cpp
index 18d3833..0974bca 100644
--- a/protocols/yahoo/libkyahoo/yabtask.cpp
+++ b/protocols/yahoo/libkyahoo/yabtask.cpp
@@ -31,7 +31,7 @@ using namespace KYahoo;
YABTask::YABTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
}
YABTask::~YABTask()
@@ -66,7 +66,7 @@ bool YABTask::forMe( const Transfer* transfer ) const
void YABTask::parseContactDetails( YMSGTransfer* t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString from; /* key = 7 */
int count;
@@ -91,10 +91,9 @@ void YABTask::parseContactDetails( YMSGTransfer* t )
}
}
-
void YABTask::getAllEntries( long lastMerge, long lastRemoteRevision )
{
- kDebug(YAHOO_RAW_DEBUG) << "LastMerge: " << lastMerge << " LastRemoteRevision: " << lastRemoteRevision;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "LastMerge: " << lastMerge << " LastRemoteRevision: " << lastRemoteRevision;
m_data.clear();
QString url = QStringLiteral("http://address.yahoo.com/yab/us?v=XM&prog=ymsgr&.intl=us&diffs=1&t=%1&tags=short&rt=%2&prog-ver=%3")
.arg( lastMerge ).arg( lastRemoteRevision ).arg( YMSG_PROGRAM_VERSION_STRING );
@@ -109,7 +108,7 @@ void YABTask::getAllEntries( long lastMerge, long lastRemoteRevision )
void YABTask::slotData( KIO::Job* /*job*/, const QByteArray &info )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
m_data += info;
}
@@ -117,18 +116,18 @@ void YABTask::slotResult( KJob* job )
{
if( job->error () || ( m_transferJob && m_transferJob->isErrorPage() ) )
{
- kDebug(YAHOO_RAW_DEBUG) << "Could not retrieve server side addressbook for user info.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Could not retrieve server side addressbook for user info.";
client()->notifyError( i18n( "Could not retrieve server side address book for user info." ), job->errorString(), Client::Info );
}
else
{
- kDebug(YAHOO_RAW_DEBUG) << "Server side addressbook retrieved.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Server side addressbook retrieved.";
QDomDocument doc;
QDomNodeList list;
QDomElement e;
int it = 0;
- kDebug(YAHOO_RAW_DEBUG) << m_data;
+ qCDebug(YAHOO_PROTOCOL_LOG) << m_data;
doc.setContent( m_data );
list = doc.elementsByTagName( QStringLiteral("ab") ); // Get the Addressbook
diff --git a/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp b/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp
index ba4ea92..6cfc351 100644
--- a/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp
+++ b/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp
@@ -19,7 +19,7 @@
#include <qfile.h>
// KDE Includes
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <ktemporaryfile.h>
#include <kio/global.h>
#include <kio/job.h>
@@ -44,7 +44,7 @@ YahooBuddyIconLoader::~YahooBuddyIconLoader()
void YahooBuddyIconLoader::fetchBuddyIcon( const QString &who, KUrl url, int checksum )
{
- kDebug(YAHOO_RAW_DEBUG) << url;
+ qCDebug(YAHOO_PROTOCOL_LOG) << url;
KIO::TransferJob *transfer;
QString Url = url.url();
QString ext = Url.left( Url.lastIndexOf( QLatin1String("?") ) );
@@ -63,7 +63,7 @@ void YahooBuddyIconLoader::fetchBuddyIcon( const QString &who, KUrl url, int che
void YahooBuddyIconLoader::slotData( KIO::Job *job, const QByteArray& data )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
KIO::TransferJob *transfer = static_cast< KIO::TransferJob * >(job);
@@ -73,13 +73,13 @@ void YahooBuddyIconLoader::slotData( KIO::Job *job, const QByteArray& data )
void YahooBuddyIconLoader::slotComplete( KJob *job )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
KIO::TransferJob *transfer = static_cast< KIO::TransferJob * >(job);
if ( job->error () || transfer->isErrorPage () )
{
- kDebug(YAHOO_RAW_DEBUG) << "An error occurred while downloading buddy icon.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "An error occurred while downloading buddy icon.";
if( m_client )
m_client->notifyError( i18n( "An error occurred while downloading a buddy icon (%1)", m_jobs[transfer].url.url() ), job->errorString(), Client::Info );
}
@@ -91,6 +91,3 @@ void YahooBuddyIconLoader::slotComplete( KJob *job )
m_jobs.remove( transfer );
}
-
-
-
diff --git a/protocols/yahoo/libkyahoo/yahoobytestream.cpp b/protocols/yahoo/libkyahoo/yahoobytestream.cpp
index 768c66d..b7ed472 100644
--- a/protocols/yahoo/libkyahoo/yahoobytestream.cpp
+++ b/protocols/yahoo/libkyahoo/yahoobytestream.cpp
@@ -19,13 +19,13 @@
#include <qobject.h>
#include <k3bufferedsocket.h>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <k3resolver.h>
KNetworkByteStream::KNetworkByteStream( QObject *parent )
: ByteStream ( parent )
{
- kDebug( 14181 ) << "Instantiating new KNetwork byte stream.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Instantiating new KNetwork byte stream.";
// reset close tracking flag
mClosing = false;
@@ -45,7 +45,7 @@ KNetworkByteStream::KNetworkByteStream( QObject *parent )
bool KNetworkByteStream::connect( QString host, QString service )
{
- kDebug( 14181 ) << "Connecting to " << host << ", service " << service;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Connecting to " << host << ", service " << service;
return socket()->connect( host, service );
}
@@ -58,7 +58,7 @@ bool KNetworkByteStream::isOpen() const
void KNetworkByteStream::close ()
{
- kDebug ( 14181 ) << "Closing stream.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Closing stream.";
// close the socket and set flag that we are closing it ourselves
mClosing = true;
@@ -69,7 +69,7 @@ int KNetworkByteStream::tryWrite ()
{
// send all data from the buffers to the socket
QByteArray writeData = takeWrite();
- kDebug( 14181 ) << "[writeData.size() = " << writeData.size() << "]";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "[writeData.size() = " << writeData.size() << "]";
socket()->write( writeData.data(), writeData.size () );
@@ -93,25 +93,25 @@ void KNetworkByteStream::slotConnected()
void KNetworkByteStream::slotConnectionClosed()
{
- kDebug( 14181 ) << "Socket has been closed.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Socket has been closed.";
// depending on who closed the socket, emit different signals
if ( mClosing )
{
- kDebug( 14181 ) << "..by ourselves!";
- kDebug( 14181 ) << "socket error is " << socket()->errorString();
+ qCDebug(YAHOO_PROTOCOL_LOG) << "..by ourselves!";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "socket error is " << socket()->errorString();
emit connectionClosed ();
}
else
{
- kDebug( 14181 ) << "..by the other end";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "..by the other end";
emit delayedCloseFinished ();
}
}
void KNetworkByteStream::slotReadyRead()
{
- kDebug( 14181 );
+ qCDebug(YAHOO_PROTOCOL_LOG);
// stuff all available data into our buffers
QByteArray readBuffer;
readBuffer.resize( socket()->bytesAvailable () );
@@ -125,16 +125,14 @@ void KNetworkByteStream::slotReadyRead()
void KNetworkByteStream::slotBytesWritten( qint64 bytes )
{
- kDebug( 14181 ) << "[int bytes]: " << bytes;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "[int bytes]: " << bytes;
emit bytesWritten(bytes);
}
void KNetworkByteStream::slotError( int code )
{
- kDebug( 14181 ) << "Socket error " << code;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Socket error " << code;
emit error( code );
}
-
-// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off;
diff --git a/protocols/yahoo/libkyahoo/yahoobytestream.h b/protocols/yahoo/libkyahoo/yahoobytestream.h
index 0817a2f..d445e80 100644
--- a/protocols/yahoo/libkyahoo/yahoobytestream.h
+++ b/protocols/yahoo/libkyahoo/yahoobytestream.h
@@ -22,7 +22,6 @@
#include "bytestream.h"
-
/**
* Low level socket class, using KDE's KNetwork socket classes
* @author Till Gerken
@@ -65,4 +64,3 @@ private:
#endif // YAHOOBYTESTREAM_H
-// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off;
diff --git a/protocols/yahoo/libkyahoo/yahoochattask.cpp b/protocols/yahoo/libkyahoo/yahoochattask.cpp
index b42b2df..c20390e 100644
--- a/protocols/yahoo/libkyahoo/yahoochattask.cpp
+++ b/protocols/yahoo/libkyahoo/yahoochattask.cpp
@@ -20,7 +20,7 @@
#include "ymsgtransfer.h"
#include "yahootypes.h"
#include "client.h"
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <klocale.h>
#include <kio/global.h>
#include <kio/job.h>
@@ -31,7 +31,7 @@ using namespace KYahoo;
YahooChatTask::YahooChatTask(Task* parent) : Task(parent)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
m_loggedIn = false;
}
@@ -90,7 +90,7 @@ void YahooChatTask::onGo()
void YahooChatTask::getYahooChatCategories()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
KIO::TransferJob *transfer;
transfer = KIO::get( KUrl("http://insider.msg.yahoo.com/ycontent/?chatcat=0"), KIO::NoReload, KIO::HideProgressInfo );
@@ -99,14 +99,13 @@ void YahooChatTask::getYahooChatCategories()
transfer->addMetaData( QStringLiteral("cookies"), QStringLiteral("manual") );
transfer->addMetaData(QStringLiteral("setcookies"), QStringLiteral("Cookie: %1; %2; %3").arg(client()->tCookie(), client()->yCookie()) );
-
connect( transfer, SIGNAL(result(KJob*)), this, SLOT(slotCategoriesComplete(KJob*)) );
connect( transfer, SIGNAL(data(KIO::Job*,QByteArray)), this, SLOT(slotData(KIO::Job*,QByteArray)) );
}
void YahooChatTask::getYahooChatRooms( const Yahoo::ChatCategory &category )
{
- kDebug(YAHOO_RAW_DEBUG) << "Category Id: " << category.id;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Category Id: " << category.id;
KIO::TransferJob *transfer;
transfer = KIO::get( KUrl(QStringLiteral("http://insider.msg.yahoo.com/ycontent/?chatroom_%1=0").arg( category.id )), KIO::NoReload, KIO::HideProgressInfo );
@@ -115,7 +114,6 @@ void YahooChatTask::getYahooChatRooms( const Yahoo::ChatCategory &category )
transfer->addMetaData( QStringLiteral("cookies"), QStringLiteral("manual") );
transfer->addMetaData(QStringLiteral("setcookies"), QStringLiteral("Cookie: %1; %2; %3").arg(client()->tCookie(), client()->yCookie()) );
-
connect( transfer, SIGNAL(result(KJob*)), this, SLOT(slotChatRoomsComplete(KJob*)) );
connect( transfer, SIGNAL(data(KIO::Job*,QByteArray)), this, SLOT(slotData(KIO::Job*,QByteArray)) );
@@ -124,19 +122,19 @@ void YahooChatTask::getYahooChatRooms( const Yahoo::ChatCategory &category )
void YahooChatTask::slotData( KIO::Job *job, const QByteArray& data)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
m_jobs[job].data.append( data );
}
void YahooChatTask::slotCategoriesComplete( KJob *job )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
KIO::TransferJob *transfer = static_cast< KIO::TransferJob * >(job);
if ( job->error () || transfer->isErrorPage () )
{
- kDebug(YAHOO_RAW_DEBUG) << "An error occurred while downloading the chat categories list.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "An error occurred while downloading the chat categories list.";
}
else
{
@@ -150,19 +148,19 @@ void YahooChatTask::slotCategoriesComplete( KJob *job )
void YahooChatTask::slotChatRoomsComplete( KJob *job )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
KIO::TransferJob *transfer = static_cast< KIO::TransferJob * >(job);
if ( job->error () || transfer->isErrorPage () )
{
- kDebug(YAHOO_RAW_DEBUG) << "An error occurred while downloading the chat categories list.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "An error occurred while downloading the chat categories list.";
}
else
{
QDomDocument doc;
doc.setContent( m_jobs[ transfer ].data );
-// kDebug(YAHOO_RAW_DEBUG) << doc.toString();
+// qCDebug(YAHOO_PROTOCOL_LOG) << doc.toString();
emit gotYahooChatRooms( m_jobs[ transfer ].category, doc );
}
@@ -171,7 +169,7 @@ void YahooChatTask::slotChatRoomsComplete( KJob *job )
void YahooChatTask::joinRoom( const Yahoo::ChatRoom &room )
{
- kDebug(YAHOO_RAW_DEBUG) << "Joining room " << room.name << " (" << room.id << ")...";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Joining room " << room.name << " (" << room.id << ")...";
if( !m_loggedIn )
{
m_pendingJoins.append( room );
@@ -191,10 +189,10 @@ void YahooChatTask::joinRoom( const Yahoo::ChatRoom &room )
void YahooChatTask::sendYahooChatMessage( const QString &msg, const QString &handle )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( !m_loggedIn )
{
- kDebug(YAHOO_RAW_DEBUG) << "Error: trying to send, but not logged in.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Error: trying to send, but not logged in.";
return;
}
@@ -210,7 +208,7 @@ void YahooChatTask::sendYahooChatMessage( const QString &msg, const QString &han
void YahooChatTask::login()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceChatOnline);
t->setId( client()->sessionID() );
@@ -222,7 +220,7 @@ void YahooChatTask::login()
void YahooChatTask::logout()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceChatLogout);
t->setId( client()->sessionID() );
@@ -276,7 +274,7 @@ void YahooChatTask::parseJoin( YMSGTransfer *t )
// Yahoo sends a captcha requests before we can join the room
if( room == 0 && category == 0 && !comment.isEmpty() )
{
- kDebug(YAHOO_RAW_DEBUG) << "Showing captcha request";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Showing captcha request";
emit chatRoomJoined( room, category, QLatin1String(""), handle );
emit chatMessageReceived( QStringLiteral("Yahoo"), comment, handle );
}
@@ -299,7 +297,7 @@ void YahooChatTask::parseJoin( YMSGTransfer *t )
void YahooChatTask::parseChatMessage( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString handle;
QString msg;
@@ -316,7 +314,7 @@ void YahooChatTask::parseChatMessage( YMSGTransfer *t )
void YahooChatTask::parseChatExit( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString handle;
QString nick;
@@ -331,7 +329,7 @@ void YahooChatTask::parseChatExit( YMSGTransfer *t )
void YahooChatTask::parseLogout( YMSGTransfer *t )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString nick = t->firstParam( 1 );
if( nick == client()->userId() )
diff --git a/protocols/yahoo/libkyahoo/yahooclientstream.cpp b/protocols/yahoo/libkyahoo/yahooclientstream.cpp
index 54ffdb5..4b46fb6 100644
--- a/protocols/yahoo/libkyahoo/yahooclientstream.cpp
+++ b/protocols/yahoo/libkyahoo/yahooclientstream.cpp
@@ -18,7 +18,6 @@
*************************************************************************
*/
-
#include "yahooclientstream.h"
#include <QApplication> // for qdebug
@@ -27,7 +26,7 @@
#include <QTimer>
#include <QQueue>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include "bytestream.h"
#include "connector.h"
@@ -105,7 +104,7 @@ public:
ClientStream::ClientStream(Connector *conn, QObject *parent)
:Stream(parent), d(new Private())
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
d->mode = Client;
d->conn = conn;
@@ -126,7 +125,7 @@ ClientStream::~ClientStream()
void ClientStream::reset(bool all)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
d->reset();
d->noopTimer.stop();
@@ -150,7 +149,7 @@ void ClientStream::reset(bool all)
void ClientStream::connectToServer(const QString& server, bool auth)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
reset(true);
d->state = Connecting;
d->doAuth = auth;
@@ -161,7 +160,7 @@ void ClientStream::connectToServer(const QString& server, bool auth)
void ClientStream::continueAfterWarning()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
/* unneeded?
if(d->state == WaitVersion) {
d->state = Connecting;
@@ -234,7 +233,7 @@ void ClientStream::close()
bool ClientStream::transfersAvailable() const
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
return ( !d->in.isEmpty() );
}
@@ -248,7 +247,7 @@ Transfer* ClientStream::read()
void ClientStream::write( Transfer *request )
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
// pass to CoreProtocol for transformation into wire format
d->client.outgoingTransfer( request );
}
@@ -301,30 +300,30 @@ void ClientStream::cp_outgoingData( const QByteArray& outgoingBytes )
return;
// take formatted bytes from CoreProtocol and put them on the wire
- kDebug(YAHOO_RAW_DEBUG) << "[data size: " << outgoingBytes.size() << "]";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "[data size: " << outgoingBytes.size() << "]";
//cs_dump( outgoingBytes );
d->bs->write( outgoingBytes );
}
void ClientStream::cp_incomingData()
{
-// kDebug(YAHOO_RAW_DEBUG) ;
+// qCDebug(YAHOO_PROTOCOL_LOG) ;
Transfer * incoming = d->client.incomingTransfer();
if ( incoming )
{
-// kDebug(YAHOO_RAW_DEBUG) << " - got a new transfer";
+// qCDebug(YAHOO_PROTOCOL_LOG) << " - got a new transfer";
d->in.enqueue( incoming );
d->newTransfers = true;
emit doReadyRead();
}
else
- kDebug(YAHOO_RAW_DEBUG) << " - client signalled incomingData but none was available, state is: "<< d->client.state();
+ qCDebug(YAHOO_PROTOCOL_LOG) << " - client signalled incomingData but none was available, state is: "<< d->client.state();
}
/* Connector connected */
void ClientStream::cr_connected()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
d->bs = d->conn->stream();
connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed()));
@@ -343,7 +342,7 @@ void ClientStream::cr_connected()
void ClientStream::cr_error()
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
reset();
emit error(ErrConnection);
}
@@ -361,20 +360,20 @@ void ClientStream::bs_delayedCloseFinished()
void ClientStream::bs_error(int)
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
// TODO
}
void ClientStream::bs_readyRead()
{
-// kDebug(YAHOO_RAW_DEBUG) ;
+// qCDebug(YAHOO_PROTOCOL_LOG) ;
QByteArray a;
//qDebug( "size of storage for incoming data is %i bytes.", a.size() );
a = d->bs->read();
//QCString cs(a.data(), a.size()+1);
//qDebug("ClientStream: recv: %d [%s]\n", a.size(), cs.data());
- //kDebug(YAHOO_RAW_DEBUG) << " recv: " << a.size() <<" bytes";
+ //qCDebug(YAHOO_PROTOCOL_LOG) << " recv: " << a.size() <<" bytes";
//cs_dump( a );
d->client.addIncomingData(a);
@@ -382,7 +381,7 @@ void ClientStream::bs_readyRead()
void ClientStream::bs_bytesWritten(int bytes)
{
- kDebug(YAHOO_RAW_DEBUG) << " written: " << bytes <<" bytes";
+ qCDebug(YAHOO_PROTOCOL_LOG) << " written: " << bytes <<" bytes";
}
void ClientStream::srvProcessNext()
@@ -391,7 +390,7 @@ void ClientStream::srvProcessNext()
void ClientStream::doReadyRead()
{
-// kDebug(YAHOO_RAW_DEBUG) ;
+// qCDebug(YAHOO_PROTOCOL_LOG) ;
emit readyRead();
}
@@ -408,7 +407,6 @@ bool ClientStream::handleNeed()
return false;
}
-
void ClientStream::doNoop()
{
}
diff --git a/protocols/yahoo/libkyahoo/yahooconnector.cpp b/protocols/yahoo/libkyahoo/yahooconnector.cpp
index e9fdabc..d8e5c36 100644
--- a/protocols/yahoo/libkyahoo/yahooconnector.cpp
+++ b/protocols/yahoo/libkyahoo/yahooconnector.cpp
@@ -20,7 +20,7 @@
#include "yahooconnector.h"
#include <k3bufferedsocket.h>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <k3resolver.h>
#include "yahoobytestream.h"
@@ -29,7 +29,7 @@
KNetworkConnector::KNetworkConnector( QObject *parent )
: Connector( parent )
{
- kDebug( YAHOO_RAW_DEBUG ) << "New KNetwork connector.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "New KNetwork connector.";
mErrorCode = KNetwork::KSocketBase::NoError;
@@ -48,7 +48,7 @@ KNetworkConnector::~KNetworkConnector()
void KNetworkConnector::connectToServer( const QString &server )
{
Q_UNUSED( server );
- kDebug( YAHOO_RAW_DEBUG ) << "Initiating connection to " << mHost;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Initiating connection to " << mHost;
Q_ASSERT( !mHost.isNull() );
Q_ASSERT( mPort );
@@ -64,7 +64,7 @@ void KNetworkConnector::connectToServer( const QString &server )
void KNetworkConnector::slotConnected()
{
- kDebug( YAHOO_RAW_DEBUG ) << "We are connected.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "We are connected.";
// FIXME: setPeerAddress() is something different, find out correct usage later
//KInetSocketAddress inetAddress = mStreamSocket->address().asInet().makeIPv6 ();
@@ -75,7 +75,7 @@ void KNetworkConnector::slotConnected()
void KNetworkConnector::slotError( int code )
{
- kDebug( YAHOO_RAW_DEBUG ) << "Error detected: " << code;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Error detected: " << code;
mErrorCode = code;
emit error ();
@@ -88,24 +88,22 @@ int KNetworkConnector::errorCode()
ByteStream *KNetworkConnector::stream() const
{
- kDebug(YAHOO_RAW_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
return mByteStream;
}
void KNetworkConnector::done()
{
- kDebug ( YAHOO_RAW_DEBUG ) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
mByteStream->close ();
}
void KNetworkConnector::setOptHostPort( const QString &host, quint16 port )
{
- kDebug ( YAHOO_RAW_DEBUG ) << "Manually specifying host " << host << " and port " << port;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Manually specifying host " << host << " and port " << port;
mHost = host;
mPort = port;
}
-
-// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off;
diff --git a/protocols/yahoo/libkyahoo/yahooconnector.h b/protocols/yahoo/libkyahoo/yahooconnector.h
index 0ac5799..25652df 100644
--- a/protocols/yahoo/libkyahoo/yahooconnector.h
+++ b/protocols/yahoo/libkyahoo/yahooconnector.h
@@ -64,4 +64,3 @@ private:
#endif
-// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off;
diff --git a/protocols/yahoo/libkyahoo/ymsgprotocol.cpp b/protocols/yahoo/libkyahoo/ymsgprotocol.cpp
index 9ad4c23..6278048 100644
--- a/protocols/yahoo/libkyahoo/ymsgprotocol.cpp
+++ b/protocols/yahoo/libkyahoo/ymsgprotocol.cpp
@@ -23,7 +23,7 @@
#include <QObject>
#include <QStringList>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include "ymsgtransfer.h"
#include "yahootypes.h"
@@ -53,7 +53,7 @@ Transfer* YMSGProtocol::parse( const QByteArray & packet, uint& bytes )
/ 0 - 65535* |
+-------------------------------------------------+
*/
- kDebug(YAHOO_RAW_DEBUG) << packet;
+ qCDebug(YAHOO_PROTOCOL_LOG) << packet;
int pos = 0;
int len = 0;
@@ -75,11 +75,11 @@ Transfer* YMSGProtocol::parse( const QByteArray & packet, uint& bytes )
pos += 2;
version2 = yahoo_get16(packet.data() + pos);
pos += 2;
- kDebug(YAHOO_RAW_DEBUG) << " - parsed packet version " << version1 << " " << version2;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " - parsed packet version " << version1 << " " << version2;
len = yahoo_get16(packet.data() + pos);
pos += 2;
- kDebug(YAHOO_RAW_DEBUG) << " - parsed packet len " << len;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " - parsed packet len " << len;
servicenum = yahoo_get16(packet.data() + pos);
pos += 2;
@@ -88,220 +88,220 @@ Transfer* YMSGProtocol::parse( const QByteArray & packet, uint& bytes )
{
// TODO add remamining services
case (Yahoo::ServiceAuth) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceAuth " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceAuth " << servicenum;
service = Yahoo::ServiceAuth;
break;
case (Yahoo::ServiceAuthResp) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceAuthResp " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceAuthResp " << servicenum;
service = Yahoo::ServiceAuthResp;
break;
case (Yahoo::ServiceVerify) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceVerify " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceVerify " << servicenum;
service = Yahoo::ServiceVerify;
break;
case (Yahoo::ServiceList) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceList " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceList " << servicenum;
service = Yahoo::ServiceList;
break;
case (Yahoo::ServiceLogon) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceLogon " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceLogon " << servicenum;
service = Yahoo::ServiceLogon;
break;
case (Yahoo::ServicePing) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServicePing " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServicePing " << servicenum;
service = Yahoo::ServicePing;
break;
case (Yahoo::ServiceNewMail) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceNewMail " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceNewMail " << servicenum;
service = Yahoo::ServiceNewMail;
break;
case (Yahoo::ServiceLogoff) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceLogoff " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceLogoff " << servicenum;
service = Yahoo::ServiceLogoff;
break;
case (Yahoo::ServiceIsAway) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceIsAway " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceIsAway " << servicenum;
service = Yahoo::ServiceIsAway;
break;
case (Yahoo::ServiceIsBack) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceIsBack " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceIsBack " << servicenum;
service = Yahoo::ServiceIsBack;
break;
case (Yahoo::ServiceGameLogon) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceGameLogon " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceGameLogon " << servicenum;
service = Yahoo::ServiceGameLogon;
break;
case (Yahoo::ServiceGameLogoff) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceGameLogoff " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceGameLogoff " << servicenum;
service = Yahoo::ServiceGameLogoff;
break;
case (Yahoo::ServiceIdAct) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceIdAct " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceIdAct " << servicenum;
service = Yahoo::ServiceIdAct;
break;
case (Yahoo::ServiceIddeAct) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceIddeAct " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceIddeAct " << servicenum;
service = Yahoo::ServiceIddeAct;
break;
case (Yahoo::ServiceStatus) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceStatus " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceStatus " << servicenum;
service = Yahoo::ServiceStatus;
break;
case (Yahoo::ServiceMessage) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceMessage " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceMessage " << servicenum;
service = Yahoo::ServiceMessage;
break;
case (Yahoo::ServiceNotify) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceNotify " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceNotify " << servicenum;
service = Yahoo::ServiceNotify;
break;
case (Yahoo::ServiceBuddyAdd) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceBuddyAdd " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceBuddyAdd " << servicenum;
service = Yahoo::ServiceBuddyAdd;
break;
case (Yahoo::ServiceBuddyRemove) :
- kDebug(YAHOO_RAW_DEBUG) << "Parsed packet service - This means ServiceBuddyRemove " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Parsed packet service - This means ServiceBuddyRemove " << servicenum;
service = Yahoo::ServiceBuddyRemove;
break;
case (Yahoo::ServiceBuddyChangeGroup) :
- kDebug(YAHOO_RAW_DEBUG) << "Parsed packet service - This means ServiceBuddyChangeGroup " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Parsed packet service - This means ServiceBuddyChangeGroup " << servicenum;
service = Yahoo::ServiceBuddyChangeGroup;
break;
case (Yahoo::ServicePictureChecksum) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServicePictureChecksum " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServicePictureChecksum " << servicenum;
service = Yahoo::ServicePictureChecksum;
break;
case (Yahoo::ServicePictureStatus) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServicePictureStatus " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServicePictureStatus " << servicenum;
service = Yahoo::ServicePictureStatus;
break;
case (Yahoo::ServicePicture) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServicePicture " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServicePicture " << servicenum;
service = Yahoo::ServicePicture;
break;
case (Yahoo::ServiceStealthOnline) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceStealthOnline " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceStealthOnline " << servicenum;
service = Yahoo::ServiceStealthOnline;
break;
case (Yahoo::ServiceStealthOffline) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceStealthOffline " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceStealthOffline " << servicenum;
service = Yahoo::ServiceStealthOffline;
break;
case (Yahoo::ServicePictureUpload) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServicePictureUpload " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServicePictureUpload " << servicenum;
service = Yahoo::ServicePictureUpload;
break;
case (Yahoo::ServiceWebcam) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceWebcam " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceWebcam " << servicenum;
service = Yahoo::ServiceWebcam;
break;
case (Yahoo::ServiceConfInvite) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceConfInvite " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceConfInvite " << servicenum;
service = Yahoo::ServiceConfInvite;
break;
case (Yahoo::ServiceConfLogon) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceConfLogon " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceConfLogon " << servicenum;
service = Yahoo::ServiceConfLogon;
break;
case (Yahoo::ServiceConfDecline) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceConfDecline " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceConfDecline " << servicenum;
service = Yahoo::ServiceConfDecline;
break;
case (Yahoo::ServiceConfLogoff) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceConfLogoff " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceConfLogoff " << servicenum;
service = Yahoo::ServiceConfLogoff;
break;
case (Yahoo::ServiceConfAddInvite) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceConfAddInvite " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceConfAddInvite " << servicenum;
service = Yahoo::ServiceConfAddInvite;
break;
case (Yahoo::ServiceConfMsg) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceConfMsg " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceConfMsg " << servicenum;
service = Yahoo::ServiceConfMsg;
break;
case (Yahoo::ServiceAuthorization) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceAuthorization " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceAuthorization " << servicenum;
service = Yahoo::ServiceAuthorization;
break;
case (Yahoo::ServiceContactDetails) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceContactDetails " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceContactDetails " << servicenum;
service = Yahoo::ServiceContactDetails;
break;
case (Yahoo::ServiceFileTransfer) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceFileTransfer " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceFileTransfer " << servicenum;
service = Yahoo::ServiceFileTransfer;
break;
case (Yahoo::ServiceFileTransfer7) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceFileTransfer7 " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceFileTransfer7 " << servicenum;
service = Yahoo::ServiceFileTransfer7;
break;
case (Yahoo::ServiceFileTransfer7Info) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceFileTransfer7Info " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceFileTransfer7Info " << servicenum;
service = Yahoo::ServiceFileTransfer7Info;
break;
case (Yahoo::ServiceFileTransfer7Accept) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceFileTransfer7Accept " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceFileTransfer7Accept " << servicenum;
service = Yahoo::ServiceFileTransfer7Accept;
break;
case (Yahoo::ServicePeerToPeer) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServicePeerToPeer " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServicePeerToPeer " << servicenum;
service = Yahoo::ServicePeerToPeer;
break;
case (Yahoo::ServiceChatOnline) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceChatOnline " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceChatOnline " << servicenum;
service = Yahoo::ServiceChatOnline;
break;
case (Yahoo::ServiceChatGoto) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceChatGoto " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceChatGoto " << servicenum;
service = Yahoo::ServiceChatGoto;
break;
case (Yahoo::ServiceChatJoin) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceChatJoin " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceChatJoin " << servicenum;
service = Yahoo::ServiceChatJoin;
break;
case (Yahoo::ServiceChatleave) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceChatleave " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceChatleave " << servicenum;
service = Yahoo::ServiceChatleave;
break;
case (Yahoo::ServiceChatExit) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceChatExit " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceChatExit " << servicenum;
service = Yahoo::ServiceChatExit;
break;
case (Yahoo::ServiceChatLogout) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceChatLogout " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceChatLogout " << servicenum;
service = Yahoo::ServiceChatLogout;
break;
case (Yahoo::ServiceChatPing) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServicePeerToPeer " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServicePeerToPeer " << servicenum;
service = Yahoo::ServiceChatPing;
break;
case (Yahoo::ServiceChatLogon) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceChatLogon " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceChatLogon " << servicenum;
service = Yahoo::ServiceChatLogon;
break;
case (Yahoo::ServiceChatLogoff) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceChatLogoff " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceChatLogoff " << servicenum;
service = Yahoo::ServiceChatLogoff;
break;
case (Yahoo::ServiceChatMsg) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceChatMsg " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceChatMsg " << servicenum;
service = Yahoo::ServiceChatMsg;
break;
case (Yahoo::ServiceComment) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceComment " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceComment " << servicenum;
service = Yahoo::ServiceComment;
break;
case (Yahoo::ServiceBuddyStatus) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceBuddyStatus " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceBuddyStatus " << servicenum;
service = Yahoo::ServiceBuddyStatus;
break;
case (Yahoo::ServiceBuddyList) :
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceBuddyList " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceBuddyList " << servicenum;
service = Yahoo::ServiceBuddyList;
break;
case (Yahoo::ServiceAnimatedAudibleIcon) :
//added by michaelacole
- kDebug(YAHOO_RAW_DEBUG) << " Parsed packet service - This means ServiceAnimatedAudibleIcon " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed packet service - This means ServiceAnimatedAudibleIcon " << servicenum;
service = Yahoo::ServiceAnimatedAudibleIcon;
break;
/*
@@ -329,10 +329,9 @@ Transfer* YMSGProtocol::parse( const QByteArray & packet, uint& bytes )
ServicePictureUpdate = 0xc1,
ServiceVisibility = 0xc5, // YMSG13, key 13: 2 = invisible, 1 = visible
*/
-
default:
- kDebug(YAHOO_RAW_DEBUG) << "*************** Parsed packet service - This means an unknown service " << servicenum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "*************** Parsed packet service - This means an unknown service " << servicenum;
break;
}
@@ -365,15 +364,15 @@ Transfer* YMSGProtocol::parse( const QByteArray & packet, uint& bytes )
StatusOffline
StatusNotify*/
default:
- kDebug(YAHOO_RAW_DEBUG) << " - unknown status " << statusnum;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " - unknown status " << statusnum;
break;
}
sessionid = yahoo_get32(packet.data() + pos);
- kDebug(YAHOO_RAW_DEBUG) << " Parsed session id: " << sessionid;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Parsed session id: " << sessionid;
pos += 4;
- kDebug(YAHOO_RAW_DEBUG) << " Setting incoming transfer basic information.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Setting incoming transfer basic information.";
YMSGTransfer *t = new YMSGTransfer();
t->setService(service);
t->setId(sessionid);
@@ -388,13 +387,13 @@ Transfer* YMSGProtocol::parse( const QByteArray & packet, uint& bytes )
QString value = QString::fromUtf8( list[i+1].toAscii() );
pos += key.toUtf8().length() + value.toUtf8().length() + 4;
t->setParam( QString(key).toInt(), value.toUtf8() );
- kDebug(YAHOO_RAW_DEBUG) << k_funcinfo << "Key: " << key << " Value: " << value << endl;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Key: " << key << " Value: " << value << endl;
}
while( pos < packet.size() && packet.data()[pos] == '\x00' )
pos++;
-// kDebug(YAHOO_RAW_DEBUG) << " Returning transfer";
+// qCDebug(YAHOO_PROTOCOL_LOG) << " Returning transfer";
// tell them we have parsed offset bytes
bytes = pos;
diff --git a/protocols/yahoo/libkyahoo/ymsgprotocol.h b/protocols/yahoo/libkyahoo/ymsgprotocol.h
index 2530e59..0ee05b8 100644
--- a/protocols/yahoo/libkyahoo/ymsgprotocol.h
+++ b/protocols/yahoo/libkyahoo/ymsgprotocol.h
@@ -21,12 +21,10 @@
#include "inputprotocolbase.h"
-
class YMSGProtocol : public InputProtocolBase
{
Q_OBJECT
public:
-
YMSGProtocol( QObject *parent = 0 );
~YMSGProtocol();
diff --git a/protocols/yahoo/libkyahoo/ymsgtransfer.cpp b/protocols/yahoo/libkyahoo/ymsgtransfer.cpp
index 45d89e0..f4fdb17 100644
--- a/protocols/yahoo/libkyahoo/ymsgtransfer.cpp
+++ b/protocols/yahoo/libkyahoo/ymsgtransfer.cpp
@@ -19,18 +19,17 @@
*/
#include "ymsgtransfer.h"
+#include "yahoo_protocol_debug.h"
#include <string>
#include "yahootypes.h"
-#include "kdebug.h"
#include <qdatastream.h>
#include <qmap.h>
#include <qstring.h>
#include <qstringlist.h>
-
using namespace Yahoo;
class YMSGTransferPrivate
@@ -143,7 +142,6 @@ int YMSGTransfer::paramCount( int index ) const
return cnt;
}
-
QByteArray YMSGTransfer::nthParam( int index, int occurrence ) const
{
int cnt = 0;
@@ -202,7 +200,6 @@ int YMSGTransfer::length() const
return len;
}
-
QByteArray YMSGTransfer::serialize() const
{
/*
@@ -238,13 +235,13 @@ QByteArray YMSGTransfer::serialize() const
stream << (qint32)d->id;
for (ParamList::ConstIterator it = d->data.constBegin(); it != d->data.constEnd(); ++it)
{
- kDebug(YAHOO_RAW_DEBUG) << " Serializing key " << (*it).first << " value " << (*it).second;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " Serializing key " << (*it).first << " value " << (*it).second;
stream.writeRawData ( QString::number( (*it).first ).toLocal8Bit(), QString::number( (*it).first ).length() );
stream << (qint8)0xc0 << (qint8)0x80;
stream.writeRawData( (*it).second, (*it).second.length() );
stream << (qint8)0xc0 << (qint8)0x80;
}
- kDebug(YAHOO_RAW_DEBUG) << " pos=" << pos << " (packet size)" << buffer;
+ qCDebug(YAHOO_PROTOCOL_LOG) << " pos=" << pos << " (packet size)" << buffer;
return buffer;
}
diff --git a/protocols/yahoo/libkyahoo/ymsgtransfer.h b/protocols/yahoo/libkyahoo/ymsgtransfer.h
index 5ab69e9..3c55db0 100644
--- a/protocols/yahoo/libkyahoo/ymsgtransfer.h
+++ b/protocols/yahoo/libkyahoo/ymsgtransfer.h
@@ -47,7 +47,6 @@ public:
YMSGTransfer();
~YMSGTransfer();
-
TransferType type() Q_DECL_OVERRIDE;
//! Get the validity of the transfer object
@@ -60,14 +59,12 @@ public:
void setId(unsigned int id);
int packetLength() const;
void setPacketLength(int len);
-
ParamList paramList() const;
QByteArray firstParam( int index ) const;
QByteArray nthParam( int index, int occurrence ) const;
QByteArray nthParamSeparated( int index, int occurrence, int separator ) const;
int paramCount( int index ) const;
-
void setParam(int index, const QByteArray &data);
void setParam(int index, int data);
diff --git a/protocols/yahoo/ui/yahoochatselectordialog.cpp b/protocols/yahoo/ui/yahoochatselectordialog.cpp
index bc71631..ca0e676 100644
--- a/protocols/yahoo/ui/yahoochatselectordialog.cpp
+++ b/protocols/yahoo/ui/yahoochatselectordialog.cpp
@@ -20,7 +20,7 @@
#include <QTreeWidgetItem>
#include <QHeaderView>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include "ui_yahoochatselectorwidgetbase.h"
@@ -56,7 +56,7 @@ YahooChatSelectorDialog::~YahooChatSelectorDialog()
void YahooChatSelectorDialog::slotCategorySelectionChanged( QTreeWidgetItem *newItem, QTreeWidgetItem *oldItem )
{
Q_UNUSED( oldItem );
- kDebug(YAHOO_RAW_DEBUG) << "Selected Category: " << newItem->text( 0 ) << "(" << newItem->data( 0, Qt::UserRole ).toInt() << ")";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Selected Category: " << newItem->text( 0 ) << "(" << newItem->data( 0, Qt::UserRole ).toInt() << ")";
mUi->treeRooms->clear();
@@ -80,7 +80,7 @@ void YahooChatSelectorDialog::slotChatRoomDoubleClicked( QTreeWidgetItem * item,
void YahooChatSelectorDialog::slotSetChatCategories( const QDomDocument &doc )
{
- kDebug(YAHOO_RAW_DEBUG) << doc.toString();
+ qCDebug(YAHOO_PROTOCOL_LOG) << doc.toString();
mUi->treeCategories->takeTopLevelItem(0);
QTreeWidgetItem *root = new QTreeWidgetItem( mUi->treeCategories );
@@ -117,7 +117,7 @@ void YahooChatSelectorDialog::parseChatCategory( const QDomNode &node, QTreeWidg
void YahooChatSelectorDialog::slotSetChatRooms( const Yahoo::ChatCategory &category, const QDomDocument &doc )
{
- kDebug(YAHOO_RAW_DEBUG) << doc.toString();
+ qCDebug(YAHOO_PROTOCOL_LOG) << doc.toString();
Q_UNUSED( category );
mUi->treeRooms->clear();
@@ -183,4 +183,3 @@ Yahoo::ChatRoom YahooChatSelectorDialog::selectedRoom()
return room;
}
-
diff --git a/protocols/yahoo/ui/yahoochatselectordialog.h b/protocols/yahoo/ui/yahoochatselectordialog.h
index d46ba65..8d21bfd 100644
--- a/protocols/yahoo/ui/yahoochatselectordialog.h
+++ b/protocols/yahoo/ui/yahoochatselectordialog.h
@@ -14,7 +14,6 @@
*************************************************************************
*/
-
#ifndef YAHOOCHATSELECTORDIALOG_H
#define YAHOOCHATSELECTORDIALOG_H
diff --git a/protocols/yahoo/ui/yahooinvitelistimpl.cpp b/protocols/yahoo/ui/yahooinvitelistimpl.cpp
index 59a21e3..c94de56 100644
--- a/protocols/yahoo/ui/yahooinvitelistimpl.cpp
+++ b/protocols/yahoo/ui/yahooinvitelistimpl.cpp
@@ -17,7 +17,7 @@
#include "yahooinvitelistimpl.h"
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <QListWidget>
#include <QListWidgetItem>
@@ -51,14 +51,14 @@ YahooInviteListImpl::~YahooInviteListImpl()
void YahooInviteListImpl::setRoom( const QString &room )
{
- kDebug(14180) << "Setting roomname to: " << room;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Setting roomname to: " << room;
m_room = room;
}
void YahooInviteListImpl::fillFriendList( const QStringList &buddies )
{
- kDebug(14180) << "Adding friends: " << buddies;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Adding friends: " << buddies;
m_buddyList = buddies;
updateListBoxes();
@@ -66,7 +66,7 @@ void YahooInviteListImpl::fillFriendList( const QStringList &buddies )
void YahooInviteListImpl::updateListBoxes()
{
- kDebug(14180) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
m_inviteWidget->listFriends->clear();
m_inviteWidget->listInvited->clear();
@@ -78,7 +78,7 @@ void YahooInviteListImpl::updateListBoxes()
void YahooInviteListImpl::addInvitees( const QStringList &invitees )
{
- kDebug(14180) << "Adding invitees: " << invitees;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Adding invitees: " << invitees;
for( QStringList::const_iterator it = invitees.begin(); it != invitees.end(); ++it )
{
@@ -93,7 +93,7 @@ void YahooInviteListImpl::addInvitees( const QStringList &invitees )
void YahooInviteListImpl::removeInvitees( const QStringList &invitees )
{
- kDebug(14180) << "Removing invitees: " << invitees;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Removing invitees: " << invitees;
for( QStringList::const_iterator it = invitees.begin(); it != invitees.end(); ++it )
{
@@ -113,25 +113,23 @@ void YahooInviteListImpl::addParticipant( const QString &p )
void YahooInviteListImpl::slotInvite()
{
- kDebug(14180) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( m_inviteeList.count() )
emit readyToInvite( m_room, m_inviteeList,m_participants, m_inviteWidget->editMessage->text() );
accept();
}
-
void YahooInviteListImpl::slotCancel()
{
- kDebug(14180) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
reject();
}
-
void YahooInviteListImpl::slotAddCustom()
{
- kDebug(14180) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString userId;
userId = m_inviteWidget->editBuddyAdd->text();
@@ -142,10 +140,9 @@ void YahooInviteListImpl::slotAddCustom()
m_inviteWidget->editBuddyAdd->clear();
}
-
void YahooInviteListImpl::slotRemove()
{
- kDebug(14180) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QStringList buddies;
QList<QListWidgetItem *> items = m_inviteWidget->listInvited->selectedItems();
@@ -156,10 +153,9 @@ void YahooInviteListImpl::slotRemove()
removeInvitees( buddies );
}
-
void YahooInviteListImpl::slotAdd()
{
- kDebug(14180) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QStringList buddies;
QList<QListWidgetItem *> items = m_inviteWidget->listFriends->selectedItems();
@@ -170,5 +166,3 @@ void YahooInviteListImpl::slotAdd()
addInvitees( buddies );
}
-
-
diff --git a/protocols/yahoo/ui/yahooinvitelistimpl.h b/protocols/yahoo/ui/yahooinvitelistimpl.h
index 00e7fb3..12acd6c 100644
--- a/protocols/yahoo/ui/yahooinvitelistimpl.h
+++ b/protocols/yahoo/ui/yahooinvitelistimpl.h
@@ -22,7 +22,6 @@
#include <kdialog.h>
#include "ui_yahooinvitelistbase.h"
-
class YahooInviteListImpl : public KDialog
{
Q_OBJECT
diff --git a/protocols/yahoo/ui/yahoouserinfodialog.cpp b/protocols/yahoo/ui/yahoouserinfodialog.cpp
index 5a493f8..b2b0da9 100644
--- a/protocols/yahoo/ui/yahoouserinfodialog.cpp
+++ b/protocols/yahoo/ui/yahoouserinfodialog.cpp
@@ -28,7 +28,7 @@
#include <qtextcodec.h>
#include <kdatewidget.h>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <kglobal.h>
#include <QIcon>
#include <klocale.h>
@@ -50,7 +50,7 @@ YahooUserInfoDialog::YahooUserInfoDialog( YahooContact *c, QWidget * parent )
//KF5 FIXME setButtonGuiItem( KDialog::User2, KGuiItem( i18n("Merge with existing entry") ) );
//KF5 FIXME showButton( KDialog::User2, false );
- kDebug(14180) << "Creating new yahoo user info widget";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Creating new yahoo user info widget";
QWidget *genInfo = new QWidget(this);
m_genInfoWidget = new Ui::YahooGeneralInfoWidget;
@@ -269,6 +269,3 @@ void YahooUserInfoDialog::setData( const YABEntry &yab )
m_otherInfoWidget->note4Edit->setText( yab.additional4 );
}
-
-//kate: indent-mode csands; tab-width 4; space-indent off; replace-tabs off;
-
diff --git a/protocols/yahoo/ui/yahoouserinfodialog.h b/protocols/yahoo/ui/yahoouserinfodialog.h
index 3acbfb6..b4c7199 100644
--- a/protocols/yahoo/ui/yahoouserinfodialog.h
+++ b/protocols/yahoo/ui/yahoouserinfodialog.h
@@ -56,4 +56,3 @@ private:
#endif
-//kate: indent-mode csands; tab-width 4; space-indent off; replace-tabs off;
diff --git a/protocols/yahoo/ui/yahoowebcamdialog.cpp b/protocols/yahoo/ui/yahoowebcamdialog.cpp
index 30579f8..00f5ae0 100644
--- a/protocols/yahoo/ui/yahoowebcamdialog.cpp
+++ b/protocols/yahoo/ui/yahoowebcamdialog.cpp
@@ -22,7 +22,7 @@
#include <QLayout>
#include <QVBoxLayout>
#include <QPixmap>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <klocale.h>
#include <webcamwidget.h>
@@ -77,7 +77,7 @@ void YahooWebcamDialog::webcamPaused()
void YahooWebcamDialog::webcamClosed( int reason )
{
- kDebug(14180) << "webcam closed with reason?? " << reason;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "webcam closed with reason?? " << reason;
QString closeReason;
switch ( reason )
{
@@ -115,5 +115,3 @@ void YahooWebcamDialog::setViewer( const QStringList &viewer )
m_Viewer->show();
}
-// kate: indent-mode csands; tab-width 4;
-
diff --git a/protocols/yahoo/ui/yahoowebcamdialog.h b/protocols/yahoo/ui/yahoowebcamdialog.h
index 1f05631..f20d6c2 100644
--- a/protocols/yahoo/ui/yahoowebcamdialog.h
+++ b/protocols/yahoo/ui/yahoowebcamdialog.h
@@ -17,10 +17,8 @@
#ifndef YAHOOWEBCAMDIALOG_H_
#define YAHOOWEBCAMDIALOG_H_
-
#include <kdialog.h>
-
class QPixmap;
class QLabel;
class QWidget;
diff --git a/protocols/yahoo/yahooaccount.cpp b/protocols/yahoo/yahooaccount.cpp
index e3bc29f..bca865a 100644
--- a/protocols/yahoo/yahooaccount.cpp
+++ b/protocols/yahoo/yahooaccount.cpp
@@ -38,7 +38,7 @@
// KDE
#include <klocale.h>
#include <kconfig.h>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <QAction>
#include <KActionMenu>
#include <QMenu>
@@ -145,7 +145,7 @@ void YahooAccount::setPort( int port )
void YahooAccount::slotGoStatus( int status, const QString &awayMessage)
{
- kDebug(YAHOO_GEN_DEBUG) << "GoStatus: " << status << " msg: " << awayMessage;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "GoStatus: " << status << " msg: " << awayMessage;
if( !isConnected() )
{
connect( m_protocol->statusFromYahoo( status ) );
@@ -199,7 +199,7 @@ QColor YahooAccount::getMsgColor(const QString& msg)
/* Yahoo sends a message either with color or without color
* so we have to use this really hacky method to get colors
*/
- //kDebug(YAHOO_GEN_DEBUG) << "msg is " << msg;
+ //qCDebug(YAHOO_PROTOCOL_LOG) << "msg is " << msg;
//Please note that some of the colors are hard-coded to
//match the yahoo colors
if ( msg.indexOf(QLatin1String("\033[38m")) != -1 )
@@ -220,7 +220,7 @@ QColor YahooAccount::getMsgColor(const QString& msg)
return QColor("#FFD8D8");
if ( msg.indexOf(QLatin1String("\033[#")) != -1 )
{
- kDebug(YAHOO_GEN_DEBUG) << "Custom color is " << msg.mid(msg.indexOf(QLatin1String("\033[#"))+2,7);
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Custom color is " << msg.mid(msg.indexOf(QLatin1String("\033[#"))+2,7);
return QColor(msg.mid(msg.indexOf(QLatin1String("\033[#"))+2,7));
}
@@ -524,7 +524,7 @@ void YahooAccount::initConnectionSignals( enum SignalConnectionType sct )
void YahooAccount::connectWithPassword( const QString &passwd )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if ( isAway() )
{
slotGoOnline();
@@ -534,7 +534,7 @@ void YahooAccount::connectWithPassword( const QString &passwd )
if ( isConnected() ||
myself()->onlineStatus() == m_protocol->Connecting )
{
- kDebug(YAHOO_GEN_DEBUG) << "Yahoo plugin: Ignoring connect request (already connected).";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Yahoo plugin: Ignoring connect request (already connected).";
return;
}
@@ -552,7 +552,7 @@ void YahooAccount::connectWithPassword( const QString &passwd )
//YahooSessionManager::manager()->setPager( server, port );
//m_session = YahooSessionManager::manager()->createSession( accountId(), passwd );
- kDebug(YAHOO_GEN_DEBUG) << "Attempting to connect to Yahoo on <" << server << ":"
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Attempting to connect to Yahoo on <" << server << ":"
<< port << ">. user <" << accountId() << ">" << endl;
static_cast<YahooContact *>( myself() )->setOnlineStatus( m_protocol->Connecting );
m_session->setStatusOnConnect( Yahoo::Status( initialStatus().internalStatus() ) );
@@ -561,12 +561,12 @@ void YahooAccount::connectWithPassword( const QString &passwd )
void YahooAccount::disconnect()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
m_currentMailCount = 0;
if ( isConnected() )
{
- kDebug(YAHOO_GEN_DEBUG) << "Attempting to disconnect from Yahoo server ";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Attempting to disconnect from Yahoo server ";
disconnected( Manual );
m_session->close();
@@ -580,7 +580,7 @@ void YahooAccount::disconnect()
}
else
{ //make sure we set everybody else offline explicitly, just for cleanup
- kDebug(YAHOO_GEN_DEBUG) << "Cancelling active login attempts (not fully connected).";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Cancelling active login attempts (not fully connected).";
m_session->cancelConnect();
QHash<QString,Kopete::Contact*>::ConstIterator it, itEnd = contacts().constEnd();
@@ -597,14 +597,14 @@ void YahooAccount::disconnect()
void YahooAccount::verifyAccount( const QString &word )
{
- kDebug(YAHOO_GEN_DEBUG) << "Word: s" << word;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Word: s" << word;
m_session->setVerificationWord( word );
disconnected( BadPassword );
}
void YahooAccount::setAway(bool status, const QString &awayMessage)
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( awayMessage.isEmpty() )
slotGoStatus( status ? 2 : 0 );
@@ -614,12 +614,12 @@ void YahooAccount::setAway(bool status, const QString &awayMessage)
void YahooAccount::slotConnected()
{
- kDebug(YAHOO_GEN_DEBUG) << "Moved to slotLoginResponse for the moment";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Moved to slotLoginResponse for the moment";
}
void YahooAccount::slotGoOnline()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( !isConnected() )
connect( m_protocol->Online );
else
@@ -636,7 +636,7 @@ void YahooAccount::slotGoOffline()
void YahooAccount::fillActionMenu( KActionMenu *actionMenu )
{
-// kDebug(YAHOO_GEN_DEBUG) ;
+// qCDebug(YAHOO_PROTOCOL_LOG) ;
Kopete::Account::fillActionMenu( actionMenu );
@@ -654,7 +654,7 @@ YahooContact *YahooAccount::contact( const QString &id )
bool YahooAccount::createContact(const QString &contactId, Kopete::MetaContact *parentContact )
{
-// kDebug(YAHOO_GEN_DEBUG) << " contactId: " << contactId;
+// qCDebug(YAHOO_PROTOCOL_LOG) << " contactId: " << contactId;
if(!contact(contactId))
{
@@ -667,7 +667,7 @@ bool YahooAccount::createContact(const QString &contactId, Kopete::MetaContact *
return newContact != 0;
}
else
- kDebug(YAHOO_GEN_DEBUG) << "Contact already exists";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Contact already exists";
return false;
}
@@ -706,7 +706,7 @@ void YahooAccount::setupActions( bool connected )
void YahooAccount::slotLoginResponse( int succ , const QString &url )
{
- kDebug(YAHOO_GEN_DEBUG) << succ << ", " << url << ")]";
+ qCDebug(YAHOO_PROTOCOL_LOG) << succ << ", " << url << ")]";
QString errorMsg;
setupActions( succ == Yahoo::LoginOk );
if ( succ == Yahoo::LoginOk || (succ == Yahoo::LoginDupl && m_lastDisconnectCode == 2) )
@@ -720,7 +720,6 @@ void YahooAccount::slotLoginResponse( int succ , const QString &url )
static_cast<YahooContact *>( myself() )->setOnlineStatus( m_protocol->Online );
}
-
setBuddyIcon( myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString() );
m_session->getYABEntries( m_YABLastMerge, m_YABLastRemoteRevision );
IDs.clear();
@@ -783,7 +782,7 @@ void YahooAccount::slotLoginResponse( int succ , const QString &url )
void YahooAccount::slotDisconnected()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
initConnectionSignals( DeleteConnections );
setupActions( false );
if( !isConnected() )
@@ -802,7 +801,7 @@ void YahooAccount::slotDisconnected()
void YahooAccount::slotLoginFailed()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
initConnectionSignals( DeleteConnections );
static_cast<YahooContact *>( myself() )->setOnlineStatus( m_protocol->Offline );
disconnected( Manual ); // don't reconnect
@@ -831,55 +830,55 @@ void YahooAccount::slotError( int level )
void YahooAccount::slotGotBuddy( const QString &userid, const QString &alias, const QString &group )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
IDs[userid] = QPair<QString, QString>(group, alias);
// Serverside -> local
if ( !contact( userid ) )
{
- kDebug(YAHOO_GEN_DEBUG) << "SS Contact " << userid << " is not in the contact list. Adding...";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "SS Contact " << userid << " is not in the contact list. Adding...";
Kopete::Group *g=Kopete::ContactList::self()->findGroup(group);
addContact(userid, alias.isEmpty() ? userid : alias, g, Kopete::Account::ChangeKABC);
}
- kDebug(YAHOO_GEN_DEBUG) << IDs;
+ qCDebug(YAHOO_PROTOCOL_LOG) << IDs;
}
void YahooAccount::slotBuddyAddResult( const QString &userid, const QString &group, bool success )
{
- kDebug(YAHOO_GEN_DEBUG) << success;
+ qCDebug(YAHOO_PROTOCOL_LOG) << success;
if(success)
IDs[userid] = QPair<QString, QString>(group, QString());
- kDebug(YAHOO_GEN_DEBUG) << IDs;
+ qCDebug(YAHOO_PROTOCOL_LOG) << IDs;
}
void YahooAccount::slotBuddyRemoveResult( const QString &userid, const QString & /*group*/, bool /*success*/ )
{
- kDebug(YAHOO_GEN_DEBUG);
+ qCDebug(YAHOO_PROTOCOL_LOG);
// Ignore success here, the only reason this will fail is because the
// contact isn't on the server's list, so we shouldn't have them in our
// list either.
IDs.remove(userid);
- kDebug(YAHOO_GEN_DEBUG) << IDs;
+ qCDebug(YAHOO_PROTOCOL_LOG) << IDs;
}
void YahooAccount::slotBuddyChangeGroupResult(const QString &userid, const QString &group, bool success)
{
- kDebug(YAHOO_GEN_DEBUG);
+ qCDebug(YAHOO_PROTOCOL_LOG);
if(success)
IDs[userid] = QPair<QString, QString>(group, QString());
- kDebug(YAHOO_GEN_DEBUG) << IDs;
+ qCDebug(YAHOO_PROTOCOL_LOG) << IDs;
}
void YahooAccount::slotAuthorizationAccepted( const QString &who )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if ( isBusy() )
return;
@@ -895,7 +894,7 @@ void YahooAccount::slotAuthorizationAccepted( const QString &who )
void YahooAccount::slotAuthorizationRejected( const QString &who, const QString &msg )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if ( isBusy() )
return;
@@ -908,7 +907,7 @@ void YahooAccount::slotAuthorizationRejected( const QString &who, const QString
void YahooAccount::slotgotAuthorizationRequest( const QString &user, const QString &msg, const QString &name )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
Q_UNUSED( msg );
Q_UNUSED( name );
YahooContact *kc = contact( user );
@@ -951,17 +950,17 @@ void YahooAccount::slotAddedInfoEventActionActivated( uint actionId )
void YahooAccount::slotGotIgnore( const QStringList & /* igns */ )
{
- //kDebug(YAHOO_GEN_DEBUG) ;
+ //qCDebug(YAHOO_PROTOCOL_LOG) ;
}
void YahooAccount::slotGotIdentities( const QStringList & /* ids */ )
{
- //kDebug(YAHOO_GEN_DEBUG) ;
+ //qCDebug(YAHOO_PROTOCOL_LOG) ;
}
void YahooAccount::slotStatusChanged( const QString &who, int stat, const QString &msg, int away, int idle, int pictureChecksum )
{
- kDebug(YAHOO_GEN_DEBUG) << who << " status: " << stat << " msg: " << msg << " away: " << away << " idle: " << idle;
+ qCDebug(YAHOO_PROTOCOL_LOG) << who << " status: " << stat << " msg: " << msg << " away: " << away << " idle: " << idle;
YahooContact *kc = contact( who );
if( contact( who ) == myself() )
@@ -994,11 +993,11 @@ void YahooAccount::slotStatusChanged( const QString &who, int stat, const QStrin
void YahooAccount::slotStealthStatusChanged( const QString &who, Yahoo::StealthStatus /*state*/ )
{
- //kDebug(YAHOO_GEN_DEBUG) << "Stealth Status of " << who << "changed to " << state;
+ //qCDebug(YAHOO_PROTOCOL_LOG) << "Stealth Status of " << who << "changed to " << state;
YahooContact* kc = contact( who );
if ( kc == NULL ) {
- kDebug(YAHOO_GEN_DEBUG) << "contact " << who << " doesn't exist.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "contact " << who << " doesn't exist.";
return;
}
kc->updateStealthed();
@@ -1011,7 +1010,7 @@ QString YahooAccount::prepareIncomingMessage( const QString &messageText )
int pos = 0;
newMsgText = stripMsgColorCodes( newMsgText );
- kDebug(YAHOO_GEN_DEBUG) << "Message after stripping color codes '" << newMsgText << "'";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Message after stripping color codes '" << newMsgText << "'";
newMsgText.replace( QLatin1String( "&" ), QLatin1String( "&amp;" ) );
@@ -1092,13 +1091,13 @@ void YahooAccount::slotGotIm( const QString &who, const QString &msg, long tm, i
if( !contact( who ) )
{
- kDebug(YAHOO_GEN_DEBUG) << "Adding contact " << who;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Adding contact " << who;
addContact( who,who, 0L, Kopete::Account::Temporary );
}
//Parse the message for it's properties
- kDebug(YAHOO_GEN_DEBUG) << "Original message is '" << msg << "'";
- //kDebug(YAHOO_GEN_DEBUG) << "Message color is " << getMsgColor(msg);
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Original message is '" << msg << "'";
+ //qCDebug(YAHOO_PROTOCOL_LOG) << "Message color is " << getMsgColor(msg);
QColor fgColor = getMsgColor( msg );
if (tm == 0)
@@ -1108,7 +1107,7 @@ void YahooAccount::slotGotIm( const QString &who, const QString &msg, long tm, i
QString newMsgText = prepareIncomingMessage( msg );
- kDebug(YAHOO_GEN_DEBUG) << "Message after fixing font tags '" << newMsgText << "'";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Message after fixing font tags '" << newMsgText << "'";
Kopete::ChatSession *mm = contact(who)->manager(Kopete::Contact::CanCreate);
@@ -1134,7 +1133,7 @@ void YahooAccount::slotGotBuzz( const QString &who, long tm )
if( !contact( who ) )
{
- kDebug(YAHOO_GEN_DEBUG) << "Adding contact " << who;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Adding contact " << who;
addContact( who,who, 0L, Kopete::Account::Temporary );
}
@@ -1164,8 +1163,8 @@ void YahooAccount::slotGotBuzz( const QString &who, long tm )
void YahooAccount::slotGotConfInvite( const QString & who, const QString & room, const QString &msg, const QStringList &members )
{
- kDebug(YAHOO_GEN_DEBUG) << who << " has invited you to join the conference \"" << room << "\" : " << msg;
- kDebug(YAHOO_GEN_DEBUG) << "Members: " << members;
+ qCDebug(YAHOO_PROTOCOL_LOG) << who << " has invited you to join the conference \"" << room << "\" : " << msg;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Members: " << members;
if( !m_pendingConfInvites.contains( room ) ) // We have to keep track of the invites as the server will send the same invite twice if it gets canceled by the host
m_pendingConfInvites.push_back( room );
@@ -1203,7 +1202,7 @@ void YahooAccount::slotGotConfInvite( const QString & who, const QString & room,
YahooContact * c = contact( *it );
if ( !c )
{
- kDebug(YAHOO_GEN_DEBUG) << "Adding contact " << *it << " to conference.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Adding contact " << *it << " to conference.";
addContact( *it,*it, 0L, Kopete::Account::Temporary );
c = contact( *it );
}
@@ -1227,7 +1226,7 @@ void YahooAccount::prepareConference( const QString &who )
room += (c > 25) ? c + 71 : c + 65;
}
room = QStringLiteral("%1-%2--").arg(accountId()).arg(room);
- kDebug(YAHOO_GEN_DEBUG) << "The generated roomname is: " << room;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "The generated roomname is: " << room;
QStringList buddies;
QHash<QString,Kopete::Contact*>::ConstIterator it, itEnd = contacts().constEnd();
@@ -1248,7 +1247,7 @@ void YahooAccount::prepareConference( const QString &who )
void YahooAccount::slotInviteConference( const QString &room, const QStringList &members, const QStringList &participants, const QString &msg )
{
Q_UNUSED( participants );
-kDebug(YAHOO_GEN_DEBUG) << "Inviting " << members << " to the conference " << room << ". Message: " << msg;
+qCDebug(YAHOO_PROTOCOL_LOG) << "Inviting " << members << " to the conference " << room << ". Message: " << msg;
m_session->inviteConference( room, members, msg );
Kopete::ContactPtrList others;
@@ -1263,17 +1262,17 @@ kDebug(YAHOO_GEN_DEBUG) << "Inviting " << members << " to the conference " << ro
void YahooAccount::slotAddInviteConference( const QString &room, const QStringList &who, const QStringList &members, const QString &msg )
{
- kDebug(YAHOO_GEN_DEBUG) << "Inviting " << who << " to the conference " << room << ". Message: " << msg;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Inviting " << who << " to the conference " << room << ". Message: " << msg;
m_session->addInviteConference( room, who, members, msg );
}
void YahooAccount::slotConfUserDecline( const QString &who, const QString &room, const QString &msg)
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( !m_conferences.contains( room ) )
{
- kDebug(YAHOO_GEN_DEBUG) << "Error. No chatsession for this conference found.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Error. No chatsession for this conference found.";
return;
}
@@ -1289,10 +1288,10 @@ void YahooAccount::slotConfUserDecline( const QString &who, const QString &room,
void YahooAccount::slotConfUserJoin( const QString &who, const QString &room )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( !m_conferences.contains( room ) )
{
- kDebug(YAHOO_GEN_DEBUG) << "Error. No chatsession for this conference found.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Error. No chatsession for this conference found.";
return;
}
@@ -1306,10 +1305,10 @@ void YahooAccount::slotConfUserJoin( const QString &who, const QString &room )
void YahooAccount::slotConfUserLeave( const QString & who, const QString &room )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( !m_conferences.contains( room ) )
{
- kDebug(YAHOO_GEN_DEBUG) << "Error. No chatsession for this conference found.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Error. No chatsession for this conference found.";
return;
}
@@ -1323,7 +1322,7 @@ void YahooAccount::slotConfUserLeave( const QString & who, const QString &room )
void YahooAccount::slotConfLeave( YahooConferenceChatSession *s )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( !s )
return;
QStringList members;
@@ -1331,7 +1330,7 @@ void YahooAccount::slotConfLeave( YahooConferenceChatSession *s )
{
if( (*it) == myself() )
continue;
- kDebug(YAHOO_GEN_DEBUG) << "Member: " << (*it)->contactId();
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Member: " << (*it)->contactId();
members.append( (*it)->contactId() );
}
m_session->leaveConference( s->room(), members );
@@ -1340,11 +1339,11 @@ void YahooAccount::slotConfLeave( YahooConferenceChatSession *s )
void YahooAccount::slotConfMessage( const QString &who, const QString &room, const QString &msg )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( !m_conferences.contains( room ) )
{
- kDebug(YAHOO_GEN_DEBUG) << "Error. No chatsession for this conference found.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Error. No chatsession for this conference found.";
return;
}
@@ -1356,17 +1355,17 @@ void YahooAccount::slotConfMessage( const QString &who, const QString &room, con
if( !contact( who ) )
{
- kDebug(YAHOO_GEN_DEBUG) << "Adding contact " << who;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Adding contact " << who;
addContact( who,who, 0L, Kopete::Account::Temporary );
}
- kDebug(YAHOO_GEN_DEBUG) << "Original message is '" << msg << "'";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Original message is '" << msg << "'";
QColor fgColor = getMsgColor( msg );
msgDT.setTime_t(time(0L));
QString newMsgText = prepareIncomingMessage( msg );
- kDebug(YAHOO_GEN_DEBUG) << "Message after fixing font tags '" << newMsgText << "'";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Message after fixing font tags '" << newMsgText << "'";
session->receivedTypingMsg(contact(who), false);
justMe.append(myself());
@@ -1382,13 +1381,13 @@ void YahooAccount::slotConfMessage( const QString &who, const QString &room, con
void YahooAccount::sendConfMessage( YahooConferenceChatSession *s, const Kopete::Message &message )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QStringList members;
for( Kopete::ContactPtrList::ConstIterator it = s->members().constBegin(); it != s->members().constEnd(); ++it )
{
if( (*it) == myself() )
continue;
- kDebug(YAHOO_GEN_DEBUG) << "Member: " << (*it)->contactId();
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Member: " << (*it)->contactId();
members.append( (*it)->contactId() );
}
m_session->sendConferenceMessage( s->room(), members, YahooContact::prepareMessage( message.escapedBody() ) );
@@ -1398,13 +1397,13 @@ void YahooAccount::slotGotYABRevision( long rev, bool merged )
{
if( merged )
{
- kDebug(YAHOO_GEN_DEBUG) << "Merge Revision received: " << rev;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Merge Revision received: " << rev;
configGroup()->writeEntry( "YABLastMerge", (qlonglong)rev );
m_YABLastMerge = rev;
}
else
{
- kDebug(YAHOO_GEN_DEBUG) << "Remote Revision received: " << rev;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Remote Revision received: " << rev;
configGroup()->writeEntry( "YABLastRemoteRevision", (qlonglong)rev );
m_YABLastRemoteRevision = rev;
}
@@ -1415,12 +1414,12 @@ void YahooAccount::slotGotYABEntry( YABEntry *entry )
YahooContact* kc = contact( entry->yahooId );
if( !kc )
{
- kDebug(YAHOO_GEN_DEBUG) << "YAB entry received for a contact not on our buddylist: " << entry->yahooId;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "YAB entry received for a contact not on our buddylist: " << entry->yahooId;
delete entry;
}
else
{
- kDebug(YAHOO_GEN_DEBUG) << "YAB entry received for: " << entry->yahooId;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "YAB entry received for: " << entry->yahooId;
if( entry->source == YABEntry::SourceYAB )
{
kc->setYABEntry( entry );
@@ -1440,7 +1439,7 @@ void YahooAccount::slotGotYABEntry( YABEntry *entry )
void YahooAccount::slotSaveYABEntry( YABEntry &entry )
{
- kDebug(YAHOO_GEN_DEBUG) << "YABId: " << entry.YABId;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "YABId: " << entry.YABId;
if( entry.YABId > 0 )
m_session->saveYABEntry( entry );
else
@@ -1457,8 +1456,8 @@ void YahooAccount::slotModifyYABEntryError( YABEntry *entry, const QString &msg
void YahooAccount::slotGotFile( const QString & who, const QString & url , long /* expires */, const QString & msg , const QString & fname, unsigned long fesize, const QPixmap &preview )
{
- kDebug(YAHOO_GEN_DEBUG) << "Received File from " << who << ": " << msg;
- kDebug(YAHOO_GEN_DEBUG) << "Filename :" << fname << " size:" << fesize;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Received File from " << who << ": " << msg;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Filename :" << fname << " size:" << fesize;
Kopete::TransferManager::transferManager()->askIncomingTransfer( contact( who ) , fname, fesize, msg, url, preview );
@@ -1474,7 +1473,7 @@ void YahooAccount::slotGotFile( const QString & who, const QString & url , lon
void YahooAccount::slotReceiveFileAccepted(Kopete::Transfer *transfer, const QString& fileName)
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( !m_pendingFileTransfers.contains( transfer->info().internalId() ) )
return;
@@ -1520,7 +1519,7 @@ void YahooAccount::slotReceiveFileRefused( const Kopete::FileTransferInfo& info
void YahooAccount::slotFileTransferBytesProcessed( unsigned int transferId, unsigned int bytes )
{
- kDebug(YAHOO_GEN_DEBUG) << "Transfer: " << transferId << " Bytes:" << bytes;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Transfer: " << transferId << " Bytes:" << bytes;
Kopete::Transfer *t = m_fileTransfers[transferId];
if( !t )
return;
@@ -1530,7 +1529,7 @@ void YahooAccount::slotFileTransferBytesProcessed( unsigned int transferId, unsi
void YahooAccount::slotFileTransferComplete( unsigned int transferId )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
Kopete::Transfer *t = m_fileTransfers[transferId];
if( !t )
return;
@@ -1541,7 +1540,7 @@ void YahooAccount::slotFileTransferComplete( unsigned int transferId )
void YahooAccount::slotFileTransferError( unsigned int transferId, int error, const QString &desc )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
Kopete::Transfer *t = m_fileTransfers[transferId];
if( !t )
return;
@@ -1552,7 +1551,7 @@ void YahooAccount::slotFileTransferError( unsigned int transferId, int error, co
void YahooAccount::slotFileTransferResult( KJob *job )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
const Kopete::Transfer *t = dynamic_cast< const Kopete::Transfer * >( job );
if( !t )
@@ -1567,12 +1566,12 @@ void YahooAccount::slotFileTransferResult( KJob *job )
void YahooAccount::slotContactAdded( const QString & /* myid */, const QString & /* who */, const QString & /* msg */ )
{
-// kDebug(YAHOO_GEN_DEBUG) << myid << " " << who << " " << msg;
+// qCDebug(YAHOO_PROTOCOL_LOG) << myid << " " << who << " " << msg;
}
void YahooAccount::slotRejected( const QString & /* who */, const QString & /* msg */ )
{
-// kDebug(YAHOO_GEN_DEBUG) ;
+// qCDebug(YAHOO_PROTOCOL_LOG) ;
}
void YahooAccount::slotTypingNotify( const QString &who, int what )
@@ -1582,12 +1581,12 @@ void YahooAccount::slotTypingNotify( const QString &who, int what )
void YahooAccount::slotGameNotify( const QString & /* who */, int /* stat */ )
{
-// kDebug(YAHOO_GEN_DEBUG) ;
+// qCDebug(YAHOO_PROTOCOL_LOG) ;
}
void YahooAccount::slotMailNotify( const QString& from, const QString& subject , int cnt )
{
- kDebug(YAHOO_GEN_DEBUG) << "Mail count: " << cnt;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Mail count: " << cnt;
if ( isBusy() )
return;
@@ -1601,7 +1600,7 @@ void YahooAccount::slotMailNotify( const QString& from, const QString& subject
m_currentMailCount = cnt;
}
else if ( cnt > 0 )
- { kDebug(YAHOO_GEN_DEBUG) << "attempting to trigger event";
+ { qCDebug(YAHOO_PROTOCOL_LOG) << "attempting to trigger event";
QObject::connect(KNotification::event( QStringLiteral("yahoo_mail"), i18n( "%1 has a message from %2 in your Yahoo inbox. <br><br>Subject: %3", m_session->userId(), from, subject )
, QPixmap() , Kopete::UI::Global::mainWidget() ), SIGNAL(activated(uint)) , this, SLOT(slotOpenInbox()) );
@@ -1611,19 +1610,19 @@ void YahooAccount::slotMailNotify( const QString& from, const QString& subject
void YahooAccount::slotSystemMessage( const QString & /* msg */ )
{
-// kDebug(YAHOO_GEN_DEBUG) << msg;
+// qCDebug(YAHOO_PROTOCOL_LOG) << msg;
}
void YahooAccount::slotRemoveHandler( int /* fd */ )
{
-// kDebug(YAHOO_GEN_DEBUG) ;
+// qCDebug(YAHOO_PROTOCOL_LOG) ;
}
void YahooAccount::slotGotWebcamInvite( const QString& who )
{
YahooContact* kc = contact( who );
if ( kc == NULL ) {
- kDebug(YAHOO_GEN_DEBUG) << "contact " << who << " doesn't exist.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "contact " << who << " doesn't exist.";
return;
}
@@ -1648,7 +1647,7 @@ void YahooAccount::slotGotWebcamImage( const QString& who, const QPixmap& image
{
YahooContact* kc = contact( who );
if ( kc == NULL ) {
- kDebug(YAHOO_GEN_DEBUG) << "contact " << who << " doesn't exist.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "contact " << who << " doesn't exist.";
return;
}
kc->receivedWebcamImage( image );
@@ -1658,25 +1657,25 @@ void YahooAccount::slotPictureStatusNotify( const QString &who, int status)
{
YahooContact *kc = contact( who );
if ( kc == NULL ) {
- kDebug(YAHOO_GEN_DEBUG) << "contact " << who << " doesn't exist.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "contact " << who << " doesn't exist.";
return;
}
- kDebug(YAHOO_GEN_DEBUG) << "contact " << who << " changed picture status to" << status;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "contact " << who << " changed picture status to" << status;
}
void YahooAccount::slotGotBuddyIconChecksum(const QString &who, int checksum)
{
YahooContact *kc = contact( who );
if ( kc == NULL ) {
- kDebug(YAHOO_GEN_DEBUG) << "contact " << who << " doesn't exist.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "contact " << who << " doesn't exist.";
return;
}
if ( checksum == kc->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt() &&
QFile::exists( KStandardDirs::locateLocal( "appdata", "yahoopictures/"+ who.toLower().replace(QRegExp("[./~]"),QStringLiteral("-")) +".png" ) ) )
{
- kDebug(YAHOO_GEN_DEBUG) << "Icon already exists. I will not request it again.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Icon already exists. I will not request it again.";
return;
} else
m_session->requestPicture( who );
@@ -1684,17 +1683,17 @@ void YahooAccount::slotGotBuddyIconChecksum(const QString &who, int checksum)
void YahooAccount::slotGotBuddyIconInfo(const QString &who, KUrl url, int checksum)
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YahooContact *kc = contact( who );
if ( kc == NULL ) {
- kDebug(YAHOO_GEN_DEBUG) << "contact " << who << " doesn't exist.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "contact " << who << " doesn't exist.";
return;
}
if ( checksum == kc->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt() &&
QFile::exists( KStandardDirs::locateLocal( "appdata", "yahoopictures/"+ who.toLower().replace(QRegExp("[./~]"),QStringLiteral("-")) +".png" ) ))
{
- kDebug(YAHOO_GEN_DEBUG) << "Icon already exists. I will not download it again.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Icon already exists. I will not download it again.";
return;
} else
m_session->downloadPicture( who, url, checksum );
@@ -1702,24 +1701,24 @@ void YahooAccount::slotGotBuddyIconInfo(const QString &who, KUrl url, int checks
void YahooAccount::slotGotBuddyIcon( const QString &who, const QByteArray &data, int checksum )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YahooContact *kc = contact( who );
if ( kc == NULL ) {
- kDebug(YAHOO_GEN_DEBUG) << "contact " << who << " doesn't exist.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "contact " << who << " doesn't exist.";
return;
}
kc->setDisplayPicture( data, checksum );
}
void YahooAccount::slotGotBuddyIconRequest( const QString & who )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
m_session->sendPictureInformation( who, myself()->property( YahooProtocol::protocol()->iconRemoteUrl ).value().toString(),
myself()->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt() );
}
void YahooAccount::setBuddyIcon( const KUrl &url )
{
- kDebug(YAHOO_GEN_DEBUG) << "Url: " << url.toLocalFile();
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Url: " << url.toLocalFile();
QString s = url.toLocalFile();
if ( url.toLocalFile().isEmpty() )
{
@@ -1790,7 +1789,7 @@ void YahooAccount::setBuddyIcon( const KUrl &url )
void YahooAccount::slotBuddyIconChanged( const QString &url, int expires )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
int checksum = myself()->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt();
if( !url.isEmpty() )
@@ -1806,7 +1805,7 @@ void YahooAccount::slotBuddyIconChanged( const QString &url, int expires )
void YahooAccount::slotWebcamReadyForTransmission()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( !m_webcam )
{
m_webcam = new YahooWebcam( this );
@@ -1818,7 +1817,7 @@ void YahooAccount::slotWebcamReadyForTransmission()
void YahooAccount::slotWebcamStopTransmission()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( m_webcam )
{
@@ -1860,7 +1859,7 @@ void YahooAccount::slotWebcamClosed( const QString& who, int reason )
{
YahooContact* kc = contact( who );
if ( kc == NULL ) {
- kDebug(YAHOO_GEN_DEBUG) << "contact " << who << " doesn't exist.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "contact " << who << " doesn't exist.";
return;
}
kc->webcamClosed( reason );
@@ -1870,7 +1869,7 @@ void YahooAccount::slotWebcamPaused( const QString &who )
{
YahooContact* kc = contact( who );
if ( kc == NULL ) {
- kDebug(YAHOO_GEN_DEBUG) << "contact " << who << " doesn't exist.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "contact " << who << " doesn't exist.";
return;
}
kc->webcamPaused();
@@ -1878,7 +1877,7 @@ void YahooAccount::slotWebcamPaused( const QString &who )
void YahooAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const Kopete::StatusMessage &reason, const OnlineStatusOptions& /*options*/ )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if ( myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline &&
status.status() != Kopete::OnlineStatus::Offline )
{
@@ -1944,7 +1943,7 @@ void YahooAccount::slotJoinChatRoom()
if( chatDialog->exec() == QDialog::Accepted && chatDialog )
{
- kDebug() << chatDialog->selectedRoom().topic << " " << chatDialog->selectedRoom().topic << " " << chatDialog->selectedRoom().id;
+ qCDebug(YAHOO_PROTOCOL_LOG) << chatDialog->selectedRoom().topic << " " << chatDialog->selectedRoom().topic << " " << chatDialog->selectedRoom().id;
m_session->joinYahooChatRoom( chatDialog->selectedRoom() );
}
@@ -1962,7 +1961,6 @@ void YahooAccount::slotChatCategorySelected( const Yahoo::ChatCategory &category
m_session->getYahooChatRooms( category );
}
-
void YahooAccount::slotChatJoined( int /*roomId*/, int /*categoryId*/, const QString &comment, const QString &handle )
{
Kopete::ContactPtrList others;
@@ -1998,7 +1996,7 @@ void YahooAccount::slotChatBuddyHasJoined( const QString &nick, const QString &h
YahooContact *c = contact( nick );
if ( !c )
{
- kDebug(YAHOO_GEN_DEBUG) << "Adding contact " << nick << " to chat.";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Adding contact " << nick << " to chat.";
// addContact( nick, nick, 0, Kopete::Account::Temporary );
if( !createChatContact( nick ) )
return;
@@ -2010,7 +2008,7 @@ void YahooAccount::slotChatBuddyHasJoined( const QString &nick, const QString &h
void YahooAccount::slotChatBuddyHasLeft( const QString &nick, const QString &handle )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if(!m_chatChatSession)
return;
@@ -2038,19 +2036,19 @@ void YahooAccount::slotChatMessageReceived( const QString &nick, const QString &
if( !contact( nick ) )
{
- kDebug(YAHOO_GEN_DEBUG) << "Adding contact " << nick;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Adding contact " << nick;
addContact( nick, nick, 0, Kopete::Account::DontChangeKABC );
if( !createChatContact( nick ) )
return;
}
- kDebug(YAHOO_GEN_DEBUG) << "Original message is '" << message << "'";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Original message is '" << message << "'";
QColor fgColor = getMsgColor( message );
msgDT.setTime_t(time(0L));
QString newMsgText = prepareIncomingMessage( message );
- kDebug(YAHOO_GEN_DEBUG) << "Message after fixing font tags '" << newMsgText << "'";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Message after fixing font tags '" << newMsgText << "'";
justMe.append(myself());
@@ -2068,7 +2066,3 @@ void YahooAccount::sendChatMessage( const Kopete::Message &msg, const QString &h
m_session->sendYahooChatMessage( YahooContact::prepareMessage( msg.escapedBody() ), handle );
}
-
-
-// vim: set noet ts=4 sts=4 sw=4:
-//kate: indent-mode csands; tab-width 4;
diff --git a/protocols/yahoo/yahooaccount.h b/protocols/yahoo/yahooaccount.h
index bff37e8..d845df9 100644
--- a/protocols/yahoo/yahooaccount.h
+++ b/protocols/yahoo/yahooaccount.h
@@ -17,7 +17,6 @@
*************************************************************************
*/
-
#ifndef YAHOOACCOUNT_H
#define YAHOOACCOUNT_H
diff --git a/protocols/yahoo/yahooaddcontact.cpp b/protocols/yahoo/yahooaddcontact.cpp
index 274772d..d3d6b13 100644
--- a/protocols/yahoo/yahooaddcontact.cpp
+++ b/protocols/yahoo/yahooaddcontact.cpp
@@ -23,7 +23,7 @@
#include <QVBoxLayout>
// KDE Includes
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <QLineEdit>
// Kopete Includes
@@ -37,7 +37,7 @@
// Yahoo Add Contact page
YahooAddContact::YahooAddContact(YahooProtocol *owner, QWidget *parent): AddContactPage(parent)
{
- kDebug(YAHOO_GEN_DEBUG) << "YahooAddContact::YahooAddContact(<owner>, <parent>, " << objectName() << ")";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "YahooAddContact::YahooAddContact(<owner>, <parent>, " << objectName() << ")";
QVBoxLayout *topLayout = new QVBoxLayout( this );
QWidget* w = new QWidget( this );
@@ -51,20 +51,20 @@ YahooAddContact::YahooAddContact(YahooProtocol *owner, QWidget *parent): AddCont
// Destructor
YahooAddContact::~YahooAddContact()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
delete theDialog;
}
bool YahooAddContact::validateData()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
return !theDialog->contactID->text().isEmpty();
}
bool YahooAddContact::apply(Kopete::Account *theAccount, Kopete::MetaContact *theMetaContact)
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString displayName = theDialog->contactID->text();
YahooAccount* myAccount = static_cast<YahooAccount*>(theAccount);
@@ -72,6 +72,3 @@ bool YahooAddContact::apply(Kopete::Account *theAccount, Kopete::MetaContact *th
return true;
}
-
-// vim: set noet ts=4 sts=4 sw=4:
-
diff --git a/protocols/yahoo/yahooaddcontact.h b/protocols/yahoo/yahooaddcontact.h
index 88d9832..39666bd 100644
--- a/protocols/yahoo/yahooaddcontact.h
+++ b/protocols/yahoo/yahooaddcontact.h
@@ -51,5 +51,3 @@ public slots:
#endif
-// vim: set noet ts=4 sts=4 sw=4:
-
diff --git a/protocols/yahoo/yahoochatchatsession.cpp b/protocols/yahoo/yahoochatchatsession.cpp
index d701d98..1217e6b 100644
--- a/protocols/yahoo/yahoochatchatsession.cpp
+++ b/protocols/yahoo/yahoochatchatsession.cpp
@@ -18,7 +18,7 @@
#include "yahoochatchatsession.h"
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <klocale.h>
#include <kcomponentdata.h>
@@ -81,7 +81,7 @@ void YahooChatChatSession::left( YahooContact *c )
void YahooChatChatSession::slotMessageSent( Kopete::Message & message, Kopete::ChatSession * )
{
- kDebug ( YAHOO_GEN_DEBUG ) ;
+ qCDebug (YAHOO_PROTOCOL_LOG) ;
YahooAccount *acc = dynamic_cast< YahooAccount *>( account() );
if( acc )
@@ -90,6 +90,3 @@ void YahooChatChatSession::slotMessageSent( Kopete::Message & message, Kopete::C
messageSucceeded();
}
-
-// vim: set noet ts=4 sts=4 sw=4:
-
diff --git a/protocols/yahoo/yahoochatchatsession.h b/protocols/yahoo/yahoochatchatsession.h
index a5b4825..4307688 100644
--- a/protocols/yahoo/yahoochatchatsession.h
+++ b/protocols/yahoo/yahoochatchatsession.h
@@ -54,5 +54,3 @@ private:
#endif
-// vim: set noet ts=4 sts=4 tw=4:
-
diff --git a/protocols/yahoo/yahoochatsession.cpp b/protocols/yahoo/yahoochatsession.cpp
index 8fb2298..62154a6 100644
--- a/protocols/yahoo/yahoochatsession.cpp
+++ b/protocols/yahoo/yahoochatsession.cpp
@@ -24,7 +24,7 @@
#include <QList>
#include <kconfig.h>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <kinputdialog.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -52,7 +52,7 @@ YahooChatSession::YahooChatSession( Kopete::Protocol *protocol, const Kopete::Co
Kopete::ContactPtrList others )
: Kopete::ChatSession( user, others, protocol )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
Kopete::ChatSessionManager::self()->registerChatSession( this );
//
@@ -102,42 +102,42 @@ YahooChatSession::~YahooChatSession()
void YahooChatSession::slotBuzzContact()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QList<Kopete::Contact*>contacts = members();
static_cast<YahooContact *>(contacts.first())->buzzContact();
}
void YahooChatSession::slotUserInfo()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QList<Kopete::Contact*>contacts = members();
static_cast<YahooContact *>(contacts.first())->slotUserInfo();
}
void YahooChatSession::slotRequestWebcam()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QList<Kopete::Contact*>contacts = members();
static_cast<YahooContact *>(contacts.first())->requestWebcam();
}
void YahooChatSession::slotInviteWebcam()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QList<Kopete::Contact*>contacts = members();
static_cast<YahooContact *>(contacts.first())->inviteWebcam();
}
void YahooChatSession::slotSendFile()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QList<Kopete::Contact*>contacts = members();
static_cast<YahooContact *>(contacts.first())->sendFile();
}
void YahooChatSession::slotDisplayPictureChanged()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QList<Kopete::Contact*> mb=members();
YahooContact *c = static_cast<YahooContact *>( mb.first() );
if ( c && m_image )
diff --git a/protocols/yahoo/yahoochatsession.h b/protocols/yahoo/yahoochatsession.h
index 1b659a7..6f5e298 100644
--- a/protocols/yahoo/yahoochatsession.h
+++ b/protocols/yahoo/yahoochatsession.h
@@ -21,7 +21,6 @@
class QLabel;
-
/**
* @author Andre Duffeck
*/
diff --git a/protocols/yahoo/yahooconferencemessagemanager.cpp b/protocols/yahoo/yahooconferencemessagemanager.cpp
index 5db1501..b4cc58c 100644
--- a/protocols/yahoo/yahooconferencemessagemanager.cpp
+++ b/protocols/yahoo/yahooconferencemessagemanager.cpp
@@ -18,7 +18,7 @@
#include "yahooconferencemessagemanager.h"
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <QLineEdit>
#include <klocale.h>
#include <kmessagebox.h>
@@ -83,7 +83,7 @@ void YahooConferenceChatSession::left( YahooContact *c )
void YahooConferenceChatSession::slotMessageSent( Kopete::Message & message, Kopete::ChatSession * )
{
- kDebug ( YAHOO_GEN_DEBUG ) ;
+ qCDebug (YAHOO_PROTOCOL_LOG) ;
YahooAccount *acc = dynamic_cast< YahooAccount *>( account() );
if( acc )
@@ -113,6 +113,3 @@ void YahooConferenceChatSession::slotInviteOthers()
dlg->show();
}
-
-// vim: set noet ts=4 sts=4 sw=4:
-
diff --git a/protocols/yahoo/yahooconferencemessagemanager.h b/protocols/yahoo/yahooconferencemessagemanager.h
index 4023d1a..1641552 100644
--- a/protocols/yahoo/yahooconferencemessagemanager.h
+++ b/protocols/yahoo/yahooconferencemessagemanager.h
@@ -53,5 +53,3 @@ private:
#endif
-// vim: set noet ts=4 sts=4 tw=4:
-
diff --git a/protocols/yahoo/yahoocontact.cpp b/protocols/yahoo/yahoocontact.cpp
index 1a7674d..c8b885d 100644
--- a/protocols/yahoo/yahoocontact.cpp
+++ b/protocols/yahoo/yahoocontact.cpp
@@ -48,7 +48,7 @@
#include <QPointer>
// KDE Includes
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <QAction>
#include <KActionCollection>
#include <kdialog.h>
@@ -69,7 +69,7 @@
YahooContact::YahooContact( YahooAccount *account, const QString &userId, const QString &fullName, Kopete::MetaContact *metaContact )
: Kopete::Contact( account, userId, metaContact )
{
- //kDebug(YAHOO_GEN_DEBUG) ;
+ //qCDebug(YAHOO_PROTOCOL_LOG) ;
m_userId = userId;
if ( metaContact )
@@ -143,18 +143,18 @@ bool YahooContact::stealthed() const
void YahooContact::serialize(QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData)
{
- //kDebug(YAHOO_GEN_DEBUG) ;
+ //qCDebug(YAHOO_PROTOCOL_LOG) ;
Kopete::Contact::serialize(serializedData, addressBookData);
}
void YahooContact::syncToServer()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if(!m_account->isConnected()) return;
if ( !m_account->isOnServer(m_userId) && !metaContact()->isTemporary() )
- { kDebug(YAHOO_GEN_DEBUG) << "Contact " << m_userId << " doesn't exist on server-side. Adding...";
+ { qCDebug(YAHOO_PROTOCOL_LOG) << "Contact " << m_userId << " doesn't exist on server-side. Adding...";
Kopete::GroupList groupList = metaContact()->groups();
foreach(Kopete::Group *g, groupList)
@@ -164,14 +164,14 @@ void YahooContact::syncToServer()
void YahooContact::sync(unsigned int flags)
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if ( !m_account->isConnected() )
return;
if ( !m_account->isOnServer( contactId() ) )
{
//TODO: Share this code with the above function
- kDebug(YAHOO_GEN_DEBUG) << "Contact isn't on the server. Adding...";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Contact isn't on the server. Adding...";
Kopete::GroupList groupList = metaContact()->groups();
foreach(Kopete::Group *g, groupList)
m_account->yahooSession()->addBuddy(m_userId, g->displayName() );
@@ -181,23 +181,22 @@ void YahooContact::sync(unsigned int flags)
QString newGroup = metaContact()->groups().first()->displayName();
if ( flags & Kopete::Contact::MovedBetweenGroup )
{
- kDebug(YAHOO_GEN_DEBUG) << "contact changed groups. moving on server";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "contact changed groups. moving on server";
m_account->yahooSession()->moveBuddy( contactId(), m_groupName, newGroup );
m_groupName = newGroup;
}
}
}
-
bool YahooContact::isOnline() const
{
- //kDebug(YAHOO_GEN_DEBUG) ;
+ //qCDebug(YAHOO_PROTOCOL_LOG) ;
return onlineStatus().status() != Kopete::OnlineStatus::Offline && onlineStatus().status() != Kopete::OnlineStatus::Unknown;
}
bool YahooContact::isReachable()
{
- //kDebug(YAHOO_GEN_DEBUG) ;
+ //qCDebug(YAHOO_PROTOCOL_LOG) ;
if ( m_account->isConnected() )
return true;
else
@@ -240,7 +239,6 @@ QString YahooContact::prepareMessage( const QString &messageText )
}
}
-
// find and replace Bold-formattings
regExp.setPattern( QStringLiteral("<span([^>]*)font-weight:600([^>]*)>(.*)</span>") );
pos = 0;
@@ -353,12 +351,12 @@ QString YahooContact::prepareMessage( const QString &messageText )
void YahooContact::slotSendMessage( Kopete::Message &message )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString messageText = message.escapedBody();
- kDebug(YAHOO_GEN_DEBUG) << "Original message: " << messageText;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Original message: " << messageText;
messageText = prepareMessage( messageText );
- kDebug(YAHOO_GEN_DEBUG) << "Converted message: " << messageText;
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Converted message: " << messageText;
Kopete::ContactPtrList m_them = manager(Kopete::Contact::CanCreate)->members();
Kopete::Contact *target = m_them.first();
@@ -387,7 +385,6 @@ void YahooContact::slotTyping(bool isTyping_ )
Kopete::ContactPtrList m_them = manager(Kopete::Contact::CanCreate)->members();
Kopete::Contact *target = m_them.first();
-
m_account->yahooSession()->sendTyping( static_cast<YahooContact*>(target)->m_userId, isTyping_ );
}
@@ -483,7 +480,7 @@ QList<QAction*> *YahooContact::customContextMenuActions()
void YahooContact::slotUserInfo()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( !m_YABEntry )
{
readYABEntry(); // No YABEntry was set, so read the one from contactlist.xml
@@ -498,7 +495,7 @@ void YahooContact::slotUserInfo()
void YahooContact::slotUserProfile()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QString profileSiteString = QLatin1String("http://profiles.yahoo.com/") + userId();
KToolInvocation::invokeBrowser( profileSiteString );
@@ -506,13 +503,13 @@ void YahooContact::slotUserProfile()
void YahooContact::slotSendFile( const KUrl &url)
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
m_account->sendFile( this, url );
}
void YahooContact::stealthContact()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
QPointer <KDialog> stealthSettingDialog = new KDialog( Kopete::UI::Global::mainWidget() );
stealthSettingDialog->setCaption( i18n("Stealth Setting") );
@@ -534,7 +531,6 @@ void YahooContact::stealthContact()
if( stealthed() )
stealthWidget.radioPermOffline->setChecked( true );
-
// Show dialog
if ( stealthSettingDialog->exec() == QDialog::Rejected || ! stealthSettingDialog )
{
@@ -586,7 +582,7 @@ void YahooContact::buzzContact()
void YahooContact::setDisplayPicture(const QByteArray &data, int checksum)
{
- kDebug(YAHOO_GEN_DEBUG) << data.size();
+ qCDebug(YAHOO_PROTOCOL_LOG) << data.size();
setProperty( YahooProtocol::protocol()->iconCheckSum, checksum );
@@ -605,10 +601,9 @@ void YahooContact::setDisplayPicture(const QByteArray &data, int checksum)
}
}
-
void YahooContact::setYABEntry( YABEntry *entry, bool show )
{
- kDebug(YAHOO_GEN_DEBUG) << userId();
+ qCDebug(YAHOO_PROTOCOL_LOG) << userId();
delete m_YABEntry;
m_YABEntry = entry;
@@ -706,15 +701,15 @@ void YahooContact::closeWebcamDialog()
void YahooContact::deleteContact()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if( !m_account->isOnServer( contactId() ) )
{
- kDebug(YAHOO_GEN_DEBUG) << "Contact does not exist on server-side. Not removing...";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Contact does not exist on server-side. Not removing...";
}
else
{
- kDebug(YAHOO_GEN_DEBUG) << "Contact is getting remove from server side contact list....";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Contact is getting remove from server side contact list....";
// Delete from YAB first
if( !m_YABEntry )
readYABEntry();
@@ -728,7 +723,7 @@ void YahooContact::deleteContact()
void YahooContact::writeYABEntry()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
// Personal
setProperty( YahooProtocol::protocol()->propfirstName, m_YABEntry->firstName );
@@ -787,7 +782,7 @@ void YahooContact::writeYABEntry()
void YahooContact::readYABEntry()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
delete m_YABEntry;
m_YABEntry = new YABEntry;
@@ -847,7 +842,5 @@ void YahooContact::readYABEntry()
m_YABEntry->additional4 = property( YahooProtocol::protocol()->propAdditional4 ).value().toString();
}
-
-// vim: set noet ts=4 sts=4 sw=4:
//kate: space-indent off; replace-tabs off; indent-mode csands;
diff --git a/protocols/yahoo/yahoocontact.h b/protocols/yahoo/yahoocontact.h
index 8b139a0..18dc702 100644
--- a/protocols/yahoo/yahoocontact.h
+++ b/protocols/yahoo/yahoocontact.h
@@ -59,7 +59,6 @@ public:
void updateStealthed();
bool stealthed() const;
-
/** The group name getter and setter methods**/
QString group() const;
void setGroup( const QString& );
@@ -134,5 +133,3 @@ private:
#endif
-// vim: set noet ts=4 sts=4 sw=4:
-
diff --git a/protocols/yahoo/yahooeditaccount.cpp b/protocols/yahoo/yahooeditaccount.cpp
index e1156fe..04e64b2 100644
--- a/protocols/yahoo/yahooeditaccount.cpp
+++ b/protocols/yahoo/yahooeditaccount.cpp
@@ -32,7 +32,7 @@
// KDE Includes
#include <klocale.h>
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <kmessagebox.h>
#include <krun.h>
#include <kurl.h>
@@ -56,7 +56,7 @@
YahooEditAccount::YahooEditAccount(YahooProtocol *protocol, Kopete::Account *theAccount, QWidget *parent): QWidget(parent), KopeteEditAccountWidget(theAccount)
{
setupUi(this);
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
theProtocol = protocol;
@@ -101,7 +101,7 @@ YahooEditAccount::YahooEditAccount(YahooProtocol *protocol, Kopete::Account *the
bool YahooEditAccount::validateData()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if(mScreenName->text().isEmpty())
{
@@ -118,7 +118,7 @@ bool YahooEditAccount::validateData()
Kopete::Account *YahooEditAccount::apply()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
if ( !account() )
setAccount( new YahooAccount( theProtocol, mScreenName->text().toLower() ) );
@@ -176,6 +176,3 @@ void YahooEditAccount::slotSelectPicture()
}
}
-
-// vim: set noet ts=4 sts=4 sw=4:
-
diff --git a/protocols/yahoo/yahooeditaccount.h b/protocols/yahoo/yahooeditaccount.h
index 09365d4..3edfacf 100644
--- a/protocols/yahoo/yahooeditaccount.h
+++ b/protocols/yahoo/yahooeditaccount.h
@@ -56,4 +56,3 @@ private slots:
#endif // YAHOOEDITACCOUNT_H
-// vim: set noet ts=4 sts=4 sw=4:
diff --git a/protocols/yahoo/yahooprotocol.cpp b/protocols/yahoo/yahooprotocol.cpp
index 117f8aa..715b9f2 100644
--- a/protocols/yahoo/yahooprotocol.cpp
+++ b/protocols/yahoo/yahooprotocol.cpp
@@ -21,7 +21,7 @@
/* QT Includes */
/* KDE Includes */
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <kgenericfactory.h>
#include <kconfig.h>
@@ -104,17 +104,16 @@ YahooProtocol::YahooProtocol( QObject *parent, const QVariantList & )
propAdditional3(QStringLiteral("YABAdditional3"), i18n("Additional 3"), QString(), Kopete::PropertyTmpl::PersistentProperty),
propAdditional4(QStringLiteral("YABAdditional4"), i18n("Additional 4"), QString(), Kopete::PropertyTmpl::PersistentProperty)
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
s_protocolStatic_ = this;
setCapabilities( RichFgColor | RichFormatting | RichFont );
addAddressBookField( QStringLiteral("messaging/yahoo"), Kopete::Plugin::MakeIndexField );
}
-
YahooProtocol::~YahooProtocol()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
s_protocolStatic_ = 0L;
}
@@ -180,12 +179,12 @@ Kopete::Contact *YahooProtocol::deserializeContact( Kopete::MetaContact *metaCon
YahooAccount *theAccount = static_cast<YahooAccount*>(Kopete::AccountManager::self()->findAccount(protocol()->pluginId(), accountId));
if(!theAccount)
- { kDebug( YAHOO_GEN_DEBUG ) << "Account " << accountId << " not found";
+ { qCDebug (YAHOO_PROTOCOL_LOG) << "Account " << accountId << " not found";
return 0;
}
if(theAccount->contact(contactId))
- { kDebug( YAHOO_GEN_DEBUG ) << "User " << contactId << " already in contacts map";
+ { qCDebug (YAHOO_PROTOCOL_LOG) << "User " << contactId << " already in contacts map";
return 0;
}
@@ -201,7 +200,7 @@ Kopete::Contact *YahooProtocol::deserializeContact( Kopete::MetaContact *metaCon
AddContactPage *YahooProtocol::createAddContactWidget( QWidget * parent , Kopete::Account* )
{
- kDebug(YAHOO_GEN_DEBUG) << "YahooProtocol::createAddContactWidget(<parent>)";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "YahooProtocol::createAddContactWidget(<parent>)";
return new YahooAddContact(this, parent);
}
@@ -217,5 +216,3 @@ Kopete::Account *YahooProtocol::createNewAccount(const QString &accountId)
#include "yahooprotocol.moc"
-// vim: set noet ts=4 sts=4 sw=4:
-
diff --git a/protocols/yahoo/yahooprotocol.h b/protocols/yahoo/yahooprotocol.h
index ad952ce..07f65cc 100644
--- a/protocols/yahoo/yahooprotocol.h
+++ b/protocols/yahoo/yahooprotocol.h
@@ -131,7 +131,6 @@ public slots:
KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, QWidget *parent) Q_DECL_OVERRIDE;
Kopete::Account *createNewAccount(const QString &accountId) Q_DECL_OVERRIDE;
-
private:
static YahooProtocol* s_protocolStatic_;
@@ -139,5 +138,3 @@ private:
#endif
-// vim: set noet ts=4 sts=4 sw=4:
-
diff --git a/protocols/yahoo/yahooverifyaccount.cpp b/protocols/yahoo/yahooverifyaccount.cpp
index def8ae1..dfd18d4 100644
--- a/protocols/yahoo/yahooverifyaccount.cpp
+++ b/protocols/yahoo/yahooverifyaccount.cpp
@@ -22,7 +22,7 @@
#include <qlabel.h>
// KDE Includes
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <QLineEdit>
#include <ktemporaryfile.h>
#include <klocale.h>
@@ -59,7 +59,7 @@ YahooVerifyAccount::YahooVerifyAccount(Kopete::Account *account, QWidget *parent
// Destructor
YahooVerifyAccount::~YahooVerifyAccount()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
delete mTheDialog;
}
@@ -76,7 +76,7 @@ void YahooVerifyAccount::setUrl( const KUrl &url )
void YahooVerifyAccount::slotData( KIO::Job */*job*/, const QByteArray& data )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
mFile->write( data.data() , data.size() );
}
@@ -84,7 +84,7 @@ void YahooVerifyAccount::slotData( KIO::Job */*job*/, const QByteArray& data )
void YahooVerifyAccount::slotComplete( KJob */*job*/ )
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
mFile->close();
mTheDialog->mPicture->setPixmap( mFile->fileName() );
mTheDialog->mPicture->show();
@@ -92,7 +92,7 @@ void YahooVerifyAccount::slotComplete( KJob */*job*/ )
bool YahooVerifyAccount::validateData()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
return ( !mTheDialog->mWord->text().isEmpty() );
}
@@ -104,13 +104,10 @@ void YahooVerifyAccount::slotClose()
void YahooVerifyAccount::slotApply()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
YahooAccount* myAccount = static_cast<YahooAccount*>(mTheAccount);
myAccount->verifyAccount( mTheDialog->mWord->text() );
QDialog::done(0);
}
-
-// vim: set noet ts=4 sts=4 sw=4:
-
diff --git a/protocols/yahoo/yahooverifyaccount.h b/protocols/yahoo/yahooverifyaccount.h
index d2d2c59..47d4022 100644
--- a/protocols/yahoo/yahooverifyaccount.h
+++ b/protocols/yahoo/yahooverifyaccount.h
@@ -55,5 +55,3 @@ public slots:
#endif
-// vim: set noet ts=4 sts=4 sw=4:
-
diff --git a/protocols/yahoo/yahoowebcam.cpp b/protocols/yahoo/yahoowebcam.cpp
index db3e6f3..1e0c95a 100644
--- a/protocols/yahoo/yahoowebcam.cpp
+++ b/protocols/yahoo/yahoowebcam.cpp
@@ -15,7 +15,7 @@
#include "yahoowebcam.h"
-#include <kdebug.h>
+#include "yahoo_protocol_debug.h"
#include <qtimer.h>
#include "client.h"
@@ -30,7 +30,7 @@
YahooWebcam::YahooWebcam( YahooAccount *account ) : QObject( 0 )
{
setObjectName( QStringLiteral("yahoo_webcam") );
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
theAccount = account;
theDialog = 0L;
m_img = new QImage();
@@ -91,7 +91,7 @@ void YahooWebcam::updateImage()
void YahooWebcam::sendImage()
{
- kDebug(YAHOO_GEN_DEBUG) ;
+ qCDebug(YAHOO_PROTOCOL_LOG) ;
#ifndef VIDEOSUPPORT_DISABLED
if (EXIT_SUCCESS == m_devicePool->getFrame())
@@ -106,12 +106,12 @@ void YahooWebcam::sendImage()
{
if (WebcamImgFormat::instance()->forYahoo(result, m_img))
{
- kDebug(YAHOO_RAW_DEBUG) << "Image successfully converted";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Image successfully converted";
theAccount->yahooSession()->sendWebcamImage(result);
} else
- kDebug(YAHOO_RAW_DEBUG) << "Failed to convert outgoing Yahoo webcam image";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Failed to convert outgoing Yahoo webcam image";
} else
- kDebug(YAHOO_RAW_DEBUG) << "Failed to initialize WebcamImgFormat helper";
+ qCDebug(YAHOO_PROTOCOL_LOG) << "Failed to initialize WebcamImgFormat helper";
}
void YahooWebcam::addViewer( const QString &viewer )