View | Details | Raw Unified
Collapse All | Expand All

(-) kdenetwork/kopete/protocols/oscar/liboscar/ssimodifytask.cpp (-21 / +28 lines)
 Lines 147-153    Link Here 
void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& details )
void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& details )
{
{
	if ( contact.lower() != contactId().lower() )
	if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) )
		return;
		return;
	kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << contact << endl;
	kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << contact << endl;
 Lines 181-187    Link Here 
void AIMContact::userOnline( const QString& userId )
void AIMContact::userOnline( const QString& userId )
{
{
	if ( userId.lower() == contactId().lower() )
	if ( Oscar::normalize( userId ) == Oscar::normalize( contactId() ) )
	{
	{
		kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Getting more contact info" << endl;
		kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Getting more contact info" << endl;
		setOnlineStatus( mProtocol->statusOnline );
		setOnlineStatus( mProtocol->statusOnline );
 Lines 199-205    Link Here 
void AIMContact::updateAwayMessage( const QString& contact, const QString& message )
void AIMContact::updateAwayMessage( const QString& contact, const QString& message )
{
{
	if ( contact.lower() != contactId().lower() )
	if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) )
		return;
		return;
	else
	else
	{
	{
 Lines 222-228    Link Here 
void AIMContact::updateProfile( const QString& contact, const QString& profile )
void AIMContact::updateProfile( const QString& contact, const QString& profile )
{
{
	if ( contact.lower() != contactId().lower() )
	if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) )
		return;
		return;
	
	
	setProperty( mProtocol->clientProfile, profile );
	setProperty( mProtocol->clientProfile, profile );
 Lines 106-112    Link Here 
void ICQContact::userOnline( const QString& userId )
void ICQContact::userOnline( const QString& userId )
{
{
	if ( userId != contactId() )
	if ( Oscar::normalize( userId ) != Oscar::normalize( contactId() ) )
		return;
		return;
	kdDebug(OSCAR_ICQ_DEBUG) << "Setting " << userId << " online" << endl;
	kdDebug(OSCAR_ICQ_DEBUG) << "Setting " << userId << " online" << endl;
 Lines 116-122    Link Here 
void ICQContact::userOffline( const QString& userId )
void ICQContact::userOffline( const QString& userId )
{
{
	if ( userId != contactId() )
	if ( Oscar::normalize( userId ) != Oscar::normalize( contactId() ) )
		return;
		return;
	kdDebug(OSCAR_ICQ_DEBUG) << "Setting " << userId << " offline" << endl;
	kdDebug(OSCAR_ICQ_DEBUG) << "Setting " << userId << " offline" << endl;
 Lines 130-136    Link Here 
		setOnlineStatus( mProtocol->statusManager()->waitingForAuth() );
		setOnlineStatus( mProtocol->statusManager()->waitingForAuth() );
	QString nickname = property( Kopete::Global::Properties::self()->nickName() ).value().toString();
	QString nickname = property( Kopete::Global::Properties::self()->nickName() ).value().toString();
	if ( nickname.isEmpty() || nickname == contactId() )
	if ( nickname.isEmpty() || Oscar::normalize( nickname ) == Oscar::normalize( contactId() ) )
	{
	{
		int time = ( KApplication::random() % 25 ) * 1000;
		int time = ( KApplication::random() % 25 ) * 1000;
		kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating nickname in " << time/1000 << " seconds" << endl;
		kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating nickname in " << time/1000 << " seconds" << endl;
 Lines 164-170    Link Here 
void ICQContact::slotGotAuthReply( const QString& contact, const QString& reason, bool granted )
void ICQContact::slotGotAuthReply( const QString& contact, const QString& reason, bool granted )
{
{
	if ( contact != contactId() )
	if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) )
		return;
		return;
	
	
	kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << endl;
	kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << endl;
 Lines 189-195    Link Here 
void ICQContact::slotGotAuthRequest( const QString& contact, const QString& reason )
void ICQContact::slotGotAuthRequest( const QString& contact, const QString& reason )
{
{
	if ( contact != contactId() )
	if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) )
		return;
		return;
	
	
	ICQAuthReplyDialog replyDialog;
	ICQAuthReplyDialog replyDialog;
 Lines 202-208    Link Here 
void ICQContact::receivedLongInfo( const QString& contact )
void ICQContact::receivedLongInfo( const QString& contact )
{
{
	if ( contact.lower() != contactId().lower() )
	if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) )
	{
	{
		if ( m_infoWidget )
		if ( m_infoWidget )
			m_infoWidget->delayedDestruct();
			m_infoWidget->delayedDestruct();
 Lines 224-230    Link Here 
void ICQContact::receivedShortInfo( const QString& contact )
void ICQContact::receivedShortInfo( const QString& contact )
{
{
	if ( contact != contactId() )
	if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) )
		return;
		return;
	
	
	ICQShortInfo shortInfo = mAccount->engine()->getShortInfo( contact );
	ICQShortInfo shortInfo = mAccount->engine()->getShortInfo( contact );
 Lines 21-26    Link Here 
#include "transfer.h"
#include "transfer.h"
#include "buffer.h"
#include "buffer.h"
#include "connection.h"
#include "connection.h"
#include "oscarutils.h"
#include <kdebug.h>
#include <kdebug.h>
 Lines 135-141    Link Here 
{
{
	Buffer* buf = transfer()->buffer();
	Buffer* buf = transfer()->buffer();
	
	
	QString uin = buf->getBUIN();
	QString uin = Oscar::normalize( buf->getBUIN() );
	QString reason = buf->getBSTR();
	QString reason = buf->getBSTR();
	
	
	buf->getWord(); // 0x0000 - Unknown
	buf->getWord(); // 0x0000 - Unknown
 Lines 149-155    Link Here 
{
{
	Buffer* buf = transfer()->buffer();
	Buffer* buf = transfer()->buffer();
	
	
	QString uin = buf->getBUIN();
	QString uin = Oscar::normalize( buf->getBUIN() );
	QString reason = buf->getBSTR();
	QString reason = buf->getBSTR();
	
	
	buf->getWord(); // 0x0000 - Unknown
	buf->getWord(); // 0x0000 - Unknown
 Lines 164-170    Link Here 
{
{
	Buffer* buf = transfer()->buffer();
	Buffer* buf = transfer()->buffer();
	
	
	QString uin = buf->getBUIN();
	QString uin = Oscar::normalize( buf->getBUIN() );
	bool accepted = buf->getByte();
	bool accepted = buf->getByte();
	QString reason = buf->getBSTR();
	QString reason = buf->getBSTR();
	
	
 Lines 186-192    Link Here 
{
{
	Buffer* buf = transfer()->buffer();
	Buffer* buf = transfer()->buffer();
	
	
	QString uin = buf->getBUIN();
	QString uin = Oscar::normalize( buf->getBUIN() );
	
	
	kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "User " << uin << " added you to the contact list" << endl;
	kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "User " << uin << " added you to the contact list" << endl;
	emit contactAddedYou( uin );
	emit contactAddedYou( uin );
 Lines 110-115    Link Here 
			tlvList.append( t );
			tlvList.append( t );
		}
		}
		
		
		if ( itemType == ROSTER_CONTACT )
			itemName = Oscar::normalize( itemName );
		
		Oscar::SSI s( itemName, groupId, itemId, itemType, tlvList );
		Oscar::SSI s( itemName, groupId, itemId, itemType, tlvList );
		s.setTLVListLength( tlvLength );
		s.setTLVListLength( tlvLength );
		
		
 Lines 41-47    Link Here 
{
{
}
}
void SSIModifyTask::onGo( )
void SSIModifyTask::onGo()
{
{
	sendSSIUpdate();
	sendSSIUpdate();
}
}
 Lines 62-68    Link Here 
{
{
	m_opType = Add;
	m_opType = Add;
	m_opSubject = Contact;
	m_opSubject = Contact;
	Oscar::SSI oldItem = m_ssiManager->findContact( contact );
	
	QString newContact = Oscar::normalize( contact );
	
	Oscar::SSI oldItem = m_ssiManager->findContact( newContact );
	Oscar::SSI groupItem = m_ssiManager->findGroup( group );
	Oscar::SSI groupItem = m_ssiManager->findGroup( group );
	
	
	if ( !groupItem )
	if ( !groupItem )
 Lines 81-87    Link Here 
	}
	}
	
	
	kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "creating new SSI item for " << contact << " in group " << group << endl;
	kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "creating new SSI item for " << contact << " in group " << group << endl;
	Oscar::SSI newItem( contact, groupItem.gid(), m_ssiManager->nextContactId(), ROSTER_CONTACT, tlvList );
	Oscar::SSI newItem( newContact, groupItem.gid(), m_ssiManager->nextContactId(), ROSTER_CONTACT, tlvList );
	m_newItem = newItem;
	m_newItem = newItem;
	return true;
	return true;
}
}
 Lines 90-96    Link Here 
{
{
	m_opType = Remove;
	m_opType = Remove;
	m_opSubject = Contact;
	m_opSubject = Contact;
	m_oldItem = m_ssiManager->findContact( contact );
	m_oldItem = m_ssiManager->findContact( Oscar::normalize( contact ) );
	kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Scheduling" << m_oldItem.name() << " for removal" << endl;
	kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Scheduling" << m_oldItem.name() << " for removal" << endl;
	return true;
	return true;
}
}
 Lines 99-105    Link Here 
{
{
	m_opType = Change;
	m_opType = Change;
	m_opSubject = Group;
	m_opSubject = Group;
	m_oldItem = m_ssiManager->findContact( contact );
	m_oldItem = m_ssiManager->findContact( Oscar::normalize( contact ) );
	Oscar::SSI oldGroupItem;
	Oscar::SSI oldGroupItem;
	if ( m_oldItem.isValid() )
	if ( m_oldItem.isValid() )
		oldGroupItem = m_ssiManager->findGroup( newGroup );
		oldGroupItem = m_ssiManager->findGroup( newGroup );
 Lines 138-144    Link Here 
	return true;
	return true;
}
}
bool SSIModifyTask::removeGroup( const QString & groupName )
bool SSIModifyTask::removeGroup( const QString& groupName )
{
{
	m_opType = Remove;
	m_opType = Remove;
	m_opSubject = Group;
	m_opSubject = Group;