summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp')
-rw-r--r--kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp b/kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp
index 8fd56115..ed424bd3 100644
--- a/kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp
+++ b/kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp
@@ -2,7 +2,7 @@
Kopete Yahoo Protocol
Send a notification
- Copyright (c) 2005 André Duffeck <andre.duffeck@kdemail.net>
+ Copyright (c) 2005-2006 André Duffeck <duffeck@kde.org>
*************************************************************************
* *
@@ -19,12 +19,12 @@
#include "ymsgtransfer.h"
#include "yahootypes.h"
#include "client.h"
-#include <qstring.h>
+
#include <kdebug.h>
SendNotifyTask::SendNotifyTask(Task* parent) : Task(parent)
{
- kdDebug(YAHOO_RAW_DEBUG) << k_funcinfo << endl;
+ kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl;
}
SendNotifyTask::~SendNotifyTask()
@@ -36,29 +36,35 @@ void SendNotifyTask::onGo()
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceNotify);
t->setId( client()->sessionID() );
t->setStatus( Yahoo::StatusNotify );
- t->setParam( 4, client()->userId().local8Bit() );
- t->setParam( 5, m_target.local8Bit() );
- t->setParam( 14, " " );
+
switch( m_type )
{
case NotifyTyping:
+ t->setParam( 4, client()->userId().local8Bit() );
+ t->setParam( 5, m_target.local8Bit() );
t->setParam( 13, m_state );
+ t->setParam( 14, " " );
t->setParam( 49, "TYPING" );
break;
case NotifyWebcamInvite:
+
+ kdDebug(YAHOO_RAW_DEBUG) << "send invitation set Param" << endl;
+ t->setParam( 1, client()->userId().local8Bit() );
+ t->setParam( 5, m_target.local8Bit() );
t->setParam( 13, 0 );
- t->setParam( 49, "WEBCAMINVITE" );
+ t->setParam( 14, " " );
+ t->setParam( 49, "WEBCAMINVITE" );
break;
case NotifyGame:
default:
- setSuccess( false );
+ setError();
delete t;
return;
break;
}
send( t );
-
- setSuccess( true );
+
+ setSuccess();
}
void SendNotifyTask::setType( Type type )