[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesupport/akonadi/server/src/storage
From: Volker Krause <vkrause () kde ! org>
Date: 2009-02-28 22:51:06
Message-ID: 1235861466.470226.32408.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 933443 by vkrause:
remove the old item retrieval code
M +0 -48 datastore.cpp
M +0 -6 datastore.h
--- trunk/kdesupport/akonadi/server/src/storage/datastore.cpp #933442:933443
@@ -52,10 +52,6 @@
using namespace Akonadi;
-QList<int> DataStore::mPendingItemDeliveries;
-QMutex DataStore::mPendingItemDeliveriesMutex;
-QWaitCondition DataStore::mPendingItemDeliveriesCondition;
-
/***************************************************************************
* DataStore *
***************************************************************************/
@@ -555,50 +551,6 @@
return ok;
}
-void Akonadi::DataStore::retrieveDataFromResource( qint64 uid, const QByteArray& \
remote_id, const QByteArray& mimeType,
- const QString &resource, const \
QStringList &parts )
-{
- // TODO: error handling
- qDebug() << "retrieveDataFromResource()" << uid;
-
- // check if that item is already being fetched by someone else
- mPendingItemDeliveriesMutex.lock();
- if ( mPendingItemDeliveries.contains( uid ) ) {
- qDebug() << "requestItemDelivery(): item already requested by other thread - \
waiting" << uid;
- mPendingItemDeliveriesCondition.wait( &mPendingItemDeliveriesMutex );
- qDebug() << "requestItemDelivery(): continuing";
- forever {
- if ( !mPendingItemDeliveries.contains( uid ) ) {
- mPendingItemDeliveriesMutex.unlock();
- break;
- }
- qDebug() << "requestItemDelivery(): item still requested by other thread - \
waiting again" << uid;
- mPendingItemDeliveriesCondition.wait( &mPendingItemDeliveriesMutex );
- }
- } else {
- qDebug() << "requestItemDelivery(): blocking uid" << uid;
- mPendingItemDeliveries << uid;
- mPendingItemDeliveriesMutex.unlock();
-
- qDebug() << "requestItemDelivery(): requested parts:" << parts;
-
- // call the resource
- org::freedesktop::Akonadi::Resource *interface = resourceInterface( resource \
);
- if ( interface ) {
- QDBusReply<bool> reply = interface->requestItemDelivery( uid, \
QString::fromUtf8(remote_id),
- \
QString::fromUtf8(mimeType), parts );
- if ( !reply.isValid() || reply.value() == false )
- qDebug() << "Retrieval from resource" << resource << "failed!" << \
reply.value() << reply.error();
- }
-
- mPendingItemDeliveriesMutex.lock();
- qDebug() << "requestItemDelivery(): freeing uid" << uid;
- mPendingItemDeliveries.removeAll( uid );
- mPendingItemDeliveriesCondition.wakeAll();
- mPendingItemDeliveriesMutex.unlock();
- }
-}
-
void DataStore::triggerCollectionSync( const Collection &collection )
{
org::freedesktop::Akonadi::Resource *interface = resourceInterface( \
collection.resource().name() );
--- trunk/kdesupport/akonadi/server/src/storage/datastore.h #933442:933443
@@ -254,8 +254,6 @@
void debugLastDbError( const char* actionDescription ) const;
void debugLastQueryError( const QSqlQuery &query, const char* actionDescription \
) const; public:
- void retrieveDataFromResource( qint64 uid, const QByteArray& remote_id, const \
QByteArray& mimeType,
- const QString &resource, const QStringList \
&parts ); void triggerCollectionSync( const Collection &collection );
/** Returns the id of the most recent inserted row, or -1 if there's no such
@@ -294,10 +292,6 @@
QByteArray mSessionId;
NotificationCollector* mNotificationCollector;
- static QList<int> mPendingItemDeliveries;
- static QMutex mPendingItemDeliveriesMutex;
- static QWaitCondition mPendingItemDeliveriesCondition;
-
// resource dbus interface cache
QHash<QString, org::freedesktop::Akonadi::Resource*> mResourceInterfaceCache;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic