~ubuntu-branches/ubuntu/precise/kdenetwork/precise-updates

« back to all changes in this revision

Viewing changes to kopete/protocols/oscar/icq/icqcontact.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-15 14:17:51 UTC
  • mfrom: (1.1.64)
  • Revision ID: package-import@ubuntu.com-20111215141751-wqggakhb7cvb8vkc
Tags: 4:4.7.90-0ubuntu1
new upstream beta release

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
 
52
52
        setPresenceTarget( Oscar::Presence( Oscar::Presence::Offline ) );
53
53
 
54
 
        QObject::connect( mAccount->engine(), SIGNAL( loggedIn() ), this, SLOT( loggedIn() ) );
55
 
        //QObject::connect( mAccount->engine(), SIGNAL( userIsOnline( const QString& ) ), this, SLOT( userOnline( const QString&, UserDetails ) ) );
56
 
        QObject::connect( mAccount->engine(), SIGNAL( userIsOffline( const QString& ) ), this, SLOT( userOffline( const QString& ) ) );
57
 
        QObject::connect( mAccount->engine(), SIGNAL( authReplyReceived( const QString&, const QString&, bool ) ),
58
 
                          this, SLOT( slotGotAuthReply(const QString&, const QString&, bool ) ) );
59
 
        QObject::connect( mAccount->engine(), SIGNAL(receivedIcqShortInfo(const QString&)),
60
 
                          this, SLOT(receivedShortInfo(const QString&)) );
61
 
        QObject::connect( mAccount->engine(), SIGNAL( receivedIcqLongInfo( const QString& ) ),
62
 
                          this, SLOT( receivedLongInfo( const QString& ) ) );
63
 
        QObject::connect( mAccount->engine(), SIGNAL( receivedUserInfo( const QString&, const UserDetails& ) ),
64
 
                          this, SLOT( userInfoUpdated( const QString&, const UserDetails& ) ) );
65
 
        QObject::connect( mAccount->engine(), SIGNAL(receivedIcqTlvInfo(const QString&)),
66
 
                          this, SLOT(receivedTlvInfo(const QString&)) );
 
54
        QObject::connect( mAccount->engine(), SIGNAL(loggedIn()), this, SLOT(loggedIn()) );
 
55
        //QObject::connect( mAccount->engine(), SIGNAL(userIsOnline(QString)), this, SLOT(userOnline(QString,UserDetails)) );
 
56
        QObject::connect( mAccount->engine(), SIGNAL(userIsOffline(QString)), this, SLOT(userOffline(QString)) );
 
57
        QObject::connect( mAccount->engine(), SIGNAL(authReplyReceived(QString,QString,bool)),
 
58
                          this, SLOT(slotGotAuthReply(QString,QString,bool)) );
 
59
        QObject::connect( mAccount->engine(), SIGNAL(receivedIcqShortInfo(QString)),
 
60
                          this, SLOT(receivedShortInfo(QString)) );
 
61
        QObject::connect( mAccount->engine(), SIGNAL(receivedIcqLongInfo(QString)),
 
62
                          this, SLOT(receivedLongInfo(QString)) );
 
63
        QObject::connect( mAccount->engine(), SIGNAL(receivedUserInfo(QString,UserDetails)),
 
64
                          this, SLOT(userInfoUpdated(QString,UserDetails)) );
 
65
        QObject::connect( mAccount->engine(), SIGNAL(receivedIcqTlvInfo(QString)),
 
66
                          this, SLOT(receivedTlvInfo(QString)) );
67
67
}
68
68
 
69
69
ICQContact::~ICQContact()
90
90
                // we were offline and we don't know how many users changed its info, so better
91
91
                // delay the request.
92
92
                if ( mAccount->isConnected() )
93
 
                        QTimer::singleShot( 0, this, SLOT( requestMediumTlvInfo() ) );
 
93
                        QTimer::singleShot( 0, this, SLOT(requestMediumTlvInfo()) );
94
94
                else
95
95
                        requestMediumTlvInfoDelayed();
96
96
        }
101
101
void ICQContact::setEncoding( int mib )
102
102
{
103
103
        ICQContactBase::setEncoding( mib );
104
 
        QTimer::singleShot( 0, this, SLOT( requestShortInfo() ) );
 
104
        QTimer::singleShot( 0, this, SLOT(requestShortInfo()) );
105
105
}
106
106
 
107
107
void ICQContact::userInfoUpdated( const QString& contact, const UserDetails& details )
408
408
                m_requestingInfo = InfoShort;
409
409
                int time = ( KRandom::random() % 20 ) * 1000 + minDelay;
410
410
                kDebug(OSCAR_ICQ_DEBUG) << "requesting info in " << time/1000 << " seconds";
411
 
                QTimer::singleShot( time, this, SLOT( infoDelayTimeout() ) );
 
411
                QTimer::singleShot( time, this, SLOT(infoDelayTimeout()) );
412
412
        }
413
413
}
414
414
 
419
419
                m_requestingInfo = InfoMediumTlv;
420
420
                int time = ( KRandom::random() % 20 ) * 1000 + minDelay;
421
421
                kDebug(OSCAR_ICQ_DEBUG) << "requesting info in " << time/1000 << " seconds";
422
 
                QTimer::singleShot( time, this, SLOT( infoDelayTimeout() ) );
 
422
                QTimer::singleShot( time, this, SLOT(infoDelayTimeout()) );
423
423
        }
424
424
}
425
425