diff options
Diffstat (limited to 'src/include/extractor.h')
-rw-r--r-- | src/include/extractor.h | 32 |
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 | */ |
405 | const char * | 415 | _EXTRACTOR_EXTERN const char * |
406 | EXTRACTOR_metatype_to_string (enum EXTRACTOR_MetaType type); | 416 | EXTRACTOR_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 | */ |
418 | const char * | 428 | _EXTRACTOR_EXTERN const char * |
419 | EXTRACTOR_metatype_to_description (enum EXTRACTOR_MetaType type); | 429 | EXTRACTOR_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 | */ |
428 | enum EXTRACTOR_MetaType | 438 | _EXTRACTOR_EXTERN enum EXTRACTOR_MetaType |
429 | EXTRACTOR_metatype_get_max (void); | 439 | EXTRACTOR_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 | */ |
560 | struct EXTRACTOR_PluginList * | 570 | _EXTRACTOR_EXTERN struct EXTRACTOR_PluginList * |
561 | EXTRACTOR_plugin_add_defaults (enum EXTRACTOR_Options flags); | 571 | EXTRACTOR_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 | */ |
573 | struct EXTRACTOR_PluginList * | 583 | _EXTRACTOR_EXTERN struct EXTRACTOR_PluginList * |
574 | EXTRACTOR_plugin_add (struct EXTRACTOR_PluginList * prev, | 584 | EXTRACTOR_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 | */ |
595 | struct EXTRACTOR_PluginList * | 605 | _EXTRACTOR_EXTERN struct EXTRACTOR_PluginList * |
596 | EXTRACTOR_plugin_add_config (struct EXTRACTOR_PluginList *prev, | 606 | EXTRACTOR_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 | */ |
608 | struct EXTRACTOR_PluginList * | 618 | _EXTRACTOR_EXTERN struct EXTRACTOR_PluginList * |
609 | EXTRACTOR_plugin_remove (struct EXTRACTOR_PluginList *prev, | 619 | EXTRACTOR_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 | */ |
618 | void | 628 | _EXTRACTOR_EXTERN void |
619 | EXTRACTOR_plugin_remove_all (struct EXTRACTOR_PluginList *plugins); | 629 | EXTRACTOR_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 | */ |
633 | void | 643 | _EXTRACTOR_EXTERN void |
634 | EXTRACTOR_extract (struct EXTRACTOR_PluginList *plugins, | 644 | EXTRACTOR_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 | */ |
658 | int | 668 | _EXTRACTOR_EXTERN int |
659 | EXTRACTOR_meta_data_print (void *handle, | 669 | EXTRACTOR_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, |