arts Library API Documentation

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:

Inheritance graph
[legend]
Collaboration diagram for KArtsServer:

Collaboration graph
[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 KProcess::normalExit(), KConfigBase::readBoolEntry(), KConfigBase::readEntry(), restartedServer(), KConfigBase::setGroup(), KProcess::start(), KSimpleConfig::sync(), and KConfigBase::writeEntry().

Referenced by KDE::PlayObjectFactory::PlayObjectFactory().

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:
KDE Logo
This file is part of the documentation for arts Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 7 22:09:50 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003