Mercurial > audlegacy
annotate src/audacious/dbus.c @ 2771:4585019eb82e trunk
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
-Added stubs for the MPRIS /Player signals
-Added stubs for the MPRIS /TrackList methods (implemented AddTrack)
-Modified build system to be more ignorant of DBus support
author | magma |
---|---|
date | Tue, 15 May 2007 21:53:37 -0700 |
parents | bf2d80abf76e |
children | 182aa34ae6c4 |
rev | line source |
---|---|
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
1 /* |
2696
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
2 * Audacious: A cross-platform multimedia player |
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
3 * Copyright (c) 2007 Ben Tucker |
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
4 * |
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
5 * This program is free software; you can redistribute it and/or modify |
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
6 * it under the terms of the GNU General Public License as published by |
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
7 * the Free Software Foundation; under version 2 of the License. |
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
8 * |
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
9 * This program is distributed in the hope that it will be useful, |
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
12 * GNU General Public License for more details. |
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
13 * |
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
14 * You should have received a copy of the GNU General Public License |
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
15 * along with this program; if not, write to the Free Software |
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
17 * 02110-1301, USA. |
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
18 */ |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
19 |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
20 #ifdef HAVE_CONFIG_H |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
21 # include "config.h" |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
22 #endif |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
23 |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
24 #include <glib.h> |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
25 #include <dbus/dbus-glib-bindings.h> |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
26 #include "dbus.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:
2706
diff
changeset
|
27 #include "dbus-service.h" |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
28 #include "dbus-server-bindings.h" |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
29 |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
30 #include "main.h" |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
31 #include "ui_equalizer.h" |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
32 #include "ui_main.h" |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
33 #include "input.h" |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
34 #include "playback.h" |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
35 #include "playlist.h" |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
36 #include "ui_playlist.h" |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
37 #include "ui_preferences.h" |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
38 #include "memorypool.h" |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
39 #include "titlestring.h" |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
40 #include "ui_jumptotrack.h" |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
41 |
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:
2766
diff
changeset
|
42 static DBusGConnection *dbus_conn = NULL; |
2771
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
43 static guint signals[LAST_SIG] = { 0 }; |
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:
2766
diff
changeset
|
44 |
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:
2728
diff
changeset
|
45 G_DEFINE_TYPE(RemoteObject, audacious_rc, G_TYPE_OBJECT); |
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:
2766
diff
changeset
|
46 G_DEFINE_TYPE(MprisRoot, mpris_root, G_TYPE_OBJECT); |
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:
2766
diff
changeset
|
47 G_DEFINE_TYPE(MprisPlayer, mpris_player, G_TYPE_OBJECT); |
2771
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
48 G_DEFINE_TYPE(MprisTrackList, mpris_tracklist, G_TYPE_OBJECT); |
2711
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
49 |
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:
2728
diff
changeset
|
50 void audacious_rc_class_init(RemoteObjectClass *klass) {} |
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:
2766
diff
changeset
|
51 void mpris_root_class_init(MprisRootClass *klass) {} |
2771
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
52 |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
53 void mpris_player_class_init(MprisPlayerClass *klass) { |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
54 signals[CAPS_CHANGE_SIG] = |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
55 g_signal_new("caps_change", |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
56 G_OBJECT_CLASS_TYPE(klass), |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
57 G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
58 0, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
59 NULL, NULL, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
60 g_cclosure_marshal_VOID__STRING, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
61 G_TYPE_NONE, 1, G_TYPE_STRING); |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
62 signals[TRACK_CHANGE_SIG] = |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
63 g_signal_new("track_change", |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
64 G_OBJECT_CLASS_TYPE(klass), |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
65 G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
66 0, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
67 NULL, NULL, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
68 g_cclosure_marshal_VOID__STRING, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
69 G_TYPE_NONE, 1, G_TYPE_STRING); |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
70 signals[STATUS_CHANGE_SIG] = |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
71 g_signal_new("status_change", |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
72 G_OBJECT_CLASS_TYPE(klass), |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
73 G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
74 0, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
75 NULL, NULL, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
76 g_cclosure_marshal_VOID__STRING, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
77 G_TYPE_NONE, 1, G_TYPE_STRING); |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
78 } |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
79 |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
80 void mpris_tracklist_class_init(MprisTrackListClass *klass) {} |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
81 |
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:
2728
diff
changeset
|
82 void audacious_rc_init(RemoteObject *object) { |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
83 GError *error = NULL; |
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:
2728
diff
changeset
|
84 DBusGProxy *driver_proxy; |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
85 unsigned int request_ret; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
86 |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
87 |
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:
2728
diff
changeset
|
88 dbus_g_object_type_install_info(audacious_rc_get_type(), |
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:
2728
diff
changeset
|
89 &dbus_glib_audacious_rc_object_info); |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
90 |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
91 // Register DBUS path |
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:
2766
diff
changeset
|
92 dbus_g_connection_register_g_object(dbus_conn, |
2711
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
93 AUDACIOUS_DBUS_PATH, G_OBJECT(object)); |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
94 |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
95 // Register the service name, the constants here are defined in |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
96 // dbus-glib-bindings.h |
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:
2766
diff
changeset
|
97 driver_proxy = dbus_g_proxy_new_for_name(dbus_conn, |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
98 DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
99 DBUS_INTERFACE_DBUS); |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
100 |
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:
2728
diff
changeset
|
101 if (!org_freedesktop_DBus_request_name(driver_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:
2706
diff
changeset
|
102 AUDACIOUS_DBUS_SERVICE, 0, &request_ret, &error)) { |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
103 g_warning("Unable to register service: %s", error->message); |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
104 g_error_free(error); |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
105 } |
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:
2728
diff
changeset
|
106 |
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:
2766
diff
changeset
|
107 if (!org_freedesktop_DBus_request_name(driver_proxy, |
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:
2766
diff
changeset
|
108 AUDACIOUS_DBUS_SERVICE_MPRIS, 0, &request_ret, &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:
2766
diff
changeset
|
109 g_warning("Unable to register service: %s", error->message); |
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:
2766
diff
changeset
|
110 g_error_free(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:
2766
diff
changeset
|
111 } |
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:
2766
diff
changeset
|
112 |
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:
2728
diff
changeset
|
113 g_object_unref(driver_proxy); |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
114 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
115 |
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:
2766
diff
changeset
|
116 void mpris_root_init(MprisRoot *object) { |
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:
2766
diff
changeset
|
117 dbus_g_object_type_install_info(mpris_root_get_type(), |
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:
2766
diff
changeset
|
118 &dbus_glib_mpris_root_object_info); |
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:
2766
diff
changeset
|
119 |
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:
2766
diff
changeset
|
120 // Register DBUS path |
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:
2766
diff
changeset
|
121 dbus_g_connection_register_g_object(dbus_conn, |
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:
2766
diff
changeset
|
122 AUDACIOUS_DBUS_PATH_MPRIS_ROOT, |
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:
2766
diff
changeset
|
123 G_OBJECT(object)); |
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:
2766
diff
changeset
|
124 } |
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:
2766
diff
changeset
|
125 |
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:
2766
diff
changeset
|
126 void mpris_player_init(MprisPlayer *object) { |
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:
2766
diff
changeset
|
127 dbus_g_object_type_install_info(mpris_player_get_type(), |
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:
2766
diff
changeset
|
128 &dbus_glib_mpris_player_object_info); |
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:
2766
diff
changeset
|
129 |
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:
2766
diff
changeset
|
130 // Register DBUS path |
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:
2766
diff
changeset
|
131 dbus_g_connection_register_g_object(dbus_conn, |
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:
2766
diff
changeset
|
132 AUDACIOUS_DBUS_PATH_MPRIS_PLAYER, |
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:
2766
diff
changeset
|
133 G_OBJECT(object)); |
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:
2766
diff
changeset
|
134 } |
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:
2766
diff
changeset
|
135 |
2771
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
136 void mpris_tracklist_init(MprisTrackList *object) { |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
137 dbus_g_object_type_install_info(mpris_tracklist_get_type(), |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
138 &dbus_glib_mpris_tracklist_object_info); |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
139 |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
140 // Register DBUS path |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
141 dbus_g_connection_register_g_object(dbus_conn, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
142 AUDACIOUS_DBUS_PATH_MPRIS_TRACKLIST, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
143 G_OBJECT(object)); |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
144 } |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
145 |
2700
2d1837805ca4
[svn] Improved DBus initialization and fixed a warning.
magma
parents:
2696
diff
changeset
|
146 void init_dbus() { |
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:
2766
diff
changeset
|
147 GError *error = NULL; |
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:
2766
diff
changeset
|
148 // Initialize the DBus connection |
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:
2766
diff
changeset
|
149 dbus_conn = dbus_g_bus_get(DBUS_BUS_SESSION, &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:
2766
diff
changeset
|
150 if (dbus_conn == NULL) { |
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:
2766
diff
changeset
|
151 g_warning("Unable to connect to dbus: %s", error->message); |
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:
2766
diff
changeset
|
152 g_error_free(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:
2766
diff
changeset
|
153 return; |
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:
2766
diff
changeset
|
154 } |
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:
2766
diff
changeset
|
155 |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
156 g_type_init(); |
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:
2728
diff
changeset
|
157 g_object_new(audacious_rc_get_type(), NULL); |
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:
2766
diff
changeset
|
158 g_object_new(mpris_root_get_type(), NULL); |
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:
2766
diff
changeset
|
159 g_object_new(mpris_player_get_type(), NULL); |
2771
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
160 g_object_new(mpris_tracklist_get_type(), NULL); |
2728
452a159dc619
[svn] - log when dbus has been successfully started up
nenolod
parents:
2717
diff
changeset
|
161 g_message("D-Bus support has been activated"); |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
162 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
163 |
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:
2766
diff
changeset
|
164 /////////////////////////// |
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:
2766
diff
changeset
|
165 // MPRIS defined methods // |
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:
2766
diff
changeset
|
166 /////////////////////////// |
2771
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
167 // MPRIS / |
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:
2766
diff
changeset
|
168 gboolean mpris_root_identity(MprisRoot *obj, gchar **identity, |
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:
2766
diff
changeset
|
169 GError **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:
2766
diff
changeset
|
170 *identity = g_strdup_printf("Audacious %s", VERSION); |
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:
2766
diff
changeset
|
171 return TRUE; |
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:
2766
diff
changeset
|
172 } |
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:
2766
diff
changeset
|
173 |
2771
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
174 // MPRIS /Player |
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:
2766
diff
changeset
|
175 gboolean mpris_player_next(MprisPlayer *obj, GError **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:
2766
diff
changeset
|
176 return audacious_rc_advance(obj, 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:
2766
diff
changeset
|
177 } |
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:
2766
diff
changeset
|
178 gboolean mpris_player_prev(MprisPlayer *obj, GError **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:
2766
diff
changeset
|
179 return audacious_rc_reverse(obj, 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:
2766
diff
changeset
|
180 } |
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:
2766
diff
changeset
|
181 gboolean mpris_player_pause(MprisPlayer *obj, GError **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:
2766
diff
changeset
|
182 return audacious_rc_pause(obj, 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:
2766
diff
changeset
|
183 } |
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:
2766
diff
changeset
|
184 gboolean mpris_player_stop(MprisPlayer *obj, GError **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:
2766
diff
changeset
|
185 return audacious_rc_stop(obj, 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:
2766
diff
changeset
|
186 } |
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:
2766
diff
changeset
|
187 gboolean mpris_player_play(MprisPlayer *obj, GError **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:
2766
diff
changeset
|
188 return audacious_rc_play(obj, 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:
2766
diff
changeset
|
189 } |
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:
2766
diff
changeset
|
190 gboolean mpris_player_quit(MprisPlayer *obj, GError **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:
2766
diff
changeset
|
191 return audacious_rc_quit(obj, 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:
2766
diff
changeset
|
192 } |
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:
2766
diff
changeset
|
193 gboolean mpris_player_repeat(MprisPlayer *obj, gboolean rpt, GError **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:
2766
diff
changeset
|
194 mainwin_repeat_pushed(rpt); |
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:
2766
diff
changeset
|
195 mainwin_set_noplaylistadvance(rpt); |
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:
2766
diff
changeset
|
196 return TRUE; |
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:
2766
diff
changeset
|
197 } |
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:
2766
diff
changeset
|
198 gboolean mpris_player_get_status(MprisPlayer *obj, gint *status, |
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:
2766
diff
changeset
|
199 GError **error) { |
2771
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
200 return FALSE; |
2769
bf2d80abf76e
[svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents:
2766
diff
changeset
|
201 } |
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:
2766
diff
changeset
|
202 gboolean mpris_player_get_caps(MprisPlayer *obj, gint *capabilities, |
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:
2766
diff
changeset
|
203 GError **error) { |
2771
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
204 return FALSE; |
2769
bf2d80abf76e
[svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents:
2766
diff
changeset
|
205 } |
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:
2766
diff
changeset
|
206 gboolean mpris_player_volume_set(MprisPlayer *obj, gint vol, GError **error) { |
2771
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
207 return FALSE; |
2769
bf2d80abf76e
[svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents:
2766
diff
changeset
|
208 } |
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:
2766
diff
changeset
|
209 gboolean mpris_player_volume_get(MprisPlayer *obj, gint *vol, |
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:
2766
diff
changeset
|
210 GError **error) { |
2771
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
211 return FALSE; |
2769
bf2d80abf76e
[svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents:
2766
diff
changeset
|
212 } |
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:
2766
diff
changeset
|
213 gboolean mpris_player_position_set(MprisPlayer *obj, gint pos, |
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:
2766
diff
changeset
|
214 GError **error) { |
2771
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
215 return FALSE; |
2769
bf2d80abf76e
[svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents:
2766
diff
changeset
|
216 } |
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:
2766
diff
changeset
|
217 gboolean mpris_player_position_get(MprisPlayer *obj, gint *pos, |
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:
2766
diff
changeset
|
218 GError **error) { |
2771
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
219 return FALSE; |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
220 } |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
221 // MPRIS /Player signals |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
222 gboolean mpris_player_emit_caps_change(MprisPlayer *obj, GError **error) { |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
223 g_signal_emit(obj, signals[CAPS_CHANGE_SIG], 0, "capabilities changed"); |
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:
2766
diff
changeset
|
224 return TRUE; |
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:
2766
diff
changeset
|
225 } |
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:
2766
diff
changeset
|
226 |
2771
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
227 gboolean mpris_player_emit_track_change(MprisPlayer *obj, GError **error) { |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
228 g_signal_emit(obj, signals[TRACK_CHANGE_SIG], 0, "track changed"); |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
229 return TRUE; |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
230 } |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
231 |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
232 gboolean mpris_player_emit_status_change(MprisPlayer *obj, GError **error) { |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
233 g_signal_emit(obj, signals[STATUS_CHANGE_SIG], 0, "status changed"); |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
234 return TRUE; |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
235 } |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
236 |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
237 // MPRIS /TrackList |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
238 gboolean mpris_tracklist_get_metadata(MprisTrackList *obj, gint pos, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
239 GHashTable *metadata, GError **error) { |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
240 return FALSE; |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
241 } |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
242 gboolean mpris_tracklist_get_current_track(MprisTrackList *obj, gint *pos, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
243 GError **error) { |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
244 return audacious_rc_position(obj, pos, error); |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
245 } |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
246 gboolean mpris_tracklist_get_length(MprisTrackList *obj, gint *pos, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
247 GError **error) { |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
248 return FALSE; |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
249 } |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
250 gboolean mpris_tracklist_add_track(MprisTrackList *obj, gchar *uri, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
251 gboolean play, GError **error) { |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
252 playlist_add_url(playlist_get_active(), uri); |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
253 if (play) { |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
254 int pos = playlist_get_length(playlist_get_active()) - 1; |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
255 playlist_set_position(playlist_get_active(), pos); |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
256 playback_initiate(); |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
257 } |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
258 return TRUE; |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
259 } |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
260 gboolean mpris_tracklist_del_track(MprisTrackList *obj, gint pos, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
261 GError **error) { |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
262 return FALSE; |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
263 } |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
264 gboolean mpris_tracklist_loop(MprisTrackList *obj, gboolean loop, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
265 GError **error) { |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
266 return FALSE; |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
267 } |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
268 gboolean mpris_tracklist_random(MprisTrackList *obj, gboolean random, |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
269 GError **error) { |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
270 return FALSE; |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
271 } |
4585019eb82e
[svn] -Renamed MPRIS /TrackList Shuffle method to Random
magma
parents:
2769
diff
changeset
|
272 |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
273 // Audacious General Information |
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:
2728
diff
changeset
|
274 gboolean audacious_rc_version(RemoteObject *obj, gchar **version, |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
275 GError **error) { |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
276 *version = g_strdup(VERSION); |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
277 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
278 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
279 |
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:
2728
diff
changeset
|
280 gboolean audacious_rc_quit(RemoteObject *obj, GError **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:
2728
diff
changeset
|
281 mainwin_quit_cb(); |
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:
2728
diff
changeset
|
282 return TRUE; |
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:
2728
diff
changeset
|
283 } |
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:
2728
diff
changeset
|
284 |
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:
2728
diff
changeset
|
285 gboolean audacious_rc_eject(RemoteObject *obj, GError **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:
2728
diff
changeset
|
286 if (has_x11_connection) |
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:
2728
diff
changeset
|
287 mainwin_eject_pushed(); |
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:
2728
diff
changeset
|
288 return TRUE; |
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:
2728
diff
changeset
|
289 } |
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:
2728
diff
changeset
|
290 |
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:
2728
diff
changeset
|
291 gboolean audacious_rc_main_win_visible(RemoteObject *obj, |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
292 gboolean *is_main_win, GError **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:
2728
diff
changeset
|
293 *is_main_win = cfg.player_visible; |
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:
2728
diff
changeset
|
294 g_message("main win %s\n", (cfg.player_visible? "visible" : "hidden")); |
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:
2728
diff
changeset
|
295 return TRUE; |
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:
2728
diff
changeset
|
296 } |
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:
2728
diff
changeset
|
297 |
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:
2728
diff
changeset
|
298 gboolean audacious_rc_show_main_win(RemoteObject *obj, gboolean show, |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
299 GError **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:
2728
diff
changeset
|
300 g_message("%s main win\n", (show? "showing": "hiding")); |
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:
2728
diff
changeset
|
301 if (has_x11_connection) |
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:
2728
diff
changeset
|
302 mainwin_show(show); |
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:
2728
diff
changeset
|
303 return TRUE; |
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:
2728
diff
changeset
|
304 } |
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:
2728
diff
changeset
|
305 |
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:
2728
diff
changeset
|
306 gboolean audacious_rc_equalizer_visible(RemoteObject *obj, |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
307 gboolean *is_eq_win, GError **error) { |
2741 | 308 *is_eq_win = cfg.equalizer_visible; |
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:
2728
diff
changeset
|
309 return TRUE; |
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:
2728
diff
changeset
|
310 } |
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:
2728
diff
changeset
|
311 |
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:
2728
diff
changeset
|
312 gboolean audacious_rc_show_equalizer(RemoteObject *obj, gboolean show, |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
313 GError **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:
2728
diff
changeset
|
314 if (has_x11_connection) |
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:
2728
diff
changeset
|
315 equalizerwin_show(show); |
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:
2728
diff
changeset
|
316 return TRUE; |
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:
2728
diff
changeset
|
317 } |
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:
2728
diff
changeset
|
318 |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
319 gboolean audacious_rc_playlist_visible(RemoteObject *obj, gboolean *is_pl_win, |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
320 GError **error) { |
2741 | 321 *is_pl_win = cfg.playlist_visible; |
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:
2728
diff
changeset
|
322 return TRUE; |
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:
2728
diff
changeset
|
323 } |
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:
2728
diff
changeset
|
324 |
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:
2728
diff
changeset
|
325 gboolean audacious_rc_show_playlist(RemoteObject *obj, gboolean show, |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
326 GError **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:
2728
diff
changeset
|
327 if (has_x11_connection) { |
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:
2728
diff
changeset
|
328 if (show) |
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:
2728
diff
changeset
|
329 playlistwin_show(); |
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:
2728
diff
changeset
|
330 else |
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:
2728
diff
changeset
|
331 playlistwin_hide(); |
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:
2728
diff
changeset
|
332 } |
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:
2728
diff
changeset
|
333 return TRUE; |
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:
2728
diff
changeset
|
334 } |
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:
2728
diff
changeset
|
335 |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
336 // Playback Information/Manipulation |
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:
2728
diff
changeset
|
337 gboolean audacious_rc_play(RemoteObject *obj, GError **error) { |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
338 if (playback_get_paused()) |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
339 playback_pause(); |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
340 else if (playlist_get_length(playlist_get_active())) |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
341 playback_initiate(); |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
342 else |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
343 mainwin_eject_pushed(); |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
344 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
345 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
346 |
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:
2728
diff
changeset
|
347 gboolean audacious_rc_pause(RemoteObject *obj, GError **error) { |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
348 playback_pause(); |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
349 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
350 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
351 |
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:
2728
diff
changeset
|
352 gboolean audacious_rc_stop(RemoteObject *obj, GError **error) { |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
353 ip_data.stop = TRUE; |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
354 playback_stop(); |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
355 ip_data.stop = FALSE; |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
356 mainwin_clear_song_info(); |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
357 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
358 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
359 |
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:
2728
diff
changeset
|
360 gboolean audacious_rc_playing(RemoteObject *obj, gboolean *is_playing, |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
361 GError **error) { |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
362 *is_playing = playback_get_playing(); |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
363 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
364 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
365 |
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:
2728
diff
changeset
|
366 gboolean audacious_rc_paused(RemoteObject *obj, gboolean *is_paused, |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
367 GError **error) { |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
368 *is_paused = playback_get_paused(); |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
369 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
370 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
371 |
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:
2728
diff
changeset
|
372 gboolean audacious_rc_stopped(RemoteObject *obj, gboolean *is_stopped, |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
373 GError **error) { |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
374 *is_stopped = !playback_get_playing(); |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
375 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
376 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
377 |
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:
2728
diff
changeset
|
378 gboolean audacious_rc_status(RemoteObject *obj, gchar **status, |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
379 GError **error) { |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
380 if (playback_get_paused()) |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
381 *status = g_strdup("paused"); |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
382 else if (playback_get_playing()) |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
383 *status = g_strdup("playing"); |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
384 else |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
385 *status = g_strdup("stopped"); |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
386 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
387 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
388 |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
389 gboolean audacious_rc_info(RemoteObject *obj, gint *rate, gint *freq, |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
390 gint *nch, GError **error) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
391 playback_get_sample_params(rate, freq, nch); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
392 return TRUE; |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
393 } |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
394 |
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:
2728
diff
changeset
|
395 gboolean audacious_rc_time(RemoteObject *obj, gint *time, GError **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:
2706
diff
changeset
|
396 if (playback_get_playing()) |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
397 *time = playback_get_time(); |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
398 else |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
399 *time = 0; |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
400 return TRUE; |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
401 } |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
402 |
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:
2728
diff
changeset
|
403 gboolean audacious_rc_seek(RemoteObject *obj, guint pos, GError **error) { |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
404 if (playlist_get_current_length(playlist_get_active()) > 0 && |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
405 pos < (guint)playlist_get_current_length(playlist_get_active())) |
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
406 playback_seek(pos / 1000); |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
407 |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
408 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
409 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
410 |
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:
2728
diff
changeset
|
411 gboolean audacious_rc_volume(RemoteObject *obj, gint *vl, gint *vr, |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
412 GError **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:
2706
diff
changeset
|
413 input_get_volume(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:
2706
diff
changeset
|
414 return TRUE; |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
415 } |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
416 |
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:
2728
diff
changeset
|
417 gboolean audacious_rc_set_volume(RemoteObject *obj, gint vl, gint vr, |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
418 GError **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:
2706
diff
changeset
|
419 if (vl > 100) |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
420 vl = 100; |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
421 if (vr > 100) |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
422 vr = 100; |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
423 input_set_volume(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:
2706
diff
changeset
|
424 return TRUE; |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
425 } |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
426 |
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:
2728
diff
changeset
|
427 gboolean audacious_rc_balance(RemoteObject *obj, gint *balance, |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
428 GError **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:
2706
diff
changeset
|
429 gint 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:
2706
diff
changeset
|
430 input_get_volume(&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:
2706
diff
changeset
|
431 if (vl < 0 || vr < 0) |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
432 *balance = 0; |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
433 else if (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:
2706
diff
changeset
|
434 *balance = -100 + ((vr * 100) / vl); |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
435 else if (vr > vl) |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
436 *balance = 100 - ((vl * 100) / vr); |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
437 else |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
438 *balance = 0; |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
439 return TRUE; |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
440 } |
c35913222440
[svn] Initial commit of dbus client library for plugins. Various changes were made to the plugin structure to support dbus.
magma
parents:
2706
diff
changeset
|
441 |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
442 // Playlist Information/Manipulation |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
443 gboolean audacious_rc_position(RemoteObject *obj, int *pos, GError **error) { |
2706
958d12f78138
[svn] Completed the implementation of all the stubs in dbus.c, and commented the creation of the mpris dbus bindings to fix compilation issues.
magma
parents:
2702
diff
changeset
|
444 *pos = playlist_get_position(playlist_get_active()); |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
445 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
446 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
447 |
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:
2728
diff
changeset
|
448 gboolean audacious_rc_advance(RemoteObject *obj, GError **error) { |
2696
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
449 playlist_next(playlist_get_active()); |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
450 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
451 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
452 |
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:
2728
diff
changeset
|
453 gboolean audacious_rc_reverse(RemoteObject *obj, GError **error) { |
2696
c00850315ce1
[svn] Fixed licensing issues and DBus node/interface names. Also implemented playlist advance and reverse.
magma
parents:
2695
diff
changeset
|
454 playlist_prev(playlist_get_active()); |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
455 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
456 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
457 |
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:
2728
diff
changeset
|
458 gboolean audacious_rc_length(RemoteObject *obj, int *length, |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
459 GError **error) { |
2706
958d12f78138
[svn] Completed the implementation of all the stubs in dbus.c, and commented the creation of the mpris dbus bindings to fix compilation issues.
magma
parents:
2702
diff
changeset
|
460 *length = playlist_get_length(playlist_get_active()); |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
461 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
462 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
463 |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
464 gboolean audacious_rc_song_title(RemoteObject *obj, guint pos, |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
465 gchar **title, GError **error) { |
2706
958d12f78138
[svn] Completed the implementation of all the stubs in dbus.c, and commented the creation of the mpris dbus bindings to fix compilation issues.
magma
parents:
2702
diff
changeset
|
466 *title = playlist_get_songtitle(playlist_get_active(), pos); |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
467 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
468 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
469 |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
470 gboolean audacious_rc_song_filename(RemoteObject *obj, guint pos, |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
471 gchar **filename, GError **error) { |
2706
958d12f78138
[svn] Completed the implementation of all the stubs in dbus.c, and commented the creation of the mpris dbus bindings to fix compilation issues.
magma
parents:
2702
diff
changeset
|
472 *filename = playlist_get_filename(playlist_get_active(), pos); |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
473 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
474 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
475 |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
476 gboolean audacious_rc_song_length(RemoteObject *obj, guint pos, int *length, |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
477 GError **error) { |
2706
958d12f78138
[svn] Completed the implementation of all the stubs in dbus.c, and commented the creation of the mpris dbus bindings to fix compilation issues.
magma
parents:
2702
diff
changeset
|
478 *length = playlist_get_songtime(playlist_get_active(), pos) / 1000; |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
479 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
480 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
481 |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
482 gboolean audacious_rc_song_frames(RemoteObject *obj, guint pos, int *length, |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
483 GError **error) { |
2706
958d12f78138
[svn] Completed the implementation of all the stubs in dbus.c, and commented the creation of the mpris dbus bindings to fix compilation issues.
magma
parents:
2702
diff
changeset
|
484 *length = playlist_get_songtime(playlist_get_active(), pos); |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
485 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
486 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
487 |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
488 gboolean audacious_rc_song_tuple(RemoteObject *obj, guint pos, gchar *field, |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
489 GValue *value, GError **error) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
490 TitleInput *tuple; |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
491 tuple = playlist_get_tuple(playlist_get_active(), pos); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
492 if (!tuple) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
493 return FALSE; |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
494 } else { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
495 if (!strcasecmp(field, "performer")) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
496 g_value_init(value, G_TYPE_STRING); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
497 g_value_set_string(value, tuple->performer); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
498 } else if (!strcasecmp(field, "album_name")) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
499 g_value_init(value, G_TYPE_STRING); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
500 g_value_set_string(value, tuple->album_name); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
501 } else if (!strcasecmp(field, "track_name")) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
502 g_value_init(value, G_TYPE_STRING); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
503 g_value_set_string(value, tuple->track_name); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
504 } else if (!strcasecmp(field, "track_number")) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
505 g_value_init(value, G_TYPE_INT); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
506 g_value_set_int(value, tuple->track_number); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
507 } else if (!strcasecmp(field, "year")) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
508 g_value_init(value, G_TYPE_INT); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
509 g_value_set_int(value, tuple->year); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
510 } else if (!strcasecmp(field, "date")) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
511 g_value_init(value, G_TYPE_STRING); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
512 g_value_set_string(value, tuple->date); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
513 } else if (!strcasecmp(field, "genre")) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
514 g_value_init(value, G_TYPE_STRING); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
515 g_value_set_string(value, tuple->genre); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
516 } else if (!strcasecmp(field, "comment")) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
517 g_value_init(value, G_TYPE_STRING); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
518 g_value_set_string(value, tuple->comment); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
519 } else if (!strcasecmp(field, "file_name")) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
520 g_value_init(value, G_TYPE_STRING); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
521 g_value_set_string(value, tuple->file_name); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
522 } else if (!strcasecmp(field, "file_ext")) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
523 g_value_init(value, G_TYPE_STRING); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
524 g_value_set_string(value, g_strdup(tuple->file_ext)); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
525 } else if (!strcasecmp(field, "file_path")) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
526 g_value_init(value, G_TYPE_STRING); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
527 g_value_set_string(value, tuple->file_path); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
528 } else if (!strcasecmp(field, "length")) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
529 g_value_init(value, G_TYPE_INT); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
530 g_value_set_int(value, tuple->length); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
531 } else if (!strcasecmp(field, "album_name")) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
532 g_value_init(value, G_TYPE_STRING); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
533 g_value_set_string(value, tuple->album_name); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
534 } else if (!strcasecmp(field, "formatter")) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
535 g_value_init(value, G_TYPE_STRING); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
536 g_value_set_string(value, tuple->formatter); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
537 } else if (!strcasecmp(field, "custom")) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
538 g_value_init(value, G_TYPE_STRING); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
539 g_value_set_string(value, tuple->custom); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
540 } else if (!strcasecmp(field, "mtime")) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
541 g_value_init(value, G_TYPE_INT); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
542 g_value_set_int(value, tuple->mtime); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
543 } |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
544 } |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
545 return TRUE; |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
546 } |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
547 |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
548 gboolean audacious_rc_jump(RemoteObject *obj, guint pos, GError **error) { |
2706
958d12f78138
[svn] Completed the implementation of all the stubs in dbus.c, and commented the creation of the mpris dbus bindings to fix compilation issues.
magma
parents:
2702
diff
changeset
|
549 if (pos < (guint)playlist_get_length(playlist_get_active())) |
958d12f78138
[svn] Completed the implementation of all the stubs in dbus.c, and commented the creation of the mpris dbus bindings to fix compilation issues.
magma
parents:
2702
diff
changeset
|
550 playlist_set_position(playlist_get_active(), pos); |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
551 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
552 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
553 |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
554 gboolean audacious_rc_add(RemoteObject *obj, gchar *file, GError **error) { |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
555 playlist_add_url(playlist_get_active(), file); |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
556 return TRUE; |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
557 } |
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
558 gboolean audacious_rc_add_url(RemoteObject *obj, gchar *url, GError **error) { |
2706
958d12f78138
[svn] Completed the implementation of all the stubs in dbus.c, and commented the creation of the mpris dbus bindings to fix compilation issues.
magma
parents:
2702
diff
changeset
|
559 playlist_add_url(playlist_get_active(), url); |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
560 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
561 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
562 |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
563 gboolean audacious_rc_delete(RemoteObject *obj, guint pos, GError **error) { |
2706
958d12f78138
[svn] Completed the implementation of all the stubs in dbus.c, and commented the creation of the mpris dbus bindings to fix compilation issues.
magma
parents:
2702
diff
changeset
|
564 playlist_delete_index(playlist_get_active(), pos); |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
565 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
566 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
567 |
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:
2728
diff
changeset
|
568 gboolean audacious_rc_clear(RemoteObject *obj, GError **error) { |
2706
958d12f78138
[svn] Completed the implementation of all the stubs in dbus.c, and commented the creation of the mpris dbus bindings to fix compilation issues.
magma
parents:
2702
diff
changeset
|
569 playlist_clear(playlist_get_active()); |
958d12f78138
[svn] Completed the implementation of all the stubs in dbus.c, and commented the creation of the mpris dbus bindings to fix compilation issues.
magma
parents:
2702
diff
changeset
|
570 mainwin_clear_song_info(); |
958d12f78138
[svn] Completed the implementation of all the stubs in dbus.c, and commented the creation of the mpris dbus bindings to fix compilation issues.
magma
parents:
2702
diff
changeset
|
571 mainwin_set_info_text(); |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
572 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
573 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
574 |
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:
2766
diff
changeset
|
575 gboolean audacious_rc_auto_advance(RemoteObject *obj, gboolean *is_advance, |
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:
2766
diff
changeset
|
576 GError **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:
2766
diff
changeset
|
577 *is_advance = cfg.no_playlist_advance; |
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:
2766
diff
changeset
|
578 return TRUE; |
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:
2766
diff
changeset
|
579 } |
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:
2766
diff
changeset
|
580 |
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:
2766
diff
changeset
|
581 gboolean audacious_rc_toggle_auto_advance(RemoteObject *obj, GError **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:
2766
diff
changeset
|
582 cfg.no_playlist_advance = !cfg.no_playlist_advance; |
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:
2766
diff
changeset
|
583 return TRUE; |
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:
2766
diff
changeset
|
584 } |
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:
2766
diff
changeset
|
585 |
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:
2766
diff
changeset
|
586 gboolean audacious_rc_repeat(RemoteObject *obj, gboolean *is_repeating, |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
587 GError **error) { |
2706
958d12f78138
[svn] Completed the implementation of all the stubs in dbus.c, and commented the creation of the mpris dbus bindings to fix compilation issues.
magma
parents:
2702
diff
changeset
|
588 *is_repeating = cfg.repeat; |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
589 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
590 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
591 |
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:
2766
diff
changeset
|
592 gboolean audacious_rc_toggle_repeat(RemoteObject *obj, GError **error) { |
2706
958d12f78138
[svn] Completed the implementation of all the stubs in dbus.c, and commented the creation of the mpris dbus bindings to fix compilation issues.
magma
parents:
2702
diff
changeset
|
593 mainwin_repeat_pushed(!cfg.repeat); |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
594 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
595 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
596 |
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:
2766
diff
changeset
|
597 gboolean audacious_rc_shuffle(RemoteObject *obj, gboolean *is_shuffling, |
2766
ea20b1e92411
[svn] Added CMD_GET_INFO and CMD_PLAYLIST_GET_TUPLE_DATA replacements; Changed some formatting and used unsigned numbers where appropriate.
magma
parents:
2741
diff
changeset
|
598 GError **error) { |
2706
958d12f78138
[svn] Completed the implementation of all the stubs in dbus.c, and commented the creation of the mpris dbus bindings to fix compilation issues.
magma
parents:
2702
diff
changeset
|
599 *is_shuffling = cfg.shuffle; |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
600 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
601 } |
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
602 |
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:
2766
diff
changeset
|
603 gboolean audacious_rc_toggle_shuffle(RemoteObject *obj, GError **error) { |
2706
958d12f78138
[svn] Completed the implementation of all the stubs in dbus.c, and commented the creation of the mpris dbus bindings to fix compilation issues.
magma
parents:
2702
diff
changeset
|
604 mainwin_shuffle_pushed(!cfg.shuffle); |
2695
4c4c8b294287
[svn] Fixed formatting. Tabs + tw=2 ==> spaces + tw=4.
magma
parents:
2694
diff
changeset
|
605 return TRUE; |
2694
c2b82432c1b6
[svn] Added basic DBus support, disabled by default with a configuration option to enable it. The general and playback information/manipulation methods are currently the only ones implemented. That is version, play, pause, stop, playing, paused, stopped, status, and seek. There are stubs for many unimplemented methods.
magma
parents:
diff
changeset
|
606 } |