[tracker/miner-fs-dbus-api: 1/13] Renamed TrackerMinerFilesReindex to TrackerMinerFilesIndex.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-dbus-api: 1/13] Renamed TrackerMinerFilesReindex to TrackerMinerFilesIndex.
- Date: Mon, 23 Aug 2010 13:35:21 +0000 (UTC)
commit 99619533feaee2867a64bc17157f225a4bc0e101
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Aug 18 13:54:21 2010 +0200
Renamed TrackerMinerFilesReindex to TrackerMinerFilesIndex.
It will be gaining new methods where "reindex" don't have much sense.
...s-reindex.xml => tracker-miner-files-index.xml} | 4 +-
src/miners/fs/Makefile.am | 6 +-
src/miners/fs/tracker-dbus.c | 14 ++--
src/miners/fs/tracker-main.c | 6 +-
...files-reindex.c => tracker-miner-files-index.c} | 74 ++++++++++----------
src/miners/fs/tracker-miner-files-index.h | 60 ++++++++++++++++
src/miners/fs/tracker-miner-files-reindex.h | 60 ----------------
src/tracker-control/Makefile.am | 2 +-
src/tracker-control/tracker-control.c | 14 ++--
9 files changed, 120 insertions(+), 120 deletions(-)
---
diff --git a/data/dbus/tracker-miner-files-reindex.xml b/data/dbus/tracker-miner-files-index.xml
similarity index 68%
rename from data/dbus/tracker-miner-files-reindex.xml
rename to data/dbus/tracker-miner-files-index.xml
index 260a321..edee281 100644
--- a/data/dbus/tracker-miner-files-reindex.xml
+++ b/data/dbus/tracker-miner-files-index.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<node name="/">
- <interface name="org.freedesktop.Tracker1.Miner.Files.Reindex">
- <method name="MimeTypes">
+ <interface name="org.freedesktop.Tracker1.Miner.Files.Index">
+ <method name="ReindexMimeTypes">
<annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
<arg type="as" name="mime_types" direction="in" />
</method>
diff --git a/src/miners/fs/Makefile.am b/src/miners/fs/Makefile.am
index d5749a7..dc0fb37 100644
--- a/src/miners/fs/Makefile.am
+++ b/src/miners/fs/Makefile.am
@@ -34,8 +34,8 @@ tracker_miner_fs_SOURCES = \
tracker-miner-applications.h \
tracker-miner-files.c \
tracker-miner-files.h \
- tracker-miner-files-reindex.c \
- tracker-miner-files-reindex.h
+ tracker-miner-files-index.c \
+ tracker-miner-files-index.h
tracker_miner_fs_LDADD = \
$(top_builddir)/src/libtracker-miner/libtracker-miner- TRACKER_API_VERSION@.la \
@@ -57,7 +57,7 @@ marshal_sources = \
dbus_sources = \
tracker-miner-glue.h \
- tracker-miner-files-reindex-glue.h \
+ tracker-miner-files-index-glue.h \
tracker-extract-client.h
tracker-marshal.h: tracker-marshal.list
diff --git a/src/miners/fs/tracker-dbus.c b/src/miners/fs/tracker-dbus.c
index 407547b..7ae29f8 100644
--- a/src/miners/fs/tracker-dbus.c
+++ b/src/miners/fs/tracker-dbus.c
@@ -22,8 +22,8 @@
#include <libtracker-common/tracker-dbus.h>
#include "tracker-dbus.h"
-#include "tracker-miner-files-reindex.h"
-#include "tracker-miner-files-reindex-glue.h"
+#include "tracker-miner-files-index.h"
+#include "tracker-miner-files-index-glue.h"
static DBusGConnection *connection;
static DBusGProxy *gproxy;
@@ -109,8 +109,8 @@ dbus_register_names (void)
DBUS_PATH_DBUS,
DBUS_INTERFACE_DBUS);
- /* Register the service name for org.freedesktop.Tracker1.Miner.Files.Reindex */
- if (!dbus_register_service (gproxy, TRACKER_MINER_FILES_REINDEX_SERVICE)) {
+ /* Register the service name for org.freedesktop.Tracker1.Miner.Files.Index */
+ if (!dbus_register_service (gproxy, TRACKER_MINER_FILES_INDEX_SERVICE)) {
return FALSE;
}
@@ -153,7 +153,7 @@ tracker_dbus_shutdown (void)
gboolean
tracker_dbus_register_objects (gpointer object)
{
- g_return_val_if_fail (TRACKER_IS_MINER_FILES_REINDEX (object), FALSE);
+ g_return_val_if_fail (TRACKER_IS_MINER_FILES_INDEX (object), FALSE);
if (!connection || !gproxy) {
g_critical ("D-Bus support must be initialized before registering objects!");
@@ -169,8 +169,8 @@ tracker_dbus_register_objects (gpointer object)
dbus_register_object (connection,
gproxy,
G_OBJECT (object),
- &dbus_glib_tracker_miner_files_reindex_object_info,
- TRACKER_MINER_FILES_REINDEX_PATH);
+ &dbus_glib_tracker_miner_files_index_object_info,
+ TRACKER_MINER_FILES_INDEX_PATH);
objects = g_slist_prepend (objects, object);
return TRUE;
diff --git a/src/miners/fs/tracker-main.c b/src/miners/fs/tracker-main.c
index 7f6cce6..1d08403 100644
--- a/src/miners/fs/tracker-main.c
+++ b/src/miners/fs/tracker-main.c
@@ -50,7 +50,7 @@
#include "tracker-marshal.h"
#include "tracker-miner-applications.h"
#include "tracker-miner-files.h"
-#include "tracker-miner-files-reindex.h"
+#include "tracker-miner-files-index.h"
#define ABOUT \
"Tracker " PACKAGE_VERSION "\n"
@@ -545,7 +545,7 @@ main (gint argc, gchar *argv[])
{
TrackerConfig *config;
TrackerMiner *miner_applications, *miner_files;
- TrackerMinerFilesReindex *object;
+ TrackerMinerFilesIndex *object;
GOptionContext *context;
GError *error = NULL;
gchar *log_filename = NULL;
@@ -644,7 +644,7 @@ main (gint argc, gchar *argv[])
G_CALLBACK (miner_finished_cb),
main_loop);
- object = tracker_miner_files_reindex_new (TRACKER_MINER_FILES (miner_files));
+ object = tracker_miner_files_index_new (TRACKER_MINER_FILES (miner_files));
if (!object) {
g_object_unref (miner_files);
diff --git a/src/miners/fs/tracker-miner-files-reindex.c b/src/miners/fs/tracker-miner-files-index.c
similarity index 75%
rename from src/miners/fs/tracker-miner-files-reindex.c
rename to src/miners/fs/tracker-miner-files-index.c
index 3a7e059..b725c0f 100644
--- a/src/miners/fs/tracker-miner-files-reindex.c
+++ b/src/miners/fs/tracker-miner-files-index.c
@@ -23,7 +23,7 @@
#include <libtracker-sparql/tracker-sparql.h>
-#include "tracker-miner-files-reindex.h"
+#include "tracker-miner-files-index.h"
#include "tracker-dbus.h"
#include "tracker-marshal.h"
@@ -36,37 +36,37 @@ typedef struct {
typedef struct {
TrackerMinerFiles *files_miner;
-} TrackerMinerFilesReindexPrivate;
+} TrackerMinerFilesIndexPrivate;
enum {
PROP_0,
PROP_FILES_MINER
};
-#define TRACKER_MINER_FILES_REINDEX_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_TYPE_MINER_FILES_REINDEX, TrackerMinerFilesReindexPrivate))
+#define TRACKER_MINER_FILES_INDEX_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_TYPE_MINER_FILES_INDEX, TrackerMinerFilesIndexPrivate))
-static void reindex_set_property (GObject *object,
+static void index_set_property (GObject *object,
guint param_id,
const GValue *value,
GParamSpec *pspec);
-static void reindex_get_property (GObject *object,
+static void index_get_property (GObject *object,
guint param_id,
GValue *value,
GParamSpec *pspec);
-static void reindex_finalize (GObject *object);
+static void index_finalize (GObject *object);
-G_DEFINE_TYPE(TrackerMinerFilesReindex, tracker_miner_files_reindex, G_TYPE_OBJECT)
+G_DEFINE_TYPE(TrackerMinerFilesIndex, tracker_miner_files_index, G_TYPE_OBJECT)
static void
-tracker_miner_files_reindex_class_init (TrackerMinerFilesReindexClass *klass)
+tracker_miner_files_index_class_init (TrackerMinerFilesIndexClass *klass)
{
GObjectClass *object_class;
object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = reindex_finalize;
- object_class->set_property = reindex_set_property;
- object_class->get_property = reindex_get_property;
+ object_class->finalize = index_finalize;
+ object_class->set_property = index_set_property;
+ object_class->get_property = index_get_property;
g_object_class_install_property (object_class,
PROP_FILES_MINER,
@@ -76,18 +76,18 @@ tracker_miner_files_reindex_class_init (TrackerMinerFilesReindexClass *klass)
TRACKER_TYPE_MINER_FILES,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
- g_type_class_add_private (klass, sizeof (TrackerMinerFilesReindexPrivate));
+ g_type_class_add_private (klass, sizeof (TrackerMinerFilesIndexPrivate));
}
static void
-reindex_set_property (GObject *object,
- guint param_id,
- const GValue *value,
- GParamSpec *pspec)
+index_set_property (GObject *object,
+ guint param_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
- TrackerMinerFilesReindexPrivate *priv;
+ TrackerMinerFilesIndexPrivate *priv;
- priv = TRACKER_MINER_FILES_REINDEX_GET_PRIVATE (object);
+ priv = TRACKER_MINER_FILES_INDEX_GET_PRIVATE (object);
switch (param_id) {
case PROP_FILES_MINER:
@@ -101,14 +101,14 @@ reindex_set_property (GObject *object,
static void
-reindex_get_property (GObject *object,
- guint param_id,
- GValue *value,
- GParamSpec *pspec)
+index_get_property (GObject *object,
+ guint param_id,
+ GValue *value,
+ GParamSpec *pspec)
{
- TrackerMinerFilesReindexPrivate *priv;
+ TrackerMinerFilesIndexPrivate *priv;
- priv = TRACKER_MINER_FILES_REINDEX_GET_PRIVATE (object);
+ priv = TRACKER_MINER_FILES_INDEX_GET_PRIVATE (object);
switch (param_id) {
case PROP_FILES_MINER:
@@ -121,14 +121,14 @@ reindex_get_property (GObject *object,
}
static void
-reindex_finalize (GObject *object)
+index_finalize (GObject *object)
{
- TrackerMinerFilesReindexPrivate *priv = TRACKER_MINER_FILES_REINDEX_GET_PRIVATE (object);
+ TrackerMinerFilesIndexPrivate *priv = TRACKER_MINER_FILES_INDEX_GET_PRIVATE (object);
g_object_unref (priv->files_miner);
}
static void
-tracker_miner_files_reindex_init (TrackerMinerFilesReindex *object)
+tracker_miner_files_index_init (TrackerMinerFilesIndex *object)
{
}
@@ -199,21 +199,21 @@ mime_types_cb (GObject *object,
mime_types_data_destroy (user_data);
}
-TrackerMinerFilesReindex *
-tracker_miner_files_reindex_new (TrackerMinerFiles *miner_files)
+TrackerMinerFilesIndex *
+tracker_miner_files_index_new (TrackerMinerFiles *miner_files)
{
- return g_object_new (TRACKER_TYPE_MINER_FILES_REINDEX,
- "files-miner", miner_files,
+ return g_object_new (TRACKER_TYPE_MINER_FILES_INDEX,
+ "files-miner", miner_files,
NULL);
}
void
-tracker_miner_files_reindex_mime_types (TrackerMinerFilesReindex *object,
- gchar **mime_types,
- DBusGMethodInvocation *context,
- GError **error)
+tracker_miner_files_index_reindex_mime_types (TrackerMinerFilesIndex *object,
+ gchar **mime_types,
+ DBusGMethodInvocation *context,
+ GError **error)
{
- TrackerMinerFilesReindexPrivate *priv;
+ TrackerMinerFilesIndexPrivate *priv;
GString *query;
GError *inner_error = NULL;
TrackerSparqlConnection *connection;
@@ -262,7 +262,7 @@ tracker_miner_files_reindex_mime_types (TrackerMinerFilesReindex *object,
g_string_append (query, ") }");
- priv = TRACKER_MINER_FILES_REINDEX_GET_PRIVATE (object);
+ priv = TRACKER_MINER_FILES_INDEX_GET_PRIVATE (object);
/* FIXME: save last call id */
tracker_sparql_connection_query_async (connection,
diff --git a/src/miners/fs/tracker-miner-files-index.h b/src/miners/fs/tracker-miner-files-index.h
new file mode 100644
index 0000000..c5f0532
--- /dev/null
+++ b/src/miners/fs/tracker-miner-files-index.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2010, Nokia <ivan frade nokia com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __TRACKER_STORE_MINER_FILES_INDEX_H__
+#define __TRACKER_STORE_MINER_FILES_INDEX_H__
+
+#include <glib-object.h>
+
+#define TRACKER_MINER_FILES_INDEX_SERVICE "org.freedesktop.Tracker1.Miner.Files.Index"
+#define TRACKER_MINER_FILES_INDEX_PATH "/org/freedesktop/Tracker1/Miner/Files/Index"
+#define TRACKER_MINER_FILES_INDEX_INTERFACE "org.freedesktop.Tracker1.Miner.Files.Index"
+
+#include "tracker-miner-files.h"
+
+G_BEGIN_DECLS
+
+#define TRACKER_TYPE_MINER_FILES_INDEX (tracker_miner_files_index_get_type ())
+#define TRACKER_MINER_FILES_INDEX(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TRACKER_TYPE_MINER_FILES_INDEX, TrackerMinerFilesIndex))
+#define TRACKER_MINER_FILES_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_DBUS_MINER_FILES_INDEX, TrackerMinerFilesIndexClass))
+#define TRACKER_IS_MINER_FILES_INDEX(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), TRACKER_TYPE_MINER_FILES_INDEX))
+#define TRACKER_IS_MINER_FILES_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_MINER_FILES_INDEX))
+#define TRACKER_MINER_FILES_INDEX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_MINER_FILES_INDEX, TrackerMinerFilesIndexClass))
+
+typedef struct TrackerMinerFilesIndex TrackerMinerFilesIndex;
+typedef struct TrackerMinerFilesIndexClass TrackerMinerFilesIndexClass;
+
+struct TrackerMinerFilesIndex {
+ GObject parent;
+};
+
+struct TrackerMinerFilesIndexClass {
+ GObjectClass parent;
+};
+
+GType tracker_miner_files_index_get_type (void);
+TrackerMinerFilesIndex *tracker_miner_files_index_new (TrackerMinerFiles *miner_files);
+void tracker_miner_files_index_reindex_mime_types (TrackerMinerFilesIndex *object,
+ gchar **mime_types,
+ DBusGMethodInvocation *context,
+ GError **error);
+
+G_END_DECLS
+
+#endif /* __TRACKER_STORE_MINER_FILES_INDEX_H__ */
diff --git a/src/tracker-control/Makefile.am b/src/tracker-control/Makefile.am
index f92d6f9..637e4cf 100644
--- a/src/tracker-control/Makefile.am
+++ b/src/tracker-control/Makefile.am
@@ -39,7 +39,7 @@ tracker_control_SOURCES = \
tracker_control_LDADD = $(libs)
dbus_sources = \
- tracker-miner-files-reindex-client.h
+ tracker-miner-files-index-client.h
%-client.h: $(top_srcdir)/data/dbus/%.xml
$(AM_V_GEN)$(DBUSBINDINGTOOL) --mode=glib-client --output=$@ --prefix=$(subst -,_,$*) $^
diff --git a/src/tracker-control/tracker-control.c b/src/tracker-control/tracker-control.c
index 464e6e8..6eaa997 100644
--- a/src/tracker-control/tracker-control.c
+++ b/src/tracker-control/tracker-control.c
@@ -38,7 +38,7 @@
#include <libtracker-data/tracker-db-manager.h>
#include <libtracker-miner/tracker-miner.h>
-#include "tracker-miner-files-reindex-client.h"
+#include "tracker-miner-files-index-client.h"
#define ABOUT \
"Tracker " PACKAGE_VERSION "\n"
@@ -553,9 +553,9 @@ main (int argc, char **argv)
* predefined for us to just use (dbus_g_proxy_...)
*/
proxy = dbus_g_proxy_new_for_name (connection,
- "org.freedesktop.Tracker1.Miner.Files.Reindex",
- "/org/freedesktop/Tracker1/Miner/Files/Reindex",
- "org.freedesktop.Tracker1.Miner.Files.Reindex");
+ "org.freedesktop.Tracker1.Miner.Files.Index",
+ "/org/freedesktop/Tracker1/Miner/Files/Index",
+ "org.freedesktop.Tracker1.Miner.Files.Index");
if (!proxy) {
g_print ("Could not create a proxy for the D-Bus service, %s",
@@ -564,9 +564,9 @@ main (int argc, char **argv)
return FALSE;
}
- if (!org_freedesktop_Tracker1_Miner_Files_Reindex_mime_types (proxy,
- reindex_mime_types,
- &error)) {
+ if (!org_freedesktop_Tracker1_Miner_Files_Index_reindex_mime_types (proxy,
+ reindex_mime_types,
+ &error)) {
g_print ("Could not reindex mime types, %s",
error ? error->message : "no error given.");
g_clear_error (&error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]