1 diff --git a/herrie/src/dbus.c b/herrie/src/dbus.c
2 index 640cd6b..b5c63c5 100644
3 --- a/herrie/src/dbus.c
4 +++ b/herrie/src/dbus.c
5 @@ -74,6 +74,7 @@ typedef struct {
8 static DBusServer *ds = NULL;
9 +extern GString *str_song;
12 * @brief DBus bus name used by this application.
13 @@ -176,6 +177,20 @@ dbus_server_volume_up(DBusServer *self, GError **error)
18 + * @brief DBus event to retrieve the currently playing song.
21 +dbus_server_get_song(DBusServer *self, gchar **song, GError **error)
24 + /* It is the caller's responsibility to free this. */
25 + *song = g_strdup(str_song->str);
31 #include <dbus_binding.h>
34 diff --git a/herrie/src/dbus.xml b/herrie/src/dbus.xml
35 index 139e6b5..71f2272 100644
36 --- a/herrie/src/dbus.xml
37 +++ b/herrie/src/dbus.xml
40 <method name="volumeDown"/>
41 <method name="volumeUp"/>
42 + <method name="getSong">
43 + <arg type="s" name="song" direction="out"/>
47 diff --git a/herrie/src/gui_playq.c b/herrie/src/gui_playq.c
48 index 4f1a43c..4c6ed84 100644
49 --- a/herrie/src/gui_playq.c
50 +++ b/herrie/src/gui_playq.c
51 @@ -51,7 +51,7 @@ static const char *str_status = NULL;
52 * @brief Buffer containing a string representation of the artist and
53 * title of the current song.
55 -static GString *str_song;
58 * @brief Window object of the status bar at the top of the screen.