changeset 2713:8f7da5257692 trunk

[svn] - rename to libaudclient - enforce libaudclient.so.1
author nenolod
date Wed, 09 May 2007 14:40:01 -0700
parents aeb4d8da1543
children 13ac9eeaddf2
files ChangeLog src/Makefile src/audacious/build_stamp.c src/libaudaciousng/Makefile src/libaudaciousng/audctrl.c src/libaudaciousng/audctrl.h src/libaudclient/Makefile src/libaudclient/audctrl.c src/libaudclient/audctrl.h
diffstat 9 files changed, 378 insertions(+), 367 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed May 09 14:38:41 2007 -0700
+++ b/ChangeLog	Wed May 09 14:40:01 2007 -0700
@@ -1,3 +1,14 @@
+2007-05-09 21:38:41 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [4450]
+  - move configdb public API to audacious proper
+  - drop libaudacious entirely
+  
+  trunk/src/audacious/Makefile   |    3 
+  trunk/src/audacious/configdb.c |  193 +++++++++++++++++++++++++++++++++++++++
+  trunk/src/audacious/configdb.h |  198 +++++++++++++++++++++++++++++++++++++++++
+  3 files changed, 393 insertions(+), 1 deletion(-)
+
+
 2007-05-09 21:36:37 +0000  Ben Tucker <bnt@interchange.ubc.ca>
   revision [4448]
   Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
--- a/src/Makefile	Wed May 09 14:38:41 2007 -0700
+++ b/src/Makefile	Wed May 09 14:40:01 2007 -0700
@@ -3,7 +3,7 @@
 include ../mk/rules.mk
 include ../mk/init.mk
 
-SUBDIRS = $(INTL_OBJECTIVE) $(SUBDIR_GUESS) audacious libaudaciousng audtool libid3tag
+SUBDIRS = $(INTL_OBJECTIVE) $(SUBDIR_GUESS) audacious libaudclient audtool libid3tag
 
 include ../mk/objective.mk
 
--- a/src/audacious/build_stamp.c	Wed May 09 14:38:41 2007 -0700
+++ b/src/audacious/build_stamp.c	Wed May 09 14:40:01 2007 -0700
@@ -1,2 +1,2 @@
 #include <glib.h>
-const gchar *svn_stamp = "20070509-4448";
+const gchar *svn_stamp = "20070509-4450";
--- a/src/libaudaciousng/Makefile	Wed May 09 14:38:41 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-include ../../mk/rules.mk
-include ../../mk/init.mk
-
-PICLDFLAGS = $(LIBLDFLAGS)
-
-OBJECTIVE_LIBS = libaudaciousng$(SHARED_SUFFIX)
-OBJECTIVE_SONAME_SUFFIX = 1
-LIBAUDACIOUS_SUFFIX = 1.0.0
-
-LIBADD = \
-	$(GTK_LIBS) \
-	$(DBUS_LIBS) \
-	$(MOWGLI_LIBS) \
-	$(GCONF_LIBS) \
-	$(LIBMCS_LIBS)
-
-CFLAGS += $(PICFLAGS) \
-	$(MOWGLI_CFLAGS) \
-	$(GTK_CFLAGS) \
-	$(GCONF_CFLAGS) \
-	$(DBUS_CFLAGS) \
-	$(LIBMCS_CFLAGS) \
-	-D_AUDACIOUS_CORE \
-	-I.. -I../.. \
-	-I../intl
-
-SOURCES = \
-	audctrl.c
-
-OBJECTS = ${SOURCES:.c=.o}
-
-HEADERS = \
-	audctrl.h
-
-include ../../mk/objective.mk
-
-install-posthook:
-	@mv ${DESTDIR}/${LIBDIR}/libaudaciousng$(SHARED_SUFFIX) ${DESTDIR}/${LIBDIR}/libaudaciousng$(SHARED_SUFFIX).$(LIBAUDACIOUS_SUFFIX)
-	@ln -sf libaudaciousng$(SHARED_SUFFIX).$(LIBAUDACIOUS_SUFFIX) \
-		${DESTDIR}/${LIBDIR}/libaudaciousng$(SHARED_SUFFIX).5
-	@ln -sf libaudaciousng$(SHARED_SUFFIX).5 \
-		${DESTDIR}/${LIBDIR}/libaudaciousng$(SHARED_SUFFIX)
--- a/src/libaudaciousng/audctrl.c	Wed May 09 14:38:41 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,193 +0,0 @@
-/*
- * Audacious: A cross-platform multimedia player
- * Copyright (c) 2007 Ben Tucker
- *
- * This program 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; under version 2 of the License.
- *
- * This program 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 program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#    include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <glib.h>
-#include <dbus/dbus-glib.h>
-#include "audacious/dbus.h"
-#include "audacious/dbus-client-bindings.h"
-#include "audctrl.h"
-
-GError *error = NULL;
-
-void audacious_remote_playlist(DBusGProxy *proxy, gchar **list, gint num,
-                               gboolean enqueue) {
-}
-
-gint audacious_remote_get_version(DBusGProxy *proxy) {
-    return 0;
-}
-
-void audacious_remote_playlist_add(DBusGProxy *proxy, GList *list) {
-}
-
-void audacious_remote_playlist_delete(DBusGProxy *proxy, gint pos) {
-}
-
-void audacious_remote_play(DBusGProxy *proxy) {
-    org_atheme_audacious_playback_play(proxy, &error);
-    g_error_free(error);
-}
-
-void audacious_remote_pause(DBusGProxy *proxy) {
-    org_atheme_audacious_playback_pause(proxy, &error);
-    g_error_free(error);
-}
-
-void audacious_remote_stop(DBusGProxy *proxy) {
-    org_atheme_audacious_playback_stop(proxy, &error);
-    g_error_free(error);
-}
-
-gboolean audacious_remote_is_playing(DBusGProxy *proxy) {
-    gboolean is_playing;
-    org_atheme_audacious_playback_playing(proxy, &is_playing, &error);
-    g_error_free(error);
-    return is_playing;
-}
-
-gboolean audacious_remote_is_paused(DBusGProxy *proxy) {
-    gboolean is_paused;
-    org_atheme_audacious_playback_paused(proxy, &is_paused, &error);
-    g_error_free(error);
-    return is_paused;
-}
-
-gint audacious_remote_get_playlist_pos(DBusGProxy *proxy) {
-    gint pos;
-    org_atheme_audacious_playlist_position(proxy, &pos, &error);
-    g_error_free(error);
-    return pos;
-}
-
-void audacious_remote_set_playlist_pos(DBusGProxy *proxy, gint pos) {
-}
-
-gint audacious_remote_get_playlist_length(DBusGProxy *proxy) {
-    gint len;
-    org_atheme_audacious_playlist_length(proxy, &len, &error);
-    g_error_free(error);
-    return len;
-}
-
-void audacious_remote_playlist_clear(DBusGProxy *proxy) {
-    org_atheme_audacious_playlist_clear(proxy, &error);
-    g_error_free(error);
-}
-
-gint audacious_remote_get_output_time(DBusGProxy *proxy) {
-    gint time;
-    org_atheme_audacious_playback_time(proxy, &time, &error);
-    g_error_free(error);
-    return time;
-}
-
-void audacious_remote_jump_to_time(DBusGProxy *proxy, gint pos) {
-}
-
-/**
- * audacious_remote_get_volume:
- * @proxy: DBus proxy for audacious
- * @vl: Pointer to integer containing the left channel's volume.
- * @vr: Pointer to integer containing the right channel's volume.
- *
- * Queries audacious about the current volume.
- **/
-void audacious_remote_get_volume(DBusGProxy *proxy, gint * vl, gint * vr) {
-    org_atheme_audacious_playback_volume(proxy, vl, vr, &error);
-    g_error_free(error);
-}
-
-/**
- * audacious_remote_get_main_volume:
- * @proxy: DBus proxy for audacious
- *
- * Queries audacious about the current volume.
- *
- * Return value: The current volume.
- **/
-gint audacious_remote_get_main_volume(DBusGProxy *proxy) {
-    gint vl, vr;
-
-    audacious_remote_get_volume(proxy, &vl, &vr);
-
-    return (vl > vr) ? vl : vr;
-}
-
-/**
- * audacious_remote_set_volume:
- * @proxy: DBus proxy for audacious
- * @vl: The volume for the left channel.
- * @vr: The volume for the right channel.
- *
- * Sets the volume for the left and right channels in Audacious.
- **/
-void audacious_remote_set_volume(DBusGProxy *proxy, gint vl, gint vr) {
-    org_atheme_audacious_playback_set_volume(proxy, vl, vr,  &error);
-    g_error_free(error);
-}
-
-
-/**
- * audacious_remote_set_main_volume:
- * @proxy: DBus proxy for audacious
- * @v: The volume to set.
- *
- * Sets the volume in Audacious.
- **/
-void audacious_remote_set_main_volume(DBusGProxy *proxy, gint v) {
-    gint b, vl, vr;
-
-    b = audacious_remote_get_balance(proxy);
-
-    if (b < 0) {
-        vl = v;
-        vr = (v * (100 - abs(b))) / 100;
-    } else if (b > 0) {
-        vl = (v * (100 - b)) / 100;
-        vr = v;
-    } else
-        vl = vr = v;
-    audacious_remote_set_volume(proxy, vl, vr);
-}
-
-/**
- * audacious_remote_get_balance:
- * @proxy: DBus proxy for audacious
- *
- * Queries audacious about the current balance.
- *
- * Return value: The current balance.
- **/
-gint audacious_remote_get_balance(DBusGProxy *proxy) {
-    gint balance;
-    org_atheme_audacious_playback_balance(proxy, &balance,  &error);
-    g_error_free(error);
-    return balance;
-}
-
-void audacious_remote_playlist_add_url_string(DBusGProxy *proxy,
-                                              gchar *string) {
-    org_atheme_audacious_playlist_add_url(proxy, string, &error);
-    g_error_free(error);
-}
--- a/src/libaudaciousng/audctrl.h	Wed May 09 14:38:41 2007 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*  Audacious - Cross-platform multimedia player
- *  Copyright (DBusGProxy *proxy, C) 2005-2007  Audacious development team
- *
- *  Based on XMMS:
- *  Copyright (DBusGProxy *proxy, C) 1998-2003  Peter Alm, Mikael Alm, Olle Hallnas,
- *                           Thomas Nilsson and 4Front Technologies
- *  Copyright (DBusGProxy *proxy, C) 1999-2003  Haavard Kvaalen
- *
- *  This program 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; under version 2 of the License.
- *
- *  This program 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 program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-#ifndef _AUDCTRL_H
-#define _AUDCTRL_H
-
-#include <glib.h>
-#include <dbus/dbus-glib.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-    void audacious_remote_playlist(DBusGProxy *proxy, gchar **list, gint num,
-                                   gboolean enqueue);
-    gint audacious_remote_get_version(DBusGProxy *proxy);
-    void audacious_remote_playlist_add(DBusGProxy *proxy, GList *list);
-    void audacious_remote_playlist_delete(DBusGProxy *proxy, gint pos);
-    void audacious_remote_play(DBusGProxy *proxy);
-    void audacious_remote_pause(DBusGProxy *proxy);
-    void audacious_remote_stop(DBusGProxy *proxy);
-    gboolean audacious_remote_is_playing(DBusGProxy *proxy);
-    gboolean audacious_remote_is_paused(DBusGProxy *proxy);
-    gint audacious_remote_get_playlist_pos(DBusGProxy *proxy);
-    void audacious_remote_set_playlist_pos(DBusGProxy *proxy, gint pos);
-    gint audacious_remote_get_playlist_length(DBusGProxy *proxy);
-    void audacious_remote_playlist_clear(DBusGProxy *proxy);
-    gint audacious_remote_get_output_time(DBusGProxy *proxy);
-    void audacious_remote_jump_to_time(DBusGProxy *proxy, gint pos);
-    void audacious_remote_get_volume(DBusGProxy *proxy, gint *vl, gint *vr);
-    gint audacious_remote_get_main_volume(DBusGProxy *proxy);
-    gint audacious_remote_get_balance(DBusGProxy *proxy);
-    void audacious_remote_set_volume(DBusGProxy *proxy, gint vl, gint vr);
-    void audacious_remote_set_main_volume(DBusGProxy *proxy, gint v);
-    void audacious_remote_set_balance(DBusGProxy *proxy, gint b);
-    gchar *audacious_remote_get_skin(DBusGProxy *proxy);
-    void audacious_remote_set_skin(DBusGProxy *proxy, gchar *skinfile);
-    gchar *audacious_remote_get_playlist_file(DBusGProxy *proxy, gint pos);
-    gchar *audacious_remote_get_playlist_title(DBusGProxy *proxy, gint pos);
-    gint audacious_remote_get_playlist_time(DBusGProxy *proxy, gint pos);
-    void audacious_remote_get_info(DBusGProxy *proxy, gint *rate, gint *freq,
-                                   gint *nch);
-    void audacious_remote_main_win_toggle(DBusGProxy *proxy, gboolean show);
-    void audacious_remote_pl_win_toggle(DBusGProxy *proxy, gboolean show);
-    void audacious_remote_eq_win_toggle(DBusGProxy *proxy, gboolean show);
-    gboolean audacious_remote_is_main_win(DBusGProxy *proxy);
-    gboolean audacious_remote_is_pl_win(DBusGProxy *proxy);
-    gboolean audacious_remote_is_eq_win(DBusGProxy *proxy);
-    void audacious_remote_show_prefs_box(DBusGProxy *proxy);
-    void audacious_remote_toggle_aot(DBusGProxy *proxy, gboolean ontop);
-    void audacious_remote_eject(DBusGProxy *proxy);
-    void audacious_remote_playlist_prev(DBusGProxy *proxy);
-    void audacious_remote_playlist_next(DBusGProxy *proxy);
-    void audacious_remote_playlist_add_url_string(DBusGProxy *proxy,
-                                                  gchar *string);
-    gboolean audacious_remote_is_running(DBusGProxy *proxy);
-    void audacious_remote_toggle_repeat(DBusGProxy *proxy);
-    void audacious_remote_toggle_shuffle(DBusGProxy *proxy);
-    gboolean audacious_remote_is_repeat(DBusGProxy *proxy);
-    gboolean audacious_remote_is_shuffle(DBusGProxy *proxy);
-    void audacious_remote_get_eq(DBusGProxy *proxy, gfloat *preamp,
-                                 gfloat **bands);
-    gfloat audacious_remote_get_eq_preamp(DBusGProxy *proxy);
-    gfloat audacious_remote_get_eq_band(DBusGProxy *proxy, gint band);
-    void audacious_remote_set_eq(DBusGProxy *proxy, gfloat preamp,
-                                 gfloat *bands);
-    void audacious_remote_set_eq_preamp(DBusGProxy *proxy, gfloat preamp);
-    void audacious_remote_set_eq_band(DBusGProxy *proxy, gint band,
-                                      gfloat value);
-
-/* Added in XMMS 1.2.1 */
-    void audacious_remote_quit(DBusGProxy *proxy);
-
-/* Added in XMMS 1.2.6 */
-    void audacious_remote_play_pause(DBusGProxy *proxy);
-    void audacious_remote_playlist_ins_url_string(DBusGProxy *proxy,
-                                                  gchar *string, gint pos);
-
-/* Added in XMMS 1.2.11 */
-    void audacious_remote_playqueue_add(DBusGProxy *proxy, gint pos);
-    void audacious_remote_playqueue_remove(DBusGProxy *proxy, gint pos);
-    gint audacious_remote_get_playqueue_length(DBusGProxy *proxy);
-    void audacious_remote_toggle_advance(DBusGProxy *proxy);
-    gboolean audacious_remote_is_advance(DBusGProxy *proxy);
-
-/* Added in BMP 0.9.7 */
-    void audacious_remote_activate(DBusGProxy *proxy);
-
-/* Added in Audacious 1.1 */
-    void audacious_remote_show_jtf_box(DBusGProxy *proxy);
-    void audacious_remote_playqueue_clear(DBusGProxy *proxy);
-    gboolean audacious_remote_playqueue_is_queued(DBusGProxy *proxy, gint pos);
-    gint audacious_remote_get_playqueue_position(DBusGProxy *proxy, gint pos);
-    gint audacious_remote_get_playqueue_queue_position(DBusGProxy *proxy,
-                                                       gint pos);
-
-/* Added in Audacious 1.2 */
-    void audacious_set_session_uri(DBusGProxy *proxy, gchar *uri);
-    gchar *audacious_get_session_uri(DBusGProxy *proxy);
-    void audacious_set_session_type(DBusGProxy *proxy, gint type);
-
-/* Added in Audacious 1.3 */
-    void audacious_remote_playlist_enqueue_to_temp(DBusGProxy *proxy,
-                                                   gchar *string);
-    gchar *audacious_get_tuple_field_data(DBusGProxy *proxy, gchar *field,
-                                          gint pos);
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/libaudclient/Makefile	Wed May 09 14:40:01 2007 -0700
@@ -0,0 +1,42 @@
+include ../../mk/rules.mk
+include ../../mk/init.mk
+
+PICLDFLAGS = $(LIBLDFLAGS)
+
+OBJECTIVE_LIBS = libaudclient$(SHARED_SUFFIX)
+OBJECTIVE_SONAME_SUFFIX = 1
+LIBAUDACIOUS_SUFFIX = 1.0.0
+
+LIBADD = \
+	$(GTK_LIBS) \
+	$(DBUS_LIBS) \
+	$(MOWGLI_LIBS) \
+	$(GCONF_LIBS) \
+	$(LIBMCS_LIBS)
+
+CFLAGS += $(PICFLAGS) \
+	$(MOWGLI_CFLAGS) \
+	$(GTK_CFLAGS) \
+	$(GCONF_CFLAGS) \
+	$(DBUS_CFLAGS) \
+	$(LIBMCS_CFLAGS) \
+	-D_AUDACIOUS_CORE \
+	-I.. -I../.. \
+	-I../intl
+
+SOURCES = \
+	audctrl.c
+
+OBJECTS = ${SOURCES:.c=.o}
+
+HEADERS = \
+	audctrl.h
+
+include ../../mk/objective.mk
+
+install-posthook:
+	@mv ${DESTDIR}/${LIBDIR}/libaudclient$(SHARED_SUFFIX) ${DESTDIR}/${LIBDIR}/libaudclient$(SHARED_SUFFIX).$(LIBAUDACIOUS_SUFFIX)
+	@ln -sf libaudclient$(SHARED_SUFFIX).$(LIBAUDACIOUS_SUFFIX) \
+		${DESTDIR}/${LIBDIR}/libaudclient$(SHARED_SUFFIX).1
+	@ln -sf libaudclient$(SHARED_SUFFIX).1 \
+		${DESTDIR}/${LIBDIR}/libaudclient$(SHARED_SUFFIX)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/libaudclient/audctrl.c	Wed May 09 14:40:01 2007 -0700
@@ -0,0 +1,193 @@
+/*
+ * Audacious: A cross-platform multimedia player
+ * Copyright (c) 2007 Ben Tucker
+ *
+ * This program 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; under version 2 of the License.
+ *
+ * This program 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 program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#    include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <glib.h>
+#include <dbus/dbus-glib.h>
+#include "audacious/dbus.h"
+#include "audacious/dbus-client-bindings.h"
+#include "audctrl.h"
+
+GError *error = NULL;
+
+void audacious_remote_playlist(DBusGProxy *proxy, gchar **list, gint num,
+                               gboolean enqueue) {
+}
+
+gint audacious_remote_get_version(DBusGProxy *proxy) {
+    return 0;
+}
+
+void audacious_remote_playlist_add(DBusGProxy *proxy, GList *list) {
+}
+
+void audacious_remote_playlist_delete(DBusGProxy *proxy, gint pos) {
+}
+
+void audacious_remote_play(DBusGProxy *proxy) {
+    org_atheme_audacious_playback_play(proxy, &error);
+    g_error_free(error);
+}
+
+void audacious_remote_pause(DBusGProxy *proxy) {
+    org_atheme_audacious_playback_pause(proxy, &error);
+    g_error_free(error);
+}
+
+void audacious_remote_stop(DBusGProxy *proxy) {
+    org_atheme_audacious_playback_stop(proxy, &error);
+    g_error_free(error);
+}
+
+gboolean audacious_remote_is_playing(DBusGProxy *proxy) {
+    gboolean is_playing;
+    org_atheme_audacious_playback_playing(proxy, &is_playing, &error);
+    g_error_free(error);
+    return is_playing;
+}
+
+gboolean audacious_remote_is_paused(DBusGProxy *proxy) {
+    gboolean is_paused;
+    org_atheme_audacious_playback_paused(proxy, &is_paused, &error);
+    g_error_free(error);
+    return is_paused;
+}
+
+gint audacious_remote_get_playlist_pos(DBusGProxy *proxy) {
+    gint pos;
+    org_atheme_audacious_playlist_position(proxy, &pos, &error);
+    g_error_free(error);
+    return pos;
+}
+
+void audacious_remote_set_playlist_pos(DBusGProxy *proxy, gint pos) {
+}
+
+gint audacious_remote_get_playlist_length(DBusGProxy *proxy) {
+    gint len;
+    org_atheme_audacious_playlist_length(proxy, &len, &error);
+    g_error_free(error);
+    return len;
+}
+
+void audacious_remote_playlist_clear(DBusGProxy *proxy) {
+    org_atheme_audacious_playlist_clear(proxy, &error);
+    g_error_free(error);
+}
+
+gint audacious_remote_get_output_time(DBusGProxy *proxy) {
+    gint time;
+    org_atheme_audacious_playback_time(proxy, &time, &error);
+    g_error_free(error);
+    return time;
+}
+
+void audacious_remote_jump_to_time(DBusGProxy *proxy, gint pos) {
+}
+
+/**
+ * audacious_remote_get_volume:
+ * @proxy: DBus proxy for audacious
+ * @vl: Pointer to integer containing the left channel's volume.
+ * @vr: Pointer to integer containing the right channel's volume.
+ *
+ * Queries audacious about the current volume.
+ **/
+void audacious_remote_get_volume(DBusGProxy *proxy, gint * vl, gint * vr) {
+    org_atheme_audacious_playback_volume(proxy, vl, vr, &error);
+    g_error_free(error);
+}
+
+/**
+ * audacious_remote_get_main_volume:
+ * @proxy: DBus proxy for audacious
+ *
+ * Queries audacious about the current volume.
+ *
+ * Return value: The current volume.
+ **/
+gint audacious_remote_get_main_volume(DBusGProxy *proxy) {
+    gint vl, vr;
+
+    audacious_remote_get_volume(proxy, &vl, &vr);
+
+    return (vl > vr) ? vl : vr;
+}
+
+/**
+ * audacious_remote_set_volume:
+ * @proxy: DBus proxy for audacious
+ * @vl: The volume for the left channel.
+ * @vr: The volume for the right channel.
+ *
+ * Sets the volume for the left and right channels in Audacious.
+ **/
+void audacious_remote_set_volume(DBusGProxy *proxy, gint vl, gint vr) {
+    org_atheme_audacious_playback_set_volume(proxy, vl, vr,  &error);
+    g_error_free(error);
+}
+
+
+/**
+ * audacious_remote_set_main_volume:
+ * @proxy: DBus proxy for audacious
+ * @v: The volume to set.
+ *
+ * Sets the volume in Audacious.
+ **/
+void audacious_remote_set_main_volume(DBusGProxy *proxy, gint v) {
+    gint b, vl, vr;
+
+    b = audacious_remote_get_balance(proxy);
+
+    if (b < 0) {
+        vl = v;
+        vr = (v * (100 - abs(b))) / 100;
+    } else if (b > 0) {
+        vl = (v * (100 - b)) / 100;
+        vr = v;
+    } else
+        vl = vr = v;
+    audacious_remote_set_volume(proxy, vl, vr);
+}
+
+/**
+ * audacious_remote_get_balance:
+ * @proxy: DBus proxy for audacious
+ *
+ * Queries audacious about the current balance.
+ *
+ * Return value: The current balance.
+ **/
+gint audacious_remote_get_balance(DBusGProxy *proxy) {
+    gint balance;
+    org_atheme_audacious_playback_balance(proxy, &balance,  &error);
+    g_error_free(error);
+    return balance;
+}
+
+void audacious_remote_playlist_add_url_string(DBusGProxy *proxy,
+                                              gchar *string) {
+    org_atheme_audacious_playlist_add_url(proxy, string, &error);
+    g_error_free(error);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/libaudclient/audctrl.h	Wed May 09 14:40:01 2007 -0700
@@ -0,0 +1,130 @@
+/*  Audacious - Cross-platform multimedia player
+ *  Copyright (DBusGProxy *proxy, C) 2005-2007  Audacious development team
+ *
+ *  Based on XMMS:
+ *  Copyright (DBusGProxy *proxy, C) 1998-2003  Peter Alm, Mikael Alm, Olle Hallnas,
+ *                           Thomas Nilsson and 4Front Technologies
+ *  Copyright (DBusGProxy *proxy, C) 1999-2003  Haavard Kvaalen
+ *
+ *  This program 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; under version 2 of the License.
+ *
+ *  This program 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 program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+#ifndef _AUDCTRL_H
+#define _AUDCTRL_H
+
+#include <glib.h>
+#include <dbus/dbus-glib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    void audacious_remote_playlist(DBusGProxy *proxy, gchar **list, gint num,
+                                   gboolean enqueue);
+    gint audacious_remote_get_version(DBusGProxy *proxy);
+    void audacious_remote_playlist_add(DBusGProxy *proxy, GList *list);
+    void audacious_remote_playlist_delete(DBusGProxy *proxy, gint pos);
+    void audacious_remote_play(DBusGProxy *proxy);
+    void audacious_remote_pause(DBusGProxy *proxy);
+    void audacious_remote_stop(DBusGProxy *proxy);
+    gboolean audacious_remote_is_playing(DBusGProxy *proxy);
+    gboolean audacious_remote_is_paused(DBusGProxy *proxy);
+    gint audacious_remote_get_playlist_pos(DBusGProxy *proxy);
+    void audacious_remote_set_playlist_pos(DBusGProxy *proxy, gint pos);
+    gint audacious_remote_get_playlist_length(DBusGProxy *proxy);
+    void audacious_remote_playlist_clear(DBusGProxy *proxy);
+    gint audacious_remote_get_output_time(DBusGProxy *proxy);
+    void audacious_remote_jump_to_time(DBusGProxy *proxy, gint pos);
+    void audacious_remote_get_volume(DBusGProxy *proxy, gint *vl, gint *vr);
+    gint audacious_remote_get_main_volume(DBusGProxy *proxy);
+    gint audacious_remote_get_balance(DBusGProxy *proxy);
+    void audacious_remote_set_volume(DBusGProxy *proxy, gint vl, gint vr);
+    void audacious_remote_set_main_volume(DBusGProxy *proxy, gint v);
+    void audacious_remote_set_balance(DBusGProxy *proxy, gint b);
+    gchar *audacious_remote_get_skin(DBusGProxy *proxy);
+    void audacious_remote_set_skin(DBusGProxy *proxy, gchar *skinfile);
+    gchar *audacious_remote_get_playlist_file(DBusGProxy *proxy, gint pos);
+    gchar *audacious_remote_get_playlist_title(DBusGProxy *proxy, gint pos);
+    gint audacious_remote_get_playlist_time(DBusGProxy *proxy, gint pos);
+    void audacious_remote_get_info(DBusGProxy *proxy, gint *rate, gint *freq,
+                                   gint *nch);
+    void audacious_remote_main_win_toggle(DBusGProxy *proxy, gboolean show);
+    void audacious_remote_pl_win_toggle(DBusGProxy *proxy, gboolean show);
+    void audacious_remote_eq_win_toggle(DBusGProxy *proxy, gboolean show);
+    gboolean audacious_remote_is_main_win(DBusGProxy *proxy);
+    gboolean audacious_remote_is_pl_win(DBusGProxy *proxy);
+    gboolean audacious_remote_is_eq_win(DBusGProxy *proxy);
+    void audacious_remote_show_prefs_box(DBusGProxy *proxy);
+    void audacious_remote_toggle_aot(DBusGProxy *proxy, gboolean ontop);
+    void audacious_remote_eject(DBusGProxy *proxy);
+    void audacious_remote_playlist_prev(DBusGProxy *proxy);
+    void audacious_remote_playlist_next(DBusGProxy *proxy);
+    void audacious_remote_playlist_add_url_string(DBusGProxy *proxy,
+                                                  gchar *string);
+    gboolean audacious_remote_is_running(DBusGProxy *proxy);
+    void audacious_remote_toggle_repeat(DBusGProxy *proxy);
+    void audacious_remote_toggle_shuffle(DBusGProxy *proxy);
+    gboolean audacious_remote_is_repeat(DBusGProxy *proxy);
+    gboolean audacious_remote_is_shuffle(DBusGProxy *proxy);
+    void audacious_remote_get_eq(DBusGProxy *proxy, gfloat *preamp,
+                                 gfloat **bands);
+    gfloat audacious_remote_get_eq_preamp(DBusGProxy *proxy);
+    gfloat audacious_remote_get_eq_band(DBusGProxy *proxy, gint band);
+    void audacious_remote_set_eq(DBusGProxy *proxy, gfloat preamp,
+                                 gfloat *bands);
+    void audacious_remote_set_eq_preamp(DBusGProxy *proxy, gfloat preamp);
+    void audacious_remote_set_eq_band(DBusGProxy *proxy, gint band,
+                                      gfloat value);
+
+/* Added in XMMS 1.2.1 */
+    void audacious_remote_quit(DBusGProxy *proxy);
+
+/* Added in XMMS 1.2.6 */
+    void audacious_remote_play_pause(DBusGProxy *proxy);
+    void audacious_remote_playlist_ins_url_string(DBusGProxy *proxy,
+                                                  gchar *string, gint pos);
+
+/* Added in XMMS 1.2.11 */
+    void audacious_remote_playqueue_add(DBusGProxy *proxy, gint pos);
+    void audacious_remote_playqueue_remove(DBusGProxy *proxy, gint pos);
+    gint audacious_remote_get_playqueue_length(DBusGProxy *proxy);
+    void audacious_remote_toggle_advance(DBusGProxy *proxy);
+    gboolean audacious_remote_is_advance(DBusGProxy *proxy);
+
+/* Added in BMP 0.9.7 */
+    void audacious_remote_activate(DBusGProxy *proxy);
+
+/* Added in Audacious 1.1 */
+    void audacious_remote_show_jtf_box(DBusGProxy *proxy);
+    void audacious_remote_playqueue_clear(DBusGProxy *proxy);
+    gboolean audacious_remote_playqueue_is_queued(DBusGProxy *proxy, gint pos);
+    gint audacious_remote_get_playqueue_position(DBusGProxy *proxy, gint pos);
+    gint audacious_remote_get_playqueue_queue_position(DBusGProxy *proxy,
+                                                       gint pos);
+
+/* Added in Audacious 1.2 */
+    void audacious_set_session_uri(DBusGProxy *proxy, gchar *uri);
+    gchar *audacious_get_session_uri(DBusGProxy *proxy);
+    void audacious_set_session_type(DBusGProxy *proxy, gint type);
+
+/* Added in Audacious 1.3 */
+    void audacious_remote_playlist_enqueue_to_temp(DBusGProxy *proxy,
+                                                   gchar *string);
+    gchar *audacious_get_tuple_field_data(DBusGProxy *proxy, gchar *field,
+                                          gint pos);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif