Avatar third state file. This will now request the Icon / Avatar if the user 
has changed it while they were offline, It only requests if they actually go to 
the state Online.


Notify of emails, It now notifys of how many emails you have unread and when 
you receive a new email it notifys you just like the real YM program who the 
email came from and the subject.


Send webcam notify this enables the prompt to be seen by the other user when 
you invite a user to your webcam.

Regards Michael Cole,.
Index: protocols/yahoo/libkyahoo/picturenotifiertask.cpp
===================================================================
--- protocols/yahoo/libkyahoo/picturenotifiertask.cpp	(revision 1074659)
+++ protocols/yahoo/libkyahoo/picturenotifiertask.cpp	(working copy)
@@ -118,7 +118,7 @@
 	kDebug(YAHOO_RAW_DEBUG) ;
 
 	QString	nick;		/* key = 4 */
-	int type;		/* key = 13: 1 = request, 2 = notification */
+	int type;		/* key = 13: 1 = request, 2 = notification, 0 = Just changed */
 	QString url;		/* key = 20 */
 	int checksum;		/* key = 192  */
 
@@ -131,6 +131,8 @@
 		emit pictureRequest( nick );
 	else if( type == 0 )
 		emit pictureInfoNotify( nick, KUrl( url ), checksum );
+	else if( type == 2 )
+		emit pictureInfoNotify( nick, KUrl( url ), checksum );
 }
 
 void PictureNotifierTask::parsePictureUploadResponse( YMSGTransfer *t )
Index: protocols/yahoo/libkyahoo/requestpicturetask.cpp
===================================================================
--- protocols/yahoo/libkyahoo/requestpicturetask.cpp	(revision 1074659)
+++ protocols/yahoo/libkyahoo/requestpicturetask.cpp	(working copy)
@@ -35,7 +35,7 @@
 {
 	YMSGTransfer *t = new YMSGTransfer(Yahoo::ServicePicture);
 	t->setId( client()->sessionID() );
-	t->setParam( 4, client()->userId().toLocal8Bit());
+	t->setParam( 1, client()->userId().toLocal8Bit());
 	t->setParam( 5, m_target.toLocal8Bit() );
 	t->setParam( 13, "1" );
 	send( t );
Index: protocols/yahoo/yahooaccount.cpp
===================================================================
--- protocols/yahoo/yahooaccount.cpp	(revision 1074659)
+++ protocols/yahoo/yahooaccount.cpp	(working copy)
@@ -1562,31 +1562,23 @@
 //	kDebug(YAHOO_GEN_DEBUG) ;
 }
 
-void YahooAccount::slotMailNotify( const QString& from, const QString& /* subject */, int cnt )
+void YahooAccount::slotMailNotify( const QString& from, const QString&  subject , int cnt )
 {
-//	kDebug(YAHOO_GEN_DEBUG) << "Mail count: " << cnt;
-
-	if ( cnt > m_currentMailCount && from.isEmpty() )
+	kDebug(YAHOO_GEN_DEBUG) << "Mail count: " << cnt;
+	
+	if ( cnt > 0 && from.isEmpty() )
 	{
-#ifdef __GNUC__
-#warning Fix KNotification here
-#endif
-#if 0
 		QObject::connect(KNotification::event( QLatin1String("yahoo_mail"), i18np( "You have one unread message in your Yahoo inbox.",
 			"You have %1 unread messages in your Yahoo inbox.", cnt ), QPixmap() , 0 ),
 		                 SIGNAL(activated(unsigned int ) ) , this, SLOT( slotOpenInbox() ) );
-#endif
+
 		m_currentMailCount = cnt;
 	}
-	else if ( cnt > m_currentMailCount )
+	else if ( cnt > 0 )
 	{	kDebug(YAHOO_GEN_DEBUG) << "attempting to trigger event";
-#ifdef __GNUC__
-#warning Fix KNotification here
-#endif
-#if 0
-		QObject::connect(KNotification::event( QLatin1String("yahoo_mail"), i18n( "You have a message from %1 in your Yahoo inbox.", from)
+	
+		QObject::connect(KNotification::event( QLatin1String("yahoo_mail"), i18n( "You have a message from %1 in your Yahoo inbox. <br><br>Subject: %2", from, subject )
 		                                       , QPixmap() , 0 ), SIGNAL(activated(unsigned int ) ) , this, SLOT( slotOpenInbox() ) );
-#endif
 		m_currentMailCount = cnt;
 	}
 }
Index: protocols/yahoo/libkyahoo/sendnotifytask.cpp
===================================================================
--- protocols/yahoo/libkyahoo/sendnotifytask.cpp	(revision 1074659)
+++ protocols/yahoo/libkyahoo/sendnotifytask.cpp	(working copy)
@@ -36,17 +36,23 @@
 	YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceNotify);
 	t->setId( client()->sessionID() );
 	t->setStatus( Yahoo::StatusNotify );
-	t->setParam( 4, client()->userId().toLocal8Bit() );
-	t->setParam( 5, m_target.toLocal8Bit() );
-	t->setParam( 14, " " );	
+
 	switch( m_type )
 	{
 	case NotifyTyping:
+		t->setParam( 4, client()->userId().toLocal8Bit() );
+		t->setParam( 5, m_target.toLocal8Bit() );
 		t->setParam( 13, m_state );
+		t->setParam( 14, " " );	
 		t->setParam( 49, "TYPING" );
 	break;
 	case NotifyWebcamInvite:
+		
+		kDebug(YAHOO_RAW_DEBUG) << "send invitation set Param";
+		t->setParam( 1, client()->userId().toLocal8Bit() );
+		t->setParam( 5, m_target.toLocal8Bit() );
 		t->setParam( 13, 0 );
+		t->setParam( 14, " " );	
 		t->setParam( 49, "WEBCAMINVITE" );		
 	break;
 	case NotifyGame:
_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel

Reply via email to