[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 02/02: BUILD: Improve extractor handling. Removed platform.h fr
From: |
gnunet |
Subject: |
[gnunet] 02/02: BUILD: Improve extractor handling. Removed platform.h from include |
Date: |
Mon, 05 Dec 2022 05:17:03 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
commit 6ccf51adc80cdb818416971cfd8ba82084571299
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Mon Dec 5 13:15:09 2022 +0900
BUILD: Improve extractor handling. Removed platform.h from include
Extractor is not properly detected and GNUNET_FS_EXTRACTOR_ENABLED
added to gnunet_config.h.
platform.h is removed from $PREFIX/include as it must not be included
by third parties anyway.
---
configure.ac | 2 +
src/fs/fs.h | 2 +-
src/fs/fs_api.c | 2 +-
src/fs/fs_api.h | 2 +-
src/fs/fs_directory.c | 2 +-
src/fs/fs_dirmetascan.c | 2 +-
src/fs/fs_download.c | 2 +-
src/fs/fs_getopt.c | 2 +-
src/fs/fs_list_indexed.c | 2 +-
src/fs/fs_misc.c | 2 +-
src/fs/fs_namespace.c | 2 +-
src/fs/fs_publish.c | 2 +-
src/fs/fs_publish_ksk.c | 2 +-
src/fs/fs_publish_ublock.h | 2 +-
src/fs/fs_search.c | 2 +-
src/fs/fs_sharetree.c | 2 +-
src/fs/fs_unindex.c | 2 +-
src/fs/fs_uri.c | 2 +-
src/fs/gnunet-daemon-fsprofiler.c | 2 +-
src/fs/gnunet-directory.c | 2 +-
src/fs/gnunet-download.c | 2 +-
src/fs/gnunet-fs.c | 2 +-
src/fs/gnunet-helper-fs-publish.c | 2 +-
src/fs/gnunet-publish.c | 2 +-
src/fs/gnunet-search.c | 2 +-
src/fs/gnunet-unindex.c | 2 +-
src/fs/meta_data.c | 2 +-
src/fs/plugin_block_fs.c | 2 +-
src/fs/test_fs_meta_data.c | 2 +-
src/include/Makefile.am | 3 +-
src/include/gnunet_config.h.in | 7 ++
src/include/gnunet_extractor_compat.h | 149 ----------------------------------
src/include/gnunet_fs_service.h | 100 +++++++++++++++++++++++
src/include/gnunet_util_lib.h | 1 +
34 files changed, 139 insertions(+), 179 deletions(-)
diff --git a/configure.ac b/configure.ac
index 81d678ecd..79b9d82d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1490,6 +1490,8 @@ AS_IF([test "x$extractor" = "x0"],
AC_MSG_WARN([libextractor not found, but various file-sharing operations
require it])],
[libextractor_msg="yes"])
+AC_SUBST([extractor])
+
# libzbar
AS_IF([test "x$zbar" = "x1"],
[libzbar_msg="yes"],
diff --git a/src/fs/fs.h b/src/fs/fs.h
index 920cf27b2..c3bae65d2 100644
--- a/src/fs/fs.h
+++ b/src/fs/fs.h
@@ -29,7 +29,7 @@
#include "gnunet_constants.h"
#include "gnunet_datastore_service.h"
#include "gnunet_dht_service.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "gnunet_block_lib.h"
#include "block_fs.h"
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c
index c786d660c..627c58004 100644
--- a/src/fs/fs_api.c
+++ b/src/fs/fs_api.c
@@ -26,7 +26,7 @@
#include "platform.h"
#include "gnunet_util_lib.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "fs_api.h"
#include "fs_tree.h"
diff --git a/src/fs/fs_api.h b/src/fs/fs_api.h
index 9c9ce0f24..fdda91928 100644
--- a/src/fs/fs_api.h
+++ b/src/fs/fs_api.h
@@ -29,7 +29,7 @@
#include "gnunet_constants.h"
#include "gnunet_datastore_service.h"
#include "gnunet_dht_service.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "gnunet_block_lib.h"
#include "block_fs.h"
diff --git a/src/fs/fs_directory.c b/src/fs/fs_directory.c
index e53b2dc11..c693f9216 100644
--- a/src/fs/fs_directory.c
+++ b/src/fs/fs_directory.c
@@ -33,7 +33,7 @@
* into memory
*/
#include "platform.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "fs_api.h"
diff --git a/src/fs/fs_dirmetascan.c b/src/fs/fs_dirmetascan.c
index 3990a2521..2379e29ce 100644
--- a/src/fs/fs_dirmetascan.c
+++ b/src/fs/fs_dirmetascan.c
@@ -26,7 +26,7 @@
* @author Christian Grothoff
*/
#include "platform.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "gnunet_scheduler_lib.h"
#include <pthread.h>
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c
index 73e12acb1..2a21e4810 100644
--- a/src/fs/fs_download.c
+++ b/src/fs/fs_download.c
@@ -24,7 +24,7 @@
*/
#include "platform.h"
#include "gnunet_constants.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "fs_api.h"
#include "fs_tree.h"
diff --git a/src/fs/fs_getopt.c b/src/fs/fs_getopt.c
index 186963bba..0135e2e05 100644
--- a/src/fs/fs_getopt.c
+++ b/src/fs/fs_getopt.c
@@ -24,7 +24,7 @@
* @author Igor Wronsky, Christian Grothoff
*/
#include "platform.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "fs_api.h"
diff --git a/src/fs/fs_list_indexed.c b/src/fs/fs_list_indexed.c
index 7d30933dd..78816cad1 100644
--- a/src/fs/fs_list_indexed.c
+++ b/src/fs/fs_list_indexed.c
@@ -26,7 +26,7 @@
#include "platform.h"
#include "gnunet_constants.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "gnunet_protocols.h"
#include "fs_api.h"
diff --git a/src/fs/fs_misc.c b/src/fs/fs_misc.c
index 3ae82a82e..a8e23f042 100644
--- a/src/fs/fs_misc.c
+++ b/src/fs/fs_misc.c
@@ -24,7 +24,7 @@
*/
#include "platform.h"
#include "gnunet_constants.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "fs_api.h"
diff --git a/src/fs/fs_namespace.c b/src/fs/fs_namespace.c
index b3eeeb23c..f8b7b91c0 100644
--- a/src/fs/fs_namespace.c
+++ b/src/fs/fs_namespace.c
@@ -28,7 +28,7 @@
#include "gnunet_constants.h"
#include "gnunet_signatures.h"
#include "gnunet_util_lib.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "fs_api.h"
#include "fs_publish_ublock.h"
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c
index bd533fcfb..d1662c78b 100644
--- a/src/fs/fs_publish.c
+++ b/src/fs/fs_publish.c
@@ -28,7 +28,7 @@
#include "gnunet_constants.h"
#include "gnunet_signatures.h"
#include "gnunet_util_lib.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "fs_api.h"
#include "fs_tree.h"
diff --git a/src/fs/fs_publish_ksk.c b/src/fs/fs_publish_ksk.c
index d8ea22da2..3981ad335 100644
--- a/src/fs/fs_publish_ksk.c
+++ b/src/fs/fs_publish_ksk.c
@@ -30,7 +30,7 @@
#include "gnunet_constants.h"
#include "gnunet_signatures.h"
#include "gnunet_util_lib.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "fs_api.h"
#include "fs_tree.h"
diff --git a/src/fs/fs_publish_ublock.h b/src/fs/fs_publish_ublock.h
index 991926444..4adffc6c1 100644
--- a/src/fs/fs_publish_ublock.h
+++ b/src/fs/fs_publish_ublock.h
@@ -30,7 +30,7 @@
#include "gnunet_util_lib.h"
#include "gnunet_datastore_service.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "gnunet_identity_service.h"
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c
index 975dcfb14..823f046ed 100644
--- a/src/fs/fs_search.c
+++ b/src/fs/fs_search.c
@@ -24,7 +24,7 @@
*/
#include "platform.h"
#include "gnunet_constants.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "gnunet_protocols.h"
#include "fs_api.h"
diff --git a/src/fs/fs_sharetree.c b/src/fs/fs_sharetree.c
index a09b3589d..6c246a3ad 100644
--- a/src/fs/fs_sharetree.c
+++ b/src/fs/fs_sharetree.c
@@ -25,7 +25,7 @@
* @author Christian Grothoff
*/
#include "platform.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "gnunet_scheduler_lib.h"
#include <pthread.h>
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c
index 6031d7bc3..68ba667c4 100644
--- a/src/fs/fs_unindex.c
+++ b/src/fs/fs_unindex.c
@@ -26,7 +26,7 @@
*/
#include "platform.h"
#include "gnunet_constants.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "gnunet_protocols.h"
#include "fs_api.h"
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c
index 0810f77ca..b0be0db4f 100644
--- a/src/fs/fs_uri.c
+++ b/src/fs/fs_uri.c
@@ -81,7 +81,7 @@
*
*/
#include "platform.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "gnunet_signatures.h"
#include "fs_api.h"
diff --git a/src/fs/gnunet-daemon-fsprofiler.c
b/src/fs/gnunet-daemon-fsprofiler.c
index bc7ca9521..b99933cfa 100644
--- a/src/fs/gnunet-daemon-fsprofiler.c
+++ b/src/fs/gnunet-daemon-fsprofiler.c
@@ -27,7 +27,7 @@
* - how to signal driver that we're done?
*/
#include "platform.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "gnunet_statistics_service.h"
diff --git a/src/fs/gnunet-directory.c b/src/fs/gnunet-directory.c
index e720628b3..ab9f2905a 100644
--- a/src/fs/gnunet-directory.c
+++ b/src/fs/gnunet-directory.c
@@ -23,7 +23,7 @@
* @author Christian Grothoff
*/
#include "platform.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
static int ret;
diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c
index f463f901e..4694077e9 100644
--- a/src/fs/gnunet-download.c
+++ b/src/fs/gnunet-download.c
@@ -26,7 +26,7 @@
* @author Igor Wronsky
*/
#include "platform.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
static int ret;
diff --git a/src/fs/gnunet-fs.c b/src/fs/gnunet-fs.c
index 3dd00c7dc..21e3c4a40 100644
--- a/src/fs/gnunet-fs.c
+++ b/src/fs/gnunet-fs.c
@@ -23,7 +23,7 @@
* @author Christian Grothoff
*/
#include "platform.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
/**
diff --git a/src/fs/gnunet-helper-fs-publish.c
b/src/fs/gnunet-helper-fs-publish.c
index b886280c9..0e07b79dc 100644
--- a/src/fs/gnunet-helper-fs-publish.c
+++ b/src/fs/gnunet-helper-fs-publish.c
@@ -27,7 +27,7 @@
* and report the results to stdout.
*/
#include "platform.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c
index 094cbc9b9..59f16210a 100644
--- a/src/fs/gnunet-publish.c
+++ b/src/fs/gnunet-publish.c
@@ -26,7 +26,7 @@
* @author Igor Wronsky
*/
#include "platform.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "gnunet_identity_service.h"
diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c
index b55602523..a72cf97cc 100644
--- a/src/fs/gnunet-search.c
+++ b/src/fs/gnunet-search.c
@@ -30,7 +30,7 @@
#include <ctype.h>
#include <inttypes.h>
#include <limits.h>
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
diff --git a/src/fs/gnunet-unindex.c b/src/fs/gnunet-unindex.c
index 80cd95c19..326f75a63 100644
--- a/src/fs/gnunet-unindex.c
+++ b/src/fs/gnunet-unindex.c
@@ -26,7 +26,7 @@
* @author Igor Wronsky
*/
#include "platform.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
static int ret;
diff --git a/src/fs/meta_data.c b/src/fs/meta_data.c
index f676ce57c..3e2857101 100644
--- a/src/fs/meta_data.c
+++ b/src/fs/meta_data.c
@@ -28,7 +28,7 @@
#include "platform.h"
#include "gnunet_util_lib.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
/**
diff --git a/src/fs/plugin_block_fs.c b/src/fs/plugin_block_fs.c
index a6cfb2e64..bbd0ff57b 100644
--- a/src/fs/plugin_block_fs.c
+++ b/src/fs/plugin_block_fs.c
@@ -25,7 +25,7 @@
*/
#include "platform.h"
#include "gnunet_block_plugin.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#include "block_fs.h"
#include "gnunet_signatures.h"
diff --git a/src/fs/test_fs_meta_data.c b/src/fs/test_fs_meta_data.c
index 50f902cb5..bee7844ea 100644
--- a/src/fs/test_fs_meta_data.c
+++ b/src/fs/test_fs_meta_data.c
@@ -28,7 +28,7 @@
#include "platform.h"
#include "gnunet_util_lib.h"
-#include "gnunet_extractor_compat.h"
+
#include "gnunet_fs_service.h"
#define ABORT(m) { fprintf (stderr, "Error at %s:%d\n", __FILE__, __LINE__); \
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index 6ece35851..4a0429900 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -4,13 +4,13 @@ SUBDIRS = .
gnunetincludedir = $(includedir)/gnunet
EXTRA_DIST = \
+ platform.h \
gauger.h \
block_fs.h \
block_dns.h \
block_regex.h
gnunetinclude_HEADERS = \
- platform.h \
gnunet_config.h \
gettext.h \
compat.h \
@@ -51,7 +51,6 @@ gnunetinclude_HEADERS = \
gnunet_dnsstub_lib.h \
gnunet_dns_service.h \
gnunet_error_codes.h \
- gnunet_extractor_compat.h \
gnunet_fragmentation_lib.h \
gnunet_friends_lib.h \
gnunet_fs_service.h \
diff --git a/src/include/gnunet_config.h.in b/src/include/gnunet_config.h.in
index ce7c5a894..63ffd84bd 100644
--- a/src/include/gnunet_config.h.in
+++ b/src/include/gnunet_config.h.in
@@ -48,4 +48,11 @@
/* Set to 1 if GnuTLS has DANE support */
#define GNUNET_CURL_GNUTLS @curl_gnutls@
+/**
+ * Set to 1 if file-sharing meta data parsing is built with
+ * libextractor, which means that callers to the API must use also use
+ * libextractor.
+ */
+#define GNUNET_FS_EXTRACTOR_ENABLED @extractor@
+
#endif
diff --git a/src/include/gnunet_extractor_compat.h
b/src/include/gnunet_extractor_compat.h
deleted file mode 100644
index d69525c9d..000000000
--- a/src/include/gnunet_extractor_compat.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- This file is part of GNUnet
- Copyright (C) 2022 GNUnet e.V.
-
- GNUnet is free software: you can redistribute it and/or modify it
- under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License,
- or (at your option) any later version.
-
- GNUnet is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- SPDX-License-Identifier: AGPL3.0-or-later
- */
-/**
- * @author Martin Schanzenbach
- *
- * @file
- * libextractor compatibility insanity helper header
- *
- * @{
- */
-#ifndef GNUNET_EXTRACTOR_COMPAT_H
-#define GNUNET_EXTRACTOR_COMPAT_H
-
-
-#ifdef __cplusplus
-extern "C"
-{
-#if 0 /* keep Emacsens' auto-indent happy */
-}
-#endif
-#endif
-
-#if HAVE_EXTRACTOR_H
-
-#include <extractor.h>
-
-#else
-
-/* definitions from extractor.h we need for the build */
-
-/**
- * Enumeration defining various sources of keywords. See also
- * http://dublincore.org/documents/1998/09/dces/
- */
-enum EXTRACTOR_MetaType
-{
- EXTRACTOR_METATYPE_RESERVED = 0,
- EXTRACTOR_METATYPE_MIMETYPE = 1,
- EXTRACTOR_METATYPE_FILENAME = 2,
- EXTRACTOR_METATYPE_COMMENT = 3,
- EXTRACTOR_METATYPE_TITLE = 4,
- EXTRACTOR_METATYPE_BOOK_TITLE = 5,
- EXTRACTOR_METATYPE_JOURNAL_NAME = 8,
- EXTRACTOR_METATYPE_AUTHOR_NAME = 13,
- EXTRACTOR_METATYPE_PUBLICATION_DATE = 24,
- EXTRACTOR_METATYPE_URL = 29,
- EXTRACTOR_METATYPE_URI = 30,
- EXTRACTOR_METATYPE_ISRC = 31,
- EXTRACTOR_METATYPE_UNKNOWN = 45,
- EXTRACTOR_METATYPE_DESCRIPTION = 46,
- EXTRACTOR_METATYPE_KEYWORDS = 49,
- EXTRACTOR_METATYPE_SUBJECT = 52,
- EXTRACTOR_METATYPE_PACKAGE_NAME = 69,
- EXTRACTOR_METATYPE_THUMBNAIL = 114,
- EXTRACTOR_METATYPE_ALBUM = 129,
- EXTRACTOR_METATYPE_ARTIST = 130,
- EXTRACTOR_METATYPE_ORIGINAL_TITLE = 162,
- EXTRACTOR_METATYPE_GNUNET_FULL_DATA = 174,
- EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME = 180,
-};
-
-/**
- * Format in which the extracted meta data is presented.
- */
-enum EXTRACTOR_MetaFormat
-{
- /**
- * Format is unknown.
- */
- EXTRACTOR_METAFORMAT_UNKNOWN = 0,
-
- /**
- * 0-terminated, UTF-8 encoded string. "data_len"
- * is strlen(data)+1.
- */
- EXTRACTOR_METAFORMAT_UTF8 = 1,
-
- /**
- * Some kind of binary format, see given Mime type.
- */
- EXTRACTOR_METAFORMAT_BINARY = 2,
-
- /**
- * 0-terminated string. The specific encoding is unknown.
- * "data_len" is strlen (data)+1.
- */
- EXTRACTOR_METAFORMAT_C_STRING = 3
-};
-
-
-/**
- * Type of a function that libextractor calls for each
- * meta data item found.
- *
- * @param cls closure (user-defined)
- * @param plugin_name name of the plugin that produced this value;
- * special values can be used (e.g. '<zlib>' for zlib being
- * used in the main libextractor library and yielding
- * meta data).
- * @param type libextractor-type describing the meta data
- * @param format basic format information about @a data
- * @param data_mime_type mime-type of @a data (not of the original file);
- * can be NULL (if mime-type is not known)
- * @param data actual meta-data found
- * @param data_len number of bytes in @a data
- * @return 0 to continue extracting, 1 to abort
- */
-typedef int (*EXTRACTOR_MetaDataProcessor) (void *cls,
- const char *plugin_name,
- enum EXTRACTOR_MetaType type,
- enum EXTRACTOR_MetaFormat format,
- const char *data_mime_type,
- const char *data,
- size_t data_len);
-
-#endif
-
-#ifndef EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME
-/* hack for LE < 0.6.3 */
-#define EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME 180
-#endif
-
-#if 0 /* keep Emacsens' auto-indent happy */
-{
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/** @} */ /* end of group */
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h
index 53ca6a9ec..5c271c71f 100644
--- a/src/include/gnunet_fs_service.h
+++ b/src/include/gnunet_fs_service.h
@@ -71,6 +71,106 @@ extern "C"
*/
#define GNUNET_FS_VERSION 0x00090300
+#if GNUNET_FS_EXTRACTOR_ENABLED
+
+#include <extractor.h>
+
+#else
+
+/* definitions from extractor.h we need for the build */
+
+/**
+ * Enumeration defining various sources of keywords. See also
+ * http://dublincore.org/documents/1998/09/dces/
+ */
+enum EXTRACTOR_MetaType
+{
+ EXTRACTOR_METATYPE_RESERVED = 0,
+ EXTRACTOR_METATYPE_MIMETYPE = 1,
+ EXTRACTOR_METATYPE_FILENAME = 2,
+ EXTRACTOR_METATYPE_COMMENT = 3,
+ EXTRACTOR_METATYPE_TITLE = 4,
+ EXTRACTOR_METATYPE_BOOK_TITLE = 5,
+ EXTRACTOR_METATYPE_JOURNAL_NAME = 8,
+ EXTRACTOR_METATYPE_AUTHOR_NAME = 13,
+ EXTRACTOR_METATYPE_PUBLICATION_DATE = 24,
+ EXTRACTOR_METATYPE_URL = 29,
+ EXTRACTOR_METATYPE_URI = 30,
+ EXTRACTOR_METATYPE_ISRC = 31,
+ EXTRACTOR_METATYPE_UNKNOWN = 45,
+ EXTRACTOR_METATYPE_DESCRIPTION = 46,
+ EXTRACTOR_METATYPE_KEYWORDS = 49,
+ EXTRACTOR_METATYPE_SUBJECT = 52,
+ EXTRACTOR_METATYPE_PACKAGE_NAME = 69,
+ EXTRACTOR_METATYPE_THUMBNAIL = 114,
+ EXTRACTOR_METATYPE_ALBUM = 129,
+ EXTRACTOR_METATYPE_ARTIST = 130,
+ EXTRACTOR_METATYPE_ORIGINAL_TITLE = 162,
+ EXTRACTOR_METATYPE_GNUNET_FULL_DATA = 174,
+ EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME = 180,
+};
+
+/**
+ * Format in which the extracted meta data is presented.
+ */
+enum EXTRACTOR_MetaFormat
+{
+ /**
+ * Format is unknown.
+ */
+ EXTRACTOR_METAFORMAT_UNKNOWN = 0,
+
+ /**
+ * 0-terminated, UTF-8 encoded string. "data_len"
+ * is strlen(data)+1.
+ */
+ EXTRACTOR_METAFORMAT_UTF8 = 1,
+
+ /**
+ * Some kind of binary format, see given Mime type.
+ */
+ EXTRACTOR_METAFORMAT_BINARY = 2,
+
+ /**
+ * 0-terminated string. The specific encoding is unknown.
+ * "data_len" is strlen (data)+1.
+ */
+ EXTRACTOR_METAFORMAT_C_STRING = 3
+};
+
+
+/**
+ * Type of a function that libextractor calls for each
+ * meta data item found.
+ *
+ * @param cls closure (user-defined)
+ * @param plugin_name name of the plugin that produced this value;
+ * special values can be used (e.g. '<zlib>' for zlib being
+ * used in the main libextractor library and yielding
+ * meta data).
+ * @param type libextractor-type describing the meta data
+ * @param format basic format information about @a data
+ * @param data_mime_type mime-type of @a data (not of the original file);
+ * can be NULL (if mime-type is not known)
+ * @param data actual meta-data found
+ * @param data_len number of bytes in @a data
+ * @return 0 to continue extracting, 1 to abort
+ */
+typedef int (*EXTRACTOR_MetaDataProcessor) (void *cls,
+ const char *plugin_name,
+ enum EXTRACTOR_MetaType type,
+ enum EXTRACTOR_MetaFormat format,
+ const char *data_mime_type,
+ const char *data,
+ size_t data_len);
+
+#endif
+
+#ifndef EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME
+/* hack for LE < 0.6.3 */
+#define EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME 180
+#endif
+
/* ******************** URI API *********************** */
diff --git a/src/include/gnunet_util_lib.h b/src/include/gnunet_util_lib.h
index 280304825..ada40a4ca 100644
--- a/src/include/gnunet_util_lib.h
+++ b/src/include/gnunet_util_lib.h
@@ -65,6 +65,7 @@ extern "C"
#define GNUNET_AGPL_URL "https://git.gnunet.org/gnunet.git/tag/?h=v" \
GNUNET_VERSION
+#include "gnunet_config.h"
#include "gnunet_common.h"
#include "gnunet_crypto_lib.h"
#include "gnunet_bandwidth_lib.h"
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.