1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-05 11:35:01 +00:00

- Add patches from upstream to bring Yahoo support back \o/

- Bump PORTREVISION

Noticed by:	Kris Moore <kris@pcbsd.com)
Obtained from:	kde svn
This commit is contained in:
Martin Wilke 2009-02-11 11:37:45 +00:00
parent 22b1896e39
commit c6701f9ae7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=228044
5 changed files with 119 additions and 0 deletions

View File

@ -6,6 +6,7 @@
PORTNAME= kdenetwork
PORTVERSION= ${KDE4_VERSION}
PORTREVISION= 1
CATEGORIES= net kde ipv6
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= ${KDE4_BRANCH}/${PORTVERSION}/src

View File

@ -0,0 +1,68 @@
--- ../kopete/protocols/yahoo/libkyahoo/client.cpp 2009/02/06 02:57:20 921978
+++ ../kopete/protocols/yahoo/libkyahoo/client.cpp 2009/02/09 14:00:12 923817
@@ -99,6 +99,8 @@
QString statusMessageOnConnect;
Yahoo::PictureStatus pictureFlag;
int pictureChecksum;
+ bool buddyListReady;
+ QStringList pictureRequestQueue;
};
Client::Client(QObject *par) :QObject(par)
@@ -117,12 +119,14 @@
d->loginTask = new LoginTask( d->root );
d->listTask = new ListTask( d->root );
d->pictureFlag = Yahoo::NoPicture;
+ d->buddyListReady = false;
m_connector = 0L;
m_pingTimer = new QTimer( this );
QObject::connect( m_pingTimer, SIGNAL( timeout() ), this, SLOT( sendPing() ) );
QObject::connect( d->loginTask, SIGNAL( haveSessionID( uint ) ), SLOT( lt_gotSessionID( uint ) ) );
+ QObject::connect( d->loginTask, SIGNAL( buddyListReady() ), SLOT( processPictureQueue() ) );
QObject::connect( d->loginTask, SIGNAL( loginResponse( int, const QString& ) ),
SLOT( slotLoginResponse( int, const QString& ) ) );
QObject::connect( d->loginTask, SIGNAL( haveCookies() ), SLOT( slotGotCookies() ) );
@@ -197,6 +201,7 @@
m_connector->deleteLater();
m_connector = 0L;
d->active = false;
+ d->buddyListReady = false;
}
int Client::error()
@@ -490,8 +495,33 @@
// ***** Buddyicon handling *****
+void Client::processPictureQueue()
+{
+ kDebug(YAHOO_RAW_DEBUG) << k_funcinfo << endl;
+ d->buddyListReady = true;
+ if( d->pictureRequestQueue.isEmpty() )
+ {
+ return;
+ }
+
+ requestPicture( d->pictureRequestQueue.front() );
+ d->pictureRequestQueue.pop_front();
+
+
+ if( !d->pictureRequestQueue.isEmpty() )
+ {
+ QTimer::singleShot( 1000, this, SLOT(processPictureQueue()) );
+ }
+}
+
void Client::requestPicture( const QString &userId )
{
+ if( !d->buddyListReady )
+ {
+ d->pictureRequestQueue << userId;
+ return;
+ }
+
RequestPictureTask *rpt = new RequestPictureTask( d->root );
rpt->setTarget( userId );
rpt->go( true );

View File

@ -0,0 +1,15 @@
--- ../kopete/protocols/yahoo/libkyahoo/client.h 2009/02/06 02:57:20 921978
+++ ../kopete/protocols/yahoo/libkyahoo/client.h 2009/02/09 14:00:12 923817
@@ -705,6 +705,12 @@
* Send a Yahoo Ping packet to the server
*/
void sendPing();
+
+ /**
+ * Send all queued buddy icon requests
+ */
+ void processPictureQueue();
+
private:
void distribute( Transfer *transfer );

View File

@ -0,0 +1,25 @@
--- ../kopete/protocols/yahoo/libkyahoo/logintask.cpp 2009/01/06 17:13:38 906699
+++ ../kopete/protocols/yahoo/libkyahoo/logintask.cpp 2009/02/09 14:00:12 923817
@@ -66,6 +66,12 @@
YMSGTransfer *t = static_cast<YMSGTransfer *>(transfer);
+
+ if ( t->service() == Yahoo::ServicePing) {
+ emit buddyListReady();
+ return true;
+ }
+
switch (mState)
{
case (InitialState):
@@ -99,6 +105,9 @@
if (!t)
return false;
+ if ( t->service() == Yahoo::ServicePing)
+ return true;
+
switch (mState)
{
case (InitialState):

View File

@ -0,0 +1,10 @@
--- ../kopete/protocols/yahoo/libkyahoo/logintask.h 2009/01/06 17:13:38 906699
+++ ../kopete/protocols/yahoo/libkyahoo/logintask.h 2009/02/09 14:00:12 923817
@@ -62,6 +62,7 @@
void haveSessionID( uint );
void haveCookies();
void loginResponse( int, const QString& );
+ void buddyListReady();
private:
State mState;
Yahoo::Status m_stateOnConnect;