dbus_message_unref( p_msg ); \
return DBUS_HANDLER_RESULT_HANDLED
-#define SIGNAL_INIT( signal ) \
- DBusMessage *p_msg = dbus_message_new_signal( MPRIS_DBUS_PLAYER_PATH, \
+#define SIGNAL_INIT( path, signal ) \
+ DBusMessage *p_msg = dbus_message_new_signal( path, \
MPRIS_DBUS_INTERFACE, signal ); \
if( !p_msg ) return DBUS_HANDLER_RESULT_NEED_MEMORY; \
" <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"
"</node>\n"
;
-#define MPRIS_DBUS_ROOT_PATH "/"
-#define MPRIS_DBUS_PLAYER_PATH "/Player"
-#define MPRIS_DBUS_TRACKLIST_PATH "/TrackList"
/* Handle messages reception */
DBUS_METHOD( handle_root );
DBUS_METHOD( handle_player );
DBUS_METHOD( handle_tracklist );
-static DBusObjectPathVTable vlc_dbus_root_vtable = {
+static const DBusObjectPathVTable vlc_dbus_root_vtable = {
NULL, handle_root, /* handler function */
NULL, NULL, NULL, NULL
};
-static DBusObjectPathVTable vlc_dbus_player_vtable = {
+static const DBusObjectPathVTable vlc_dbus_player_vtable = {
NULL, handle_player, /* handler function */
NULL, NULL, NULL, NULL
};
-static DBusObjectPathVTable vlc_dbus_tracklist_vtable = {
+static const DBusObjectPathVTable vlc_dbus_tracklist_vtable = {
NULL, handle_tracklist, /* handler function */
NULL, NULL, NULL, NULL
};