diff src/audacious/dbus.c @ 2695:4c4c8b294287 trunk

[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
author magma
date Sat, 05 May 2007 16:04:39 -0700
parents c2b82432c1b6
children c00850315ce1
line wrap: on
line diff
--- a/src/audacious/dbus.c	Sat May 05 15:37:54 2007 -0700
+++ b/src/audacious/dbus.c	Sat May 05 16:04:39 2007 -0700
@@ -19,7 +19,7 @@
 */
 
 #ifdef HAVE_CONFIG_H
-#  include "config.h"
+#    include "config.h"
 #endif
 
 #include <glib.h>
@@ -45,185 +45,185 @@
 void audacious_remote_class_init(RemoteObjectClass *class) {}
 
 void audacious_remote_init(RemoteObject *object) {
-	GError *error = NULL;
-	DBusGProxy *driver_proxy;
-	unsigned int request_ret;
+    GError *error = NULL;
+    DBusGProxy *driver_proxy;
+    unsigned int request_ret;
 
-	// Initialize the DBus connection
-	object->connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
-	if (object->connection == NULL) {
-		g_warning("Unable to connect to dbus: %s", error->message);
-		g_error_free(error);
-		return;
-	}
-	
-	dbus_g_object_type_install_info(audacious_remote_get_type(),
-																	&dbus_glib_audacious_remote_object_info);
-	
-	// Register DBUS path
-	dbus_g_connection_register_g_object(object->connection, DBUS_OBJECT_PATH,
-																			G_OBJECT(object));
+    // Initialize the DBus connection
+    object->connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
+    if (object->connection == NULL) {
+        g_warning("Unable to connect to dbus: %s", error->message);
+        g_error_free(error);
+        return;
+    }
+    
+    dbus_g_object_type_install_info(audacious_remote_get_type(),
+                                    &dbus_glib_audacious_remote_object_info);
+    
+    // Register DBUS path
+    dbus_g_connection_register_g_object(object->connection, DBUS_OBJECT_PATH,
+                                        G_OBJECT(object));
 
-	// Register the service name, the constants here are defined in
-	// dbus-glib-bindings.h
-	driver_proxy = dbus_g_proxy_new_for_name(object->connection,
-																					 DBUS_SERVICE_DBUS, DBUS_PATH_DBUS,
-																					 DBUS_INTERFACE_DBUS);
+    // Register the service name, the constants here are defined in
+    // dbus-glib-bindings.h
+    driver_proxy = dbus_g_proxy_new_for_name(object->connection,
+                                             DBUS_SERVICE_DBUS, DBUS_PATH_DBUS,
+                                             DBUS_INTERFACE_DBUS);
 
-	if (!org_freedesktop_DBus_request_name(driver_proxy, DBUS_SERVICE, 0,
-			&request_ret, &error)) {
-		g_warning("Unable to register service: %s", error->message);
-		g_error_free(error);
-	}
-	
-	g_object_unref(driver_proxy);
+    if (!org_freedesktop_DBus_request_name(driver_proxy, DBUS_SERVICE, 0,
+            &request_ret, &error)) {
+        g_warning("Unable to register service: %s", error->message);
+        g_error_free(error);
+    }
+    
+    g_object_unref(driver_proxy);
 }
 
 RemoteObject *init_dbus() {
-	RemoteObject *object;
-	g_type_init();
-	object = g_object_new(audacious_remote_get_type(), NULL);
-	return object;
+    RemoteObject *object;
+    g_type_init();
+    object = g_object_new(audacious_remote_get_type(), NULL);
+    return object;
 }
 
 // Audacious General Information
 gboolean audacious_remote_version(RemoteObject *obj, gchar **version,
-																	GError **error) {
-	*version = g_strdup(VERSION);
-	return TRUE;
+                                  GError **error) {
+    *version = g_strdup(VERSION);
+    return TRUE;
 }
 
 // Playback Information/Manipulation
 gboolean audacious_remote_play(RemoteObject *obj, GError **error) {
-	if (playback_get_paused())
-		playback_pause();
-	else if (playlist_get_length(playlist_get_active()))
-		playback_initiate();
-	else
-		mainwin_eject_pushed();
-	return TRUE;
+    if (playback_get_paused())
+        playback_pause();
+    else if (playlist_get_length(playlist_get_active()))
+        playback_initiate();
+    else
+        mainwin_eject_pushed();
+    return TRUE;
 }
 
 gboolean audacious_remote_pause(RemoteObject *obj, GError **error) {
-	playback_pause();
-	return TRUE;
+    playback_pause();
+    return TRUE;
 }
 
 gboolean audacious_remote_stop(RemoteObject *obj, GError **error) {
-	ip_data.stop = TRUE;
-	playback_stop();
-	ip_data.stop = FALSE;
-	mainwin_clear_song_info();
-	return TRUE;
+    ip_data.stop = TRUE;
+    playback_stop();
+    ip_data.stop = FALSE;
+    mainwin_clear_song_info();
+    return TRUE;
 }
 
 gboolean audacious_remote_playing(RemoteObject *obj, gboolean *is_playing,
-																	GError **error) {
-	*is_playing = playback_get_playing();
-	return TRUE;
+                                  GError **error) {
+    *is_playing = playback_get_playing();
+    return TRUE;
 }
 
 gboolean audacious_remote_paused(RemoteObject *obj, gboolean *is_paused,
-																 GError **error) {
-	*is_paused = playback_get_paused();
-	return TRUE;
+                                 GError **error) {
+    *is_paused = playback_get_paused();
+    return TRUE;
 }
 
 gboolean audacious_remote_stopped(RemoteObject *obj, gboolean *is_stopped,
-																	GError **error) {
-	*is_stopped = !playback_get_playing();
-	return TRUE;
+                                  GError **error) {
+    *is_stopped = !playback_get_playing();
+    return TRUE;
 }
 
 gboolean audacious_remote_status(RemoteObject *obj, gchar **status,
-																 GError **error) {
-	if (playback_get_paused())
-		*status = g_strdup("paused");
-	else if (playback_get_playing())
-		*status = g_strdup("playing");
-	else
-		*status = g_strdup("stopped");
-	return TRUE;
+                                 GError **error) {
+    if (playback_get_paused())
+        *status = g_strdup("paused");
+    else if (playback_get_playing())
+        *status = g_strdup("playing");
+    else
+        *status = g_strdup("stopped");
+    return TRUE;
 }
 
 gboolean audacious_remote_seek(RemoteObject *obj, guint pos, GError **error) {
-	if (playlist_get_current_length(playlist_get_active()) > 0 &&
-			pos < (guint)playlist_get_current_length(playlist_get_active()))
-			playback_seek(pos / 1000);
+    if (playlist_get_current_length(playlist_get_active()) > 0 &&
+            pos < (guint)playlist_get_current_length(playlist_get_active()))
+            playback_seek(pos / 1000);
 
-	return TRUE;
+    return TRUE;
 }
 
 // Playlist Information/Manipulation
 gboolean audacious_remote_position(RemoteObject *obj, int *pos, GError **error)
 {
-	return TRUE;
+    return TRUE;
 }
 
 gboolean audacious_remote_advance(RemoteObject *obj, GError **error) {
-	return TRUE;
+    return TRUE;
 }
 
 gboolean audacious_remote_reverse(RemoteObject *obj, GError **error) {
-	return TRUE;
+    return TRUE;
 }
 
 gboolean audacious_remote_length(RemoteObject *obj, int *length,
-																 GError **error) {
-	return TRUE;
+                                 GError **error) {
+    return TRUE;
 }
 
 gboolean audacious_remote_song_title(RemoteObject *obj, int pos,
-																		 gchar **title, GError **error) {
-	return TRUE;
+                                     gchar **title, GError **error) {
+    return TRUE;
 }
 
 gboolean audacious_remote_song_filename(RemoteObject *obj, int pos,
-																				gchar **filename, GError **error) {
-	return TRUE;
+                                        gchar **filename, GError **error) {
+    return TRUE;
 }
 
 gboolean audacious_remote_song_length(RemoteObject *obj, int pos, int *length,
-																			GError **error) {
-	return TRUE;
+                                      GError **error) {
+    return TRUE;
 }
 
 gboolean audacious_remote_song_frames(RemoteObject *obj, int pos, int *length,
-																			GError **error) {
-	return TRUE;
+                                      GError **error) {
+    return TRUE;
 }
 
 gboolean audacious_remote_jump(RemoteObject *obj, int pos, GError **error) {
-	return TRUE;
+    return TRUE;
 }
 
 gboolean audacious_remote_add_url(RemoteObject *obj, gchar *url,
-																	GError **error) {
-	return TRUE;
+                                  GError **error) {
+    return TRUE;
 }
 
 gboolean audacious_remote_delete(RemoteObject *obj, int pos, GError **error) {
-	return TRUE;
+    return TRUE;
 }
 
 gboolean audacious_remote_clear(RemoteObject *obj, GError **error) {
-	return TRUE;
+    return TRUE;
 }
 
 gboolean audacious_remote_repeating(RemoteObject *obj, gboolean *is_repeating,
-																		GError **error) {
-	return TRUE;
+                                    GError **error) {
+    return TRUE;
 }
 
 gboolean audacious_remote_repeat(RemoteObject *obj, GError **error) {
-	return TRUE;
+    return TRUE;
 }
 
 gboolean audacious_remote_shuffling(RemoteObject *obj, gboolean *is_shuffling,
-																		GError **error) {
-	return TRUE;
+                                    GError **error) {
+    return TRUE;
 }
 
 gboolean audacious_remote_shuffle(RemoteObject *obj, GError **error) {
-	return TRUE;
+    return TRUE;
 }