~ubuntu-branches/ubuntu/quantal/akonadi/quantal

« back to all changes in this revision

Viewing changes to server/src/main.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-01-24 23:43:13 UTC
  • mto: (3.1.12 sid)
  • mto: This revision was merged to the branch mainline in revision 69.
  • Revision ID: package-import@ubuntu.com-20120124234313-ooald4uh9w8jilyw
Tags: upstream-1.7.0
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
#include "akonadi.h"
22
22
#include "akapplication.h"
 
23
#include "akdbus.h"
23
24
#include "akdebug.h"
24
25
#include "akcrash.h"
25
26
 
58
59
#else
59
60
    Q_INIT_RESOURCE( akonadidb_mobile );
60
61
#endif
61
 
    AkApplication app( argc, argv );
 
62
    AkCoreApplication app( argc, argv );
62
63
    app.setDescription( QLatin1String( "Akonadi Server\nDo not run manually, use 'akonadictl' instead to start/stop Akonadi." ) );
63
64
 
64
65
#if !defined(NDEBUG) && !defined(_WIN32_WCE)
78
79
#else
79
80
   if (
80
81
#endif
81
 
        !QDBusConnection::sessionBus().interface()->isServiceRegistered( QLatin1String(AKONADI_DBUS_CONTROL_SERVICE_LOCK) ) ) {
 
82
        !QDBusConnection::sessionBus().interface()->isServiceRegistered( AkDBus::serviceName(AkDBus::ControlLock) ) ) {
82
83
     akError() << "Akonadi control process not found - aborting.";
83
84
     akFatal() << "If you started akonadiserver manually, try 'akonadictl start' instead.";
84
85
   }
86
87
    Akonadi::AkonadiServer::instance(); // trigger singleton creation
87
88
    AkonadiCrash::setShutdownMethod( shutdownHandler );
88
89
 
89
 
    if ( !QDBusConnection::sessionBus().registerService( QLatin1String(AKONADI_DBUS_SERVER_SERVICE) ) )
 
90
    if ( !QDBusConnection::sessionBus().registerService( AkDBus::serviceName(AkDBus::Server) ) )
90
91
      akFatal() << "Unable to connect to dbus service: " << QDBusConnection::sessionBus().lastError().message();
91
92
 
92
93
    const int result = app.exec();