Nepomuk-Core
Go to the documentation of this file.
22 #include "nepomukversion.h"
24 #include <kcmdlineargs.h>
25 #include <kaboutdata.h>
27 #include <kcomponentdata.h>
30 #include <QtCore/QCoreApplication>
31 #include <QtDBus/QDBusConnection>
32 #include <QtDBus/QDBusConnectionInterface>
39 void signalHandler(
int signal )
46 QCoreApplication::instance()->quit();
50 void installSignalHandler() {
52 ::memset( &sa, 0,
sizeof( sa ) );
53 sa.sa_handler = signalHandler;
54 sigaction( SIGHUP, &sa, 0 );
55 sigaction( SIGINT, &sa, 0 );
56 sigaction( SIGQUIT, &sa, 0 );
57 sigaction( SIGTERM, &sa, 0 );
65 KAboutData aboutData(
"NepomukServer",
"nepomukserver",
66 ki18n(
"Nepomuk Server"),
67 NEPOMUK_VERSION_STRING,
68 ki18n(
"Nepomuk Server - Manages Nepomuk storage and services"),
69 KAboutData::License_GPL,
70 ki18n(
"(c) 2008-2011, Sebastian Trüg"),
72 "http://nepomuk.kde.org" );
73 aboutData.addAuthor(ki18n(
"Sebastian Trüg"),ki18n(
"Maintainer"),
"trueg@kde.org");
75 KCmdLineArgs::init( argc, argv, &aboutData );
77 KCmdLineOptions options;
78 options.add(
"noservices", ki18n(
"Start the nepomukserver without any services"));
79 KCmdLineArgs::addCmdLineOptions(options);
81 KComponentData componentData( &aboutData );
83 if ( QDBusConnection::sessionBus().interface()->isServiceRegistered(QLatin1String(
"org.kde.NepomukServer")) ) {
84 fprintf( stderr,
"Nepomuk server already running.\n" );
89 installSignalHandler();
92 QCoreApplication app(argc, argv);
94 const KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
#define NEPOMUK_SERVER_EXPORT
NEPOMUK_SERVER_EXPORT int kdemain(int argc, char **argv)
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:08 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.