HOWTO Make KDED Modules
=======================

A KDED module is loaded when a call is made to it.
KDED modules should not be added if it is avoidable because (especially
when new) they endanger the stability of KDED and its other modules which
provide important services. There are other ways to achieve what a KDED
module can do in many cases.
KDED modules should be useful during the whole session and manage
information that, for some reason, cannot be kept in any other process.

Here are examples of KDED modules:
 frameworks/baloo/src/kioslaves/kded/baloosearchmodule.cpp   Baloo search module
 kde/workspace/khotkeys/app/kded.cpp                         KHotKeys

A KDED module should install a .desktop file with
	ServicesTypes=KDEDModule

A KDED module will be loaded on KDE startup if it has a line
	X-KDE-Kded-autoload=true

Note that this flag doesn't cause the module to be loaded if the KDE desktop
is not running (i.e. when running a KDE application in another environment).

[The following paragraph was copied from kdebase/workspace/ksmserver/README]
The exact way autoloading works is controlled by X-KDE-Kded-phase=,
which may be 0, 1 or 2 (the default). Kded phase 0 means the module is
always loaded by kded, even outside of KDE session. It should used only
by kded modules which must be always running. Kded phase 1 modules are
loaded right after kded startup, but only during KDE startup, i.e. it is
for modules that are always needed by the KDE session. Phase 2 modules
will be loaded later. 

Normally KDED modules are loaded whenever they are accessed, so you don't
need autoloading enabled. On demand loading can be disabled by putting
the following line in the .desktop file:
	X-KDE-Kded-load-on-demand=false

Further it should contain:
	X-KDE-Library=foo

Which means that kded_foo.so is the name of the library that contains
the module. Note that the name of the library always starts with kded_.

The .desktop file should be installed to ${SERVICES_INSTALL_DIR}/kded
