Version: 0.10 (using KDE 3.4.0 Level "a" , SUSE 9.2 UNSUPPORTED) Compiler: gcc version 3.3.4 (pre 3.3.5 20040809) OS: Linux (i686) release 2.6.8-24.11-default if i type in icq a message, in the status bar of my chat partner, stands a message like .. is typing. this messege is missing on both sieds. KDE 3.4 rc1 and KDE 3.3.0 KDE 3.3 and KDE 3.3 works
The Kopete shipped with KDE 3.4 has a new ICQ backend implementation. Unfortunatelly we didn't have time to finish the implementation of that feature. We are working to have it done before KDE 3.4.1
CVS commit by wstephens: Receive Oscar (well, ICQ, as AIM doesn't support it) typing notifications. CCBUGS:101037 M +23 -0 oscaraccount.cpp 1.170 M +4 -0 oscaraccount.h 1.77 M +14 -2 oscarcontact.cpp 1.168 M +4 -0 oscarcontact.h 1.93 M +8 -4 liboscar/client.cpp 1.8 M +3 -0 liboscar/client.h 1.8 M +10 -1 liboscar/typingnotifytask.cpp 1.2
CVS commit by wstephens: Backport typing notifications fix CCBUGS:101037 M +23 -0 oscaraccount.cpp 1.169.2.1 M +4 -0 oscaraccount.h 1.75.4.1 M +14 -2 oscarcontact.cpp 1.166.4.1 M +4 -0 oscarcontact.h 1.91.4.1 --- kdenetwork/kopete/protocols/oscar/oscaraccount.cpp #1.169:1.169.2.1 @@ -84,4 +84,8 @@ OscarAccount::OscarAccount(Kopete::Proto QObject::connect( d->engine, SIGNAL( error( int, int, const QString& ) ), this, SLOT( protocolError( int, int, const QString& ) ) ); + QObject::connect( d->engine, SIGNAL( userStartedTyping( const QString& ) ), + this, SLOT( userStartedTyping( const QString& ) ) ); + QObject::connect( d->engine, SIGNAL( userStoppedTyping( const QString& ) ), + this, SLOT( userStoppedTyping( const QString& ) ) ); } @@ -471,4 +475,23 @@ void OscarAccount::ssiGroupAdded( const } +void OscarAccount::userStartedTyping( const QString & contact ) +{ + Kopete::Contact * ct = contacts()[ Oscar::normalize( contact ) ]; + if ( ct ) + { + OscarContact * oc = static_cast<OscarContact *>( ct ); + oc->startedTyping(); + } +} + +void OscarAccount::userStoppedTyping( const QString & contact ) +{ + Kopete::Contact * ct = contacts()[ Oscar::normalize( contact ) ]; + if ( ct ) + { + OscarContact * oc = static_cast<OscarContact *>( ct ); + oc->stoppedTyping(); + } +} #include "oscaraccount.moc" --- kdenetwork/kopete/protocols/oscar/oscaraccount.h #1.75:1.75.4.1 @@ -123,4 +123,8 @@ protected slots: void ssiContactRemoved( const Oscar::SSI& ) {} + /* slots for receiving typing notifications, and notify the appropriate OscarContact */ + void userStartedTyping( const QString & contact ); + void userStoppedTyping( const QString & contact ); + signals: --- kdenetwork/kopete/protocols/oscar/oscarcontact.cpp #1.166:1.166.4.1 @@ -105,6 +105,6 @@ Kopete::ChatSession* OscarContact::manag this, SLOT( chatSessionDestroyed() ) ); - connect(mMsgManager, SIGNAL( typingMsg( bool ) ), - this, SLOT( slotTyping( bool ) ) ); +/* connect(mMsgManager, SIGNAL( myselfTyping( bool ) ), + this, SLOT( slotTyping( bool ) ) );*/ } return mMsgManager; @@ -202,4 +202,16 @@ void OscarContact::slotSendMsg( Kopete:: } +void OscarContact::startedTyping() +{ + if ( mMsgManager ) + mMsgManager->receivedTypingMsg( this, true ); +} + +void OscarContact::stoppedTyping() +{ + if ( mMsgManager ) + mMsgManager->receivedTypingMsg( this, false ); +} + #include "oscarcontact.moc" //kate: tab-width 4; indent-mode csands; --- kdenetwork/kopete/protocols/oscar/oscarcontact.h #1.91:1.91.4.1 @@ -79,4 +79,8 @@ public: Oscar::SSI ssiItem() const; + /** we received a typing notification from this contact, tell any message manager */ + void startedTyping(); + void stoppedTyping(); + public slots: /** slot so that properties can be updated based on a new SSI item */
CVS commit by wstephens: Fix sending typing notifications for ICQ. BUG:101037 M +3 -2 oscaraccount.cpp 1.171 M +8 -2 oscarcontact.cpp 1.169 M +3 -0 oscarcontact.h 1.94 M +5 -1 liboscar/client.cpp 1.9 M +3 -0 liboscar/client.h 1.9 M +7 -1 liboscar/typingnotifytask.cpp 1.3 M +2 -1 liboscar/typingnotifytask.h 1.2 --- kdenetwork/kopete/protocols/oscar/oscaraccount.cpp #1.170:1.171 @@ -478,5 +478,5 @@ void OscarAccount::userStartedTyping( co { Kopete::Contact * ct = contacts()[ Oscar::normalize( contact ) ]; - if ( ct ) + if ( ct && contact != accountId() ) { OscarContact * oc = static_cast<OscarContact *>( ct ); @@ -488,5 +488,5 @@ void OscarAccount::userStoppedTyping( co { Kopete::Contact * ct = contacts()[ Oscar::normalize( contact ) ]; - if ( ct ) + if ( ct && contact != accountId() ) { OscarContact * oc = static_cast<OscarContact *>( ct ); --- kdenetwork/kopete/protocols/oscar/oscarcontact.cpp #1.168:1.169 @@ -105,6 +105,6 @@ Kopete::ChatSession* OscarContact::manag this, SLOT( chatSessionDestroyed() ) ); -/* connect(mMsgManager, SIGNAL( myselfTyping( bool ) ), - this, SLOT( slotTyping( bool ) ) );*/ + connect(mMsgManager, SIGNAL( myselfTyping( bool ) ), + this, SLOT( slotTyping( bool ) ) ); } return mMsgManager; @@ -215,4 +215,10 @@ void OscarContact::stoppedTyping() } +void OscarContact::slotTyping( bool typing ) +{ + if ( this != account()->myself() ) + account()->engine()->sendTyping( contactId(), typing ); +} + #include "oscarcontact.moc" //kate: tab-width 4; indent-mode csands; --- kdenetwork/kopete/protocols/oscar/oscarcontact.h #1.93:1.94 @@ -102,4 +102,7 @@ public slots: virtual void userOffline( const QString& ) = 0; +protected slots: + void slotTyping( bool typing ); + signals: void updatedSSI(); --- kdenetwork/kopete/protocols/oscar/liboscar/client.cpp #1.8:1.9 @@ -690,5 +690,9 @@ void Client::updateProfile( const QStrin } - +void Client::sendTyping( const QString & contact, bool typing ) +{ +d->typingNotifyTask->setParams( contact, ( typing ? TypingNotifyTask::Begin : TypingNotifyTask::Finished ) ); + d->typingNotifyTask->go( false ); // don't delete the task after sending +} #include "client.moc" --- kdenetwork/kopete/protocols/oscar/liboscar/client.h #1.8:1.9 @@ -232,4 +232,7 @@ public: int port(); + /** Send a typing notification */ + void sendTyping( const QString & contact, bool typing ); + /************* INTERNAL (FOR USE BY TASKS) METHODS --- kdenetwork/kopete/protocols/oscar/liboscar/typingnotifytask.cpp #1.2:1.3 @@ -72,5 +72,5 @@ void TypingNotifyTask::onGo() b->addWord( 0x0001 ); //mtn messages are always sent as type 1 messages - b->addBUIN( client()->userId().latin1() ); + b->addBUIN( m_contact.latin1() ); b->addWord( m_notificationType ); @@ -112,4 +112,10 @@ void TypingNotifyTask::handleNotificatio } +void TypingNotifyTask::setParams( const QString& contact, int notifyType ) +{ + m_contact = contact; + m_notificationType = notifyType; +} + #include "typingnotifytask.moc" --- kdenetwork/kopete/protocols/oscar/liboscar/typingnotifytask.h #1.1:1.2 @@ -39,5 +39,5 @@ public: virtual void onGo(); - void setNotification( int notifyType ); + void setParams( const QString & contact, int notifyType ); signals: @@ -55,4 +55,5 @@ private: private: WORD m_notificationType; + QString m_contact; };
CVS commit by wstephens: Backport fix for sending typing notifications in ICQ CCBUG:101037 M +3 -2 oscaraccount.cpp 1.169.2.2 M +8 -2 oscarcontact.cpp 1.166.4.2 M +3 -0 oscarcontact.h 1.91.4.2 M +5 -1 liboscar/client.cpp 1.6.2.2 M +3 -0 liboscar/client.h 1.6.2.2 M +7 -1 liboscar/typingnotifytask.cpp 1.1.4.2 M +2 -1 liboscar/typingnotifytask.h 1.1.4.1 --- kdenetwork/kopete/protocols/oscar/oscaraccount.cpp #1.169.2.1:1.169.2.2 @@ -478,5 +478,5 @@ void OscarAccount::userStartedTyping( co { Kopete::Contact * ct = contacts()[ Oscar::normalize( contact ) ]; - if ( ct ) + if ( ct && contact != accountId() ) { OscarContact * oc = static_cast<OscarContact *>( ct ); @@ -488,5 +488,5 @@ void OscarAccount::userStoppedTyping( co { Kopete::Contact * ct = contacts()[ Oscar::normalize( contact ) ]; - if ( ct ) + if ( ct && contact != accountId() ) { OscarContact * oc = static_cast<OscarContact *>( ct ); --- kdenetwork/kopete/protocols/oscar/oscarcontact.cpp #1.166.4.1:1.166.4.2 @@ -105,6 +105,6 @@ Kopete::ChatSession* OscarContact::manag this, SLOT( chatSessionDestroyed() ) ); -/* connect(mMsgManager, SIGNAL( myselfTyping( bool ) ), - this, SLOT( slotTyping( bool ) ) );*/ + connect(mMsgManager, SIGNAL( myselfTyping( bool ) ), + this, SLOT( slotTyping( bool ) ) ); } return mMsgManager; @@ -214,4 +214,10 @@ void OscarContact::stoppedTyping() } +void OscarContact::slotTyping( bool typing ) +{ + if ( this != account()->myself() ) + account()->engine()->sendTyping( contactId(), typing ); +} + #include "oscarcontact.moc" //kate: tab-width 4; indent-mode csands; --- kdenetwork/kopete/protocols/oscar/oscarcontact.h #1.91.4.1:1.91.4.2 @@ -102,4 +102,7 @@ public slots: virtual void userOffline( const QString& ) = 0; +protected slots: + void slotTyping( bool typing ); + signals: void updatedSSI(); --- kdenetwork/kopete/protocols/oscar/liboscar/client.cpp #1.6.2.1:1.6.2.2 @@ -688,5 +688,9 @@ void Client::updateProfile( const QStrin } - +void Client::sendTyping( const QString & contact, bool typing ) +{ +d->typingNotifyTask->setParams( contact, ( typing ? TypingNotifyTask::Begin : TypingNotifyTask::Finished ) ); + d->typingNotifyTask->go( false ); // don't delete the task after sending +} #include "client.moc" --- kdenetwork/kopete/protocols/oscar/liboscar/client.h #1.6.2.1:1.6.2.2 @@ -231,4 +231,7 @@ public: int port(); + /** Send a typing notification */ + void sendTyping( const QString & contact, bool typing ); + /************* INTERNAL (FOR USE BY TASKS) METHODS --- kdenetwork/kopete/protocols/oscar/liboscar/typingnotifytask.cpp #1.1.4.1:1.1.4.2 @@ -72,5 +72,5 @@ void TypingNotifyTask::onGo() b->addWord( 0x0001 ); //mtn messages are always sent as type 1 messages - b->addBUIN( client()->userId().latin1() ); + b->addBUIN( m_contact.latin1() ); b->addWord( m_notificationType ); @@ -112,4 +112,10 @@ void TypingNotifyTask::handleNotificatio } +void TypingNotifyTask::setParams( const QString& contact, int notifyType ) +{ + m_contact = contact; + m_notificationType = notifyType; +} + #include "typingnotifytask.moc" --- kdenetwork/kopete/protocols/oscar/liboscar/typingnotifytask.h #1.1:1.1.4.1 @@ -39,5 +39,5 @@ public: virtual void onGo(); - void setNotification( int notifyType ); + void setParams( const QString & contact, int notifyType ); signals: @@ -55,4 +55,5 @@ private: private: WORD m_notificationType; + QString m_contact; };
And it works in AIM too :)
*** Bug 102110 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.