mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
Build template architecture for the plugin manager
This commit is contained in:
@ -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 = \
|
||||
|
5
src/plug-in/Makefile.am
Normal file
5
src/plug-in/Makefile.am
Normal file
@ -0,0 +1,5 @@
|
||||
noinst_LTLIBRARIES = libplugin.la
|
||||
|
||||
libplugin_la_SOURCES = \
|
||||
pluginmanager.cpp
|
||||
plugin.cpp
|
26
src/plug-in/plugin.cpp
Normal file
26
src/plug-in/plugin.cpp
Normal file
@ -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
|
||||
}
|
41
src/plug-in/plugin.h
Normal file
41
src/plug-in/plugin.h
Normal file
@ -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
|
||||
|
6
src/plug-in/pluginmanager.cpp
Normal file
6
src/plug-in/pluginmanager.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
#include "pluginmanager.h"
|
||||
|
||||
void ::sflphone::PluginManager::loadPlugins( const std::string &path )
|
||||
{
|
||||
//TODO IMPLEMENT
|
||||
}
|
33
src/plug-in/pluginmanager.h
Normal file
33
src/plug-in/pluginmanager.h
Normal file
@ -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
|
Reference in New Issue
Block a user