DBusHandlerResult handle_root ( DBusConnection *p_conn, DBusMessage *p_from, void *p_this ) { METHOD_MAPPING_BEGIN METHOD_FUNC( DBUS_INTERFACE_PROPERTIES, "Get", GetProperty ); METHOD_FUNC( DBUS_INTERFACE_PROPERTIES, "GetAll", GetAllProperties ); METHOD_FUNC( DBUS_MPRIS_ROOT_INTERFACE, "Quit", Quit ); METHOD_FUNC( DBUS_MPRIS_ROOT_INTERFACE, "Raise", Raise ); METHOD_MAPPING_END }
DBusHandlerResult handle_tracklist ( DBusConnection *p_conn, DBusMessage *p_from, void *p_this ) { if(0); METHOD_FUNC( DBUS_INTERFACE_PROPERTIES, "Get", GetProperty ); /* here D-Bus method names are associated to an handler */ METHOD_FUNC( DBUS_MPRIS_TRACKLIST_INTERFACE, "GoTo", GoTo ); METHOD_FUNC( DBUS_MPRIS_TRACKLIST_INTERFACE, "AddTrack", AddTrack ); METHOD_FUNC( DBUS_MPRIS_TRACKLIST_INTERFACE, "RemoveTrack", RemoveTrack ); METHOD_FUNC( DBUS_MPRIS_TRACKLIST_INTERFACE, "GetTracksMetadata", GetTracksMetadata ); return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; }
DBusHandlerResult handle_player ( DBusConnection *p_conn, DBusMessage *p_from, void *p_this ) { if(0); METHOD_FUNC( DBUS_INTERFACE_PROPERTIES, "Get", GetProperty ); METHOD_FUNC( DBUS_INTERFACE_PROPERTIES, "Set", SetProperty ); /* METHOD_FUNC( DBUS_INTERFACE_PROPERTIES, "GetAll", GetAllProperties );*/ /* here D-Bus method names are associated to an handler */ METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "Previous", Prev ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "Next", Next ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "Stop", Stop ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "Seek", Seek ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "Play", Play ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "Pause", Pause ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "PlayPause", PlayPause ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "OpenUri", OpenUri ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "SetPosition", SetPosition ); return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; }
DBusHandlerResult handle_player ( DBusConnection *p_conn, DBusMessage *p_from, void *p_this ) { if( dbus_message_is_method_call( p_from, DBUS_INTERFACE_INTROSPECTABLE, "Introspect" ) ) return handle_introspect_player( p_conn, p_from, p_this ); /* here D-Bus method names are associated to an handler */ METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "Prev", Prev ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "Next", Next ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "Stop", Stop ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "Play", Play ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "Pause", Pause ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "Repeat", Repeat ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "VolumeSet", VolumeSet ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "VolumeGet", VolumeGet ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "PositionSet", PositionSet ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "PositionGet", PositionGet ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "GetStatus", GetStatus ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "GetMetadata", GetCurrentMetadata ); METHOD_FUNC( DBUS_MPRIS_PLAYER_INTERFACE, "GetCaps", GetCaps ); return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; }