X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fcontrol%2Fdbus.h;h=40dfde1037f465e62c30887eff8239f948df7df9;hb=be378fbc80c384e2541517d6853b59411b7e67de;hp=9b4508a86753b4f5fa4025c7186d1e2a6f72252b;hpb=6e8a32cec984300f67e861dd0afb4fdfc4b46f8d;p=vlc diff --git a/modules/control/dbus.h b/modules/control/dbus.h index 9b4508a867..40dfde1037 100644 --- a/modules/control/dbus.h +++ b/modules/control/dbus.h @@ -22,21 +22,24 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ +/* MPRIS VERSION */ +#define VLC_MPRIS_VERSION_MAJOR 1 +#define VLC_MPRIS_VERSION_MINOR 0 + /* DBUS IDENTIFIERS */ /* name registered on the session bus */ -#define VLC_DBUS_SERVICE "org.mpris.vlc" -#define VLC_DBUS_INTERFACE "org.freedesktop.MediaPlayer" -#define VLC_DBUS_ROOT_PATH "/" -#define VLC_DBUS_PLAYER_PATH "/Player" -#define VLC_DBUS_TRACKLIST_PATH "/TrackList" +#define VLC_MPRIS_DBUS_SERVICE "org.mpris.vlc" +#define MPRIS_DBUS_INTERFACE "org.freedesktop.MediaPlayer" +#define MPRIS_DBUS_ROOT_PATH "/" +#define MPRIS_DBUS_PLAYER_PATH "/Player" +#define MPRIS_DBUS_TRACKLIST_PATH "/TrackList" /* MACROS */ -/* DBus related */ #define DBUS_METHOD( method_function ) \ static DBusHandlerResult method_function \ - ( DBusConnection *p_conn, DBusMessage *p_from, void *p_this ) + ( DBusConnection *p_conn, DBusMessage *p_from, void *p_this ) #define DBUS_SIGNAL( signal_function ) \ static DBusHandlerResult signal_function \ @@ -54,8 +57,8 @@ return DBUS_HANDLER_RESULT_HANDLED #define SIGNAL_INIT( signal ) \ - DBusMessage *p_msg = dbus_message_new_signal( VLC_DBUS_PLAYER_PATH, \ - VLC_DBUS_INTERFACE, signal ); \ + DBusMessage *p_msg = dbus_message_new_signal( MPRIS_DBUS_PLAYER_PATH, \ + MPRIS_DBUS_INTERFACE, signal ); \ if( !p_msg ) return DBUS_HANDLER_RESULT_NEED_MEMORY; \ #define SIGNAL_SEND \ @@ -78,17 +81,14 @@ #define ADD_INT32( i ) DBUS_ADD( DBUS_TYPE_INT32, i ) #define ADD_BYTE( b ) DBUS_ADD( DBUS_TYPE_BYTE, b ) -/* VLC related */ -#define TEST_NEXT \ - p_tested_item = playlist_GetNextLeaf( p_playlist, \ - p_playlist->p_root_onelevel, p_tested_item, VLC_FALSE, VLC_FALSE ); - /* XML data to answer org.freedesktop.DBus.Introspectable.Introspect requests */ const char* psz_introspection_xml_data_root = "\n" -"" +"\n" +" \n" +" \n" " \n" " \n" " \n" @@ -98,6 +98,11 @@ const char* psz_introspection_xml_data_root = " \n" " \n" " \n" +" \n" +" \n" +" \n" +" \n" +" \n" " \n" "\n" ; @@ -111,11 +116,9 @@ const char* psz_introspection_xml_data_player = " \n" " \n" " \n" -" \n" +" \n" " \n" -" \n" -" \n" -" \n" +" \n" " \n" " \n" " \n" @@ -145,8 +148,18 @@ const char* psz_introspection_xml_data_player = " \n" " \n" " \n" -" \n" +" \n" +" \n" " \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" " \n" "\n" ; @@ -160,10 +173,11 @@ const char* psz_introspection_xml_data_tracklist = " \n" " \n" " \n" -" \n" +" \n" " \n" " \n" " \n" +" \n" " \n" " \n" " \n" @@ -178,19 +192,22 @@ const char* psz_introspection_xml_data_tracklist = " \n" " \n" " \n" -" \n" +" \n" " \n" " \n" -" \n" +" \n" " \n" " \n" +" \n" +" \n" +" \n" " \n" "\n" ; -#define VLC_DBUS_ROOT_PATH "/" -#define VLC_DBUS_PLAYER_PATH "/Player" -#define VLC_DBUS_TRACKLIST_PATH "/TrackList" +#define MPRIS_DBUS_ROOT_PATH "/" +#define MPRIS_DBUS_PLAYER_PATH "/Player" +#define MPRIS_DBUS_TRACKLIST_PATH "/TrackList" /* Handle messages reception */ DBUS_METHOD( handle_root );