From 5527e01e0675fbb06b632ccdae423756fbff622b Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 5 Jul 2010 08:45:53 +0000 Subject: 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 --- .../protocols/yahoo/libkyahoo/sendnotifytask.cpp | 26 +++++++++++++--------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp') 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 + Copyright (c) 2005-2006 André Duffeck ************************************************************************* * * @@ -19,12 +19,12 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include + #include 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 ) -- cgit v1.2.1