libextractor  1.11
About: GNU libextractor is a library used to extract meta-data from files of arbitrary type.
  Fossies Dox: libextractor-1.11.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

extractor_plugins.c File Reference

code to load plugins More...

Include dependency graph for extractor_plugins.c:

Go to the source code of this file.


static void * get_symbol_with_prefix (void *lib_handle, const char *template, const char *prefix, const char **options)
int EXTRACTOR_plugin_load_ (struct EXTRACTOR_PluginList *plugin)
struct EXTRACTOR_PluginListEXTRACTOR_plugin_add (struct EXTRACTOR_PluginList *prev, const char *library, const char *options, enum EXTRACTOR_Options flags)
struct EXTRACTOR_PluginListEXTRACTOR_plugin_add_config (struct EXTRACTOR_PluginList *prev, const char *config, enum EXTRACTOR_Options flags)
struct EXTRACTOR_PluginListEXTRACTOR_plugin_remove (struct EXTRACTOR_PluginList *prev, const char *library)
void EXTRACTOR_plugin_remove_all (struct EXTRACTOR_PluginList *plugins)

Detailed Description

code to load plugins

Christian Grothoff

Definition in file extractor_plugins.c.

Function Documentation

◆ EXTRACTOR_plugin_add()

struct EXTRACTOR_PluginList* EXTRACTOR_plugin_add ( struct EXTRACTOR_PluginList prev,
const char *  library,
const char *  options,
enum EXTRACTOR_Options  flags 

Add a library for keyword extraction.

prevthe previous list of libraries, may be NULL
librarythe name of the library
optionsoptions to pass to the plugin
flagsoptions to use
the new list of libraries, equal to prev iff an error occurred

Definition at line 206 of file extractor_plugins.c.

References EXTRACTOR_find_plugin_(), EXTRACTOR_PluginList::flags, EXTRACTOR_PluginList::libname, LOG, EXTRACTOR_PluginList::next, NULL, EXTRACTOR_PluginList::plugin_options, EXTRACTOR_PluginList::seek_request, and EXTRACTOR_PluginList::short_libname.

Referenced by EXTRACTOR_plugin_add_config(), and load_plugins_from_dir().

◆ EXTRACTOR_plugin_add_config()

struct EXTRACTOR_PluginList* EXTRACTOR_plugin_add_config ( struct EXTRACTOR_PluginList prev,
const char *  config,
enum EXTRACTOR_Options  flags 

Load multiple libraries as specified by the user.

configa string given by the user that defines which libraries should be loaded. Has the format "[[-]LIBRARYNAME[(options)][:[-]LIBRARYNAME[(options)]]]*". For example, '' loads the mp3 and the ogg library. The '-' before the LIBRARYNAME indicates that the library should be removed from the library list.
prevthe previous list of libraries, may be NULL
flagsoptions to use
the new list of libraries, equal to prev iff an error occurred or if config was empty (or NULL).

Definition at line 261 of file extractor_plugins.c.

References ABORT, EXTRACTOR_plugin_add(), EXTRACTOR_plugin_remove(), EXTRACTOR_PluginList::flags, and NULL.

Referenced by EXTRACTOR_plugin_add_defaults(), and main().

◆ EXTRACTOR_plugin_load_()

◆ EXTRACTOR_plugin_remove()

struct EXTRACTOR_PluginList* EXTRACTOR_plugin_remove ( struct EXTRACTOR_PluginList prev,
const char *  library 

◆ EXTRACTOR_plugin_remove_all()

void EXTRACTOR_plugin_remove_all ( struct EXTRACTOR_PluginList plugins)

Remove all plugins from the given list (destroys the list).

pluginthe list of plugins

Definition at line 390 of file extractor_plugins.c.

References EXTRACTOR_plugin_remove(), NULL, and EXTRACTOR_PluginList::short_libname.

Referenced by main().

◆ get_symbol_with_prefix()

static void* get_symbol_with_prefix ( void *  lib_handle,
const char *  template,
const char *  prefix,
const char **  options 

Try to resolve a plugin function.

lib_handlelibrary to search for the symbol
prefixprefix to add
sym_namebase name for the symbol
optionsset to special options requested by the plugin
NULL on error, otherwise pointer to the symbol

Definition at line 41 of file extractor_plugins.c.

References LOG, LOG_STRERROR, name, and NULL.

Referenced by EXTRACTOR_plugin_load_().