2 // C++ Interface: fxpluginhandler
7 // Author: Robert Vogl <voglrobe@lapislazuli>, (C) 2004
9 // Copyright: See COPYING file that comes with this distribution
13 #ifndef FXPLUGINHANDLER_H
14 #define FXPLUGINHANDLER_H
17 #include <QtCore/QObject>
18 #include <QtCore/QLibrary>
19 #include <QtCore/QMap>
20 // #include <Qt3Support/Q3ValueList>
24 #include <arts/kartsserver.h>
25 #include <arts/artsflow.h>
29 // App specific includes
30 #include "ksayit_fxplugin.h"
35 /** Internal structure of the effect plugin
40 destroy_fxpi pdestroy
;
41 QString name
; // This name is the unique ID of the plugin.
43 long EffectID
; // !=0, if effect is on the effect stack.
48 class FXPluginHandler
: public QObject
52 FXPluginHandler(QObject
*parent
= 0, const char *name
= 0, KConfig
*config
=0);
56 /** Loads the activated plugins.
58 void readConfiguration();
60 /** Loads any available plugin from the directories containing KSayIt plugins,
61 * fills the plugin_struct with the corresponding data and unloads the plugin.
65 /** Shows the GUI to setup the effect named name
66 \param pname The name of the effect to configure.
68 void showEffectGUI(const QString
&pname
);
70 /** Activates the named effect
71 \param pname Name of the effect to activate.
72 \param server A pointer to the soundserver instance.
73 \param fx_stack A pointer to the effect stack of the soundserver.
75 void activateEffect(const QString
&pname
,
77 StereoEffectStack
*fx_stack
);
79 /** Removes all effects from the soundservers effect stack.
80 \param fx_stack A pointer to the effect stack of the soundserver.
82 void deactivateEffects(StereoEffectStack
*fx_stack
);
84 /** Returns a list of all available plugins.
85 \param pluginlist A reference to a QStringList that contains the available plugins.
87 void getPlugins(QStringList
&pluginlist
);
92 bool initPluginMap(const QString
&libpath
);
94 private: // Attributes
96 QMap
<QString
, fx_struct
> pmap
; // holds all plugins found on the system
97 QMap
<QString
, fx_struct
> activePlugins
; // holds the active effects