-/* Handling of messages received onn VLC_DBUS_OBJECT_PATH */
-DBUS_METHOD( handle_messages ); /* handler function */
-
-/* vtable passed to dbus_connection_register_object_path() */
-static DBusObjectPathVTable vlc_dbus_vtable = {
- NULL, /* Called when vtable is unregistered or its connection is freed*/
- handle_messages, /* handler function */
- NULL,
- NULL,
- NULL,
- NULL
+const char* psz_introspection_xml_data_tracklist =
+"<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"\n"
+"\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n"
+"<node>"
+" <interface name=\"org.freedesktop.DBus.Introspectable\">\n"
+" <method name=\"Introspect\">\n"
+" <arg name=\"data\" direction=\"out\" type=\"s\"/>\n"
+" </method>\n"
+" </interface>\n"
+" <interface name=\"org.freedesktop.MediaPlayer\">\n"
+" <method name=\"AddTrack\">\n"
+" <arg type=\"s\" direction=\"in\" />\n"
+" <arg type=\"b\" direction=\"in\" />\n"
+" <arg type=\"i\" direction=\"out\" />\n"
+" </method>\n"
+" <method name=\"DelTrack\">\n"
+" <arg type=\"i\" direction=\"in\" />\n"
+" </method>\n"
+" <method name=\"GetMetadata\">\n"
+" <arg type=\"i\" direction=\"in\" />\n"
+" <arg type=\"a{sv}\" direction=\"out\" />\n"
+" </method>\n"
+" <method name=\"GetCurrentTrack\">\n"
+" <arg type=\"i\" direction=\"out\" />\n"
+" </method>\n"
+" <method name=\"GetLength\">\n"
+" <arg type=\"i\" direction=\"out\" />\n"
+" </method>\n"
+" <method name=\"SetLoop\">\n"
+" <arg type=\"b\" direction=\"in\" />\n"
+" </method>\n"
+" <method name=\"SetRandom\">\n"
+" <arg type=\"b\" direction=\"in\" />\n"
+" </method>\n"
+" <signal name=\"TrackListChange\">\n"
+" <arg type=\"i\" />\n"
+" </signal>\n"
+" </interface>\n"
+"</node>\n"
+;
+
+
+/* Handle messages reception */
+DBUS_METHOD( handle_root );
+DBUS_METHOD( handle_player );
+DBUS_METHOD( handle_tracklist );
+
+static const DBusObjectPathVTable vlc_dbus_root_vtable = {
+ NULL, handle_root, /* handler function */
+ NULL, NULL, NULL, NULL
+};
+
+static const DBusObjectPathVTable vlc_dbus_player_vtable = {
+ NULL, handle_player, /* handler function */
+ NULL, NULL, NULL, NULL
+};
+
+static const DBusObjectPathVTable vlc_dbus_tracklist_vtable = {
+ NULL, handle_tracklist, /* handler function */
+ NULL, NULL, NULL, NULL