static gboolean _prev (void) { if (!_ensure_connection ()) return FALSE; return ol_dbus_invoke (proxy, PREVIOUS); }
static gboolean _next (void) { if (!_ensure_connection ()) return FALSE; return ol_dbus_invoke (proxy, NEXT); }
static gboolean _prev (void) { if (!_ensure_dbus ()) return FALSE; return ol_dbus_invoke (proxy, PREV); }
static gboolean _stop (void) { if (!_ensure_dbus ()) return FALSE; return ol_dbus_invoke (proxy, STOP); }
static gboolean _pause (void) { if (!_ensure_dbus ()) return FALSE; return ol_dbus_invoke (proxy, PAUSE); }
static gboolean _play (void) { if (!_ensure_dbus ()) return FALSE; return ol_dbus_invoke (proxy, PLAY); }
static gboolean ol_player_listen_next () { ol_logf (OL_DEBUG, "%s\n", __FUNCTION__); if (connection == NULL || proxy == NULL) if (!ol_player_listen_init_dbus ()) return FALSE; return ol_dbus_invoke (proxy, next); }
static gboolean ol_player_listen_pause () { ol_logf (OL_DEBUG, "%s\n", __FUNCTION__); if (connection == NULL || proxy == NULL) if (!ol_player_listen_init_dbus ()) return FALSE; enum OlPlayerStatus status = ol_player_listen_get_status (); if (status == OL_PLAYER_ERROR) return FALSE; if (status == OL_PLAYER_PLAYING) return ol_dbus_invoke (proxy, play_pause); }
static gboolean ol_player_listen_play () { ol_logf (OL_DEBUG, "%s\n", __FUNCTION__); if (connection == NULL || proxy == NULL) if (!ol_player_listen_init_dbus ()) return FALSE; enum OlPlayerStatus status = ol_player_listen_get_status (); if (status == OL_PLAYER_ERROR) return FALSE; switch (status) { case OL_PLAYER_PLAYING: return TRUE; case OL_PLAYER_STOPPED: default: return ol_dbus_invoke (proxy, play); } }