<commit_before>/*
    Kopete Yahoo Protocol
    Send a notification

    Copyright (c) 2005-2006 <NAME> <<EMAIL>>

    *************************************************************************
    *                                                                       *
    * This library is free software; you can redistribute it and/or         *
    * modify it under the terms of the GNU Lesser General Public            *
    * License as published by the Free Software Foundation; either          *
    * version 2 of the License, or (at your option) any later version.      *
    *                                                                       *
    *************************************************************************
*/

#include "sendnotifytask.h"
#include "transfer.h"
#include "ymsgtransfer.h"
#include "yahootypes.h"
#include "client.h"

#include <kdebug.h>

SendNotifyTask::SendNotifyTask(Task* parent) : Task(parent)
{
	kDebug(YAHOO_RAW_DEBUG) ;
}

SendNotifyTask::~SendNotifyTask()
{
}

void SendNotifyTask::onGo()
{
	YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceNotify);
	t->setId( client()->sessionID() );
	t->setStatus( Yahoo::StatusNotify );
	t->setParam( 4, client()->userId().toLocal8Bit() );
	t->setParam( 5, m_target.toLocal8Bit() );
	t->setParam( 14, " " );	
	switch( m_type )
	{
	case NotifyTyping:
		t->setParam( 13, m_state );
		t->setParam( 49, "TYPING" );
	break;
	case NotifyWebcamInvite:
		t->setParam( 13, 0 );
		t->setParam( 49, "WEBCAMINVITE" );		
	break;
	case NotifyGame:
	default:
		setError();
		delete t;
		return;
	break;
	}
	send( t );
	
	setSuccess();
}

void SendNotifyTask::setType( Type type )
{
	m_type = type;
}

void SendNotifyTask::setTarget( const QString &to )
{
	m_target = to;
}<commit_msg>Announce invitations to your webcam to the user you're inviting<commit_after>/*
    Kopete Yahoo Protocol
    Send a notification

    Copyright (c) 2005-2006 <NAME> <<EMAIL>>

    *************************************************************************
    *                                                                       *
    * This library is free software; you can redistribute it and/or         *
    * modify it under the terms of the GNU Lesser General Public            *
    * License as published by the Free Software Foundation; either          *
    * version 2 of the License, or (at your option) any later version.      *
    *                                                                       *
    *************************************************************************
*/

#include "sendnotifytask.h"
#include "transfer.h"
#include "ymsgtransfer.h"
#include "yahootypes.h"
#include "client.h"

#include <kdebug.h>

SendNotifyTask::SendNotifyTask(Task* parent) : Task(parent)
{
	kDebug(YAHOO_RAW_DEBUG) ;
}

SendNotifyTask::~SendNotifyTask()
{
}

void SendNotifyTask::onGo()
{
	YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceNotify);
	t->setId( client()->sessionID() );
	t->setStatus( Yahoo::StatusNotify );

	switch( m_type )
	{
	case NotifyTyping:
		t->setParam( 4, client()->userId().toLocal8Bit() );
		t->setParam( 5, m_target.toLocal8Bit() );
		t->setParam( 13, m_state );
		t->setParam( 14, " " );	
		t->setParam( 49, "TYPING" );
	break;
	case NotifyWebcamInvite:
		
		kDebug(YAHOO_RAW_DEBUG) << "send invitation set Param";
		t->setParam( 1, client()->userId().toLocal8Bit() );
		t->setParam( 5, m_target.toLocal8Bit() );
		t->setParam( 13, 0 );
		t->setParam( 14, " " );	
		t->setParam( 49, "WEBCAMINVITE" );		
	break;
	case NotifyGame:
	default:
		setError();
		delete t;
		return;
	break;
	}
	send( t );
	
	setSuccess();
}

void SendNotifyTask::setType( Type type )
{
	m_type = type;
}

void SendNotifyTask::setTarget( const QString &to )
{
	m_target = to;
}
{'fraction_non_alphanumeric': 0.19936204146730463, 'fraction_numerical': 0.014354066985645933, 'mean_word_length': 2.8048533872598584, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3097044', 'n_tokens_mistral': 1260, 'n_tokens_neox': 1157, 'n_words': 288}