annotate src/libaudclient/audctrl.c @ 3867:e48f2f4c116d

- many remained audacious remote functions have been implemented. - audtool improvement in progress.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Mon, 29 Oct 2007 22:21:42 +0900
parents 3b6d316f8b09
children f3341c2d6b9e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
1 /*
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
2 * Audacious: A cross-platform multimedia player
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
3 * Copyright (c) 2007 Ben Tucker
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
4 *
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
5 * This program is free software; you can redistribute it and/or modify
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
3121
3b6d316f8b09 GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents: 2938
diff changeset
7 * the Free Software Foundation; under version 3 of the License.
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
8 *
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
9 * This program is distributed in the hope that it will be useful,
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
12 * GNU General Public License for more details.
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
13 *
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License
3121
3b6d316f8b09 GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents: 2938
diff changeset
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
16 */
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
17
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
18 #ifdef HAVE_CONFIG_H
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
19 # include "config.h"
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
20 #endif
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
21
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
22 #include <stdlib.h>
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
23 #include <glib.h>
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
24 #include <string.h>
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
25 #include <dbus/dbus-glib.h>
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
26 #include "audacious/dbus.h"
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
27 #include "audacious/dbus-client-bindings.h"
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
28 #include "audctrl.h"
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
29
2800
f42a5b531c03 [svn] - hide 'error' from outside to avoid symbol conflict.
yaz
parents: 2785
diff changeset
30 static GError *error = NULL; //it must be hidden from outside, otherwise symbol conflict likely to happen.
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
31
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
32 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
33 * audacious_remote_playlist:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
34 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
35 * @list: A list of URIs to play.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
36 * @num: Number of URIs to play.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
37 * @enqueue: Whether or not the new playlist should be added on, or replace the current playlist.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
38 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
39 * Sends a playlist to audacious.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
40 **/
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
41 void audacious_remote_playlist(DBusGProxy *proxy, gchar **list, gint num, gboolean enqueue) {
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
42 GList *glist = NULL;
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
43 gchar **data = list;
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
44
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
45 g_return_if_fail(list != NULL);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
46 g_return_if_fail(num > 0);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
47
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
48 if (!enqueue)
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
49 audacious_remote_playlist_clear(proxy);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
50
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
51 // construct a GList
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
52 while(data) {
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
53 glist = g_list_append(glist, (gpointer)data);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
54 data++;
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
55 }
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
56
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
57 org_atheme_audacious_playlist_add(proxy, (gpointer)glist, &error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
58
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
59 g_list_free(glist);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
60 glist = NULL;
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
61
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
62 if (!enqueue)
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
63 audacious_remote_play(proxy);
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
64 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
65
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
66 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
67 * audacious_remote_get_version:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
68 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
69 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
70 * Queries audacious for it's protocol version.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
71 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
72 * Return value: The protocol version used by Audacious.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
73 **/
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
74 gint audacious_remote_get_version(DBusGProxy *proxy) {
2814
77a012c3b521 [svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned.
yaz
parents: 2800
diff changeset
75 return 0x09a3; // XXX should do actual dbus call.
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
76 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
77
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
78 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
79 * audacious_remote_playlist_add:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
80 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
81 * @list: A GList of URIs to add to the playlist.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
82 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
83 * Sends a list of URIs to Audacious to add to the playlist.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
84 **/
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
85 void audacious_remote_playlist_add(DBusGProxy *proxy, GList *list) {
2938
1cdfc508d758 Fix adding files when Audacious is running.
Jonathan Schleifer <js@h3c.de>
parents: 2814
diff changeset
86 GList *iter;
1cdfc508d758 Fix adding files when Audacious is running.
Jonathan Schleifer <js@h3c.de>
parents: 2814
diff changeset
87 for (iter = list; iter != NULL; iter = g_list_next(iter))
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
88 org_atheme_audacious_playlist_add(proxy, iter->data, &error);
2938
1cdfc508d758 Fix adding files when Audacious is running.
Jonathan Schleifer <js@h3c.de>
parents: 2814
diff changeset
89 g_clear_error(&error);
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
90 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
91
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
92 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
93 * audacious_remote_playlist_delete:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
94 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
95 * @pos: The playlist position to delete.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
96 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
97 * Deletes a playlist entry.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
98 **/
2767
55dc022c405a [svn] Changed signedness and formatting.
magma
parents: 2762
diff changeset
99 void audacious_remote_playlist_delete(DBusGProxy *proxy, guint pos) {
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
100 org_atheme_audacious_delete(proxy, pos, &error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
101 g_clear_error(&error);
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
102 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
103
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
104 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
105 * audacious_remote_play:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
106 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
107 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
108 * Tells audacious to begin playback.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
109 **/
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
110 void audacious_remote_play(DBusGProxy *proxy) {
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
111 org_atheme_audacious_play(proxy, &error);
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
112 g_clear_error(&error);
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
113 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
114
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
115 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
116 * audacious_remote_pause:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
117 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
118 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
119 * Tells audacious to pause.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
120 **/
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
121 void audacious_remote_pause(DBusGProxy *proxy) {
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
122 org_atheme_audacious_pause(proxy, &error);
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
123 g_clear_error(&error);
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
124 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
125
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
126 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
127 * audacious_remote_stop:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
128 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
129 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
130 * Tells audacious to stop.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
131 **/
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
132 void audacious_remote_stop(DBusGProxy *proxy) {
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
133 org_atheme_audacious_stop(proxy, &error);
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
134 g_clear_error(&error);
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
135 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
136
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
137 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
138 * audacious_remote_is_playing:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
139 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
140 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
141 * Queries audacious about whether it is playing or not.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
142 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
143 * Return value: TRUE if playing, FALSE otherwise.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
144 **/
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
145 gboolean audacious_remote_is_playing(DBusGProxy *proxy) {
2814
77a012c3b521 [svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned.
yaz
parents: 2800
diff changeset
146 gboolean is_playing = FALSE;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
147 org_atheme_audacious_playing(proxy, &is_playing, &error);
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
148 g_clear_error(&error);
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
149 return is_playing;
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
150 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
151
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
152 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
153 * audacious_remote_is_paused:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
154 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
155 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
156 * Queries audacious about whether it is paused or not.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
157 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
158 * Return value: TRUE if playing, FALSE otherwise.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
159 **/
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
160 gboolean audacious_remote_is_paused(DBusGProxy *proxy) {
2814
77a012c3b521 [svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned.
yaz
parents: 2800
diff changeset
161 gboolean is_paused = FALSE;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
162 org_atheme_audacious_paused(proxy, &is_paused, &error);
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
163 g_clear_error(&error);
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
164 return is_paused;
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
165 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
166
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
167 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
168 * audacious_remote_get_playlist_pos:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
169 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
170 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
171 * Queries audacious about the current playlist position.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
172 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
173 * Return value: The current playlist position.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
174 **/
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
175 gint audacious_remote_get_playlist_pos(DBusGProxy *proxy) {
2814
77a012c3b521 [svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned.
yaz
parents: 2800
diff changeset
176 guint pos = 0;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
177 org_atheme_audacious_position(proxy, &pos, &error);
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
178 g_clear_error(&error);
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
179 return pos;
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
180 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
181
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
182 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
183 * audacious_remote_set_playlist_pos:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
184 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
185 * @pos: Playlist position to jump to.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
186 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
187 * Tells audacious to jump to a different playlist position.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
188 **/
2767
55dc022c405a [svn] Changed signedness and formatting.
magma
parents: 2762
diff changeset
189 void audacious_remote_set_playlist_pos(DBusGProxy *proxy, guint pos) {
2785
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
190 org_atheme_audacious_jump (proxy, pos, &error);
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
191 g_clear_error(&error);
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
192 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
193
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
194 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
195 * audacious_remote_get_playlist_length:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
196 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
197 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
198 * Queries audacious about the current playlist length.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
199 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
200 * Return value: The amount of entries in the playlist.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
201 **/
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
202 gint audacious_remote_get_playlist_length(DBusGProxy *proxy) {
2814
77a012c3b521 [svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned.
yaz
parents: 2800
diff changeset
203 gint len = 0;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
204 org_atheme_audacious_length(proxy, &len, &error);
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
205 g_clear_error(&error);
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
206 return len;
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
207 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
208
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
209 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
210 * audacious_remote_playlist_clear:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
211 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
212 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
213 * Clears the playlist.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
214 **/
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
215 void audacious_remote_playlist_clear(DBusGProxy *proxy) {
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
216 org_atheme_audacious_clear(proxy, &error);
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
217 g_clear_error(&error);
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
218 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
219
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
220 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
221 * audacious_remote_get_output_time:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
222 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
223 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
224 * Queries audacious about the current output position.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
225 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
226 * Return value: The current output position.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
227 **/
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
228 gint audacious_remote_get_output_time(DBusGProxy *proxy) {
2814
77a012c3b521 [svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned.
yaz
parents: 2800
diff changeset
229 guint time = 0;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
230 org_atheme_audacious_time(proxy, &time, &error);
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
231 g_clear_error(&error);
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
232 return time;
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
233 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
234
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
235 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
236 * audacious_remote_jump_to_time:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
237 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
238 * @pos: The time (in milliseconds) to jump to.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
239 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
240 * Tells audacious to seek to a new time position.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
241 **/
2767
55dc022c405a [svn] Changed signedness and formatting.
magma
parents: 2762
diff changeset
242 void audacious_remote_jump_to_time(DBusGProxy *proxy, guint pos) {
2785
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
243 org_atheme_audacious_seek (proxy, pos, &error);
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
244 g_clear_error(&error);
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
245 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
246
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
247 /**
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
248 * audacious_remote_get_volume:
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
249 * @proxy: DBus proxy for audacious
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
250 * @vl: Pointer to integer containing the left channel's volume.
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
251 * @vr: Pointer to integer containing the right channel's volume.
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
252 *
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
253 * Queries audacious about the current volume.
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
254 **/
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
255 void audacious_remote_get_volume(DBusGProxy *proxy, gint * vl, gint * vr) {
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
256 org_atheme_audacious_volume(proxy, vl, vr, &error);
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
257 g_clear_error(&error);
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
258 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
259
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
260 /**
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
261 * audacious_remote_get_main_volume:
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
262 * @proxy: DBus proxy for audacious
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
263 *
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
264 * Queries audacious about the current volume.
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
265 *
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
266 * Return value: The current volume.
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
267 **/
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
268 gint audacious_remote_get_main_volume(DBusGProxy *proxy) {
2814
77a012c3b521 [svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned.
yaz
parents: 2800
diff changeset
269 gint vl = 0, vr = 0;
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
270
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
271 audacious_remote_get_volume(proxy, &vl, &vr);
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
272
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
273 return (vl > vr) ? vl : vr;
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
274 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
275
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
276 /**
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
277 * audacious_remote_get_balance:
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
278 * @proxy: DBus proxy for audacious
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
279 *
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
280 * Queries audacious about the current balance.
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
281 *
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
282 * Return value: The current balance.
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
283 **/
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
284 gint audacious_remote_get_balance(DBusGProxy *proxy) {
2814
77a012c3b521 [svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned.
yaz
parents: 2800
diff changeset
285 gint balance = 50;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
286 org_atheme_audacious_balance(proxy, &balance, &error);
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
287 g_clear_error(&error);
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
288 return balance;
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
289 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
290
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
291 /**
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
292 * audacious_remote_set_volume:
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
293 * @proxy: DBus proxy for audacious
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
294 * @vl: The volume for the left channel.
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
295 * @vr: The volume for the right channel.
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
296 *
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
297 * Sets the volume for the left and right channels in Audacious.
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
298 **/
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
299 void audacious_remote_set_volume(DBusGProxy *proxy, gint vl, gint vr) {
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
300 org_atheme_audacious_set_volume(proxy, vl, vr, &error);
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
301 g_clear_error(&error);
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
302 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
303
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
304
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
305 /**
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
306 * audacious_remote_set_main_volume:
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
307 * @proxy: DBus proxy for audacious
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
308 * @v: The volume to set.
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
309 *
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
310 * Sets the volume in Audacious.
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
311 **/
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
312 void audacious_remote_set_main_volume(DBusGProxy *proxy, gint v) {
2814
77a012c3b521 [svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned.
yaz
parents: 2800
diff changeset
313 gint b = 50, vl = 0, vr = 0;
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
314
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
315 b = audacious_remote_get_balance(proxy);
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
316
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
317 if (b < 0) {
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
318 vl = v;
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
319 vr = (v * (100 - abs(b))) / 100;
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
320 } else if (b > 0) {
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
321 vl = (v * (100 - b)) / 100;
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
322 vr = v;
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
323 } else
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
324 vl = vr = v;
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
325 audacious_remote_set_volume(proxy, vl, vr);
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
326 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
327
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
328 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
329 * audacious_remote_set_balance:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
330 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
331 * @b: The balance to set.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
332 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
333 * Sets the balance in Audacious.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
334 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
335 void audacious_remote_set_balance(DBusGProxy *proxy, gint b) {
2814
77a012c3b521 [svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned.
yaz
parents: 2800
diff changeset
336 gint v = 0, vl = 0, vr = 0;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
337
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
338 if (b < -100)
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
339 b = -100;
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
340 if (b > 100)
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
341 b = 100;
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
342
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
343 v = audacious_remote_get_main_volume(proxy);
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
344
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
345 if (b < 0) {
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
346 vl = v;
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
347 vr = (v * (100 - abs(b))) / 100;
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
348 } else if (b > 0) {
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
349 vl = (v * (100 - b)) / 100;
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
350 vr = v;
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
351 } else
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
352 vl = vr = v;
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
353 audacious_remote_set_volume(proxy, vl, vr);
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
354 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
355
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
356 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
357 * audacious_remote_get_skin:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
358 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
359 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
360 * Queries Audacious about it's skin.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
361 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
362 * Return value: A path to the currently selected skin.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
363 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
364 gchar *audacious_remote_get_skin(DBusGProxy *proxy) {
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
365 gchar *skin = NULL;
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
366 org_atheme_audacious_get_skin (proxy, &skin, &error); // xxx
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
367 g_clear_error(&error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
368 return skin;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
369 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
370
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
371 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
372 * audacious_remote_set_skin:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
373 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
374 * @skinfile: Path to a skinfile to use with Audacious.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
375 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
376 * Tells audacious to start using the skinfile provided.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
377 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
378 void audacious_remote_set_skin(DBusGProxy *proxy, gchar *skinfile) {
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
379 org_atheme_audacious_set_skin(proxy, skinfile, &error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
380 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
381 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
382
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
383 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
384 * audacious_remote_get_playlist_file:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
385 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
386 * @pos: The playlist position to query for.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
387 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
388 * Queries Audacious about a playlist entry's file.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
389 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
390 * Return value: A path to the file in the playlist at %pos position.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
391 **/
2767
55dc022c405a [svn] Changed signedness and formatting.
magma
parents: 2762
diff changeset
392 gchar *audacious_remote_get_playlist_file(DBusGProxy *proxy, guint pos) {
2814
77a012c3b521 [svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned.
yaz
parents: 2800
diff changeset
393 gchar *out = NULL;
2735
ccf3e141fb1e [svn] - finish some stubs to make audtool work for my scripts
nenolod
parents: 2733
diff changeset
394 org_atheme_audacious_song_filename(proxy, pos, &out, &error);
ccf3e141fb1e [svn] - finish some stubs to make audtool work for my scripts
nenolod
parents: 2733
diff changeset
395 g_clear_error(&error);
ccf3e141fb1e [svn] - finish some stubs to make audtool work for my scripts
nenolod
parents: 2733
diff changeset
396 return out;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
397 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
398
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
399 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
400 * audacious_remote_get_playlist_title:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
401 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
402 * @pos: The playlist position to query for.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
403 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
404 * Queries Audacious about a playlist entry's title.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
405 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
406 * Return value: The title for the entry in the playlist at %pos position.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
407 **/
2767
55dc022c405a [svn] Changed signedness and formatting.
magma
parents: 2762
diff changeset
408 gchar *audacious_remote_get_playlist_title(DBusGProxy *proxy, guint pos) {
2814
77a012c3b521 [svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned.
yaz
parents: 2800
diff changeset
409 gchar *out = NULL;
2735
ccf3e141fb1e [svn] - finish some stubs to make audtool work for my scripts
nenolod
parents: 2733
diff changeset
410 org_atheme_audacious_song_title(proxy, pos, &out, &error);
ccf3e141fb1e [svn] - finish some stubs to make audtool work for my scripts
nenolod
parents: 2733
diff changeset
411 g_clear_error(&error);
ccf3e141fb1e [svn] - finish some stubs to make audtool work for my scripts
nenolod
parents: 2733
diff changeset
412 return out;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
413 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
414
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
415 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
416 * audacious_remote_get_playlist_time:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
417 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
418 * @pos: The playlist position to query for.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
419 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
420 * Queries Audacious about a playlist entry's length.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
421 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
422 * Return value: The length of the entry in the playlist at %pos position.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
423 **/
2767
55dc022c405a [svn] Changed signedness and formatting.
magma
parents: 2762
diff changeset
424 gint audacious_remote_get_playlist_time(DBusGProxy *proxy, guint pos) {
2814
77a012c3b521 [svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned.
yaz
parents: 2800
diff changeset
425 gint out = 0;
2738
1eb06f902923 [svn] - call SongFrames not SongLength
nenolod
parents: 2735
diff changeset
426 org_atheme_audacious_song_frames(proxy, pos, &out, &error);
2735
ccf3e141fb1e [svn] - finish some stubs to make audtool work for my scripts
nenolod
parents: 2733
diff changeset
427 g_clear_error(&error);
ccf3e141fb1e [svn] - finish some stubs to make audtool work for my scripts
nenolod
parents: 2733
diff changeset
428 return out;
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
429 }
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
430
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
431 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
432 * audacious_remote_get_info:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
433 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
434 * @rate: Pointer to an integer containing the bitrate.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
435 * @freq: Pointer to an integer containing the frequency.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
436 * @nch: Pointer to an integer containing the number of channels.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
437 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
438 * Queries Audacious about the current audio format.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
439 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
440 void audacious_remote_get_info(DBusGProxy *proxy, gint *rate, gint *freq,
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
441 gint *nch) {
2785
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
442 org_atheme_audacious_info(proxy, rate, freq, nch, &error);
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
443 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
444 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
445
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
446 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
447 * audacious_remote_main_win_toggle:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
448 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
449 * @show: Whether or not to show the main window.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
450 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
451 * Toggles the main window's visibility.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
452 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
453 void audacious_remote_main_win_toggle(DBusGProxy *proxy, gboolean show) {
2733
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
454 org_atheme_audacious_show_main_win(proxy, show, &error);
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
455 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
456 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
457
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
458 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
459 * audacious_remote_pl_win_toggle:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
460 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
461 * @show: Whether or not to show the playlist window.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
462 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
463 * Toggles the playlist window's visibility.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
464 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
465 void audacious_remote_pl_win_toggle(DBusGProxy *proxy, gboolean show) {
2733
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
466 org_atheme_audacious_show_playlist(proxy, show, &error);
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
467 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
468 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
469
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
470 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
471 * audacious_remote_eq_win_toggle:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
472 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
473 * @show: Whether or not to show the equalizer window.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
474 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
475 * Toggles the equalizer window's visibility.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
476 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
477 void audacious_remote_eq_win_toggle(DBusGProxy *proxy, gboolean show) {
2733
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
478 org_atheme_audacious_show_equalizer(proxy, show, &error);
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
479 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
480 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
481
2733
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
482 /**
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
483 * audacious_remote_is_main_win:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
484 * @proxy: DBus proxy for audacious
2733
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
485 *
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
486 * Queries Audacious about the main window's visibility.
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
487 *
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
488 * Return value: TRUE if visible, FALSE otherwise.
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
489 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
490 gboolean audacious_remote_is_main_win(DBusGProxy *proxy) {
2814
77a012c3b521 [svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned.
yaz
parents: 2800
diff changeset
491 gboolean visible = TRUE;
2733
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
492 org_atheme_audacious_main_win_visible(proxy, &visible, &error);
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
493 g_clear_error(&error);
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
494 return visible;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
495 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
496
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
497 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
498 * audacious_remote_is_pl_win:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
499 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
500 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
501 * Queries Audacious about the playlist window's visibility.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
502 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
503 * Return value: TRUE if visible, FALSE otherwise.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
504 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
505 gboolean audacious_remote_is_pl_win(DBusGProxy *proxy) {
2814
77a012c3b521 [svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned.
yaz
parents: 2800
diff changeset
506 gboolean visible = TRUE;
2733
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
507 org_atheme_audacious_playlist_visible(proxy, &visible, &error);
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
508 g_clear_error(&error);
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
509 return visible;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
510 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
511
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
512 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
513 * audacious_remote_is_eq_win:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
514 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
515 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
516 * Queries Audacious about the equalizer window's visibility.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
517 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
518 * Return value: TRUE if visible, FALSE otherwise.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
519 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
520 gboolean audacious_remote_is_eq_win(DBusGProxy *proxy) {
2814
77a012c3b521 [svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned.
yaz
parents: 2800
diff changeset
521 gboolean visible = FALSE;
2733
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
522 org_atheme_audacious_equalizer_visible(proxy, &visible, &error);
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
523 g_clear_error(&error);
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
524 return visible;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
525 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
526
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
527 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
528 * audacious_remote_show_prefs_box:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
529 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
530 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
531 * Tells audacious to show the preferences pane.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
532 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
533 void audacious_remote_show_prefs_box(DBusGProxy *proxy) {
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
534 org_atheme_audacious_show_prefs_box(proxy, &error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
535 g_clear_error(&error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
536 }
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
537
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
538 /**
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
539 * audacious_remote_show_about_box:
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
540 * @proxy: DBus proxy for audacious
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
541 *
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
542 * Tells audacious to show the about box.
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
543 **/
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
544 void audacious_remote_show_about_box(DBusGProxy *proxy) {
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
545 org_atheme_audacious_show_about_box(proxy, &error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
546 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
547 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
548
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
549 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
550 * audacious_remote_toggle_aot:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
551 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
552 * @ontop: Whether or not Audacious should be always-on-top.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
553 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
554 * Tells audacious to toggle the always-on-top feature.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
555 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
556 void audacious_remote_toggle_aot(DBusGProxy *proxy, gboolean ontop) {
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
557 org_atheme_audacious_toggle_aot(proxy, ontop, &error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
558 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
559 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
560
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
561 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
562 * audacious_remote_eject:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
563 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
564 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
565 * Tells audacious to display the open files pane.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
566 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
567 void audacious_remote_eject(DBusGProxy *proxy) {
2733
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
568 org_atheme_audacious_eject(proxy, &error);
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
569 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
570 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
571
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
572 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
573 * audacious_remote_playlist_prev:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
574 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
575 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
576 * Tells audacious to move backwards in the playlist.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
577 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
578 void audacious_remote_playlist_prev(DBusGProxy *proxy) {
2785
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
579 org_atheme_audacious_reverse(proxy, &error);
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
580 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
581 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
582
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
583 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
584 * audacious_remote_playlist_next:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
585 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
586 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
587 * Tells audacious to move forward in the playlist.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
588 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
589 void audacious_remote_playlist_next(DBusGProxy *proxy) {
2785
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
590 org_atheme_audacious_advance(proxy, &error);
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
591 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
592 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
593
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
594 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
595 * audacious_remote_playlist_add_url_string:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
596 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
597 * @string: The URI to add.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
598 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
599 * Tells audacious to add an URI to the playlist.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
600 **/
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
601 void audacious_remote_playlist_add_url_string(DBusGProxy *proxy,
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
602 gchar *string) {
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
603 org_atheme_audacious_add_url(proxy, string, &error);
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
604 g_clear_error(&error);
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
605 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
606
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
607 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
608 * audacious_remote_is_running:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
609 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
610 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
611 * Checks to see if an Audacious server is running.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
612 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
613 * Return value: TRUE if yes, otherwise FALSE.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
614 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
615 gboolean audacious_remote_is_running(DBusGProxy *proxy) {
2785
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
616 char *string = NULL;
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
617 org_atheme_audacious_version(proxy, &string, &error);
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
618 g_clear_error(&error);
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
619 if(string) {
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
620 g_free(string);
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
621 return TRUE;
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
622 }
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
623 else
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
624 return FALSE;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
625 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
626
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
627 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
628 * audacious_remote_toggle_repeat:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
629 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
630 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
631 * Tells audacious to toggle the repeat feature.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
632 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
633 void audacious_remote_toggle_repeat(DBusGProxy *proxy) {
2785
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
634 org_atheme_audacious_toggle_repeat(proxy, &error);
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
635 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
636 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
637
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
638 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
639 * audacious_remote_toggle_shuffle:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
640 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
641 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
642 * Tells audacious to toggle the shuffle feature.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
643 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
644 void audacious_remote_toggle_shuffle(DBusGProxy *proxy) {
2785
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
645 org_atheme_audacious_toggle_shuffle (proxy, &error);
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
646 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
647 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
648
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
649 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
650 * audacious_remote_is_repeat:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
651 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
652 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
653 * Queries audacious about whether or not the repeat feature is active.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
654 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
655 * Return value: TRUE if yes, otherwise FALSE.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
656 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
657 gboolean audacious_remote_is_repeat(DBusGProxy *proxy) {
2769
bf2d80abf76e [svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents: 2767
diff changeset
658 gboolean is_repeat;
bf2d80abf76e [svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents: 2767
diff changeset
659 org_atheme_audacious_repeat(proxy, &is_repeat, &error);
bf2d80abf76e [svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents: 2767
diff changeset
660 g_clear_error(&error);
bf2d80abf76e [svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents: 2767
diff changeset
661 return is_repeat;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
662 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
663
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
664 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
665 * audacious_remote_is_shuffle:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
666 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
667 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
668 * Queries audacious about whether or not the shuffle feature is active.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
669 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
670 * Return value: TRUE if yes, otherwise FALSE.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
671 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
672 gboolean audacious_remote_is_shuffle(DBusGProxy *proxy) {
2769
bf2d80abf76e [svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents: 2767
diff changeset
673 gboolean is_shuffle;
bf2d80abf76e [svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents: 2767
diff changeset
674 org_atheme_audacious_shuffle(proxy, &is_shuffle, &error);
bf2d80abf76e [svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents: 2767
diff changeset
675 g_clear_error(&error);
bf2d80abf76e [svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents: 2767
diff changeset
676 return is_shuffle;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
677 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
678
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
679 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
680 * audacious_remote_get_eq:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
681 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
682 * @preamp: Pointer to value for preamp setting.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
683 * @bands: Pointer to array of band settings.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
684 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
685 * Queries audacious about the equalizer settings.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
686 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
687 void audacious_remote_get_eq(DBusGProxy *proxy, gfloat *preamp,
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
688 gfloat **bands) {
2785
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
689 //XXX
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
690 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
691
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
692 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
693 * audacious_remote_get_eq_preamp:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
694 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
695 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
696 * Queries audacious about the equalizer preamp's setting.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
697 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
698 * Return value: The equalizer preamp's setting.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
699 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
700 gfloat audacious_remote_get_eq_preamp(DBusGProxy *proxy) {
2785
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
701 //XXX
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
702 return 0.0;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
703 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
704
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
705 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
706 * audacious_remote_get_eq_band:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
707 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
708 * @band: Which band to lookup the value for.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
709 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
710 * Queries audacious about an equalizer band's value.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
711 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
712 * Return value: The equalizer band's value.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
713 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
714 gfloat audacious_remote_get_eq_band(DBusGProxy *proxy, gint band) {
2785
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
715 //XXX
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
716 return 0.0;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
717 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
718
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
719 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
720 * audacious_remote_set_eq:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
721 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
722 * @preamp: Value for preamp setting.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
723 * @bands: Array of band settings.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
724 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
725 * Tells audacious to set the equalizer up using the provided values.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
726 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
727 void audacious_remote_set_eq(DBusGProxy *proxy, gfloat preamp,
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
728 gfloat *bands) {
2785
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
729 //XXX
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
730 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
731
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
732 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
733 * audacious_remote_set_eq_preamp:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
734 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
735 * @preamp: Value for preamp setting.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
736 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
737 * Tells audacious to set the equalizer's preamp setting.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
738 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
739 void audacious_remote_set_eq_preamp(DBusGProxy *proxy, gfloat preamp) {
2785
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
740 //XXX
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
741 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
742
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
743 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
744 * audacious_remote_set_eq_band:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
745 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
746 * @band: The band to set the value for.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
747 * @value: The value to set that band to.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
748 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
749 * Tells audacious to set an equalizer band's setting.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
750 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
751 void audacious_remote_set_eq_band(DBusGProxy *proxy, gint band,
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
752 gfloat value) {
2785
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
753 //XXX
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
754 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
755
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
756 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
757 * audacious_remote_quit:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
758 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
759 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
760 * Tells audacious to quit.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
761 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
762 void audacious_remote_quit(DBusGProxy *proxy) {
2733
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
763 org_atheme_audacious_quit(proxy, &error);
cf080b11c3fa [svn] Implemented more of the stubs in audctrl; Added more methods to objects.xml with implementations in dbus.c. I'm still trying to get plugins working with libaudclient.
magma
parents: 2731
diff changeset
764 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
765 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
766
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
767 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
768 * audacious_remote_play_pause:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
769 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
770 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
771 * Tells audacious to either play or pause.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
772 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
773 void audacious_remote_play_pause(DBusGProxy *proxy) {
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
774 org_atheme_audacious_play_pause(proxy, &error);
2711
c35913222440 [svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
diff changeset
775 }
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
776
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
777 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
778 * audacious_remote_playlist_ins_url_string:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
779 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
780 * @string: The URI to add.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
781 * @pos: The position to add the URI at.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
782 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
783 * Tells audacious to add an URI to the playlist at a specific position.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
784 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
785 void audacious_remote_playlist_ins_url_string(DBusGProxy *proxy,
2767
55dc022c405a [svn] Changed signedness and formatting.
magma
parents: 2762
diff changeset
786 gchar *string, guint pos) {
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
787 org_atheme_audacious_playlist_ins_url_string (proxy, string, pos, &error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
788 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
789 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
790
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
791 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
792 * audacious_remote_playqueue_add:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
793 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
794 * @pos: The playlist position to add to the queue.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
795 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
796 * Tells audacious to add a playlist entry to the playqueue.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
797 **/
2767
55dc022c405a [svn] Changed signedness and formatting.
magma
parents: 2762
diff changeset
798 void audacious_remote_playqueue_add(DBusGProxy *proxy, guint pos) {
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
799 org_atheme_audacious_playqueue_add (proxy, pos, &error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
800 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
801 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
802
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
803 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
804 * audacious_remote_playqueue_remove:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
805 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
806 * @pos: The playlist position to remove from the queue.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
807 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
808 * Tells audacious to remove a playlist entry from the playqueue.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
809 **/
2767
55dc022c405a [svn] Changed signedness and formatting.
magma
parents: 2762
diff changeset
810 void audacious_remote_playqueue_remove(DBusGProxy *proxy, guint pos) {
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
811 org_atheme_audacious_playqueue_remove (proxy, pos, &error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
812 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
813 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
814
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
815 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
816 * audacious_remote_get_playqueue_length:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
817 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
818 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
819 * Queries audacious about the playqueue's length.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
820 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
821 * Return value: The number of entries in the playqueue.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
822 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
823 gint audacious_remote_get_playqueue_length(DBusGProxy *proxy) {
2769
bf2d80abf76e [svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents: 2767
diff changeset
824 gint len = 0;
bf2d80abf76e [svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents: 2767
diff changeset
825 // this returns the lenght of the playlist, NOT the length of the playqueue
bf2d80abf76e [svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents: 2767
diff changeset
826 org_atheme_audacious_length(proxy, &len, &error);
bf2d80abf76e [svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents: 2767
diff changeset
827 g_clear_error(&error);
bf2d80abf76e [svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents: 2767
diff changeset
828 return len;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
829 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
830
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
831 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
832 * audacious_remote_toggle_advance:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
833 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
834 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
835 * Tells audacious to toggle the no-playlist-advance feature.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
836 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
837 void audacious_remote_toggle_advance(DBusGProxy *proxy) {
2769
bf2d80abf76e [svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents: 2767
diff changeset
838 org_atheme_audacious_toggle_auto_advance(proxy, &error);
bf2d80abf76e [svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents: 2767
diff changeset
839 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
840 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
841
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
842 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
843 * audacious_remote_is_advance:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
844 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
845 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
846 * Queries audacious about whether or not the no-playlist-advance feature is active.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
847 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
848 * Return value: TRUE if yes, otherwise FALSE.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
849 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
850 gboolean audacious_remote_is_advance(DBusGProxy *proxy) {
2814
77a012c3b521 [svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned.
yaz
parents: 2800
diff changeset
851 gboolean is_advance = FALSE;
2769
bf2d80abf76e [svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents: 2767
diff changeset
852 org_atheme_audacious_auto_advance(proxy, &is_advance, &error);
bf2d80abf76e [svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents: 2767
diff changeset
853 g_clear_error(&error);
bf2d80abf76e [svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents: 2767
diff changeset
854 return is_advance;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
855 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
856
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
857 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
858 * audacious_remote_activate:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
859 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
860 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
861 * Tells audacious to display the main window and become the selected window.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
862 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
863 void audacious_remote_activate(DBusGProxy *proxy) {
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
864 org_atheme_audacious_activate(proxy, &error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
865 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
866 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
867
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
868 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
869 * audacious_remote_show_jtf_box:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
870 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
871 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
872 * Tells audacious to show the Jump-to-File pane.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
873 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
874 void audacious_remote_show_jtf_box(DBusGProxy *proxy) {
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
875 org_atheme_audacious_show_jtf_box(proxy, &error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
876 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
877 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
878
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
879 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
880 * audacious_remote_playqueue_clear:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
881 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
882 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
883 * Tells audacious to clear the playqueue.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
884 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
885 void audacious_remote_playqueue_clear(DBusGProxy *proxy) {
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
886 org_atheme_audacious_playqueue_clear(proxy, &error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
887 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
888 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
889
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
890 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
891 * audacious_remote_playqueue_is_queued:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
892 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
893 * @pos: Position to check queue for.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
894 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
895 * Queries audacious about whether or not a playlist entry is in the playqueue.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
896 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
897 * Return value: TRUE if yes, FALSE otherwise.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
898 **/
2767
55dc022c405a [svn] Changed signedness and formatting.
magma
parents: 2762
diff changeset
899 gboolean audacious_remote_playqueue_is_queued(DBusGProxy *proxy, guint pos) {
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
900 gboolean is_queued;
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
901 org_atheme_audacious_playqueue_is_queued (proxy, pos, &is_queued, &error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
902 g_clear_error(&error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
903 return is_queued;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
904 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
905
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
906 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
907 * audacious_remote_get_playqueue_queue_position:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
908 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
909 * @pos: Position to check queue for.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
910 *
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
911 * Queries audacious about what the playqueue position is for a playlist entry.
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
912 *
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
913 * Return value: the playqueue position for a playlist entry
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
914 **/
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
915 gint audacious_remote_get_playqueue_queue_position(DBusGProxy *proxy, guint pos) {
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
916 guint qpos = 0;
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
917 org_atheme_audacious_queue_get_queue_pos (proxy, pos, &qpos, &error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
918 g_clear_error(&error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
919 return qpos;
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
920 }
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
921
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
922 /**
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
923 * audacious_remote_get_playqueue_list_position:
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
924 * @proxy: DBus proxy for audacious
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
925 * @pos: Position to check queue for.
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
926 *
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
927 * Queries audacious about what the playlist position is for a playqueue entry.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
928 *
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
929 * Return value: the playlist position for a playqueue entry
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
930 **/
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
931 gint audacious_remote_get_playqueue_list_position(DBusGProxy *proxy, guint qpos) {
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
932 guint pos = 0;
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
933 org_atheme_audacious_queue_get_list_pos (proxy, qpos, &pos, &error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
934 g_clear_error(&error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
935 return pos;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
936 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
937
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
938 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
939 * audacious_remote_playlist_enqueue_to_temp:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
940 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
941 * @string: The URI to enqueue to a temporary playlist.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
942 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
943 * Tells audacious to add an URI to a temporary playlist.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
944 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
945 void audacious_remote_playlist_enqueue_to_temp(DBusGProxy *proxy,
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
946 gchar *string) {
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
947 org_atheme_audacious_playlist_enqueue_to_temp(proxy, string, &error);
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
948 g_clear_error(&error);
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
949 }
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
950
2762
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
951 /**
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
952 * audacious_get_tuple_field_data:
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
953 * @proxy: DBus proxy for audacious
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
954 * @field: The name of the tuple field to retrieve.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
955 * @pos: The playlist position to query for.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
956 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
957 * Queries Audacious about a playlist entry's tuple information.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
958 *
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
959 * Return value: The requested field's data for the entry in the playlist at %pos position.
c89362b15525 [svn] Added lots of comments (styled after beepctrl).
magma
parents: 2738
diff changeset
960 **/
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
961 gchar *audacious_get_tuple_field_data(DBusGProxy *proxy, gchar *field,
2767
55dc022c405a [svn] Changed signedness and formatting.
magma
parents: 2762
diff changeset
962 guint pos) {
2785
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
963 //XXX
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
964 g_clear_error(&error);
2785
182aa34ae6c4 [svn] - implement some audacious-remote functions.
yaz
parents: 2769
diff changeset
965 return NULL;
2731
f4a5f8fa3836 [svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents: 2713
diff changeset
966 }
3867
e48f2f4c116d - many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3121
diff changeset
967