diff options
Diffstat (limited to 'src/main/extractor_plugpath.h')
-rw-r--r-- | src/main/extractor_plugpath.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/main/extractor_plugpath.h b/src/main/extractor_plugpath.h new file mode 100644 index 0000000..33bc29f --- /dev/null +++ b/src/main/extractor_plugpath.h | |||
@@ -0,0 +1,47 @@ | |||
1 | #if !defined(EXTRACTOR_PLUGPATH_H) | ||
2 | #define EXTRACTOR_PLUGPATH_H | ||
3 | |||
4 | struct DefaultLoaderContext | ||
5 | { | ||
6 | struct EXTRACTOR_PluginList *res; | ||
7 | enum EXTRACTOR_Options flags; | ||
8 | }; | ||
9 | |||
10 | /** | ||
11 | * Function to call on paths. | ||
12 | * | ||
13 | * @param cls closure | ||
14 | * @param path a directory path | ||
15 | */ | ||
16 | typedef void (*PathProcessor)(void *cls, | ||
17 | const char *path); | ||
18 | |||
19 | /** | ||
20 | * Iterate over all paths where we expect to find GNU libextractor | ||
21 | * plugins. | ||
22 | * | ||
23 | * @param pp function to call for each path | ||
24 | * @param pp_cls cls argument for pp. | ||
25 | */ | ||
26 | void | ||
27 | get_installation_paths (PathProcessor pp, | ||
28 | void *pp_cls); | ||
29 | |||
30 | /** | ||
31 | * Given a short name of a library (i.e. "mime"), find | ||
32 | * the full path of the respective plugin. | ||
33 | */ | ||
34 | char * | ||
35 | find_plugin (const char *short_name); | ||
36 | |||
37 | /** | ||
38 | * Load all plugins from the given directory. | ||
39 | * | ||
40 | * @param cls pointer to the "struct EXTRACTOR_PluginList*" to extend | ||
41 | * @param path path to a directory with plugins | ||
42 | */ | ||
43 | void | ||
44 | load_plugins_from_dir (void *cls, | ||
45 | const char *path); | ||
46 | |||
47 | #endif /* EXTRACTOR_PLUGPATH_H */ | ||