• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeaccessibility API Reference
  • KDE Home
  • Contact Us
 

jovie

  • sources
  • kde-4.12
  • kdeaccessibility
  • jovie
  • jovie
jovie/main.cpp
Go to the documentation of this file.
1 /***************************************************** vim:set ts=4 sw=4 sts=4:
2  Jovie
3 
4  The KDE Text-to-Speech Daemon.
5  -----------------------------
6  Copyright 2002-2003 by José Pablo Ezequiel "Pupeno" Fernández <pupeno@kde.org>
7  Copyright 2006 by Gary Cramblitt <garycramblitt@comcast.net>
8  Copyright 2009 by Jeremy Whiting <jpwhiting@kde.org>
9  -------------------
10 
11  This program is free software; you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation; either version 2 of the License, or
14  (at your option) any later version.
15 
16  This program is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with this program; if not, write to the Free Software
23  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24  ******************************************************************************/
25 
26 // KDE Includes.
27 #include <kuniqueapplication.h>
28 #include <kaboutdata.h>
29 #include <kcmdlineargs.h>
30 #include <kcrash.h>
31 #include <kdebug.h>
32 #include <klocale.h>
33 
34 #include <QtDBus/QtDBus>
35 
36 // KTTSD includes.
37 #include "jovie.h"
38 
39 int main (int argc, char *argv[]){
40  KAboutData aboutdata("jovie", 0, ki18n("Jovie"),
41  "0.6.0", ki18n("Text-to-speech synthesis daemon"),
42  KAboutData::License_GPL, ki18n("(C) 2002, José Pablo Ezequiel Fernández"));
43  aboutdata.addAuthor(ki18n("Jeremy Whiting"), ki18n("Current Maintainer"), "jpwhiting@kde.org");
44  aboutdata.addAuthor(ki18n("José Pablo Ezequiel Fernández"),ki18n("Original Author"),"pupeno@pupeno.com");
45  aboutdata.addAuthor(ki18n("Gary Cramblitt"), ki18n("Previous Maintainer"),"garycramblitt@comcast.net");
46  aboutdata.addAuthor(ki18n("Gunnar Schmi Dt"), ki18n("Contributor"),"gunnar@schmi-dt.de");
47  aboutdata.addAuthor(ki18n("Olaf Schmidt"), ki18n("Contributor"),"ojschmidt@kde.org");
48  aboutdata.addAuthor(ki18n("Paul Giannaros"), ki18n("Contributor"), "ceruleanblaze@gmail.com");
49  aboutdata.addAuthor(ki18n("Simion Ploscariu"), ki18n("Contributor"), "simion314@gmail.com");
50  aboutdata.addCredit(ki18n("Jorge Luis Arzola"), ki18n("Testing"), "arzolacub@hotmail.com");
51  aboutdata.addCredit(ki18n("David Powell"), ki18n("Testing"), "achiestdragon@gmail.com");
52  aboutdata.setProgramIconName(QLatin1String( "preferences-desktop-text-to-speech" ));
53 
54  KCmdLineArgs::init( argc, argv, &aboutdata );
55  KUniqueApplication::addCmdLineOptions();
56 
57  //KUniqueApplication::setOrganizationDomain("kde.org");
58  //KUniqueApplication::setApplicationName("jovie");
59  KUniqueApplication app;
60  app.setQuitOnLastWindowClosed(false);
61 
62  if (!KUniqueApplication::start()) {
63  kDebug() << "Jovie is already running";
64  return (0);
65  }
66 
67  if (QDBusConnection::sessionBus().interface()->registerService(QLatin1String( "org.kde.KSpeech" ))
68  != QDBusConnectionInterface::ServiceRegistered) {
69  kDebug() << "Could not register on KSpeech";
70  }
71 
72  if (QDBusConnection::sessionBus().interface()->registerService(QLatin1String( "org.kde.kttsd" ))
73  != QDBusConnectionInterface::ServiceRegistered) {
74  kDebug() << "Could not register on kttsd";
75  }
76 
77  KCrash::setFlags(KCrash::AutoRestart);
78 
79  // This app is started automatically, no need for session management
80  app.disableSessionManagement();
81 
82  kDebug() << "main: Creating Jovie Service";
83  Jovie* service = Jovie::Instance();
84  service->init();
85 
86  // kDebug() << "Entering event loop.";
87  return app.exec();
88  delete service;
89 }
Jovie
Jovie – the KDE Text-to-Speech API.
Definition: jovie.h:46
Jovie::init
void init()
post ctor helper method that instantiates the dbus adaptor class, and registers
Definition: jovie.cpp:491
main
int main(int argc, char *argv[])
Definition: jovie/main.cpp:39
jovie.h
Jovie::Instance
static Jovie * Instance()
singleton accessor
Definition: jovie.cpp:93
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:32:25 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

jovie

Skip menu "jovie"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeaccessibility API Reference

Skip menu "kdeaccessibility API Reference"
  • jovie

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal