diff --git a/autogen.sh b/autogen.sh index 06b6a97c95e0c7f4db9c8bd21a358a14784e9187..ac85bd137c9dcf2f99eef6992751d1a92876cdcd 100755 --- a/autogen.sh +++ b/autogen.sh @@ -4,6 +4,6 @@ aclocal -I m4 libtoolize --force autoheader -autoconf -f +autoconf -v -f automake -a ./configure $@ diff --git a/configure.ac b/configure.ac index d9b4ed6dd946e89a73809b67d9bf1b53b14214aa..3cb974e0f6ecae9ae549ade4553542e7093bbe43 100644 --- a/configure.ac +++ b/configure.ac @@ -2,8 +2,8 @@ dnl SFLPhone - configure.ac for automake 1.9 and autoconf 2.59 dnl dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([SFLPhone],[0.7],[sflphoneteam@savoirfairelinux.com],[sflphone]) -AC_COPYRIGHT([[Copyright (c) Savoir-Faire Linux 2004-2008]]) +AC_INIT([SFLPhone],[0.9.2-7],[sflphoneteam@savoirfairelinux.com],[sflphone]) +AC_COPYRIGHT([[Copyright (c) Savoir-Faire Linux 2004-2009]]) AC_REVISION([$Revision$]) dnl Compute canonical system name @@ -37,7 +37,8 @@ AC_CONFIG_FILES([src/Makefile \ src/audio/codecs/ilbc/Makefile \ src/config/Makefile \ src/dbus/Makefile \ - src/zeroconf/Makefile]) + src/zeroconf/Makefile \ + src/plug-in/Makefile]) dnl Unitary test section AC_CONFIG_FILES([test/Makefile]) diff --git a/src/Makefile.am b/src/Makefile.am index 5be031174cdf639b7967fbb297021f6256af06e5..f9af16aafd648b9d39f9df13a17ca5e9ae66c343 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -23,7 +23,7 @@ IAXSOURCES = IAXHEADERS = endif -SUBDIRS = audio config dbus $(ZEROCONFDIR) +SUBDIRS = audio config dbus $(ZEROCONFDIR) plug-in # Add here the cpp files to be build with sflphone sflphoned_SOURCES = \ diff --git a/src/plug-in/Makefile.am b/src/plug-in/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..de286d046c31970b74807d1acce3febd7c4b02b6 --- /dev/null +++ b/src/plug-in/Makefile.am @@ -0,0 +1,5 @@ +noinst_LTLIBRARIES = libplugin.la + +libplugin_la_SOURCES = \ + pluginmanager.cpp + plugin.cpp diff --git a/src/plug-in/plugin.cpp b/src/plug-in/plugin.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bc7cf18c38c58f3a89521553fca90664d8180246 --- /dev/null +++ b/src/plug-in/plugin.cpp @@ -0,0 +1,26 @@ +#include "plugin.h" + +Plugin::Plugin( const std::string &filename ) +{ + //TODO IMPLEMENT +} + +Plugin::Plugin( const Plugin &plugin ) +{ + //TODO IMPLEMENT +} + +Plugin::~Plugin() +{ + //TODO IMPLEMENT +} + +int Plugin::getCoreVersion( void ) +{ + //TODO IMPLEMENT +} + +void Plugin::registerPlugin( PluginManager & ) +{ + //TODO IMPLEMENT +} diff --git a/src/plug-in/plugin.h b/src/plug-in/plugin.h new file mode 100644 index 0000000000000000000000000000000000000000..5c825f872f4c03cfe43e0ab4b9fe6b65b1a1c29e --- /dev/null +++ b/src/plug-in/plugin.h @@ -0,0 +1,41 @@ +#ifndef PLUGIN_H +#define PLUGIN_H + +#include <string> + +/* + * @file plugin.h + * @brief Define a plugin object + */ + +namespace sflphone { + +class PluginManager; + + class Plugin { + + public: + Plugin( const std::string &filename ); + Plugin( const Plugin &plugin ); + ~Plugin(); + + public: + /** + * Return the minimal core version required so that the plugin could work + * @return int The version required + */ + int getCoreVersion() const; + + /** + * Register the plugin to the plugin manager + */ + void registerPlugin( PluginManager & ); + + private: + Plugin &operator =(const Plugin &plugin); + + }; +} + +#endif //PLUGIN_H + diff --git a/src/plug-in/pluginmanager.cpp b/src/plug-in/pluginmanager.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9c792dc3ff6d1381d0f57147c7a5ae45b30964c9 --- /dev/null +++ b/src/plug-in/pluginmanager.cpp @@ -0,0 +1,6 @@ +#include "pluginmanager.h" + +void ::sflphone::PluginManager::loadPlugins( const std::string &path ) +{ + //TODO IMPLEMENT +} diff --git a/src/plug-in/pluginmanager.h b/src/plug-in/pluginmanager.h new file mode 100644 index 0000000000000000000000000000000000000000..d91d115d49138679733efe6f86f2cb041fcf5fc5 --- /dev/null +++ b/src/plug-in/pluginmanager.h @@ -0,0 +1,33 @@ +#ifndef PLUGIN_MANAGER_H +#define PLUGIN_MANAGER_H + +/* + * @file pluginmanager.h + * @brief Base class of the plugin manager + */ + +#include "plugin.h" + +#include <map> +#include <string> + +namespace sflphone { + + class PluginManager { + + public: + /** + * Load all the plugins found in a specific directory + * @param path The absolute path to the directory + */ + void loadPlugins( const std::string &path ); + + private: + /* Map of plugins associated by their string name */ + typedef std::map<std::string, ::sflphone::Plugin> pluginMap; + + pluginMap _loadedPlugins; + }; +} + +#endif //PLUGIN_MANAGER_H