Mercurial > audlegacy
annotate src/libaudclient/audctrl.c @ 4884:f1fc1d973f27
imported new plugin enumeration loop.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Mon, 22 Jun 2009 14:53:31 +0900 |
parents | 38b491487bd8 |
children |
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> |
4811
7bf7f83a217e
rename src/audacious src/audlegacy so that both audlegacy and audacious can coexist.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4708
diff
changeset
|
26 #include "audlegacy/dbus.h" |
7bf7f83a217e
rename src/audacious src/audlegacy so that both audlegacy and audacious can coexist.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4708
diff
changeset
|
27 #include "audlegacy/dbus-client-bindings.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
|
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 |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
57 org_atheme_audlegacy_playlist_add(proxy, (gpointer)glist, &error); |
3867
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 * |
3873
f3341c2d6b9e
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3867
diff
changeset
|
70 * Queries audacious for it's version. |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
71 * |
3873
f3341c2d6b9e
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3867
diff
changeset
|
72 * Return value: The version of Audacious. |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
73 **/ |
3873
f3341c2d6b9e
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3867
diff
changeset
|
74 gchar *audacious_remote_get_version(DBusGProxy *proxy) { |
f3341c2d6b9e
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3867
diff
changeset
|
75 char *string = NULL; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
76 org_atheme_audlegacy_version(proxy, &string, &error); |
3873
f3341c2d6b9e
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3867
diff
changeset
|
77 g_clear_error(&error); |
f3341c2d6b9e
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3867
diff
changeset
|
78 |
f3341c2d6b9e
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3867
diff
changeset
|
79 return (string ? string : NULL); |
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
|
80 } |
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
|
81 |
2762
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 * audacious_remote_playlist_add: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
84 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
85 * @list: A GList of URIs to add to the playlist. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
86 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
87 * 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
|
88 **/ |
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
|
89 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
|
90 GList *iter; |
1cdfc508d758
Fix adding files when Audacious is running.
Jonathan Schleifer <js@h3c.de>
parents:
2814
diff
changeset
|
91 for (iter = list; iter != NULL; iter = g_list_next(iter)) |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
92 org_atheme_audlegacy_playlist_add(proxy, iter->data, &error); |
2938
1cdfc508d758
Fix adding files when Audacious is running.
Jonathan Schleifer <js@h3c.de>
parents:
2814
diff
changeset
|
93 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
|
94 } |
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
|
95 |
2762
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 * audacious_remote_playlist_delete: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
98 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
99 * @pos: The playlist position to delete. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
100 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
101 * Deletes a playlist entry. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
102 **/ |
2767 | 103 void audacious_remote_playlist_delete(DBusGProxy *proxy, guint pos) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
104 org_atheme_audlegacy_delete(proxy, pos, &error); |
3867
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
105 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
|
106 } |
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
|
107 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
108 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
109 * audacious_remote_play: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
110 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
111 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
112 * Tells audacious to begin playback. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
113 **/ |
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
|
114 void audacious_remote_play(DBusGProxy *proxy) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
115 org_atheme_audlegacy_play(proxy, &error); |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
116 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
|
117 } |
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
|
118 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
119 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
120 * audacious_remote_pause: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
121 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
122 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
123 * Tells audacious to pause. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
124 **/ |
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
|
125 void audacious_remote_pause(DBusGProxy *proxy) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
126 org_atheme_audlegacy_pause(proxy, &error); |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
127 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
|
128 } |
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
|
129 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
130 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
131 * audacious_remote_stop: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
132 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
133 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
134 * Tells audacious to stop. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
135 **/ |
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
|
136 void audacious_remote_stop(DBusGProxy *proxy) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
137 org_atheme_audlegacy_stop(proxy, &error); |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
138 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
|
139 } |
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
|
140 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
141 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
142 * audacious_remote_is_playing: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
143 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
144 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
145 * Queries audacious about whether it is playing or not. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
146 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
147 * Return value: TRUE if playing, FALSE otherwise. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
148 **/ |
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 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
|
150 gboolean is_playing = FALSE; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
151 org_atheme_audlegacy_playing(proxy, &is_playing, &error); |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
152 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
|
153 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
|
154 } |
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
|
155 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
156 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
157 * audacious_remote_is_paused: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
158 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
159 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
160 * Queries audacious about whether it is paused or not. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
161 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
162 * Return value: TRUE if playing, FALSE otherwise. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
163 **/ |
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 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
|
165 gboolean is_paused = FALSE; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
166 org_atheme_audlegacy_paused(proxy, &is_paused, &error); |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
167 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
|
168 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
|
169 } |
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
|
170 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
171 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
172 * audacious_remote_get_playlist_pos: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
173 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
174 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
175 * Queries audacious about the current playlist position. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
176 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
177 * Return value: The current playlist position. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
178 **/ |
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 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
|
180 guint pos = 0; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
181 org_atheme_audlegacy_position(proxy, &pos, &error); |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
182 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
|
183 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
|
184 } |
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
|
185 |
2762
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 * audacious_remote_set_playlist_pos: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
188 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
189 * @pos: Playlist position to jump to. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
190 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
191 * Tells audacious to jump to a different playlist position. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
192 **/ |
2767 | 193 void audacious_remote_set_playlist_pos(DBusGProxy *proxy, guint pos) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
194 org_atheme_audlegacy_jump (proxy, pos, &error); |
2785 | 195 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
|
196 } |
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
|
197 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
198 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
199 * audacious_remote_get_playlist_length: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
200 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
201 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
202 * Queries audacious about the current playlist length. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
203 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
204 * Return value: The amount of entries in the playlist. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
205 **/ |
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 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
|
207 gint len = 0; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
208 org_atheme_audlegacy_length(proxy, &len, &error); |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
209 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
|
210 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
|
211 } |
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
|
212 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
213 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
214 * audacious_remote_playlist_clear: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
215 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
216 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
217 * Clears the playlist. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
218 **/ |
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
|
219 void audacious_remote_playlist_clear(DBusGProxy *proxy) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
220 org_atheme_audlegacy_clear(proxy, &error); |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
221 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
|
222 } |
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
|
223 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
224 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
225 * audacious_remote_get_output_time: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
226 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
227 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
228 * Queries audacious about the current output position. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
229 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
230 * Return value: The current output position. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
231 **/ |
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 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
|
233 guint time = 0; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
234 org_atheme_audlegacy_time(proxy, &time, &error); |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
235 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
|
236 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
|
237 } |
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
|
238 |
2762
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 * audacious_remote_jump_to_time: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
241 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
242 * @pos: The time (in milliseconds) to jump to. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
243 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
244 * Tells audacious to seek to a new time position. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
245 **/ |
2767 | 246 void audacious_remote_jump_to_time(DBusGProxy *proxy, guint pos) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
247 org_atheme_audlegacy_seek (proxy, pos, &error); |
2785 | 248 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
|
249 } |
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 |
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 /** |
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 * 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
|
253 * @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
|
254 * @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
|
255 * @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
|
256 * |
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
|
257 * 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
|
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 void audacious_remote_get_volume(DBusGProxy *proxy, gint * vl, gint * vr) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
260 org_atheme_audlegacy_volume(proxy, vl, vr, &error); |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
261 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
|
262 } |
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 /** |
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 * 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
|
266 * @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
|
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 * 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
|
269 * |
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 * 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
|
271 **/ |
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 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
|
273 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
|
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 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
|
276 |
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
|
277 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
|
278 } |
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
|
279 |
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
|
280 /** |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
281 * audacious_remote_get_balance: |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
282 * @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
|
283 * |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
284 * 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
|
285 * |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
286 * 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
|
287 **/ |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
288 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
|
289 gint balance = 50; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
290 org_atheme_audlegacy_balance(proxy, &balance, &error); |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
291 g_clear_error(&error); |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
292 return balance; |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
293 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
294 |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
295 /** |
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
|
296 * 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
|
297 * @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
|
298 * @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
|
299 * @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
|
300 * |
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
|
301 * 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
|
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 void audacious_remote_set_volume(DBusGProxy *proxy, gint vl, gint vr) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
304 org_atheme_audlegacy_set_volume(proxy, vl, vr, &error); |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
305 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
|
306 } |
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 |
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 |
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 * 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
|
311 * @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
|
312 * @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
|
313 * |
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 * 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
|
315 **/ |
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 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
|
317 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
|
318 |
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 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
|
320 |
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 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
|
322 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
|
323 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
|
324 } 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
|
325 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
|
326 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
|
327 } 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
|
328 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
|
329 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
|
330 } |
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
|
331 |
2762
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 * audacious_remote_set_balance: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
334 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
335 * @b: The balance to set. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
336 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
337 * Sets the balance in Audacious. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
338 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
339 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
|
340 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
|
341 |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
342 if (b < -100) |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
343 b = -100; |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
344 if (b > 100) |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
345 b = 100; |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
346 |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
347 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
|
348 |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
349 if (b < 0) { |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
350 vl = v; |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
351 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
|
352 } else if (b > 0) { |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
353 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
|
354 vr = v; |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
355 } else |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
356 vl = vr = v; |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
357 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
|
358 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
359 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
360 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
361 * audacious_remote_get_playlist_file: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
362 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
363 * @pos: The playlist position to query for. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
364 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
365 * Queries Audacious about a playlist entry's file. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
366 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
367 * 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
|
368 **/ |
2767 | 369 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
|
370 gchar *out = NULL; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
371 org_atheme_audlegacy_song_filename(proxy, pos, &out, &error); |
2735
ccf3e141fb1e
[svn] - finish some stubs to make audtool work for my scripts
nenolod
parents:
2733
diff
changeset
|
372 g_clear_error(&error); |
ccf3e141fb1e
[svn] - finish some stubs to make audtool work for my scripts
nenolod
parents:
2733
diff
changeset
|
373 return out; |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
374 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
375 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
376 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
377 * audacious_remote_get_playlist_title: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
378 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
379 * @pos: The playlist position to query for. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
380 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
381 * Queries Audacious about a playlist entry's title. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
382 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
383 * 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
|
384 **/ |
2767 | 385 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
|
386 gchar *out = NULL; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
387 org_atheme_audlegacy_song_title(proxy, pos, &out, &error); |
2735
ccf3e141fb1e
[svn] - finish some stubs to make audtool work for my scripts
nenolod
parents:
2733
diff
changeset
|
388 g_clear_error(&error); |
ccf3e141fb1e
[svn] - finish some stubs to make audtool work for my scripts
nenolod
parents:
2733
diff
changeset
|
389 return out; |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
390 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
391 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
392 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
393 * audacious_remote_get_playlist_time: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
394 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
395 * @pos: The playlist position to query for. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
396 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
397 * Queries Audacious about a playlist entry's length. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
398 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
399 * 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
|
400 **/ |
2767 | 401 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
|
402 gint out = 0; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
403 org_atheme_audlegacy_song_frames(proxy, pos, &out, &error); |
2735
ccf3e141fb1e
[svn] - finish some stubs to make audtool work for my scripts
nenolod
parents:
2733
diff
changeset
|
404 g_clear_error(&error); |
ccf3e141fb1e
[svn] - finish some stubs to make audtool work for my scripts
nenolod
parents:
2733
diff
changeset
|
405 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
|
406 } |
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
|
407 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
408 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
409 * audacious_remote_get_info: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
410 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
411 * @rate: Pointer to an integer containing the bitrate. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
412 * @freq: Pointer to an integer containing the frequency. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
413 * @nch: Pointer to an integer containing the number of channels. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
414 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
415 * Queries Audacious about the current audio format. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
416 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
417 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
|
418 gint *nch) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
419 org_atheme_audlegacy_info(proxy, rate, freq, nch, &error); |
2785 | 420 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
|
421 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
422 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
423 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
424 * audacious_remote_main_win_toggle: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
425 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
426 * @show: Whether or not to show the main window. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
427 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
428 * Toggles the main window's visibility. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
429 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
430 void audacious_remote_main_win_toggle(DBusGProxy *proxy, gboolean show) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
431 org_atheme_audlegacy_show_main_win(proxy, show, &error); |
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
|
432 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
|
433 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
434 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
435 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
436 * audacious_remote_pl_win_toggle: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
437 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
438 * @show: Whether or not to show the playlist window. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
439 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
440 * Toggles the playlist window's visibility. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
441 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
442 void audacious_remote_pl_win_toggle(DBusGProxy *proxy, gboolean show) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
443 org_atheme_audlegacy_show_playlist(proxy, show, &error); |
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
|
444 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
|
445 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
446 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
447 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
448 * audacious_remote_eq_win_toggle: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
449 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
450 * @show: Whether or not to show the equalizer window. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
451 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
452 * Toggles the equalizer window's visibility. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
453 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
454 void audacious_remote_eq_win_toggle(DBusGProxy *proxy, gboolean show) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
455 org_atheme_audlegacy_show_equalizer(proxy, show, &error); |
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
|
456 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
|
457 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
458 |
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
|
459 /** |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
460 * audacious_remote_is_main_win: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
461 * @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
|
462 * |
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
|
463 * 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
|
464 * |
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
|
465 * 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
|
466 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
467 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
|
468 gboolean visible = TRUE; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
469 org_atheme_audlegacy_main_win_visible(proxy, &visible, &error); |
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
|
470 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
|
471 return visible; |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
472 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
473 |
2762
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 * audacious_remote_is_pl_win: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
476 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
477 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
478 * Queries Audacious about the playlist window's visibility. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
479 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
480 * Return value: TRUE if visible, FALSE otherwise. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
481 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
482 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
|
483 gboolean visible = TRUE; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
484 org_atheme_audlegacy_playlist_visible(proxy, &visible, &error); |
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 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
|
486 return visible; |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
487 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
488 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
489 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
490 * audacious_remote_is_eq_win: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
491 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
492 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
493 * Queries Audacious about the equalizer window's visibility. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
494 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
495 * Return value: TRUE if visible, FALSE otherwise. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
496 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
497 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
|
498 gboolean visible = FALSE; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
499 org_atheme_audlegacy_equalizer_visible(proxy, &visible, &error); |
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
|
500 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
|
501 return visible; |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
502 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
503 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
504 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
505 * audacious_remote_show_prefs_box: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
506 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
507 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
508 * Tells audacious to show the preferences pane. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
509 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
510 void audacious_remote_show_prefs_box(DBusGProxy *proxy) { |
3917 | 511 audacious_remote_toggle_prefs_box(proxy, TRUE); |
512 } | |
513 | |
514 /** | |
515 * audacious_remote_toggle_prefs_box: | |
516 * @proxy: DBus proxy for audacious | |
517 * @show: shows/hides | |
518 * | |
519 * Tells audacious to show/hide the preferences pane. | |
520 **/ | |
521 void audacious_remote_toggle_prefs_box(DBusGProxy *proxy, gboolean show) { | |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
522 org_atheme_audlegacy_show_prefs_box(proxy, show, &error); |
3867
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
523 g_clear_error(&error); |
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
524 } |
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
525 |
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
526 /** |
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
527 * 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
|
528 * @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
|
529 * |
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
530 * 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
|
531 **/ |
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
532 void audacious_remote_show_about_box(DBusGProxy *proxy) { |
3917 | 533 audacious_remote_toggle_about_box(proxy, TRUE); |
534 } | |
535 | |
536 /** | |
537 * audacious_remote_toggle_about_box: | |
538 * @proxy: DBus proxy for audacious | |
539 * @show: shows/hides | |
540 * | |
541 * Tells audacious to show/hide the about box. | |
542 **/ | |
543 void audacious_remote_toggle_about_box(DBusGProxy *proxy, gboolean show) { | |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
544 org_atheme_audlegacy_show_about_box(proxy, show, &error); |
3867
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
545 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
|
546 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
547 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
548 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
549 * audacious_remote_toggle_aot: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
550 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
551 * @ontop: Whether or not Audacious should be always-on-top. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
552 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
553 * Tells audacious to toggle the always-on-top feature. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
554 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
555 void audacious_remote_toggle_aot(DBusGProxy *proxy, gboolean ontop) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
556 org_atheme_audlegacy_toggle_aot(proxy, ontop, &error); |
3867
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
557 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
|
558 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
559 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
560 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
561 * audacious_remote_eject: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
562 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
563 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
564 * Tells audacious to display the open files pane. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
565 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
566 void audacious_remote_eject(DBusGProxy *proxy) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
567 org_atheme_audlegacy_eject(proxy, &error); |
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 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
|
569 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
570 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
571 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
572 * audacious_remote_playlist_prev: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
573 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
574 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
575 * Tells audacious to move backwards in the playlist. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
576 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
577 void audacious_remote_playlist_prev(DBusGProxy *proxy) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
578 org_atheme_audlegacy_reverse(proxy, &error); |
2785 | 579 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
|
580 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
581 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
582 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
583 * audacious_remote_playlist_next: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
584 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
585 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
586 * Tells audacious to move forward in the playlist. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
587 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
588 void audacious_remote_playlist_next(DBusGProxy *proxy) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
589 org_atheme_audlegacy_advance(proxy, &error); |
2785 | 590 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
|
591 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
592 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
593 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
594 * audacious_remote_playlist_add_url_string: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
595 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
596 * @string: The URI to add. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
597 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
598 * Tells audacious to add an URI to the playlist. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
599 **/ |
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
|
600 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
|
601 gchar *string) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
602 org_atheme_audlegacy_add_url(proxy, string, &error); |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
603 g_clear_error(&error); |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
604 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
605 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
606 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
607 * audacious_remote_is_running: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
608 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
609 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
610 * Checks to see if an Audacious server is running. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
611 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
612 * Return value: TRUE if yes, otherwise FALSE. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
613 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
614 gboolean audacious_remote_is_running(DBusGProxy *proxy) { |
2785 | 615 char *string = NULL; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
616 org_atheme_audlegacy_version(proxy, &string, &error); |
2785 | 617 g_clear_error(&error); |
618 if(string) { | |
619 g_free(string); | |
620 return TRUE; | |
621 } | |
622 else | |
623 return FALSE; | |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
624 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
625 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
626 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
627 * audacious_remote_toggle_repeat: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
628 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
629 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
630 * Tells audacious to toggle the repeat feature. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
631 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
632 void audacious_remote_toggle_repeat(DBusGProxy *proxy) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
633 org_atheme_audlegacy_toggle_repeat(proxy, &error); |
2785 | 634 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
|
635 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
636 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
637 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
638 * audacious_remote_toggle_shuffle: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
639 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
640 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
641 * Tells audacious to toggle the shuffle feature. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
642 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
643 void audacious_remote_toggle_shuffle(DBusGProxy *proxy) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
644 org_atheme_audlegacy_toggle_shuffle (proxy, &error); |
2785 | 645 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
|
646 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
647 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
648 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
649 * audacious_remote_is_repeat: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
650 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
651 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
652 * 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
|
653 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
654 * Return value: TRUE if yes, otherwise FALSE. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
655 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
656 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
|
657 gboolean is_repeat; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
658 org_atheme_audlegacy_repeat(proxy, &is_repeat, &error); |
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
|
659 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
|
660 return is_repeat; |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
661 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
662 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
663 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
664 * audacious_remote_is_shuffle: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
665 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
666 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
667 * 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
|
668 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
669 * Return value: TRUE if yes, otherwise FALSE. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
670 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
671 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
|
672 gboolean is_shuffle; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
673 org_atheme_audlegacy_shuffle(proxy, &is_shuffle, &error); |
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
|
674 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
|
675 return is_shuffle; |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
676 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
677 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
678 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
679 * audacious_remote_get_eq: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
680 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
681 * @preamp: Pointer to value for preamp setting. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
682 * @bands: Pointer to array of band settings. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
683 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
684 * Queries audacious about the equalizer settings. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
685 **/ |
3915
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
686 void audacious_remote_get_eq(DBusGProxy *proxy, gdouble *preamp, GArray **bands) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
687 org_atheme_audlegacy_get_eq(proxy, preamp, bands, &error); |
3915
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
688 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
|
689 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
690 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
691 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
692 * audacious_remote_get_eq_preamp: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
693 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
694 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
695 * Queries audacious about the equalizer preamp's setting. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
696 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
697 * Return value: The equalizer preamp's setting. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
698 **/ |
3915
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
699 gdouble audacious_remote_get_eq_preamp(DBusGProxy *proxy) { |
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
700 gdouble preamp = 0.0; |
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
701 |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
702 org_atheme_audlegacy_get_eq_preamp(proxy, &preamp, &error); |
3915
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
703 g_clear_error(&error); |
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
704 |
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
705 return preamp; |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
706 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
707 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
708 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
709 * audacious_remote_get_eq_band: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
710 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
711 * @band: Which band to lookup the value for. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
712 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
713 * Queries audacious about an equalizer band's value. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
714 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
715 * Return value: The equalizer band's value. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
716 **/ |
3915
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
717 gdouble audacious_remote_get_eq_band(DBusGProxy *proxy, gint band) { |
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
718 gdouble value = 0.0; |
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
719 |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
720 org_atheme_audlegacy_get_eq_band(proxy, band, &value, &error); |
3915
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
721 g_clear_error(&error); |
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
722 |
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
723 return value; |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
724 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
725 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
726 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
727 * audacious_remote_set_eq: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
728 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
729 * @preamp: Value for preamp setting. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
730 * @bands: Array of band settings. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
731 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
732 * 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
|
733 **/ |
3915
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
734 void audacious_remote_set_eq(DBusGProxy *proxy, gdouble preamp, GArray *bands) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
735 org_atheme_audlegacy_set_eq(proxy, preamp, bands, &error); |
3915
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
736 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
|
737 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
738 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
739 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
740 * audacious_remote_set_eq_preamp: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
741 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
742 * @preamp: Value for preamp setting. |
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 * Tells audacious to set the equalizer's preamp setting. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
745 **/ |
3915
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
746 void audacious_remote_set_eq_preamp(DBusGProxy *proxy, gdouble preamp) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
747 org_atheme_audlegacy_set_eq_preamp(proxy, preamp, &error); |
3915
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
748 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
|
749 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
750 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
751 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
752 * audacious_remote_set_eq_band: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
753 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
754 * @band: The band to set the value for. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
755 * @value: The value to set that band to. |
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 * Tells audacious to set an equalizer band's setting. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
758 **/ |
3915
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
759 void audacious_remote_set_eq_band(DBusGProxy *proxy, gint band, gdouble value) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
760 org_atheme_audlegacy_set_eq_band(proxy, band, value, &error); |
3915
86c9abc83fbd
audacious remote functions:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3901
diff
changeset
|
761 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
|
762 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
763 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
764 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
765 * audacious_remote_quit: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
766 * @proxy: DBus proxy for audacious |
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 * Tells audacious to quit. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
769 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
770 void audacious_remote_quit(DBusGProxy *proxy) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
771 org_atheme_audlegacy_quit(proxy, &error); |
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
|
772 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
|
773 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
774 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
775 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
776 * audacious_remote_play_pause: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
777 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
778 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
779 * Tells audacious to either play or pause. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
780 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
781 void audacious_remote_play_pause(DBusGProxy *proxy) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
782 org_atheme_audlegacy_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
|
783 } |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
784 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
785 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
786 * audacious_remote_playlist_ins_url_string: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
787 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
788 * @string: The URI to add. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
789 * @pos: The position to add the URI at. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
790 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
791 * 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
|
792 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
793 void audacious_remote_playlist_ins_url_string(DBusGProxy *proxy, |
2767 | 794 gchar *string, guint pos) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
795 org_atheme_audlegacy_playlist_ins_url_string (proxy, string, pos, &error); |
3867
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
796 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
|
797 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
798 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
799 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
800 * audacious_remote_playqueue_add: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
801 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
802 * @pos: The playlist position to add to the queue. |
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 * Tells audacious to add a playlist entry to the playqueue. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
805 **/ |
2767 | 806 void audacious_remote_playqueue_add(DBusGProxy *proxy, guint pos) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
807 org_atheme_audlegacy_playqueue_add (proxy, pos, &error); |
3867
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
808 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
|
809 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
810 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
811 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
812 * audacious_remote_playqueue_remove: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
813 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
814 * @pos: The playlist position to remove from the queue. |
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 * Tells audacious to remove a playlist entry from the playqueue. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
817 **/ |
2767 | 818 void audacious_remote_playqueue_remove(DBusGProxy *proxy, guint pos) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
819 org_atheme_audlegacy_playqueue_remove (proxy, pos, &error); |
3867
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
820 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
|
821 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
822 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
823 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
824 * audacious_remote_get_playqueue_length: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
825 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
826 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
827 * Queries audacious about the playqueue's length. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
828 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
829 * Return value: The number of entries in the playqueue. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
830 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
831 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
|
832 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
|
833 // this returns the lenght of the playlist, NOT the length of the playqueue |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
834 org_atheme_audlegacy_length(proxy, &len, &error); |
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
|
835 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
|
836 return len; |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
837 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
838 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
839 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
840 * audacious_remote_toggle_advance: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
841 * @proxy: DBus proxy for audacious |
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 * Tells audacious to toggle the no-playlist-advance feature. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
844 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
845 void audacious_remote_toggle_advance(DBusGProxy *proxy) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
846 org_atheme_audlegacy_toggle_auto_advance(proxy, &error); |
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
|
847 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
|
848 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
849 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
850 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
851 * audacious_remote_is_advance: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
852 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
853 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
854 * 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
|
855 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
856 * Return value: TRUE if yes, otherwise FALSE. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
857 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
858 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
|
859 gboolean is_advance = FALSE; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
860 org_atheme_audlegacy_auto_advance(proxy, &is_advance, &error); |
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
|
861 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
|
862 return is_advance; |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
863 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
864 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
865 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
866 * audacious_remote_activate: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
867 * @proxy: DBus proxy for audacious |
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 * 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
|
870 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
871 void audacious_remote_activate(DBusGProxy *proxy) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
872 org_atheme_audlegacy_activate(proxy, &error); |
3867
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
873 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
|
874 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
875 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
876 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
877 * audacious_remote_show_jtf_box: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
878 * @proxy: DBus proxy for audacious |
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 * Tells audacious to show the Jump-to-File pane. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
881 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
882 void audacious_remote_show_jtf_box(DBusGProxy *proxy) { |
3917 | 883 audacious_remote_toggle_jtf_box(proxy, TRUE); |
884 } | |
885 | |
886 /** | |
887 * audacious_remote_toggle_jtf_box: | |
888 * @proxy: DBus proxy for audacious | |
889 * @show: shows/hides jtf pane | |
890 * | |
891 * Tells audacious to show/hide the Jump-to-File pane. | |
892 **/ | |
893 void audacious_remote_toggle_jtf_box(DBusGProxy *proxy, gboolean show) { | |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
894 org_atheme_audlegacy_show_jtf_box(proxy, show, &error); |
3917 | 895 g_clear_error(&error); |
896 } | |
897 | |
898 /** | |
899 * audacious_remote_toggle_filebrowser: | |
900 * @proxy: DBus proxy for audacious | |
901 * @show: shows/hides filebrowser | |
902 * | |
903 * Tells audacious to show the filebrowser dialog. | |
904 **/ | |
905 void audacious_remote_toggle_filebrowser(DBusGProxy *proxy, gboolean show) { | |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
906 org_atheme_audlegacy_show_filebrowser(proxy, show, &error); |
3867
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
907 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
|
908 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
909 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
910 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
911 * audacious_remote_playqueue_clear: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
912 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
913 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
914 * Tells audacious to clear the playqueue. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
915 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
916 void audacious_remote_playqueue_clear(DBusGProxy *proxy) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
917 org_atheme_audlegacy_playqueue_clear(proxy, &error); |
3867
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); |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
919 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
920 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
921 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
922 * audacious_remote_playqueue_is_queued: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
923 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
924 * @pos: Position to check queue for. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
925 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
926 * 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
|
927 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
928 * Return value: TRUE if yes, FALSE otherwise. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
929 **/ |
2767 | 930 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
|
931 gboolean is_queued; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
932 org_atheme_audlegacy_playqueue_is_queued (proxy, pos, &is_queued, &error); |
3867
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
933 g_clear_error(&error); |
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
934 return is_queued; |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
935 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
936 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
937 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
938 * audacious_remote_get_playqueue_queue_position: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
939 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
940 * @pos: Position to check queue for. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
941 * |
3867
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
942 * 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
|
943 * |
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
944 * 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
|
945 **/ |
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
946 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
|
947 guint qpos = 0; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
948 org_atheme_audlegacy_queue_get_queue_pos (proxy, pos, &qpos, &error); |
3867
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
949 g_clear_error(&error); |
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
950 return qpos; |
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
951 } |
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
952 |
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
953 /** |
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
954 * 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
|
955 * @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
|
956 * @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
|
957 * |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
958 * 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
|
959 * |
3867
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
960 * Return value: the playlist position for a playqueue entry |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
961 **/ |
3867
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
962 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
|
963 guint pos = 0; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
964 org_atheme_audlegacy_queue_get_list_pos (proxy, qpos, &pos, &error); |
3867
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
965 g_clear_error(&error); |
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
966 return pos; |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
967 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
968 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
969 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
970 * audacious_remote_playlist_enqueue_to_temp: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
971 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
972 * @string: The URI to enqueue to a temporary playlist. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
973 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
974 * Tells audacious to add an URI to a temporary playlist. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
975 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
976 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
|
977 gchar *string) { |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
978 org_atheme_audlegacy_playlist_enqueue_to_temp(proxy, string, &error); |
3867
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
979 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
|
980 } |
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
981 |
2762
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
982 /** |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
983 * audacious_get_tuple_field_data: |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
984 * @proxy: DBus proxy for audacious |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
985 * @field: The name of the tuple field to retrieve. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
986 * @pos: The playlist position to query for. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
987 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
988 * Queries Audacious about a playlist entry's tuple information. |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
989 * |
c89362b15525
[svn] Added lots of comments (styled after beepctrl).
magma
parents:
2738
diff
changeset
|
990 * 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
|
991 **/ |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
992 gchar *audacious_get_tuple_field_data(DBusGProxy *proxy, gchar *field, |
2767 | 993 guint pos) { |
3901 | 994 GValue value = {}; |
3900
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
995 gchar *s = NULL; |
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
996 |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
997 org_atheme_audlegacy_song_tuple(proxy, pos, field, &value, &error); |
3900
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
998 |
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
999 g_clear_error(&error); |
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
1000 |
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
1001 if (G_IS_VALUE(&value) == FALSE) |
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
1002 return NULL; |
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
1003 |
4600
e5119c001bb4
Don't escape strings in audacious_get_tuple_field_data(), because we are
Matti Hamalainen <ccr@tnsp.org>
parents:
3917
diff
changeset
|
1004 /* I think the original "purpose" of using g_strescape() here |
e5119c001bb4
Don't escape strings in audacious_get_tuple_field_data(), because we are
Matti Hamalainen <ccr@tnsp.org>
parents:
3917
diff
changeset
|
1005 * has probably been to escape only \n, \t, \r, etc. but the function |
e5119c001bb4
Don't escape strings in audacious_get_tuple_field_data(), because we are
Matti Hamalainen <ccr@tnsp.org>
parents:
3917
diff
changeset
|
1006 * actually escapes all non-ASCII characters. Which is bad, since we |
e5119c001bb4
Don't escape strings in audacious_get_tuple_field_data(), because we are
Matti Hamalainen <ccr@tnsp.org>
parents:
3917
diff
changeset
|
1007 * are using UTF-8. -- ccr |
e5119c001bb4
Don't escape strings in audacious_get_tuple_field_data(), because we are
Matti Hamalainen <ccr@tnsp.org>
parents:
3917
diff
changeset
|
1008 */ |
3900
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
1009 if (G_VALUE_HOLDS_STRING(&value)) |
4600
e5119c001bb4
Don't escape strings in audacious_get_tuple_field_data(), because we are
Matti Hamalainen <ccr@tnsp.org>
parents:
3917
diff
changeset
|
1010 //s = g_strescape(g_value_get_string(&value), NULL); |
e5119c001bb4
Don't escape strings in audacious_get_tuple_field_data(), because we are
Matti Hamalainen <ccr@tnsp.org>
parents:
3917
diff
changeset
|
1011 s = g_strdup(g_value_get_string(&value)); |
3900
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
1012 else if (g_value_type_transformable(G_VALUE_TYPE(&value), G_TYPE_STRING)) |
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
1013 { |
3901 | 1014 GValue tmp_value = { 0, }; |
3900
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
1015 |
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
1016 g_value_init(&tmp_value, G_TYPE_STRING); |
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
1017 g_value_transform(&value, &tmp_value); |
4600
e5119c001bb4
Don't escape strings in audacious_get_tuple_field_data(), because we are
Matti Hamalainen <ccr@tnsp.org>
parents:
3917
diff
changeset
|
1018 |
e5119c001bb4
Don't escape strings in audacious_get_tuple_field_data(), because we are
Matti Hamalainen <ccr@tnsp.org>
parents:
3917
diff
changeset
|
1019 //s = g_strescape(g_value_get_string(&tmp_value), NULL); |
e5119c001bb4
Don't escape strings in audacious_get_tuple_field_data(), because we are
Matti Hamalainen <ccr@tnsp.org>
parents:
3917
diff
changeset
|
1020 s = g_strdup(g_value_get_string(&tmp_value)); |
3900
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
1021 |
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
1022 g_value_unset(&tmp_value); |
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
1023 } |
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
1024 else |
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
1025 s = g_strdup("<unknown type>"); |
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
1026 |
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
1027 g_value_unset(&value); |
44ab3d6057da
implement audacious_get_tuple_field_data().
William Pitcock <nenolod@atheme.org>
parents:
3873
diff
changeset
|
1028 return s; |
2731
f4a5f8fa3836
[svn] Added stubs in audctrl.c for the unimplemented functions defined in audctrl.h.
magma
parents:
2713
diff
changeset
|
1029 } |
3867
e48f2f4c116d
- many remained audacious remote functions have been implemented.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3121
diff
changeset
|
1030 |
3917 | 1031 /** |
1032 * audacious_remote_eq_activate: | |
1033 * @proxy: DBus proxy for audacious | |
1034 * @active: Whether or not to activate the equalizer. | |
1035 * | |
1036 * Toggles the equalizer. | |
1037 **/ | |
1038 void audacious_remote_eq_activate(DBusGProxy *proxy, gboolean active) { | |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
1039 org_atheme_audlegacy_equalizer_activate (proxy, active, &error); |
3917 | 1040 g_clear_error(&error); |
1041 } | |
4610
c9b0da38d07d
Add a new dbus / remote interface function for getting available "standard" Tuple field names.
Matti Hamalainen <ccr@tnsp.org>
parents:
4600
diff
changeset
|
1042 |
c9b0da38d07d
Add a new dbus / remote interface function for getting available "standard" Tuple field names.
Matti Hamalainen <ccr@tnsp.org>
parents:
4600
diff
changeset
|
1043 /** |
c9b0da38d07d
Add a new dbus / remote interface function for getting available "standard" Tuple field names.
Matti Hamalainen <ccr@tnsp.org>
parents:
4600
diff
changeset
|
1044 * audacious_remote_get_tuple_fields: |
c9b0da38d07d
Add a new dbus / remote interface function for getting available "standard" Tuple field names.
Matti Hamalainen <ccr@tnsp.org>
parents:
4600
diff
changeset
|
1045 * @proxy: DBus proxy for audacious |
c9b0da38d07d
Add a new dbus / remote interface function for getting available "standard" Tuple field names.
Matti Hamalainen <ccr@tnsp.org>
parents:
4600
diff
changeset
|
1046 * |
c9b0da38d07d
Add a new dbus / remote interface function for getting available "standard" Tuple field names.
Matti Hamalainen <ccr@tnsp.org>
parents:
4600
diff
changeset
|
1047 * Returns a array of strings with available tuple field names. |
c9b0da38d07d
Add a new dbus / remote interface function for getting available "standard" Tuple field names.
Matti Hamalainen <ccr@tnsp.org>
parents:
4600
diff
changeset
|
1048 * |
c9b0da38d07d
Add a new dbus / remote interface function for getting available "standard" Tuple field names.
Matti Hamalainen <ccr@tnsp.org>
parents:
4600
diff
changeset
|
1049 * Return value: Array of strings. |
c9b0da38d07d
Add a new dbus / remote interface function for getting available "standard" Tuple field names.
Matti Hamalainen <ccr@tnsp.org>
parents:
4600
diff
changeset
|
1050 **/ |
c9b0da38d07d
Add a new dbus / remote interface function for getting available "standard" Tuple field names.
Matti Hamalainen <ccr@tnsp.org>
parents:
4600
diff
changeset
|
1051 gchar **audacious_remote_get_tuple_fields(DBusGProxy *proxy) { |
c9b0da38d07d
Add a new dbus / remote interface function for getting available "standard" Tuple field names.
Matti Hamalainen <ccr@tnsp.org>
parents:
4600
diff
changeset
|
1052 gchar **res = NULL; |
4834
38b491487bd8
renamed dbus symbol to audlegacy
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4811
diff
changeset
|
1053 org_atheme_audlegacy_get_tuple_fields (proxy, &res, &error); |
4610
c9b0da38d07d
Add a new dbus / remote interface function for getting available "standard" Tuple field names.
Matti Hamalainen <ccr@tnsp.org>
parents:
4600
diff
changeset
|
1054 g_clear_error(&error); |
c9b0da38d07d
Add a new dbus / remote interface function for getting available "standard" Tuple field names.
Matti Hamalainen <ccr@tnsp.org>
parents:
4600
diff
changeset
|
1055 return res; |
c9b0da38d07d
Add a new dbus / remote interface function for getting available "standard" Tuple field names.
Matti Hamalainen <ccr@tnsp.org>
parents:
4600
diff
changeset
|
1056 } |