summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-05 08:45:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-05 08:45:53 +0000
commit5527e01e0675fbb06b632ccdae423756fbff622b (patch)
treec2dd1a478a7789d3b01e77fdf31f9011a96a81c5 /kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp
parent1fc8db48741fae272e2d29078b266a3d0f2e2dd1 (diff)
downloadtdenetwork-5527e01e0675fbb06b632ccdae423756fbff622b.tar.gz
tdenetwork-5527e01e0675fbb06b632ccdae423756fbff622b.zip
Many fixes to the Yahoo protocol, courtesy of Serghei Amelian
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1146108 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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 <[email protected]>
+ Copyright (c) 2005-2006 AndrĂ© Duffeck <[email protected]>
*************************************************************************
* *
@@ -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 )