[tracker/miner-fs-refactor: 121/127] libtracker-miner: Fix gir generation warnings
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-refactor: 121/127] libtracker-miner: Fix gir generation warnings
- Date: Wed, 7 Dec 2011 10:47:07 +0000 (UTC)
commit d0c19f1abcd55f323ce70256716f23274c090d81
Author: Carlos Garnacho <carlos lanedo com>
Date: Mon Nov 28 15:01:44 2011 +0100
libtracker-miner: Fix gir generation warnings
src/libtracker-miner/Makefile.am | 26 ++++++++---
src/libtracker-miner/tracker-albumart.c | 1 -
src/libtracker-miner/tracker-crawler.c | 27 ++++++++++++
src/libtracker-miner/tracker-indexing-tree.c | 14 +++++-
src/libtracker-miner/tracker-indexing-tree.h | 2 +-
.../tracker-miner-enum-types.c.template | 44 ++++++++++++++++++++
.../tracker-miner-enum-types.h.template | 26 ++++++++++++
src/libtracker-miner/tracker-miner.h | 3 +-
8 files changed, 130 insertions(+), 13 deletions(-)
---
diff --git a/src/libtracker-miner/Makefile.am b/src/libtracker-miner/Makefile.am
index 1c2fd7f..60de5cd 100644
--- a/src/libtracker-miner/Makefile.am
+++ b/src/libtracker-miner/Makefile.am
@@ -13,6 +13,12 @@ include $(top_srcdir)/Makefile.decl
#
include Makefile-shared-sources.decl
+tracker-miner-enum-types.h: tracker-miner-enum-types.h.template tracker-miner-enums.h
+ $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template tracker-miner-enum-types.h.template tracker-miner-enums.h) > $@
+
+tracker-miner-enum-types.c: tracker-miner-enum-types.c.template
+ $(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template tracker-miner-enum-types.c.template tracker-miner-enums.h) > $@
+
AM_CPPFLAGS = \
$(BUILD_CFLAGS) \
-I$(top_srcdir)/src \
@@ -37,6 +43,10 @@ crawler_sources = \
tracker-utils.h
private_sources = \
+ tracker-file-notifier.h \
+ tracker-file-notifier.c \
+ tracker-file-system.h \
+ tracker-file-system.c \
tracker-priority-queue.h \
tracker-priority-queue.c \
tracker-task-pool.h \
@@ -50,6 +60,8 @@ miner_sources = \
$(libtracker_miner_monitor_sources) \
$(libtracker_miner_monitor_headers) \
tracker-miner-dbus.h \
+ tracker-miner-enum-types.c \
+ tracker-miner-enum-types.h \
tracker-miner-object.c \
tracker-miner-object.h \
tracker-miner-fs.c \
@@ -68,10 +80,6 @@ libtracker_miner_ TRACKER_API_VERSION@_la_SOURCES = \
$(password_provider_sources) \
$(crawler_sources) \
$(miner_sources) \
- tracker-file-notifier.h \
- tracker-file-notifier.c \
- tracker-file-system.h \
- tracker-file-system.c \
tracker-indexing-tree.c \
tracker-indexing-tree.h \
tracker-network-provider.c \
@@ -84,11 +92,11 @@ libtracker_miner_ TRACKER_API_VERSION@_la_SOURCES = \
libtracker_minerinclude_HEADERS = \
tracker-albumart.h \
tracker-crawler.h \
- tracker-file-notifier.h \
- tracker-file-system.h \
tracker-indexing-tree.h \
tracker-miner.h \
tracker-miner-common.h \
+ tracker-miner-enums.h \
+ tracker-miner-enum-types.h \
tracker-miner-object.h \
tracker-miner-fs.h \
tracker-miner-manager.h \
@@ -104,7 +112,7 @@ if !ENABLE_GCOV
# Using enable_gcov instead of have_unit_test because when doing a release
# we disable gcov but NOT the unit tests
libtracker_miner_ TRACKER_API_VERSION@_la_LDFLAGS += \
- -export-symbols-regex '^tracker_(miner|thumbnailer|crawler|storage|password_provider|network_provider|indexing_tree|file_system|file_notifier)_.*'
+ -export-symbols-regex '^tracker_(miner|thumbnailer|crawler|storage|password_provider|network_provider|indexing_tree|file_system|file_notifier|directory_flags|filter_type|filter_policy)_.*'
endif
libtracker_miner_ TRACKER_API_VERSION@_la_LIBADD = \
@@ -147,6 +155,8 @@ tracker-miner-$(TRACKER_API_VERSION).deps: tracker-miner.deps
cp $< $@
BUILT_SOURCES = \
+ tracker-miner-enum-types.c \
+ tracker-miner-enum-types.h \
$(libtracker_miner_marshal_sources) \
$(libtracker_miner_marshal_headers) \
$(vapi_DATA)
@@ -154,6 +164,8 @@ BUILT_SOURCES = \
CLEANFILES = $(BUILT_SOURCES)
EXTRA_DIST = \
+ tracker-miner-enum-types.c.template \
+ tracker-miner-enum-types.h.template \
tracker-marshal.list \
tracker-miner.vapi \
tracker-miner.deps
diff --git a/src/libtracker-miner/tracker-albumart.c b/src/libtracker-miner/tracker-albumart.c
index bcef407..c624b6c 100644
--- a/src/libtracker-miner/tracker-albumart.c
+++ b/src/libtracker-miner/tracker-albumart.c
@@ -147,7 +147,6 @@ on_error:
}
/**
* tracker_albumart_remove_add:
- * @connection: SPARQL connection of this miner
* @uri: URI of the file
* @mime_type: mime-type of the file
*
diff --git a/src/libtracker-miner/tracker-crawler.c b/src/libtracker-miner/tracker-crawler.c
index fa36824..6c3b4d9 100644
--- a/src/libtracker-miner/tracker-crawler.c
+++ b/src/libtracker-miner/tracker-crawler.c
@@ -975,6 +975,15 @@ tracker_crawler_set_throttle (TrackerCrawler *crawler,
}
}
+/**
+ * tracker_crawler_set_file_attributes:
+ * @crawler: a #TrackerCrawler
+ * @file_attributes: file attributes to extract
+ *
+ * Sets the file attributes that @crawler will fetch for every
+ * file it gets, this info may be requested through
+ * tracker_crawler_get_file_info() in any #TrackerCrawler callback
+ **/
void
tracker_crawler_set_file_attributes (TrackerCrawler *crawler,
const gchar *file_attributes)
@@ -985,6 +994,14 @@ tracker_crawler_set_file_attributes (TrackerCrawler *crawler,
crawler->priv->file_attributes = g_strdup (file_attributes);
}
+/**
+ * tracker_crawler_get_file_attributes:
+ * @crawler: a #TrackerCrawler
+ *
+ * Returns the file attributes that @crawler will fetch
+ *
+ * Returns: the file attributes as a string.
+ **/
const gchar *
tracker_crawler_get_file_attributes (TrackerCrawler *crawler)
{
@@ -993,6 +1010,16 @@ tracker_crawler_get_file_attributes (TrackerCrawler *crawler)
return crawler->priv->file_attributes;
}
+/**
+ * tracker_crawler_get_file_info:
+ * @crawler: a #TrackerCrawler
+ * @file: a #GFile returned by @crawler
+ *
+ * Returns a #GFileInfo with the file attributes requested through
+ * tracker_crawler_set_file_attributes().
+ *
+ * Returns: (transfer none): a #GFileInfo with the file information
+ **/
GFileInfo *
tracker_crawler_get_file_info (TrackerCrawler *crawler,
GFile *file)
diff --git a/src/libtracker-miner/tracker-indexing-tree.c b/src/libtracker-miner/tracker-indexing-tree.c
index a8edab6..2d7170c 100644
--- a/src/libtracker-miner/tracker-indexing-tree.c
+++ b/src/libtracker-miner/tracker-indexing-tree.c
@@ -672,8 +672,7 @@ tracker_indexing_tree_file_is_indexable (TrackerIndexingTree *tree,
* tracker_indexing_tree_parent_is_indexable:
* @tree: a #TrackerIndexingTree
* @parent: parent directory
- * @children: children within @parent
- * @n_children: number of children
+ * @children: (element-type GFile): children within @parent
*
* returns %TRUE if @parent should be indexed based on its contents.
*
@@ -834,6 +833,17 @@ prepend_config_root (GNode *node,
return FALSE;
}
+/**
+ * tracker_indexing_tree_list_roots:
+ * @tree: a #TrackerIndexingTree
+ *
+ * Returns the list of indexing roots in @tree
+ *
+ * Returns: (transfer container) (element-type GFile): The list
+ * of roots, the list itself must be freed with g_list_free(),
+ * the list elements are owned by @tree and should not be
+ * freed.
+ **/
GList *
tracker_indexing_tree_list_roots (TrackerIndexingTree *tree)
{
diff --git a/src/libtracker-miner/tracker-indexing-tree.h b/src/libtracker-miner/tracker-indexing-tree.h
index 107cc0d..ba2e8fb 100644
--- a/src/libtracker-miner/tracker-indexing-tree.h
+++ b/src/libtracker-miner/tracker-indexing-tree.h
@@ -70,7 +70,7 @@ void tracker_indexing_tree_remove (TrackerIndexingTree *tre
GFile *directory);
void tracker_indexing_tree_add_filter (TrackerIndexingTree *tree,
- TrackerFilterType type,
+ TrackerFilterType filter,
const gchar *glob_string);
void tracker_indexing_tree_clear_filters (TrackerIndexingTree *tree,
TrackerFilterType type);
diff --git a/src/libtracker-miner/tracker-miner-enum-types.c.template b/src/libtracker-miner/tracker-miner-enum-types.c.template
new file mode 100644
index 0000000..e0f8d94
--- /dev/null
+++ b/src/libtracker-miner/tracker-miner-enum-types.c.template
@@ -0,0 +1,44 @@
+/*** BEGIN file-header ***/
+#include <config.h>
+
+#include "tracker-miner-enum-types.h"
+
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+/* enumerations from "@filename@" */
+#include "@filename@"
+/*** END file-production ***/
+
+
+/*** BEGIN value-header ***/
+GType
+ enum_name@_get_type (void)
+{
+ static volatile gsize g_define_type_id__volatile = 0;
+
+ if (g_once_init_enter (&g_define_type_id__volatile)) {
+ static const G Type@Value values[] = {
+/*** END value-header ***/
+
+/*** BEGIN value-production ***/
+ { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
+/*** END value-production ***/
+
+/*** BEGIN value-tail ***/
+ { 0, NULL, NULL }
+ };
+ GType g_define_type_id =
+ g_ type@_register_static (g_intern_static_string ("@EnumName@"), values);
+
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+ }
+
+ return g_define_type_id__volatile;
+}
+
+/*** END value-tail ***/
+
+/*** BEGIN file-tail ***/
+
+/*** END file-tail ***/
diff --git a/src/libtracker-miner/tracker-miner-enum-types.h.template b/src/libtracker-miner/tracker-miner-enum-types.h.template
new file mode 100644
index 0000000..8b2b151
--- /dev/null
+++ b/src/libtracker-miner/tracker-miner-enum-types.h.template
@@ -0,0 +1,26 @@
+/*** BEGIN file-header ***/
+
+#ifndef __TRACKER_MINER_ENUM_TYPES_H__
+#define __TRACKER_MINER_ENUM_TYPES_H__
+
+#include <glib-object.h>
+#include "tracker-miner-enums.h"
+
+G_BEGIN_DECLS
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+
+/* enumerations from "@filename@" */
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+GType @enum_name _get_type (void) G_GNUC_CONST;
+#define TRACKER_TYPE_ ENUMSHORT@ (@enum_name _get_type ())
+/*** END value-header ***/
+
+/*** BEGIN file-tail ***/
+G_END_DECLS
+
+#endif /* __TRACKER_ENUMS_TYPES_H__ */
+/*** END file-tail ***/
diff --git a/src/libtracker-miner/tracker-miner.h b/src/libtracker-miner/tracker-miner.h
index 0d3460b..be1182b 100644
--- a/src/libtracker-miner/tracker-miner.h
+++ b/src/libtracker-miner/tracker-miner.h
@@ -33,9 +33,8 @@
#include <libtracker-miner/tracker-miner-web.h>
#include <libtracker-miner/tracker-miner-manager.h>
#include <libtracker-miner/tracker-miner-enums.h>
+#include <libtracker-miner/tracker-miner-enum-types.h>
#include <libtracker-miner/tracker-indexing-tree.h>
-#include <libtracker-miner/tracker-file-system.h>
-#include <libtracker-miner/tracker-file-notifier.h>
#undef __LIBTRACKER_MINER_H_INSIDE__
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]