| # arts Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# KArtsServer Class Reference

KArtsServer is a wrapper to conveniently get a reference to a SoundServer, and restart artsd when necessary, using the kcontrol settings. More...

`#include <kartsserver.h>`

Inheritance diagram for KArtsServer:

[legend]
Collaboration diagram for KArtsServer:

[legend]
List of all members.

## Signals
void | restartedServer (void)
## Public Member Functions
| KArtsServer (QObject *parent=0, const char *name=0)
Arts::SoundServerV2 | server (void)

## Detailed Description

KArtsServer is a wrapper to conveniently get a reference to a SoundServer, and restart artsd when necessary, using the kcontrol settings.

Of course we'd rather that artsd never crashed, and that all users start artsd on KDE startup, but at the very least there will always be third party PlayObjects that will crash. So, this is necessary.

Definition at line 37 of file kartsserver.h.

## Constructor & Destructor Documentation

KArtsServer::KArtsServer | ( | QObject * | parent = `0`,
|  | const char * | name = `0`
| ) |

| Create a new KArtsServer. Don't forget to create a KArtsDispatcher before using KArtsServer. Definition at line 34 of file kartsserver.cpp.

## Member Function Documentation

Arts::SoundServerV2 KArtsServer::server | ( | void |  | ) |

| Get a verified reference to the SoundServerV2, (re)starting artsd using the kcontrol-specified settings if necessary. If the soundserver has changed since you called this method the last time (meaning artsd was restarted) restartedServer() will be emitted. Definition at line 47 of file kartsserver.cpp. References QFile::encodeName(), KProcess::normalExit(), KConfigBase::readBoolEntry(), KConfigBase::readEntry(), restartedServer(), KConfigBase::setGroup(), QStringList::split(), KProcess::start(), KSimpleConfig::sync(), and KConfigBase::writeEntry().

void KArtsServer::restartedServer | ( | void |  | ) | `[signal]`

| This is emitted when the soundserver has been restarted (by this KArtsServer instance or outside). It is not emitted automatically when the soundserver comes up but only after your code calls server(). Referenced by server().

The documentation for this class was generated from the following files:

- kartsserver.h
- kartsserver.cpp

This file is part of the documentation for arts Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:27:57 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003