• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KIO

main.cpp

Go to the documentation of this file.
00001 
00020 #include <kuniqueapplication.h>
00021 #include <kaboutdata.h>
00022 #include <kcmdlineargs.h>
00023 #include <kdebug.h>
00024 #include <kconfig.h>
00025 #include <kconfiggroup.h>
00026 
00027 #include "kwalletd.h"
00028 
00029 static bool isWalletEnabled()
00030 {
00031     KConfig cfg("kwalletrc");
00032     KConfigGroup walletGroup(&cfg, "Wallet");
00033     return walletGroup.readEntry("Enabled", true);
00034 }
00035 
00036 extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
00037 {
00038     KAboutData aboutdata("kwalletd", "kdelibs4", ki18n("KDE Wallet Service"),
00039                          "0.1", ki18n("KDE Wallet Service"),
00040                          KAboutData::License_LGPL, ki18n("(C) 2002-2008 George Staikos, Michael Leupold, Thiago Maceira"));
00041     // STRING FREEZE!
00042     // aboutdata.addAuthor(ki18n("Michael Leupold"),ki18n("Maintainer"),"lemma@confuego.org");
00043     // aboutdata.addAuthor(ki18n("George Staikos"),ki18n("Former maintainer"),"staikos@kde.org");
00044     // aboutdata.addAuthor(ki18n("Thiago Maceira"),ki18n("DBus Interface"),"thiago@kde.org");
00045 
00046     KCmdLineArgs::init( argc, argv, &aboutdata );
00047     KUniqueApplication::addCmdLineOptions();
00048     KUniqueApplication app;
00049 
00050     // This app is started automatically, no need for session management
00051     app.disableSessionManagement();
00052     app.setQuitOnLastWindowClosed( false );
00053 
00054     // check if kwallet is disabled
00055     if (!isWalletEnabled()) {
00056       kDebug(7024) << "kwalletd is disabled!";
00057       return (0);
00058     }
00059 
00060     if (!KUniqueApplication::start())
00061     {
00062       kDebug(7024) << "kwalletd is already running!";
00063       return (0);
00064     }
00065 
00066     KWalletD walletd;
00067     int res = app.exec();
00068     
00069     return res;
00070 }

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal