2010-02-09 06:58:27 +01:00
|
|
|
#ifndef IPLUGINMANAGER_H_INCLUDED
|
|
|
|
#define IPLUGINMANAGER_H_INCLUDED
|
|
|
|
|
|
|
|
#include "IAudioPlugin.h"
|
|
|
|
|
|
|
|
namespace cAudio
|
|
|
|
{
|
2010-02-17 06:57:55 +01:00
|
|
|
//! Interface for the plugin capabilities of cAudio.
|
2010-02-09 06:58:27 +01:00
|
|
|
class IPluginManager
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
IPluginManager() { }
|
|
|
|
~IPluginManager() { }
|
|
|
|
|
2010-02-17 06:57:55 +01:00
|
|
|
//! Installs a plugin using a statically linked plugin implementation.
|
|
|
|
/**
|
|
|
|
\param plugin: Pointer to a plugin implementation to install.
|
|
|
|
\param name: Optional name for the plugin. Pass NULL to have the plugin use its default name.
|
|
|
|
\return True if plugin was installed successfully. */
|
2010-02-09 06:58:27 +01:00
|
|
|
virtual bool installPlugin(IAudioPlugin* plugin, const char* name = NULL) = 0;
|
2010-02-17 06:57:55 +01:00
|
|
|
|
|
|
|
//! Installs a plugin from a dynamically linked library on your hard drive.
|
|
|
|
/**
|
|
|
|
\param filename: Path to the dll/so/dynlib on your hard drive.
|
|
|
|
\param name: Optional name for the plugin. Pass NULL to have the plugin use its default name.
|
|
|
|
\return True if plugin was installed successfully. */
|
2010-02-09 06:58:27 +01:00
|
|
|
virtual bool installPlugin(const char* filename, const char* name = NULL) = 0;
|
|
|
|
|
2010-02-17 06:57:55 +01:00
|
|
|
//! Checks for the existance of a plugin with the supplied name.
|
|
|
|
/**
|
|
|
|
\param name: Name of the plugin to check for. */
|
2010-02-09 06:58:27 +01:00
|
|
|
virtual bool checkForPlugin(const char* name) = 0;
|
2010-02-17 06:57:55 +01:00
|
|
|
|
|
|
|
//! Returns a plugin interface for a plugin with the supplied name.
|
|
|
|
/**
|
|
|
|
\param name: Name of the plugin to check return.
|
|
|
|
\return A pointer to the plugin interface or NULL if it could not be found. */
|
2010-02-09 06:58:27 +01:00
|
|
|
virtual IAudioPlugin* getPlugin(const char* name) = 0;
|
2010-02-17 06:57:55 +01:00
|
|
|
|
|
|
|
//! Returns the total number of installed plugins.
|
2010-02-09 06:58:27 +01:00
|
|
|
virtual unsigned int getPluginCount() = 0;
|
|
|
|
|
2010-02-17 06:57:55 +01:00
|
|
|
//! Removes a plugin installed via statically linked reference.
|
|
|
|
/**
|
|
|
|
\param plugin: Pointer to the plugin implementation to uninstall. */
|
2010-02-09 06:58:27 +01:00
|
|
|
virtual void uninstallPlugin(IAudioPlugin* plugin) = 0;
|
2010-02-17 06:57:55 +01:00
|
|
|
|
|
|
|
//! Removes a plugin with the specified name.
|
|
|
|
/**
|
|
|
|
\param name: Name of the plugin to uninstall. */
|
2010-02-09 06:58:27 +01:00
|
|
|
virtual void uninstallPlugin(const char* name) = 0;
|
|
|
|
};
|
2010-02-15 00:16:44 +01:00
|
|
|
|
2010-02-17 06:57:55 +01:00
|
|
|
//! Gets the interface to the plugin manager.
|
2010-02-15 00:16:44 +01:00
|
|
|
/** Note: This is the only way to get access to the plugin capabilities of cAudio.
|
2010-02-17 06:57:55 +01:00
|
|
|
\return A pointer to the manager.
|
2010-02-15 00:16:44 +01:00
|
|
|
*/
|
|
|
|
CAUDIO_API IPluginManager* getPluginManager();
|
2010-02-09 06:58:27 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //! IPLUGINMANAGER_H_INCLUDED
|