akonadi
20 #include "changenotificationdependenciesfactory_p.h"
21 #include "dbusconnectionpool.h"
22 #include "notificationsourceinterface.h"
23 #include "notificationmanagerinterface.h"
24 #include "changemediator_p.h"
26 #include <KComponentData>
28 #include <qdbusextratypes.h>
30 using namespace Akonadi;
32 QObject* ChangeNotificationDependenciesFactory::createNotificationSource(QObject *parent)
34 org::freedesktop::Akonadi::NotificationManager manager(
35 QLatin1String(
"org.freedesktop.Akonadi" ),
36 QLatin1String(
"/notifications" ),
37 DBusConnectionPool::threadConnection() );
39 QDBusObjectPath p = manager.subscribe( KGlobal::mainComponent().componentName() );
40 if ( manager.lastError().isValid() ) {
45 org::freedesktop::Akonadi::NotificationSource *notificationSource =
new org::freedesktop::Akonadi::NotificationSource(
46 QLatin1String(
"org.freedesktop.Akonadi" ),
48 DBusConnectionPool::threadConnection(), parent );
50 if ( !notificationSource ) {
54 return notificationSource;
57 QObject* ChangeNotificationDependenciesFactory::createChangeMediator(QObject* parent)
60 return ChangeMediator::instance();
63 CollectionCache* ChangeNotificationDependenciesFactory::createCollectionCache(
int maxCapacity,
Session *session)
68 ItemCache* ChangeNotificationDependenciesFactory::createItemCache(
int maxCapacity,
Session* session)
70 return new ItemCache(maxCapacity, session);
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Dec 10 2012 13:48:07 by
doxygen 1.8.1.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.