2010-02-09 06:58:27 +01:00
# ifndef IAUDIOPLUGIN_H_INCLUDED
# define IAUDIOPLUGIN_H_INCLUDED
2010-02-14 06:34:57 +01:00
# include "IRefCounted.h"
# include "IAudioManager.h"
# include "IAudioCapture.h"
# include "ILogger.h"
2010-02-09 06:58:27 +01:00
namespace cAudio
{
2010-02-17 02:42:45 +01:00
//! Interface for all plugins in cAudio.
2010-02-14 06:34:57 +01:00
class IAudioPlugin : public IRefCounted
2010-02-09 06:58:27 +01:00
{
public :
IAudioPlugin ( ) { }
~ IAudioPlugin ( ) { }
2010-02-17 02:42:45 +01:00
//! Called to initialize the plugin. Use this for any initial setup that needs to be done.
/**
\ param logger : Pointer to the logger singleton .
\ return True if plugin initialization was successful , false if there was an error . */
2010-02-14 06:34:57 +01:00
virtual bool installPlugin ( ILogger * logger ) = 0 ;
2010-02-17 02:42:45 +01:00
//! Called to retrieve a name to register this plugin under if the user didn't specify one (or the plugin was auto-loaded).
/**
\ return Name of the plugin . */
2010-02-09 06:58:27 +01:00
virtual const char * getPluginName ( ) = 0 ;
2010-02-17 02:42:45 +01:00
//! Called to shutdown the plugin and do any final cleanup. This is the last function call cAudio will give you before your plugin is completely removed.
2010-02-09 06:58:27 +01:00
virtual void uninstallPlugin ( ) = 0 ;
2010-02-17 02:42:45 +01:00
//! Called on creation of an Audio Playback Manager.
/** Use this to register any decoders or event handlers that you'd like to add to the engine.
\ param manager : Pointer to the newly created manager . */
2010-02-14 06:34:57 +01:00
virtual void onCreateAudioManager ( IAudioManager * manager ) { }
2010-02-17 02:42:45 +01:00
//! Called on creation of an Audio Capture Manager.
/** Use this to register any event handlers that you'd like to add to the engine.
\ param capture : Pointer to the newly created capture interface . */
2010-02-14 06:34:57 +01:00
virtual void onCreateAudioCapture ( IAudioCapture * capture ) { }
2010-02-09 06:58:27 +01:00
2010-02-17 02:42:45 +01:00
//! Called on destruction of an Audio Playback Manager.
/** Use this to remove anything you added to the playback manger earlier.
\ param manager : Pointer to the soon to be destroyed playback interface . */
2010-02-14 06:34:57 +01:00
virtual void onDestroyAudioManager ( IAudioManager * manager ) { }
2010-02-17 02:42:45 +01:00
//! Called on destruction of an Audio Capture Manager.
/** Use this to remove anything you added to a capture manger earlier.
\ param capture : Pointer to the soon to be destroyed capture interface . */
2010-02-14 06:34:57 +01:00
virtual void onDestoryAudioCapture ( IAudioCapture * capture ) { }
2010-02-09 06:58:27 +01:00
} ;
} ;
# endif //! IAUDIOPLUGIN_H_INCLUDED