Commit 26393bbe authored by Emmanuel Milou's avatar Emmanuel Milou

Build template architecture for the plugin manager

parent a3fe8cd5
......@@ -4,6 +4,6 @@
aclocal -I m4
libtoolize --force
autoheader
autoconf -f
autoconf -v -f
automake -a
./configure $@
......@@ -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])
......
......@@ -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 = \
......
noinst_LTLIBRARIES = libplugin.la
libplugin_la_SOURCES = \
pluginmanager.cpp
plugin.cpp
#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
}
#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
#include "pluginmanager.h"
void ::sflphone::PluginManager::loadPlugins( const std::string &path )
{
//TODO IMPLEMENT
}
#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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment