[tracker/writeback] Fixed indentation



commit 72c65833446b937db911f29745fd7cfad97e5897
Author: Philip Van Hoof <philip codeminded be>
Date:   Thu Nov 26 12:56:59 2009 +0100

    Fixed indentation

 src/tracker-writeback/tracker-main.c               |   24 +++---
 src/tracker-writeback/tracker-writeback-consumer.c |   39 ++++-----
 src/tracker-writeback/tracker-writeback-consumer.h |    8 +-
 .../tracker-writeback-dispatcher.c                 |   88 ++++++++++----------
 .../tracker-writeback-dispatcher.h                 |   12 ++--
 src/tracker-writeback/tracker-writeback-module.c   |   40 +++++-----
 src/tracker-writeback/tracker-writeback-module.h   |    4 +-
 src/tracker-writeback/tracker-writeback.c          |   12 ++--
 8 files changed, 113 insertions(+), 114 deletions(-)
---
diff --git a/src/tracker-writeback/tracker-main.c b/src/tracker-writeback/tracker-main.c
index b8185c8..e22737e 100644
--- a/src/tracker-writeback/tracker-main.c
+++ b/src/tracker-writeback/tracker-main.c
@@ -73,8 +73,8 @@ on_writeback_idle_cb (gpointer user_data)
 /* This callback run in the dispatcher thread */
 static void
 on_writeback_cb (TrackerWritebackDispatcher *dispatcher,
-		 const gchar                *subject,
-		 const GStrv                 rdf_types)
+                 const gchar                *subject,
+                 const GStrv                 rdf_types)
 {
 	WritebackData *data;
 
@@ -95,7 +95,7 @@ dispatcher_thread_func (gpointer data)
 	g_message ("DBus Dispatcher thread created: %p", g_thread_self ());
 
 	g_signal_connect (dispatcher, "writeback",
-			  G_CALLBACK (on_writeback_cb), NULL);
+	                  G_CALLBACK (on_writeback_cb), NULL);
 
 	loop = g_main_loop_new (dispatcher_context, FALSE);
 	g_main_loop_run (loop);
@@ -111,21 +111,21 @@ int
 main (int   argc,
       char *argv[])
 {
-        GMainLoop *loop;
+	GMainLoop *loop;
 	GError *error = NULL;
 
 	g_thread_init (NULL);
 	dbus_g_thread_init ();
 
-        g_type_init ();
+	g_type_init ();
 
-        consumer = tracker_writeback_consumer_new ();
+	consumer = tracker_writeback_consumer_new ();
 
 	/* Create dispatcher thread data here, GType
 	 * initialization for boxed types don't seem
 	 * to be threadsafe, this is troublesome with
-	 * signals initialization.
-	 */
+	 * signals initialization. */
+
 	dispatcher_context = g_main_context_new ();
 	dispatcher = tracker_writeback_dispatcher_new (dispatcher_context);
 
@@ -140,11 +140,11 @@ main (int   argc,
 
 	g_message ("Main thread is: %p", g_thread_self ());
 
-        loop = g_main_loop_new (NULL, FALSE);
-        g_main_loop_run (loop);
+	loop = g_main_loop_new (NULL, FALSE);
+	g_main_loop_run (loop);
 
-        g_object_unref (consumer);
+	g_object_unref (consumer);
 	g_main_loop_unref (loop);
 
-        return EXIT_SUCCESS;
+	return EXIT_SUCCESS;
 }
diff --git a/src/tracker-writeback/tracker-writeback-consumer.c b/src/tracker-writeback/tracker-writeback-consumer.c
index b08a418..0a5b316 100644
--- a/src/tracker-writeback/tracker-writeback-consumer.c
+++ b/src/tracker-writeback/tracker-writeback-consumer.c
@@ -33,7 +33,7 @@
 
 #define TRACKER_WRITEBACK_CONSUMER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_TYPE_WRITEBACK_CONSUMER, TrackerWritebackConsumerPrivate))
 
-#define TRACKER_SERVICE		    "org.freedesktop.Tracker1"
+#define TRACKER_SERVICE             "org.freedesktop.Tracker1"
 #define TRACKER_RESOURCES_OBJECT    "/org/freedesktop/Tracker1/Resources"
 #define TRACKER_INTERFACE_RESOURCES "org.freedesktop.Tracker1.Resources"
 
@@ -56,10 +56,9 @@ enum {
 	STATE_PROCESSING
 };
 
-static void tracker_writeback_consumer_finalize    (GObject		       *object);
-static void tracker_writeback_consumer_constructed (GObject		       *object);
-
-static gboolean process_queue_cb		   (gpointer user_data);
+static void tracker_writeback_consumer_finalize    (GObject       *object);
+static void tracker_writeback_consumer_constructed (GObject       *object);
+static gboolean process_queue_cb                   (gpointer       user_data);
 
 
 G_DEFINE_TYPE (TrackerWritebackConsumer, tracker_writeback_consumer, G_TYPE_OBJECT)
@@ -84,9 +83,9 @@ tracker_writeback_consumer_init (TrackerWritebackConsumer *consumer)
 
 	priv->client = tracker_connect (TRUE, 0);
 	priv->modules = g_hash_table_new_full (g_str_hash,
-					       g_str_equal,
-					       (GDestroyNotify) g_free,
-					       NULL);
+	                                       g_str_equal,
+	                                       (GDestroyNotify) g_free,
+	                                       NULL);
 	priv->process_queue = g_queue_new ();
 
 	priv->manager = tracker_writeback_get_miner_manager ();
@@ -189,8 +188,8 @@ sparql_query_cb (GPtrArray *result,
 				TrackerWriteback *writeback;
 
 				g_message ("  Updating metadata for subject:'%s' using module:'%s'",
-					   data->subject,
-					   module->name);
+				           data->subject,
+				           module->name);
 
 				writeback = tracker_writeback_module_create (module);
 				tracker_writeback_update_metadata (writeback, result, priv->client);
@@ -228,16 +227,16 @@ process_queue_cb (gpointer user_data)
 	}
 
 	query = g_strdup_printf ("SELECT ?url ?predicate ?object {"
-				 "  <%s> ?predicate ?object ;"
-				 "  nie:isStoredAs ?url ."
-				 "  ?predicate tracker:writeback true "
-				 "}",
-				 data->subject);
+	                         "  <%s> ?predicate ?object ;"
+	                         "  nie:isStoredAs ?url ."
+	                         "  ?predicate tracker:writeback true "
+	                         "}",
+	                         data->subject);
 
 	tracker_resources_sparql_query_async (priv->client,
-					      query,
-					      sparql_query_cb,
-					      consumer);
+	                                      query,
+	                                      sparql_query_cb,
+	                                      consumer);
 
 	g_free (query);
 
@@ -248,8 +247,8 @@ process_queue_cb (gpointer user_data)
 
 void
 tracker_writeback_consumer_add_subject (TrackerWritebackConsumer *consumer,
-					const gchar		 *subject,
-					const GStrv		  rdf_types)
+                                        const gchar              *subject,
+                                        const GStrv               rdf_types)
 {
 	TrackerWritebackConsumerPrivate *priv;
 	QueryData *data;
diff --git a/src/tracker-writeback/tracker-writeback-consumer.h b/src/tracker-writeback/tracker-writeback-consumer.h
index 78c1ac6..5d887d7 100644
--- a/src/tracker-writeback/tracker-writeback-consumer.h
+++ b/src/tracker-writeback/tracker-writeback-consumer.h
@@ -39,19 +39,19 @@ typedef struct TrackerWritebackConsumer TrackerWritebackConsumer;
 typedef struct TrackerWritebackConsumerClass TrackerWritebackConsumerClass;
 
 struct TrackerWritebackConsumer {
-        GObject parent_instance;
+	GObject parent_instance;
 };
 
 struct TrackerWritebackConsumerClass {
-        GObjectClass parent_class;
+	GObjectClass parent_class;
 };
 
 GType                      tracker_writeback_consumer_get_type (void) G_GNUC_CONST;
 TrackerWritebackConsumer * tracker_writeback_consumer_new      (void);
 
 void tracker_writeback_consumer_add_subject (TrackerWritebackConsumer *consumer,
-					     const gchar              *subject,
-					     const GStrv               rdf_types);
+                                             const gchar              *subject,
+                                             const GStrv               rdf_types);
 
 G_END_DECLS
 
diff --git a/src/tracker-writeback/tracker-writeback-dispatcher.c b/src/tracker-writeback/tracker-writeback-dispatcher.c
index f085ddd..399da47 100644
--- a/src/tracker-writeback/tracker-writeback-dispatcher.c
+++ b/src/tracker-writeback/tracker-writeback-dispatcher.c
@@ -27,9 +27,9 @@
 
 #define TRACKER_WRITEBACK_DISPATCHER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_TYPE_WRITEBACK_DISPATCHER, TrackerWritebackDispatcherPrivate))
 
-#define TRACKER_SERVICE			"org.freedesktop.Tracker1"
-#define TRACKER_RESOURCES_OBJECT	"/org/freedesktop/Tracker1/Resources"
-#define TRACKER_INTERFACE_RESOURCES	"org.freedesktop.Tracker1.Resources"
+#define TRACKER_SERVICE                 "org.freedesktop.Tracker1"
+#define TRACKER_RESOURCES_OBJECT        "/org/freedesktop/Tracker1/Resources"
+#define TRACKER_INTERFACE_RESOURCES     "org.freedesktop.Tracker1.Resources"
 
 #define DBUS_MATCH_STR \
 	"type='signal', " \
@@ -55,17 +55,17 @@ enum {
 static guint signals[LAST_SIGNAL] = { 0 };
 
 
-static void tracker_writeback_dispatcher_finalize     (GObject	    *object);
-static void tracker_writeback_dispatcher_constructed  (GObject	    *object);
+static void tracker_writeback_dispatcher_finalize     (GObject      *object);
+static void tracker_writeback_dispatcher_constructed  (GObject      *object);
 
-static void tracker_writeback_dispatcher_get_property (GObject	    *object,
-						       guint	     param_id,
-						       GValue	    *value,
-						       GParamSpec   *pspec);
-static void tracker_writeback_dispatcher_set_property (GObject	    *object,
-						       guint	     param_id,
-						       const GValue *value,
-						       GParamSpec   *pspec);
+static void tracker_writeback_dispatcher_get_property (GObject      *object,
+                                                       guint         param_id,
+                                                       GValue       *value,
+                                                       GParamSpec   *pspec);
+static void tracker_writeback_dispatcher_set_property (GObject      *object,
+                                                       guint         param_id,
+                                                       const GValue *value,
+                                                       GParamSpec   *pspec);
 
 
 G_DEFINE_TYPE (TrackerWritebackDispatcher, tracker_writeback_dispatcher, G_TYPE_OBJECT)
@@ -81,27 +81,27 @@ tracker_writeback_dispatcher_class_init (TrackerWritebackDispatcherClass *klass)
 	object_class->set_property = tracker_writeback_dispatcher_set_property;
 
 	g_object_class_install_property (object_class,
-					 PROP_MAIN_CONTEXT,
-					 g_param_spec_pointer ("context",
-							       "Main context",
-							       "Main context to run the DBus service on",
-							       G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+	                                 PROP_MAIN_CONTEXT,
+	                                 g_param_spec_pointer ("context",
+	                                                       "Main context",
+	                                                       "Main context to run the DBus service on",
+	                                                       G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 
 	signals[WRITEBACK] =
 		g_signal_new ("writeback",
-			      G_OBJECT_CLASS_TYPE (object_class),
-			      G_SIGNAL_RUN_LAST,
-			      G_STRUCT_OFFSET (TrackerWritebackDispatcherClass, writeback),
-			      NULL, NULL,
-			      tracker_marshal_VOID__STRING_BOXED,
-			      G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRV);
+		              G_OBJECT_CLASS_TYPE (object_class),
+		              G_SIGNAL_RUN_LAST,
+		              G_STRUCT_OFFSET (TrackerWritebackDispatcherClass, writeback),
+		              NULL, NULL,
+		              tracker_marshal_VOID__STRING_BOXED,
+		              G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRV);
 
 	g_type_class_add_private (object_class, sizeof (TrackerWritebackDispatcherPrivate));
 }
 
 static void
 handle_writeback_signal (TrackerWritebackDispatcher *dispatcher,
-			 DBusMessage		    *message)
+                         DBusMessage                *message)
 {
 	DBusMessageIter iter;
 	gchar *signature;
@@ -159,11 +159,11 @@ handle_writeback_signal (TrackerWritebackDispatcher *dispatcher,
 static DBusHandlerResult
 message_filter (DBusConnection *connection,
 		DBusMessage    *message,
-		gpointer	user_data)
+		gpointer        user_data)
 {
 	if (dbus_message_is_signal (message,
-				    TRACKER_INTERFACE_RESOURCES,
-				    "Writeback")) {
+	                            TRACKER_INTERFACE_RESOURCES,
+	                            "Writeback")) {
 		TrackerWritebackDispatcher *dispatcher = user_data;
 
 		handle_writeback_signal (dispatcher, message);
@@ -176,7 +176,7 @@ message_filter (DBusConnection *connection,
 
 static DBusConnection *
 setup_dbus_connection (TrackerWritebackDispatcher *dispatcher,
-		       GMainContext		  *context)
+                       GMainContext               *context)
 {
 	DBusConnection *connection;
 	DBusError error;
@@ -189,7 +189,7 @@ setup_dbus_connection (TrackerWritebackDispatcher *dispatcher,
 
 	if (dbus_error_is_set (&error)) {
 		g_critical ("Could not connect to the D-Bus session bus, %s",
-			    error.message);
+		            error.message);
 		dbus_error_free (&error);
 		return NULL;
 	}
@@ -199,12 +199,12 @@ setup_dbus_connection (TrackerWritebackDispatcher *dispatcher,
 	/* Request writeback service name */
 	g_message ("Registering D-Bus service '%s'...", TRACKER_WRITEBACK_DBUS_NAME);
 	result = dbus_bus_request_name (connection,
-					TRACKER_WRITEBACK_DBUS_NAME, 0,
-					&error);
+	                                TRACKER_WRITEBACK_DBUS_NAME, 0,
+	                                &error);
 
 	if (dbus_error_is_set (&error)) {
 		g_critical ("Could not acquire name:'%s', %s",
-			    TRACKER_WRITEBACK_DBUS_NAME, error.message);
+		            TRACKER_WRITEBACK_DBUS_NAME, error.message);
 		dbus_error_free (&error);
 		dbus_connection_close (connection);
 		dbus_connection_unref (connection);
@@ -214,8 +214,8 @@ setup_dbus_connection (TrackerWritebackDispatcher *dispatcher,
 
 	if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
 		g_critical ("D-Bus service name:'%s' is already taken, "
-			    "perhaps the application is already running?",
-			    TRACKER_WRITEBACK_DBUS_NAME);
+		            "perhaps the application is already running?",
+		            TRACKER_WRITEBACK_DBUS_NAME);
 		dbus_connection_close (connection);
 		dbus_connection_unref (connection);
 
@@ -294,9 +294,9 @@ tracker_writeback_dispatcher_constructed (GObject *object)
 
 static void
 tracker_writeback_dispatcher_get_property (GObject    *object,
-					   guint       param_id,
-					   GValue     *value,
-					   GParamSpec *pspec)
+                                           guint       param_id,
+                                           GValue     *value,
+                                           GParamSpec *pspec)
 {
 	TrackerWritebackDispatcherPrivate *priv;
 
@@ -313,10 +313,10 @@ tracker_writeback_dispatcher_get_property (GObject    *object,
 }
 
 static void
-tracker_writeback_dispatcher_set_property (GObject	*object,
-					   guint	 param_id,
-					   const GValue *value,
-					   GParamSpec	*pspec)
+tracker_writeback_dispatcher_set_property (GObject       *object,
+                                           guint          param_id,
+                                           const GValue  *value,
+                                           GParamSpec    *pspec)
 {
 	TrackerWritebackDispatcherPrivate *priv;
 
@@ -352,6 +352,6 @@ TrackerWritebackDispatcher *
 tracker_writeback_dispatcher_new (GMainContext *context)
 {
 	return g_object_new (TRACKER_TYPE_WRITEBACK_DISPATCHER,
-			     "context", context,
-			     NULL);
+	                     "context", context,
+	                     NULL);
 }
diff --git a/src/tracker-writeback/tracker-writeback-dispatcher.h b/src/tracker-writeback/tracker-writeback-dispatcher.h
index 4682ec1..0087a08 100644
--- a/src/tracker-writeback/tracker-writeback-dispatcher.h
+++ b/src/tracker-writeback/tracker-writeback-dispatcher.h
@@ -39,18 +39,18 @@ typedef struct TrackerWritebackDispatcher TrackerWritebackDispatcher;
 typedef struct TrackerWritebackDispatcherClass TrackerWritebackDispatcherClass;
 
 struct TrackerWritebackDispatcher {
-        GObject parent_instance;
+	GObject parent_instance;
 };
 
 struct TrackerWritebackDispatcherClass {
-        GObjectClass parent_class;
+	GObjectClass parent_class;
 
-        void (* writeback) (TrackerWritebackDispatcher *dispatcher,
-                            const gchar                *subject,
-                            const GStrv                 rdf_types);
+	void (* writeback) (TrackerWritebackDispatcher *dispatcher,
+	                    const gchar                *subject,
+	                    const GStrv                 rdf_types);
 };
 
-GType          tracker_writeback_dispatcher_get_type (void) G_GNUC_CONST;
+GType                        tracker_writeback_dispatcher_get_type (void) G_GNUC_CONST;
 
 TrackerWritebackDispatcher * tracker_writeback_dispatcher_new (GMainContext *context);
 
diff --git a/src/tracker-writeback/tracker-writeback-module.c b/src/tracker-writeback/tracker-writeback-module.c
index bdfb3ee..bedd9f3 100644
--- a/src/tracker-writeback/tracker-writeback-module.c
+++ b/src/tracker-writeback/tracker-writeback-module.c
@@ -126,40 +126,40 @@ tracker_writeback_module_get (const gchar *name)
 GList *
 tracker_writeback_modules_list (void)
 {
-        GError *error = NULL;
-        const gchar *name;
-        GList *list = NULL;
-        GDir *dir;
+	GError *error = NULL;
+	const gchar *name;
+	GList *list = NULL;
+	GDir *dir;
 
-        dir = g_dir_open (WRITEBACK_MODULES_DIR, 0, &error);
+	dir = g_dir_open (WRITEBACK_MODULES_DIR, 0, &error);
 
-        if (error) {
-                g_critical ("Could not get writeback modules list: %s", error->message);
-                g_error_free (error);
-                return NULL;
-        }
+	if (error) {
+		g_critical ("Could not get writeback modules list: %s", error->message);
+		g_error_free (error);
+		return NULL;
+	}
 
-        while ((name = g_dir_read_name (dir)) != NULL) {
-                if (!g_str_has_suffix (name, G_MODULE_SUFFIX)) {
-                        continue;
-                }
+	while ((name = g_dir_read_name (dir)) != NULL) {
+		if (!g_str_has_suffix (name, G_MODULE_SUFFIX)) {
+			continue;
+		}
 
-                list = g_list_prepend (list, g_strdup (name));
-        }
+		list = g_list_prepend (list, g_strdup (name));
+	}
 
-        g_dir_close (dir);
+	g_dir_close (dir);
 
-        return g_list_reverse (list);
+	return g_list_reverse (list);
 }
 
 TrackerWriteback *
 tracker_writeback_module_create (TrackerWritebackModule *module)
 {
-        return (module->create) (G_TYPE_MODULE (module));
+	return (module->create) (G_TYPE_MODULE (module));
 }
 
 const gchar * const *
 tracker_writeback_module_get_rdf_types (TrackerWritebackModule *module)
 {
-        return (module->get_rdf_types) ();
+	return (module->get_rdf_types) ();
 }
diff --git a/src/tracker-writeback/tracker-writeback-module.h b/src/tracker-writeback/tracker-writeback-module.h
index 11f4b61..f31fe96 100644
--- a/src/tracker-writeback/tracker-writeback-module.h
+++ b/src/tracker-writeback/tracker-writeback-module.h
@@ -40,8 +40,8 @@ struct TrackerWritebackModule {
 	GModule *module;
 	gchar *name;
 
-        TrackerWriteback *    (* create)        (GTypeModule *module);
-        const gchar * const * (* get_rdf_types) (void);
+	TrackerWriteback *    (* create)        (GTypeModule *module);
+	const gchar * const * (* get_rdf_types) (void);
 };
 
 struct TrackerWritebackModuleClass {
diff --git a/src/tracker-writeback/tracker-writeback.c b/src/tracker-writeback/tracker-writeback.c
index f85d36b..58cfff2 100644
--- a/src/tracker-writeback/tracker-writeback.c
+++ b/src/tracker-writeback/tracker-writeback.c
@@ -41,14 +41,14 @@ tracker_writeback_update_metadata (TrackerWriteback *writeback,
                                    GPtrArray        *values,
                                    TrackerClient    *client)
 {
-        g_return_val_if_fail (TRACKER_IS_WRITEBACK (writeback), FALSE);
-        g_return_val_if_fail (values != NULL, FALSE);
+	g_return_val_if_fail (TRACKER_IS_WRITEBACK (writeback), FALSE);
+	g_return_val_if_fail (values != NULL, FALSE);
 
-        if (TRACKER_WRITEBACK_GET_CLASS (writeback)->update_metadata) {
-                return TRACKER_WRITEBACK_GET_CLASS (writeback)->update_metadata (writeback, values, client);
-        }
+	if (TRACKER_WRITEBACK_GET_CLASS (writeback)->update_metadata) {
+		return TRACKER_WRITEBACK_GET_CLASS (writeback)->update_metadata (writeback, values, client);
+	}
 
-        return FALSE;
+	return FALSE;
 }
 
 TrackerMinerManager*



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]