rpms/kdenetwork/F-13 kdenetwork-4.4.2-kopete_yahoo_kdebug226699.patch, NONE, 1.1 kdenetwork.spec, 1.234, 1.235
Rex Dieter
rdieter at fedoraproject.org
Thu Apr 15 18:41:01 UTC 2010
Author: rdieter
Update of /cvs/pkgs/rpms/kdenetwork/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv2672
Modified Files:
kdenetwork.spec
Added Files:
kdenetwork-4.4.2-kopete_yahoo_kdebug226699.patch
Log Message:
* Thu Apr 15 2010 Rex Dieter <rdieter at fedoraproject.org> - 7:4.4.2-2
- kopete/yahoo: Outgoing messages are not received (kde#226699)
kdenetwork-4.4.2-kopete_yahoo_kdebug226699.patch:
libkyahoo/client.cpp | 51 ++++++++++++++++--------------------------------
libkyahoo/client.h | 18 ++++++++--------
libkyahoo/listtask.cpp | 52 +++++++++++++++----------------------------------
libkyahoo/listtask.h | 2 -
yahooaccount.cpp | 2 -
yahoocontact.cpp | 13 +++++-------
yahoocontact.h | 5 +---
7 files changed, 53 insertions(+), 90 deletions(-)
--- NEW FILE kdenetwork-4.4.2-kopete_yahoo_kdebug226699.patch ---
Index: yahoocontact.h
===================================================================
--- yahoocontact.h (revision 1107747)
+++ yahoocontact.h (revision 1115232)
@@ -56,8 +56,8 @@
void setOnlineStatus(const Kopete::OnlineStatus &status);
void setYahooStatus( const Kopete::OnlineStatus& );
- void setStealthed( bool );
- bool stealthed();
+ void updateStealthed();
+ bool stealthed() const;
/** The group name getter and setter methods**/
@@ -121,7 +121,6 @@
YahooChatSession *m_manager;
YahooWebcamDialog* m_webcamDialog;
YahooAccount* m_account;
- bool m_stealthed;
bool m_receivingWebcam;
bool m_sessionActive;
Index: libkyahoo/listtask.cpp
===================================================================
--- libkyahoo/listtask.cpp (revision 1107747)
+++ libkyahoo/listtask.cpp (revision 1115232)
@@ -34,9 +34,6 @@
}
-QStringList loginstealthedbuddies;
-QStringList loginunstealthedbuddies;
-
bool ListTask::take( Transfer* transfer )
{
if ( !forMe( transfer ) )
@@ -85,47 +82,30 @@
case 301:
if( p.second == "319"){
emit gotBuddy( buddy, QString(), group );
- /**
- * Note: michaelacole
- * Since you can log in from other places and remove or add Perm Offline status
- * We have to reset both conditions at login
- * Yahoo sends this data at this time,
- * so better to compile list of both now then notify kopete client.
- */
- loginunstealthedbuddies.append( buddy );
}
break;
case 317:
if( p.second == "2"){
- kDebug(YAHOO_RAW_DEBUG) << "Stealthed setting on" << buddy ;
- /** Note: michaelacole
- * Since you can log in from other places and remove or add Perm Offline status
- * We have to reset both conditions at login
- * Yahoo sends this data at this time,
- * so better to compile list of both now then notify kopete client.
- */
- loginstealthedbuddies.append( buddy );
- loginunstealthedbuddies.removeAll( buddy );
+ kDebug(YAHOO_RAW_DEBUG) << "Stealthed setting on" << buddy ;
+ emit stealthStatusChanged( buddy, Yahoo::StealthActive );
};
break;
- /**
- * Note: michaelacole
- * Other buddy codes are here for add to list and blacklist
- * I will need to capute more codes for addition here.
- * Blacklist is done on the server at Yahoo whereas
- * Kopete has its own plugin for blacklisting.
- */
+ /**
+ * Note: michaelacole
+ * Other buddy codes are here for add to list and blacklist
+ * I will need to capute more codes for addition here.
+ * Blacklist is done on the server at Yahoo whereas
+ * Kopete has its own plugin for blacklisting.
+ */
}
}
- /**
- * Note: michaelacole
- * Since you can log in from other places and remove or add Perm Offline status
- * We have to reset both conditions at login
- * Yahoo sends this data at this time,
- * so better to compile list of both now then notify kopete client.
- */
- client()->notifyUnstealthedBuddies( loginunstealthedbuddies );
- client()->notifyStealthedBuddies( loginstealthedbuddies );
+ /**
+ * Note: michaelacole
+ * Since you can log in from other places and remove or add Perm Offline status
+ * We have to reset both conditions at login
+ * Yahoo sends this data at this time,
+ * so better to compile list of both now then notify kopete client.
+ */
}
Index: libkyahoo/client.cpp
===================================================================
--- libkyahoo/client.cpp (revision 1107747)
+++ libkyahoo/client.cpp (revision 1115232)
@@ -76,8 +76,7 @@
int error;
QString errorString;
QString errorInformation;
- QStringList stealthedBuddies;
- QStringList unstealthedBuddies;
+ QSet<QString> stealthedBuddies;
// tasks
bool tasksInitialized;
LoginTask * loginTask;
@@ -133,14 +132,13 @@
QObject::connect( d->loginTask, SIGNAL( haveSessionID( uint ) ), SLOT( lt_gotSessionID( uint ) ) );
QObject::connect( d->loginTask, SIGNAL( buddyListReady() ), SLOT( processPictureQueue() ) );
- QObject::connect( d->loginTask, SIGNAL( buddyListReady() ), SLOT( processStealthQueue() ) );
QObject::connect( d->loginTask, SIGNAL( loginResponse( int, const QString& ) ),
SLOT( slotLoginResponse( int, const QString& ) ) );
QObject::connect( d->loginTask, SIGNAL( haveCookies() ), SLOT( slotGotCookies() ) );
QObject::connect( d->listTask, SIGNAL( gotBuddy(const QString &, const QString &, const QString &) ),
SIGNAL( gotBuddy(const QString &, const QString &, const QString &) ) );
QObject::connect( d->listTask, SIGNAL( stealthStatusChanged( const QString&, Yahoo::StealthStatus ) ),
- SIGNAL( stealthStatusChanged( const QString&, Yahoo::StealthStatus ) ) );
+ SLOT( notifyStealthStatusChanged( const QString&, Yahoo::StealthStatus ) ) );
}
Client::~Client()
@@ -182,9 +180,11 @@
emit connected();
kDebug(YAHOO_RAW_DEBUG) << " starting login task ... ";
+ // Clear stealth settings
+ d->stealthedBuddies.clear();
+
d->loginTask->setStateOnConnect( (d->statusOnConnect == Yahoo::StatusInvisible) ? Yahoo::StatusInvisible : Yahoo::StatusAvailable );
d->loginTask->go();
- processStealthQueue();
d->active = true;
}
@@ -615,29 +615,6 @@
spt->go( true );
}
-// **** Stealth Handling **** michaelacole
-void Client::processStealthQueue()
-{
- if( d->buddyListReady ){
- while (!d->unstealthedBuddies.isEmpty())
- {
- QString it;
- it = d->unstealthedBuddies.takeFirst();
- kDebug(YAHOO_RAW_DEBUG) << "unstealthed setting set on" << it;
- stealthContact( it, Yahoo::StealthOffline , Yahoo::StealthNotActive );
- }
-
- while (!d->stealthedBuddies.isEmpty())
- {
- QString it;
- it = d->stealthedBuddies.takeFirst();
- kDebug(YAHOO_RAW_DEBUG) << "stealthed setting set on" << it ;
- stealthContact( it, Yahoo::StealthPermOffline , Yahoo::StealthActive );
- }
- }
-}
-
-
// ***** Webcam handling *****
void Client::requestWebcam( const QString &userId )
@@ -767,14 +744,22 @@
emit error( level );
}
-void Client::notifyStealthedBuddies( const QStringList &buddies)
+Yahoo::StealthStatus Client::stealthStatus( const QString &userId ) const
{
- d->stealthedBuddies = buddies;
+ if ( d->stealthedBuddies.contains( userId ) )
+ return Yahoo::StealthActive;
+ else
+ return Yahoo::StealthNotActive;
}
-void Client::notifyUnstealthedBuddies( const QStringList &buddies)
+void Client::notifyStealthStatusChanged( const QString &userId, Yahoo::StealthStatus state )
{
- d->unstealthedBuddies = buddies;
+ if ( state == Yahoo::StealthActive )
+ d->stealthedBuddies.insert( userId );
+ else
+ d->stealthedBuddies.remove( userId );
+
+ emit stealthStatusChanged( userId, state );
}
QString Client::userId()
@@ -902,7 +887,7 @@
QObject::connect( d->statusTask, SIGNAL( statusChanged(QString,int,const QString,int,int,int) ),
SIGNAL( statusChanged(QString,int,const QString,int,int,int) ) );
QObject::connect( d->statusTask, SIGNAL( stealthStatusChanged( const QString&, Yahoo::StealthStatus ) ),
- SIGNAL( stealthStatusChanged( const QString&, Yahoo::StealthStatus ) ) );
+ SLOT( notifyStealthStatusChanged( const QString&, Yahoo::StealthStatus ) ) );
QObject::connect( d->statusTask, SIGNAL( loginResponse( int, const QString& ) ),
SLOT( slotLoginResponse( int, const QString& ) ) );
QObject::connect( d->statusTask, SIGNAL( authorizationRejected( const QString&, const QString& ) ),
Index: libkyahoo/listtask.h
===================================================================
--- libkyahoo/listtask.h (revision 1107747)
+++ libkyahoo/listtask.h (revision 1115232)
@@ -40,7 +40,7 @@
signals:
void gotBuddy(const QString&, const QString&, const QString&);
-
+ void stealthStatusChanged( const QString&, Yahoo::StealthStatus );
};
#endif
Index: libkyahoo/client.h
===================================================================
--- libkyahoo/client.h (revision 1107747)
+++ libkyahoo/client.h (revision 1115232)
@@ -189,6 +189,12 @@
void stealthContact( QString const &userId, Yahoo::StealthMode mode, Yahoo::StealthStatus state );
/**
+ * Get the stealth status of a buddy
+ * @param userId the yahoo ID of the buddy
+ */
+ Yahoo::StealthStatus stealthStatus( const QString &userId ) const;
+
+ /**
* Request the buddy's picture
* @param userId the yahoo ID of the buddy
*/
@@ -456,12 +462,6 @@
*/
void notifyError( const QString &info, const QString &errorString, LogLevel level );
- /**
- * Steathed information from login..
- */
- void notifyStealthedBuddies( const QStringList &buddies);
- void notifyUnstealthedBuddies( const QStringList &buddies);
-
signals:
/** CONNECTION EVENTS */
/**
@@ -723,10 +723,10 @@
*/
void processPictureQueue();
- /**
- * Update all Stealth info after login
+ /**
+ * Process steathed change.
*/
- void processStealthQueue();
+ void notifyStealthStatusChanged( const QString &, Yahoo::StealthStatus );
private:
void distribute( Transfer *transfer );
Index: yahoocontact.cpp
===================================================================
--- yahoocontact.cpp (revision 1107747)
+++ yahoocontact.cpp (revision 1115232)
@@ -74,7 +74,6 @@
m_manager = 0L;
m_account = account;
m_YABEntry = 0L;
- m_stealthed = false;
m_receivingWebcam = false;
m_sessionActive = false;
@@ -109,7 +108,8 @@
void YahooContact::setOnlineStatus(const Kopete::OnlineStatus &status)
{
- if( m_stealthed && status.internalStatus() <= 999) // Not Stealted -> Stealthed
+ bool isStealthed = stealthed();
+ if( isStealthed && status.internalStatus() <= 999) // Not Stealted -> Stealthed
{
Contact::setOnlineStatus(
Kopete::OnlineStatus(status.status() ,
@@ -119,7 +119,7 @@
status.overlayIcons() + QStringList("yahoo_stealthed") ,
i18n("%1|Stealthed", status.description() ) ) );
}
- else if( !m_stealthed && status.internalStatus() > 999 )// Stealthed -> Not Stealthed
+ else if( !isStealthed && status.internalStatus() > 999 )// Stealthed -> Not Stealthed
Contact::setOnlineStatus( static_cast< YahooProtocol *>( protocol() )->statusFromYahoo( status.internalStatus() - 1000 ) );
else
Contact::setOnlineStatus( status );
@@ -128,15 +128,14 @@
setStatusMessage( Kopete::StatusMessage() );
}
-void YahooContact::setStealthed( bool stealthed )
+void YahooContact::updateStealthed()
{
- m_stealthed = stealthed;
setOnlineStatus( onlineStatus() );
}
-bool YahooContact::stealthed()
+bool YahooContact::stealthed() const
{
- return m_stealthed;
+ return (m_account->yahooSession()->stealthStatus( m_userId ) == Yahoo::StealthActive );
}
void YahooContact::serialize(QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData)
Index: yahooaccount.cpp
===================================================================
--- yahooaccount.cpp (revision 1107747)
+++ yahooaccount.cpp (revision 1115232)
@@ -978,7 +978,7 @@
kDebug(YAHOO_GEN_DEBUG) << "contact " << who << " doesn't exist.";
return;
}
- kc->setStealthed( state == Yahoo::StealthActive );
+ kc->updateStealthed();
}
QString YahooAccount::prepareIncomingMessage( const QString &messageText )
Index: kdenetwork.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdenetwork/F-13/kdenetwork.spec,v
retrieving revision 1.234
retrieving revision 1.235
diff -u -p -r1.234 -r1.235
--- kdenetwork.spec 3 Apr 2010 14:47:59 -0000 1.234
+++ kdenetwork.spec 15 Apr 2010 18:41:00 -0000 1.235
@@ -3,7 +3,7 @@ Summary: KDE Network Applications
Name: kdenetwork
Epoch: 7
Version: 4.4.2
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
Group: Applications/Internet
@@ -20,6 +20,9 @@ Patch2: kdenetwork-4.3.3-resolv-conf-pat
## upstream patches
Patch100: kdenetwork-4.4.2-qt47.patch
+# http://websvn.kde.org/?revision=1110828&view=revision
+# svn diff -r1107747:1115232 svn://anonsvn.kde.org/home/kde/branches/KDE/4.4/kdenetwork/kopete/protocols/yahoo/
+Patch101: kdenetwork-4.4.2-kopete_yahoo_kdebug226699.patch
%if 0%{?fedora}
BuildRequires: avahi-compat-libdns_sd-devel
@@ -106,6 +109,9 @@ Requires: kdelibs4-devel
%patch1 -p1 -b .icon
%patch2 -p1 -b .resolv-conf-path
%patch100 -p1 -b .qt47
+pushd kopete/protocols/yahoo
+%patch101 -p0 -b .kopete_yahoo_kdebug226699
+popd
%build
@@ -196,6 +202,9 @@ fi
%changelog
+* Thu Apr 15 2010 Rex Dieter <rdieter at fedoraproject.org> - 7:4.4.2-2
+- kopete/yahoo: Outgoing messages are not received (kde#226699)
+
* Mon Mar 29 2010 Lukas Tinkl <ltinkl at redhat.com> - 7:4.4.2-1
- 4.4.2
More information about the scm-commits
mailing list