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

Nepomuk-Core

  • sources
  • kde-4.12
  • kdelibs
  • nepomuk-core
  • server
servicemanager.h
Go to the documentation of this file.
1 /* This file is part of the KDE Project
2  Copyright (c) 2008 Sebastian Trueg <trueg@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 #ifndef _SERVICE_MANAGER_H_
20 #define _SERVICE_MANAGER_H_
21 
22 #include <QtCore/QObject>
23 #include <QtDBus/QDBusMessage>
24 
25 namespace Nepomuk2 {
26 
27  class ServiceController;
28 
34  class ServiceManager : public QObject
35  {
36  Q_OBJECT
37 
38  public:
39  ServiceManager( QObject* parent = 0 );
40  ~ServiceManager();
41 
42  static ServiceManager* self() { return s_self; }
43  static void messageFilter( const QDBusMessage& );
44 
52  QStringList runningServices() const;
53 
58  QStringList pendingServices() const;
59 
67  QStringList availableServices() const;
68 
75  bool isServiceInitialized( const QString& servicename ) const;
76 
83  bool isServiceRunning( const QString& servicename ) const;
84 
85  Q_SIGNALS:
90  void serviceInitialized( const QString& name );
91 
95  void serviceStopped( const QString& name );
96 
97  public Q_SLOTS:
101  void startAllServices();
102 
106  void stopAllServices();
107 
112  bool startService( const QString& name );
113 
118  bool stopService( const QString& name );
119 
124  bool isServiceAutostarted( const QString& name );
125 
129  void setServiceAutostarted( const QString& name, bool autostart );
130 
131  private:
132  static ServiceManager* s_self;
133 
134  class Private;
135  Private* const d;
136 
137  Q_PRIVATE_SLOT( d, void _k_serviceInitialized(ServiceController*) )
138  Q_PRIVATE_SLOT( d, void _k_serviceStopped(ServiceController*) )
139  };
140 }
141 
142 #endif
Nepomuk2::ServiceManager::availableServices
QStringList availableServices() const
All services that are available in the system.
Definition: servicemanager.cpp:437
Nepomuk2::ServiceManager::isServiceRunning
bool isServiceRunning(const QString &servicename) const
Definition: servicemanager.cpp:454
Nepomuk2::ServiceController
Definition: servicecontroller.h:28
Nepomuk2::ServiceManager::messageFilter
static void messageFilter(const QDBusMessage &)
QObject
Nepomuk2::ServiceManager::startAllServices
void startAllServices()
Starts all autoload services.
Definition: servicemanager.cpp:365
Nepomuk2::ServiceManager::stopService
bool stopService(const QString &name)
Stop a specific service.
Definition: servicemanager.cpp:404
Nepomuk2::ServiceManager::serviceStopped
void serviceStopped(const QString &name)
Emitted once a service has been stopped.
Nepomuk2::ServiceManager::ServiceManager
ServiceManager(QObject *parent=0)
Definition: servicemanager.cpp:349
Nepomuk2::ServiceManager::setServiceAutostarted
void setServiceAutostarted(const QString &name, bool autostart)
Set the service indicated by name to be autostarted.
Definition: servicemanager.cpp:476
Nepomuk2::ServiceManager::stopAllServices
void stopAllServices()
Stops all services.
Definition: servicemanager.cpp:380
Nepomuk2::ServiceManager
Manages all Nepomuk services.
Definition: servicemanager.h:34
Nepomuk2::ServiceManager::pendingServices
QStringList pendingServices() const
The services that are scheduled to be started but are waiting for dependancies to get initialized...
Definition: servicemanager.cpp:428
Nepomuk2::ServiceManager::runningServices
QStringList runningServices() const
Even uninitialized services are running.
Definition: servicemanager.cpp:414
Nepomuk2::ServiceManager::~ServiceManager
~ServiceManager()
Definition: servicemanager.cpp:358
Nepomuk2::ServiceManager::serviceInitialized
void serviceInitialized(const QString &name)
Emitted once a new service finished its initialization and is ready for use.
Nepomuk2::ServiceManager::isServiceAutostarted
bool isServiceAutostarted(const QString &name)
Definition: servicemanager.cpp:465
Nepomuk2::ServiceManager::startService
bool startService(const QString &name)
Start a specific service.
Definition: servicemanager.cpp:391
Nepomuk2::ServiceManager::isServiceInitialized
bool isServiceInitialized(const QString &servicename) const
Definition: servicemanager.cpp:443
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk-Core

Skip menu "Nepomuk-Core"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

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