diff src/libaudclient/audctrl.c @ 3873:f3341c2d6b9e

audacious remote functions: - playlist_ins_url_string() and playlist_enqueue_to_temp() have been implemented. - now get_version() returns audacious version instead of protocol version. audtool: - now argc check works properly. - some cleanups.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Tue, 30 Oct 2007 22:12:47 +0900
parents e48f2f4c116d
children 44ab3d6057da
line wrap: on
line diff
--- a/src/libaudclient/audctrl.c	Tue Oct 30 18:17:55 2007 +0900
+++ b/src/libaudclient/audctrl.c	Tue Oct 30 22:12:47 2007 +0900
@@ -67,12 +67,16 @@
  * audacious_remote_get_version:
  * @proxy: DBus proxy for audacious
  *
- * Queries audacious for it's protocol version.
+ * Queries audacious for it's version.
  *
- * Return value: The protocol version used by Audacious.
+ * Return value: The version of Audacious.
  **/
-gint audacious_remote_get_version(DBusGProxy *proxy) {
-    return 0x09a3; // XXX should do actual dbus call.
+gchar *audacious_remote_get_version(DBusGProxy *proxy) {
+    char *string = NULL;
+    org_atheme_audacious_version(proxy, &string, &error);
+    g_clear_error(&error);
+
+    return (string ? string : NULL);
 }
 
 /**