aboutsummaryrefslogtreecommitdiff
path: root/src/include/extractor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/extractor.h')
-rw-r--r--src/include/extractor.h32
1 files changed, 21 insertions, 11 deletions
diff --git a/src/include/extractor.h b/src/include/extractor.h
index 37c9770..3e86868 100644
--- a/src/include/extractor.h
+++ b/src/include/extractor.h
@@ -35,10 +35,20 @@ extern "C" {
35 * 0.2.6-1 => 0x00020601 35 * 0.2.6-1 => 0x00020601
36 * 4.5.2-0 => 0x04050200 36 * 4.5.2-0 => 0x04050200
37 */ 37 */
38#define EXTRACTOR_VERSION 0x01080000 38#define EXTRACTOR_VERSION 0x01080001
39 39
40#include <stdio.h> 40#include <stdio.h>
41 41
42#ifndef _EXTRACTOR_EXTERN
43#if defined(_WIN32) && defined(MHD_W32LIB)
44#define _EXTRACTOR_EXTERN extern
45#elif defined (_WIN32) && defined(MHD_W32DLL)
46/* Define MHD_W32DLL when using MHD as W32 .DLL to speed up linker a little */
47#define _EXTRACTOR_EXTERN __declspec(dllimport)
48#else
49#define _EXTRACTOR_EXTERN extern
50#endif
51#endif
42 52
43/** 53/**
44 * Options for how plugin execution should be done. 54 * Options for how plugin execution should be done.
@@ -402,7 +412,7 @@ enum EXTRACTOR_MetaType
402 * translate using `dgettext ("libextractor", rval)` 412 * translate using `dgettext ("libextractor", rval)`
403 * @ingroup types 413 * @ingroup types
404 */ 414 */
405const char * 415_EXTRACTOR_EXTERN const char *
406EXTRACTOR_metatype_to_string (enum EXTRACTOR_MetaType type); 416EXTRACTOR_metatype_to_string (enum EXTRACTOR_MetaType type);
407 417
408 418
@@ -415,7 +425,7 @@ EXTRACTOR_metatype_to_string (enum EXTRACTOR_MetaType type);
415 * translate using `dgettext ("libextractor", rval)` 425 * translate using `dgettext ("libextractor", rval)`
416 * @ingroup types 426 * @ingroup types
417 */ 427 */
418const char * 428_EXTRACTOR_EXTERN const char *
419EXTRACTOR_metatype_to_description (enum EXTRACTOR_MetaType type); 429EXTRACTOR_metatype_to_description (enum EXTRACTOR_MetaType type);
420 430
421 431
@@ -425,7 +435,7 @@ EXTRACTOR_metatype_to_description (enum EXTRACTOR_MetaType type);
425 * @return highest legal metatype number for this version of libextractor 435 * @return highest legal metatype number for this version of libextractor
426 * @ingroup types 436 * @ingroup types
427 */ 437 */
428enum EXTRACTOR_MetaType 438_EXTRACTOR_EXTERN enum EXTRACTOR_MetaType
429EXTRACTOR_metatype_get_max (void); 439EXTRACTOR_metatype_get_max (void);
430 440
431 441
@@ -557,7 +567,7 @@ struct EXTRACTOR_PluginList;
557 * @param flags options for all of the plugins loaded 567 * @param flags options for all of the plugins loaded
558 * @return the default set of plugins, NULL if no plugins were found 568 * @return the default set of plugins, NULL if no plugins were found
559 */ 569 */
560struct EXTRACTOR_PluginList * 570_EXTRACTOR_EXTERN struct EXTRACTOR_PluginList *
561EXTRACTOR_plugin_add_defaults (enum EXTRACTOR_Options flags); 571EXTRACTOR_plugin_add_defaults (enum EXTRACTOR_Options flags);
562 572
563 573
@@ -570,7 +580,7 @@ EXTRACTOR_plugin_add_defaults (enum EXTRACTOR_Options flags);
570 * @param flags options to use 580 * @param flags options to use
571 * @return the new list of libraries, equal to prev iff an error occured 581 * @return the new list of libraries, equal to prev iff an error occured
572 */ 582 */
573struct EXTRACTOR_PluginList * 583_EXTRACTOR_EXTERN struct EXTRACTOR_PluginList *
574EXTRACTOR_plugin_add (struct EXTRACTOR_PluginList * prev, 584EXTRACTOR_plugin_add (struct EXTRACTOR_PluginList * prev,
575 const char *library, 585 const char *library,
576 const char *options, 586 const char *options,
@@ -592,7 +602,7 @@ EXTRACTOR_plugin_add (struct EXTRACTOR_PluginList * prev,
592 * @return the new list of libraries, equal to prev iff an error occured 602 * @return the new list of libraries, equal to prev iff an error occured
593 * or if config was empty (or NULL). 603 * or if config was empty (or NULL).
594 */ 604 */
595struct EXTRACTOR_PluginList * 605_EXTRACTOR_EXTERN struct EXTRACTOR_PluginList *
596EXTRACTOR_plugin_add_config (struct EXTRACTOR_PluginList *prev, 606EXTRACTOR_plugin_add_config (struct EXTRACTOR_PluginList *prev,
597 const char *config, 607 const char *config,
598 enum EXTRACTOR_Options flags); 608 enum EXTRACTOR_Options flags);
@@ -605,7 +615,7 @@ EXTRACTOR_plugin_add_config (struct EXTRACTOR_PluginList *prev,
605 * @param library the name of the plugin to remove (short handle) 615 * @param library the name of the plugin to remove (short handle)
606 * @return the reduced list, unchanged if the plugin was not loaded 616 * @return the reduced list, unchanged if the plugin was not loaded
607 */ 617 */
608struct EXTRACTOR_PluginList * 618_EXTRACTOR_EXTERN struct EXTRACTOR_PluginList *
609EXTRACTOR_plugin_remove (struct EXTRACTOR_PluginList *prev, 619EXTRACTOR_plugin_remove (struct EXTRACTOR_PluginList *prev,
610 const char *library); 620 const char *library);
611 621
@@ -615,7 +625,7 @@ EXTRACTOR_plugin_remove (struct EXTRACTOR_PluginList *prev,
615 * 625 *
616 * @param plugin the list of plugins 626 * @param plugin the list of plugins
617 */ 627 */
618void 628_EXTRACTOR_EXTERN void
619EXTRACTOR_plugin_remove_all (struct EXTRACTOR_PluginList *plugins); 629EXTRACTOR_plugin_remove_all (struct EXTRACTOR_PluginList *plugins);
620 630
621 631
@@ -630,7 +640,7 @@ EXTRACTOR_plugin_remove_all (struct EXTRACTOR_PluginList *plugins);
630 * @param proc function to call for each meta data item found 640 * @param proc function to call for each meta data item found
631 * @param proc_cls cls argument to @a proc 641 * @param proc_cls cls argument to @a proc
632 */ 642 */
633void 643_EXTRACTOR_EXTERN void
634EXTRACTOR_extract (struct EXTRACTOR_PluginList *plugins, 644EXTRACTOR_extract (struct EXTRACTOR_PluginList *plugins,
635 const char *filename, 645 const char *filename,
636 const void *data, 646 const void *data,
@@ -655,7 +665,7 @@ EXTRACTOR_extract (struct EXTRACTOR_PluginList *plugins,
655 * @param data_len number of bytes in @a data 665 * @param data_len number of bytes in @a data
656 * @return non-zero if printing failed, otherwise 0. 666 * @return non-zero if printing failed, otherwise 0.
657 */ 667 */
658int 668_EXTRACTOR_EXTERN int
659EXTRACTOR_meta_data_print (void *handle, 669EXTRACTOR_meta_data_print (void *handle,
660 const char *plugin_name, 670 const char *plugin_name,
661 enum EXTRACTOR_MetaType type, 671 enum EXTRACTOR_MetaType type,