=====>  How do I use knotify with arts sound output (if it's installed)

Start artsd:

$ artsd &

Start knotify:

$ knotify

Call (from another terminal window)

$ knotifyclient Desktop5

Note that you really should look at knotify.cpp to see if the wav file
exists. Artsd currently crashes on non-existing wav files (shame on me).

=====> The implementation:

The implementation is more-or-less straigtforward. MCOP needs (like DCOP)
a dispatcher to work properly. However, if that should run inside Qt
applications, it needs a special QIOManager object. So

  QIOManager qiomanager;				// defined in qiomanager.h
  Dispatcher dispatcher(&qiomanager);	// defined in dispatcher.h

initializes MCOP. Then using

  SimpleSoundServer *server				// defined in soundserver.h (from idl)
    = SimpleSoundServer::_fromString("global:Arts_SimpleSoundServer");

connects to the object (null pointer when that fails). This will open a
unix domain socket connection to the arts server (or tcp connection,
depending on which one works). Finally, you can use

  server->play(<filename>)

to play files. See soundserver.idl for what operations you can then perform
on the SimpleSoundServer interface.

The global object references ("global:Arts_SimpleSoundServer") are stored
in the /tmp/mcop-<username>/<global-reference-name> directory - it might be
a good idea to implement a network transparent naming service or something
like that.


Stefan Westerfeld <stefan@space.twc.de>
