akonadi
20 #include "changenotificationdependenciesfactory_p.h"
21 #include "dbusconnectionpool.h"
22 #include "notificationsourceinterface.h"
23 #include "notificationmanagerinterface.h"
24 #include "changemediator_p.h"
25 #include "servermanager.h"
27 #include <KComponentData>
29 #include <qdbusextratypes.h>
31 using namespace Akonadi;
33 QObject* ChangeNotificationDependenciesFactory::createNotificationSource(QObject *parent)
35 org::freedesktop::Akonadi::NotificationManager *manager =
36 new org::freedesktop::Akonadi::NotificationManager(
38 QLatin1String(
"/notifications" ),
39 DBusConnectionPool::threadConnection() );
46 QDBusObjectPath p = manager->subscribe( KGlobal::mainComponent().componentName() );
47 const bool validError = manager->lastError().isValid();
54 org::freedesktop::Akonadi::NotificationSource *notificationSource =
55 new org::freedesktop::Akonadi::NotificationSource(
58 DBusConnectionPool::threadConnection(), parent );
60 if ( !notificationSource ) {
64 return notificationSource;
67 QObject* ChangeNotificationDependenciesFactory::createChangeMediator(QObject* parent)
70 return ChangeMediator::instance();
73 CollectionCache* ChangeNotificationDependenciesFactory::createCollectionCache(
int maxCapacity,
Session *session)
78 ItemCache* ChangeNotificationDependenciesFactory::createItemCache(
int maxCapacity,
Session* session)
80 return new ItemCache( maxCapacity, session );
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:32 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.