Added support for plugin features

This commit is contained in:
Martin Willi
2011-10-14 10:05:44 +02:00
parent 658c993c78
commit 62b9e2f938
6 changed files with 840 additions and 51 deletions
+14 -3
View File
@@ -21,11 +21,11 @@
#ifndef PLUGIN_H_
#define PLUGIN_H_
#include "../utils.h"
#include <library.h>
typedef struct plugin_t plugin_t;
#include <library.h>
#include <plugins/plugin_feature.h>
/**
* Interface definition of a plugin.
*/
@@ -38,6 +38,17 @@ struct plugin_t {
*/
char* (*get_name)(plugin_t *this);
/**
* Get plugin features with dependencies.
*
* The returned array contains features provided by the plugin and
* dependencies for that feature. See plugin_feature_t for details.
*
* @param features pointer receiving plugin features
* @return number of features
*/
int (*get_features)(plugin_t *this, plugin_feature_t *features[]);
/**
* Try to reload plugin configuration.
*