コード例 #1
0
void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& details )
{
    if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) )
        return;

    kDebug(OSCAR_ICQ_DEBUG) << contact;

    //if they don't have an SSI alias, make sure we use the capitalization from the
    //server so their contact id looks all pretty.
    QString nickname = property( Kopete::Global::Properties::self()->nickName() ).value().toString();
    if ( nickname.isEmpty() || Oscar::normalize( nickname ) == Oscar::normalize( contact ) )
        setNickName( contact );

    kDebug( OSCAR_ICQ_DEBUG ) << "extendedStatus is " << details.extendedStatus();
    Oscar::Presence presence = mProtocol->statusManager()->presenceOf( details.extendedStatus(), details.userClass() );
    setPresenceTarget( presence );

    m_mobile = ( presence.flags() & Oscar::Presence::Wireless );

    setAwayMessage( details.personalMessage() );
    if ( presence.type() != Oscar::Presence::Online && m_details.awaySinceTime() < details.awaySinceTime() ) //prevent cyclic away message requests
    {
        mAccount->engine()->requestAIMAwayMessage( contactId() );
    }

    OscarContact::userInfoUpdated( contact, details );
}
コード例 #2
0
void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& details )
{
	if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) )
		return;

	kDebug(OSCAR_ICQ_DEBUG) << contact;

	setNickName( contact );

	kDebug( OSCAR_ICQ_DEBUG ) << "extendedStatus is " << details.extendedStatus();
	Oscar::Presence presence = mProtocol->statusManager()->presenceOf( details.extendedStatus(), details.userClass() );
	setPresenceTarget( presence );

	m_mobile = ( presence.flags() & Oscar::Presence::Wireless );

	setAwayMessage( details.personalMessage() );
	if ( presence.type() != Oscar::Presence::Online && m_details.awaySinceTime() < details.awaySinceTime() ) //prevent cyclic away message requests
	{
		mAccount->engine()->requestAIMAwayMessage( contactId() );
	}

	OscarContact::userInfoUpdated( contact, details );
}