}
-FactoryHandle
+factory_handle
plugin_default_factory_get_instance()
{
plugin_factory* instance = _default_factory_instance;
- FactoryHandle handle;
+ factory_handle handle;
if(_default_factory_instance == NULL) {
instance = (plugin_factory*) malloc(sizeof(plugin_factory));
#include <plugin_factory.h>
-FactoryHandle plugin_default_factory_get_instance(void);
+factory_handle plugin_default_factory_get_instance(void);
#endif /* SIMPLE_PLUGIN_FACTORY_H_ */
{NULL, NULL}
};
-static FactoryHandle
+static factory_handle
_load_factory (const char* factory_name, const char* factory_type)
{
- FactoryHandle handle;
+ factory_handle handle;
plugin_factory_descr *ptr = NULL;
handle.api = NULL;
const char* factory_type, config_node* properties)
{
plhandle p_handle;
- FactoryHandle f_handle = _load_factory(factory_name, factory_type);
+ factory_handle f_handle = _load_factory(factory_name, factory_type);
p_handle = create_api(f_handle, plugin_name);
return(p_handle);
#include "plugin_factory.h"
void
-get_factory_content (FactoryHandle handle, const char* container[])
+get_factory_content (factory_handle handle, const char* container[])
{
plugin_factory* factory = (plugin_factory*) handle.api;
factory->get_factory_content(container);
}
plhandle
-create_api (FactoryHandle handle, const char* plugin_name)
+create_api (factory_handle handle, const char* plugin_name)
{
plugin_factory* factory = (plugin_factory*) handle.api;
return factory->create_api(plugin_name);
/* Plugin factory API */
typedef struct {
void *api;
-} FactoryHandle;
+} factory_handle;
typedef struct {
const char* factory_name;
- FactoryHandle (*factory_creator)();
+ factory_handle (*factory_creator)();
} plugin_factory_descr;
typedef struct {
} plugin_factory;
/* Utility functions */
-void get_factory_content(FactoryHandle handle, const char* container[]);
-plhandle create_api(FactoryHandle handle, const char* plugin_name);
+void get_factory_content(factory_handle handle, const char* container[]);
+plhandle create_api(factory_handle handle, const char* plugin_name);
#endif /* PLUGIN_FACTORY_H_ */