Hello community,
here is the log from the commit of package kopete-protocol-facebook for openSUSE:Factory
checked in at Thu Jan 7 12:58:52 CET 2010.
--------
--- KDE/kopete-protocol-facebook/kopete-protocol-facebook.changes 2009-10-16 00:36:41.000000000 +0200
+++ /mounts/work_src_done/STABLE/kopete-protocol-facebook/kopete-protocol-facebook.changes 2010-01-02 01:17:22.000000000 +0100
@@ -1,0 +2,6 @@
+Fri Jan 1 23:40:48 UTC 2010 - duncan@kde.org
+
+- fix breakage due to protocol changes
+- 0.1.5
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
dmacvicar-kopete-facebook-faec2bc.tar.gz
New:
----
dmacvicar-kopete-facebook-3376a46.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kopete-protocol-facebook.spec ++++++
--- /var/tmp/diff_new_pack.ASuV7S/_old 2010-01-07 12:58:41.000000000 +0100
+++ /var/tmp/diff_new_pack.ASuV7S/_new 2010-01-07 12:58:41.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package kopete-protocol-facebook (Version 0.1.4)
+# spec file for package kopete-protocol-facebook (Version 0.1.5)
#
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,16 +17,16 @@
# norootforbuild
-%define gitrev faec2bc
+%define gitrev 3376a46
Name: kopete-protocol-facebook
BuildRequires: kopete-devel >= 4.2 libkdepimlibs4-devel libqjson-devel
-License: GPL v2 or later
+License: GPLv2+
Url: http://kopete.kde.org/
Group: System/GUI/KDE
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Facebook Protocol Support for Kopete
-Version: 0.1.4
+Version: 0.1.5
Release: 1
Source: dmacvicar-kopete-facebook-%{gitrev}.tar.gz
Provides: kde4-kopete-protocol-facebook = 0.1.2
++++++ dmacvicar-kopete-facebook-faec2bc.tar.gz -> dmacvicar-kopete-facebook-3376a46.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dmacvicar-kopete-facebook-faec2bc/facebook/.#json.cpp new/dmacvicar-kopete-facebook-3376a46/facebook/.#json.cpp
--- old/dmacvicar-kopete-facebook-faec2bc/facebook/.#json.cpp 2010-01-07 12:58:41.000000000 +0100
+++ new/dmacvicar-kopete-facebook-3376a46/facebook/.#json.cpp 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-symbolic link to duncan@tarro.9578:1242500824
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dmacvicar-kopete-facebook-faec2bc/facebook/chatservice.cpp new/dmacvicar-kopete-facebook-3376a46/facebook/chatservice.cpp
--- old/dmacvicar-kopete-facebook-faec2bc/facebook/chatservice.cpp 2009-10-15 23:58:29.000000000 +0200
+++ new/dmacvicar-kopete-facebook-3376a46/facebook/chatservice.cpp 2009-11-15 17:36:46.000000000 +0100
@@ -16,12 +16,14 @@
*/
// Useful resources when implementing the Facebook chat protocol
-//
+//
// http://code.google.com/p/pidgin-facebookchat/source/browse/trunk
// http://coderrr.wordpress.com/2008/05/06/facebook-chat-api/
// http://snipplr.com/view/6246/facebook-chat/
-// http://imfreedom.org/wiki/Facebook
// https://www.limewire.org/fisheye/browse/limecvs/components/facebook/src/main...
+//
+// The following is useful but partially outdated
+// http://imfreedom.org/wiki/Facebook
#include <QObject>
#include <QDebug>
@@ -50,14 +52,43 @@
namespace Facebook
{
+/*
+ TODO:
+ * find out what buddy_list.php is used for
+ - is update.php still necessary (FB still uses it)
+ * find out what reconnect.php is used for
+ - maybe it's the second step of FB visibility updating
+ */
+
+/*
+ When CONNECTing
+ 1. settings.php is used to set visibility=true
+ 2. update.php is POSTed and the following are returned:
+ - buddy info on own account
+ - buddy info on other online accounts
+ - other things
+ 3. reconnect.php is POSTed
+ - I'm guessing post_form_id and reason are the only two important params
+ - afaict reason=3 means page reloaded
+ (doesn't mark you as online if used initially)
+ - afaict reason=5 means used ``Go offline'' and now I've come back
+ (doesn't mark you as online if used initially)
+ - afaict reason=6 means just logged in
+ (doesn't mark you as online if used initially)
+ _. buddy_list.php is POSTed
+ - sometimes this returns the buddy infos just for me
+ - sometimes for others as well
+ */
+
#define FACEBOOK_URL "http://www.facebook.com"
#define FACEBOOK_LOGIN_URL "https://login.facebook.com/login.php"
-#define FACEBOOK_BUDDYLIST_URL "http://apps.facebook.com/ajax/presence/update.php"
+#define FACEBOOK_BUDDYLIST_URL "http://www.facebook.com/ajax/chat/buddy_list.php"
#define FACEBOOK_PAGE_URL "http://www.facebook.com/presence/popout.php"
#define FACEBOOK_VISIBILITY_URL "http://apps.facebook.com/ajax/chat/settings.php"
#define FACEBOOK_STATUS_URL "http://www.facebook.com/updatestatus.php"
#define FACEBOOK_MESSAGE_URL "http://www.facebook.com/ajax/chat/send.php"
#define FACEBOOK_ACK_MESSAGE_URL "http://www.facebook.com/ajax/chat/settings.php?_ecdc=false"
+#define FACEBOOK_RECONNECT_URL "http://www.facebook.com/ajax/presence/reconnect.php"
// only wait one second as the rest is done by the comet style connection
#define FACEBOOK_MESSAGE_POLL_INTERVAL 1000
@@ -76,13 +107,13 @@
while (i.hasNext())
{
i.next();
-
+
QStringList bothParams;
bothParams << i.key();
bothParams << QUrl::toPercentEncoding(i.value().toAscii());
paramList << bothParams.join("=");
}
-
+
data = paramList.join("&");
return data;
//return QString("Content-Type: application/x-www-form-urlencoded\nContent-Length: %1\n\n%2\n").arg(data.length()).arg(data);
@@ -131,7 +162,7 @@
QString location = QDesktopServices::storageLocation(QDesktopServices::CacheLocation);
diskCache->setCacheDirectory(location);
_network->setCache(diskCache);
-
+
QObject::connect(_network, SIGNAL(sslErrors( QNetworkReply *, const QList<QSslError> &)), this, SLOT(slotSslErrors( QNetworkReply *, const QList<QSslError> & )));
// timer for the buddylist, but we dont start it until we get the form_id
@@ -150,7 +181,7 @@
QString ChatService::userId() const
{
- return _user_id;
+ return _user_id;
}
void ChatService::setLoginInformation( const QString &login, const QString &pass )
@@ -176,13 +207,13 @@
// signals all users offline
foreach (QString userId, _availableBuddies.keys() )
{
- _availableBuddies.remove(userId);
+ _availableBuddies.remove(userId);
if ( _buddyInfos.contains(userId) )
emit buddyNotAvailable(_buddyInfos.value(userId));
else
qDebug() << "no info for buddy " << userId;
}
-
+
// clear cookies
_network->setCookieJar(new QNetworkCookieJar());
_loggedin = false;
@@ -194,12 +225,12 @@
void ChatService::logoutFromService()
{
if ( _loggedin )
- {
- disconnect();
+ {
+ disconnect();
emit logoutFromServiceFinished();
}
}
-
+
bool ChatService::isLoggedIn() const
{
return _loggedin;
@@ -227,10 +258,10 @@
void ChatService::startLoginRequest()
{
_buddylist_poll_timer->stop();
-
+
qDebug() << _network->cookieJar()->cookiesForUrl(QUrl(FACEBOOK_URL)).count() << " cookies";
QList<QNetworkCookie> cookies;
-
+
QMap params;
QUrl url(FACEBOOK_LOGIN_URL);
@@ -268,7 +299,7 @@
QNetworkReply *reply = _network->post(QNetworkRequest(url), data.toAscii());
reply->setParent(this);
-
+
QObject::connect(reply, SIGNAL(finished()), this, SLOT(slotLoginRequestFinished()));
QObject::connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(slotLoginRequestError(QNetworkReply::NetworkError)));
}
@@ -294,9 +325,9 @@
cookies << QNetworkCookie::parseCookies(rawcookie.toAscii());
}
qDebug() << "Received " << cookies.count() << " cookies";
-
+
_network->cookieJar()->setCookiesFromUrl(cookies, QUrl(FACEBOOK_URL));
-
+
QListIterator<QByteArray> header_it(reply->rawHeaderList());
while (header_it.hasNext())
@@ -313,21 +344,21 @@
if (cookie.name() == "c_user")
_user_id = cookie.value();
}
-
+
if ( _user_id.isEmpty() )
- {
+ {
qDebug() << "No user set";
_loggedin = false;
emit loginToServiceError();
return;
- }
+ }
else
qDebug() << "c_user: " << _user_id;
qDebug() << _network->cookieJar()->cookiesForUrl(QUrl(FACEBOOK_URL)).count() << " cookies";
// queue the job to grab the form_id
- QTimer::singleShot(0, this, SLOT(startRetrievePageRequest()));
+ QTimer::singleShot(0, this, SLOT(startRetrievePageRequest()));
}
void ChatService::slotLoginRequestError(QNetworkReply::NetworkError code)
@@ -340,21 +371,24 @@
{
// avoids two request in parallel
_buddylist_poll_timer->stop();
-
+
QMap params;
QUrl url(FACEBOOK_BUDDYLIST_URL);
+ params.insert("__a", "1");
params.insert("user", _user_id);
- params.insert("notifications", "1");
+ params.insert("fb_dtsg", "TOglY"); // No idea what this is
params.insert("popped_out", "false");
params.insert("force_render", "true");
params.insert("buddy_list", "1");
+ params.insert("post_form_id", _form_id);
+ params.insert("post_form_id_source", "AsyncRequest");
QString data = encodePostParams(params);
- qDebug() << data;
-
+
QNetworkReply *reply = _network->post(QNetworkRequest(url), data.toAscii());
+ qDebug() << "Buddy request: " << reply->url() << data;
reply->setParent(this);
-
+
QObject::connect(reply, SIGNAL(finished()), this, SLOT(slotRetrieveBuddyListRequestFinished()));
QObject::connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(slotRetrieveBuddyListRequestError(QNetworkReply::NetworkError)));
}
@@ -383,10 +417,10 @@
{
QMap params;
QUrl url(FACEBOOK_PAGE_URL);
-
+
QNetworkReply *reply = _network->get(QNetworkRequest(url));
reply->setParent(this);
-
+
QObject::connect(reply, SIGNAL(finished()), this, SLOT(slotRetrievePageRequestFinished()));
QObject::connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(slotRetrievePageRequestError(QNetworkReply::NetworkError)));
}
@@ -394,26 +428,26 @@
void ChatService::slotRetrievePageRequestFinished()
{
qDebug() << "got facebook page, looking for form_id";
-
+
QNetworkReply *reply = qobject_cast(sender());
if ( !reply )
return;
QString page(reply->readAll());
-
+
_form_id = scrapValue(page, "id=\"post_form_id\" name=\"post_form_id\" value=\"");
-
+
if ( _form_id.isEmpty() )
{
qDebug() << "Could not find form_id" << _form_id;
return;
}
-
+
qDebug() << "Found form_id: " << _form_id;
qDebug() << "looking for channel id";
_channel = scrapValue(page, "\", \"channel");
-
+
if ( _form_id.isEmpty() )
{
qDebug() << "Could not find form_id" << _form_id;
@@ -451,12 +485,13 @@
{
Q_UNUSED(reply);
Q_UNUSED(errors);
-
+
qDebug() << "ssl error";
}
void ChatService::startUpdateVisibilityRequest(bool visible)
{
+ _visible = visible;
QMap params;
QUrl url(FACEBOOK_VISIBILITY_URL);
// visibility=true&post_form_id=1234
@@ -464,9 +499,10 @@
params.insert("post_form_id", _form_id );
QString data = encodePostParams(params);
+ qDebug() << data;
QNetworkReply *reply = _network->post(QNetworkRequest(url), data.toAscii());
reply->setParent(this);
-
+
QObject::connect(reply, SIGNAL(finished()), this, SLOT(slotUpdateVisibilityRequestFinished()));
QObject::connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(slotUpdateVisibilityRequestError(QNetworkReply::NetworkError)));
}
@@ -474,6 +510,10 @@
void ChatService::slotUpdateVisibilityRequestFinished()
{
qDebug() << "visibility updated";
+ if (_visible) {
+ qDebug() << "reconnecting...";
+ startReconnectRequest(3);
+ }
}
void ChatService::slotUpdateVisibilityRequestError(QNetworkReply::NetworkError code)
@@ -481,18 +521,43 @@
qDebug() << "error on when setting visibility" << code;
}
+void ChatService::startReconnectRequest(int reason) {
+ QMap params;
+ QUrl url(FACEBOOK_RECONNECT_URL);
+ // reason=6&post_form_id=1234
+ params.insert("reason", QString("%1").arg(reason).toStdString().c_str());
+ params.insert("post_form_id", _form_id);
+
+ QString data = encodePostParams(params);
+ qDebug() << data;
+ QNetworkReply *reply = _network->post(QNetworkRequest(url), data.toAscii());
+ reply->setParent(this);
+
+ QObject::connect(reply, SIGNAL(finished()), this, SLOT(slotReconnectRequestFinished()));
+ QObject::connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(slotReconnectRequestError(QNetworkReply::NetworkError)));
+}
+
+void ChatService::slotReconnectRequestFinished() {
+ qDebug() << "reconnect finished";
+}
+
+void ChatService::slotReconnectRequestError(QNetworkReply::NetworkError code) {
+ qDebug() << "error on when reconnecting" << code;
+}
+
void ChatService::startUpdateStatusRequest(const QString &status)
{
- qDebug() << "starting update status request...";
+ qDebug() << "starting update status request...";
QMap params;
QUrl url(FACEBOOK_STATUS_URL);
- // visibility=true&post_form_id=1234
+ // status=<status>
params.insert("status", status );
QString data = encodePostParams(params);
+ qDebug() << data;
QNetworkReply *reply = _network->post(QNetworkRequest(url), data.toAscii());
reply->setParent(this);
-
+
QObject::connect(reply, SIGNAL(finished()), this, SLOT(slotUpdateStatusRequestFinished()));
QObject::connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(slotUpdateStatusRequestError(QNetworkReply::NetworkError)));
}
@@ -524,7 +589,7 @@
params.insert("post_form_id", _form_id);
_messageQueue[message.messageId()] = message;
-
+
QString data = encodePostParams(params);
// pass the message id as an attribute
@@ -533,8 +598,8 @@
qDebug() << "startMessageSendRequest() posting to " << url;
QNetworkReply *reply = _network->post(request, data.toAscii());
- qDebug() << "startMessageSendRequest() going to set parent";
- reply->setParent(this);
+ qDebug() << "startMessageSendRequest() going to set parent";
+ reply->setParent(this);
qDebug() << "startMessageSendRequest() connecting signals";
QObject::connect(reply, SIGNAL(finished()), this, SLOT(slotMessageSendRequestFinished()));
QObject::connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(slotMessageSendRequestError(QNetworkReply::NetworkError)));
@@ -554,7 +619,7 @@
if ( ! _messageQueue.contains(messageid) )
return;
-
+
emit messageSendFinished(_messageQueue[messageid]);
_messageQueue.remove(messageid);
}
@@ -571,7 +636,7 @@
if ( ! _messageQueue.contains(messageid) )
return;
-
+
emit messageSendError(_messageQueue[messageid]);
_messageQueue.remove(messageid);
@@ -592,11 +657,11 @@
QNetworkReply *reply = _network->get(QNetworkRequest(url));
reply->setParent(this);
-
+
QObject::connect(reply, SIGNAL(finished()), this, SLOT(slotGetMessagesRequestFinished()));
QObject::connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(slotGetMessagesRequestError(QNetworkReply::NetworkError)));
}
-
+
void ChatService::slotGetMessagesRequestFinished()
{
QNetworkReply *reply = qobject_cast(sender());
@@ -619,12 +684,13 @@
// read the useless for
input->read(QString("for (;;);").count());
QString json = input->readAll();
-
+
QJson::Parser parser;
-
+
+
bool ok = true;
QVariant result = parser.parse(json.toAscii(), &ok);
-
+
qDebug() << json;
if (ok)
@@ -640,9 +706,9 @@
qDebug() << "Server message reply is not a map";
return;
}
-
+
QString tValue = result.toMap()["t"].toString();
-
+
// in case we got a new seq,
if ( tValue == "continue" )
{
@@ -666,19 +732,19 @@
{
// our old seq was zero, and now it got reseted, to zero
// which may be some problem.
- qDebug() << "bad: old seq and new seq are 0";
+ qDebug() << "bad: old seq and new seq are 0";
disconnect();
emit error(ErrorDisconnected, "");
- return;
+ return;
}
else
{
// we had a normal seq, even zero, and it got resetted, this
// means we have to read the channel value and form_id again
- qDebug() << "seq reset by server";
+ qDebug() << "seq reset by server";
QTimer::singleShot(0, this, SLOT(startRetrievePageRequest()));
- return;
- }
+ return;
+ }
}
else if ( tValue == "msg" )
{
@@ -698,14 +764,14 @@
qDebug() << "Error decoding message item";
continue;
}
-
+
if ( ms.toMap()["type"].toString() == "typ" )
{
// typing event
ChatMessage message;
if ( message.readVariant(ms.toMap()) )
{
- qDebug() << "typing from: " << message.from() << " to " << message.to();
+ qDebug() << "typing from: " << message.from() << " to " << message.to();
emit typingEventAvailable(message.from(), message.to());
}
else
@@ -727,7 +793,7 @@
// the ack only if the message is not set _to_ us
if ( message.from() != userId() )
{
- qDebug() << "sending ack for message from " << message.fromName();
+ qDebug() << "sending ack for message from " << message.fromName();
QMap params;
params.insert("focus_chat", message.from() );
params.insert("windows_id", "12345" ); params.insert("post_form_id", _form_id );
@@ -736,9 +802,9 @@
QNetworkReply *reply = _network->post(QNetworkRequest(ackurl), data.toAscii() );
reply->setParent(this);
QObject::connect(reply, SIGNAL(finished()), this, SLOT(slotMessageAckRequestFinished()));
- QObject::connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(slotMessageAckRequestError(QNetworkReply::NetworkError)));
+ QObject::connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(slotMessageAckRequestError(QNetworkReply::NetworkError)));
}
- }
+ }
else
{
qDebug() << "Error decoding message";
@@ -751,13 +817,13 @@
{
// complain
}
-
-
+
+
qDebug() << "We got a message!!!";
// process it
_seq++;
}
-
+
// setup next poll
QTimer::singleShot(FACEBOOK_MESSAGE_POLL_INTERVAL, this, SLOT(startGetMessagesRequest()));
}
@@ -765,13 +831,13 @@
{
qDebug() << "invalid json reply";
qDebug() << "parser error message: " << parser.errorString();
- qDebug() << json;
+ qDebug() << json;
}
}
void ChatService::slotMessageAckRequestFinished()
{
- qDebug() << "message ack done";
+ qDebug() << "message ack done";
}
@@ -786,7 +852,7 @@
QString errorSummary;
QString errorDesc;
bool listChanged = true;
-
+
// we could pass the input IO device
// directly to the JSON reader but we need
// first to strip the for{;;};" string
@@ -797,10 +863,14 @@
// the format we will have hard time figuring out
responseInput->read(QString("for (;;);").count());
- QJson::Parser parser;
+ QByteArray responseText = responseInput->readAll();
+ qDebug() << "Buddy List JSON: " << responseText;
+
+ QJson::Parser parser;
bool ok = true;
- QVariant result = QJson::Parser().parse(responseInput, &ok);
-
+ //QVariant result = QJson::Parser().parse(responseInput, &ok);
+ QVariant result = QJson::Parser().parse(responseText, &ok);
+
if (ok)
{
// No errors occured
@@ -813,7 +883,7 @@
error = result.toMap()["error"].toBool();
errorSummary = result.toMap()["errorSummary"].toString();
errorDesc = result.toMap()["errorDescription"].toString();
-
+
QVariantMap payload = result.toMap()["payload"].toMap();
QVariantMap buddy_list = payload["buddy_list"].toMap();
listChanged = true; //buddy_list["listChanged"].toBool();
@@ -821,12 +891,12 @@
QVariantMap userInfos = buddy_list["userInfos"].toMap();
if ( ! listChanged )
- {
+ {
qDebug() << "buddy list did not change. " << availableCount << " buddies available" ;
- return;
+ return;
}
-
-
+
+
foreach (QString userId, userInfos.keys())
{
BuddyInfo buddy;
@@ -836,7 +906,7 @@
qDebug() << "invalid buddy";
qDebug() << buddy;
}
- qDebug() << "got buddy: " << buddy;
+ qDebug() << "got buddy: " << buddy;
_buddyInfos[userId] = buddy;
emit buddyInformation(buddy);
}
@@ -848,13 +918,13 @@
{
if ( ! nowAvailableList.contains(userId) )
{
- _availableBuddies.remove(userId);
+ _availableBuddies.remove(userId);
if ( _buddyInfos.contains(userId) )
emit buddyNotAvailable(_buddyInfos.value(userId));
else
qDebug() << "no info for buddy " << userId;
}
-
+
}
// update available contacts
@@ -863,11 +933,11 @@
bool idle = nowAvailableList.value(userId).toMap()["i"].toBool();
if ( _buddyInfos.contains(userId) )
{
-
+
// if the user id is already there with the same idle status, don't emit
// anything
qDebug() << "checking status for" << userId << "(" << _buddyInfos.value(userId).name() << ")";
- if ( _availableBuddies.contains(userId) &&
+ if ( _availableBuddies.contains(userId) &&
( _availableBuddies.value(userId) == idle ) )
continue;
@@ -881,12 +951,12 @@
if (firstTime && idle)
emit buddyAvailable(_buddyInfos.value(userId), false);
emit buddyAvailable(_buddyInfos.value(userId), idle);
- }
+ }
else
- {
- qDebug() << "no info for buddy " << userId;
- }
- }
+ {
+ qDebug() << "no info for buddy " << userId;
+ }
+ }
}
else
{
@@ -903,19 +973,19 @@
{
if ( ! _buddyInfos.contains(buddyid) )
return;
-
+
QUrl url = QUrl(_buddyInfos.value(buddyid).thumbSrc());
QNetworkRequest request(url);
request.setAttribute(QNetworkRequest::User, buddyid);
-
+
qDebug() << "requesting photo for " << buddyid << " at " << url;
QNetworkReply *reply = _network->get(request);
reply->setParent(this);
-
+
QObject::connect(reply, SIGNAL(finished()), this, SLOT(slotRetrievePictureRequestFinished()));
QObject::connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(slotRetrievePictureRequestError(QNetworkReply::NetworkError)));
}
-
+
void ChatService::slotRetrievePictureRequestFinished()
{
QNetworkReply *reply = qobject_cast(sender());
@@ -930,7 +1000,7 @@
qDebug() << "photo for unknown buddy";
return;
}
-
+
QImage image(QImage::fromData(reply->readAll()));
if ( image.format() == QImage::Format_Invalid )
{
@@ -947,4 +1017,4 @@
}
} //ns
-
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dmacvicar-kopete-facebook-faec2bc/facebook/chatservice.h new/dmacvicar-kopete-facebook-3376a46/facebook/chatservice.h
--- old/dmacvicar-kopete-facebook-faec2bc/facebook/chatservice.h 2009-10-15 23:58:29.000000000 +0200
+++ new/dmacvicar-kopete-facebook-3376a46/facebook/chatservice.h 2009-11-15 17:36:46.000000000 +0100
@@ -139,6 +139,15 @@
void startUpdateStatusRequest(const QString &status);
/**
+ * Initiate a reconnect request
+
+ * Note how I don't say what a reconnect request is or what it's
+ * used for. Hell, the usefulness of the function descriptions here
+ * is on par with: i++; // increment i
+ */
+ void startReconnectRequest(int reason);
+
+ /**
* Initiates a message send request
*/
void startMessageSendRequest( const ChatMessage &message );
@@ -200,6 +209,17 @@
*/
void slotUpdateVisibilityRequestError(QNetworkReply::NetworkError code);
+/**
+ * Handles the response from the page request to reconnect when it
+ * is finished
+ */
+ void slotReconnectRequestFinished();
+ /**
+ * Handles the response from the page request to reconnect when it
+ * has failed
+ */
+ void slotReconnectRequestError(QNetworkReply::NetworkError code);
+
/**
* Handles the response from the page request to update status
* when it is finished
@@ -343,6 +363,7 @@
QString _password;
QString _form_id;
QString _channel;
+ bool _visible;
int _seq;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dmacvicar-kopete-facebook-faec2bc/facebookaccount.cpp new/dmacvicar-kopete-facebook-3376a46/facebookaccount.cpp
--- old/dmacvicar-kopete-facebook-faec2bc/facebookaccount.cpp 2009-10-15 23:58:29.000000000 +0200
+++ new/dmacvicar-kopete-facebook-3376a46/facebookaccount.cpp 2009-11-15 17:36:46.000000000 +0100
@@ -52,6 +52,7 @@
FacebookAccount::~FacebookAccount()
{
+ qDebug() << "destructing FacebookAccount";
}
FacebookContact * FacebookAccount::contact( const QString &id )
@@ -156,6 +157,7 @@
QObject::connect(m_service, SIGNAL(buddyThumbAvailable( const QString &, const QImage & )), this, SLOT(slotBuddyThumbAvailable( const QString &, const QImage & )));
QObject::connect(m_service, SIGNAL(typingEventAvailable(const QString &, const QString &)), this, SLOT(slotTypingEventAvailable(const QString &, const QString &)));
QObject::connect(m_service, SIGNAL(error( int, const QString &)), this, SLOT(slotError(int, const QString &)));
+ QObject::connect(m_service, SIGNAL(logoutFromServiceFinished()), this, SLOT(slotLogoutFromServiceFinished()));
}
void FacebookAccount::slotLoginToServiceError()
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org