Exemplo n.º 1
0
static gboolean
_prev (void)
{
    if (!_ensure_connection ())
        return FALSE;
    return ol_dbus_invoke (proxy, PREVIOUS);
}
Exemplo n.º 2
0
static gboolean
_next (void)
{
    if (!_ensure_connection ())
        return FALSE;
    return ol_dbus_invoke (proxy, NEXT);
}
Exemplo n.º 3
0
static gboolean
_prev (void)
{
  if (!_ensure_dbus ())
    return FALSE;
  return ol_dbus_invoke (proxy, PREV);
}
Exemplo n.º 4
0
static gboolean
_stop (void)
{
  if (!_ensure_dbus ())
    return FALSE;
  return ol_dbus_invoke (proxy, STOP);
}
Exemplo n.º 5
0
static gboolean
_pause (void)
{
  if (!_ensure_dbus ())
    return FALSE;
  return ol_dbus_invoke (proxy, PAUSE);
}
Exemplo n.º 6
0
static gboolean
_play (void)
{
  if (!_ensure_dbus ())
    return FALSE;
  return ol_dbus_invoke (proxy, PLAY);
}
Exemplo n.º 7
0
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);
}
Exemplo n.º 8
0
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);
}
Exemplo n.º 9
0
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);
  }
}