Logo Search packages:      
Sourcecode: libmpdclient version File versions  Download package

enum mpd_idle mpd_run_idle_mask ( struct mpd_connection connection,
enum mpd_idle  mask 
)

Shortcut for mpd_send_idle_mask() and mpd_recv_idle(). During mpd_recv_idle(), the configured timeout is disabled.

Parameters:
connection the connection to MPD
mask a bit mask of idle events; must not be 0
Returns:
the event bit mask, or 0 on error

Definition at line 199 of file idle.c.

References mpd_recv_idle(), mpd_response_finish(), mpd_run_idle_mask(), and mpd_send_idle_mask().

Referenced by mpd_run_idle_mask().

{
      enum mpd_idle flags;

      if (!mpd_run_check(connection) ||
          !mpd_send_idle_mask(connection, mask))
            return 0;

      flags = mpd_recv_idle(connection, true);
      if (!mpd_response_finish(connection))
            return 0;

      return flags;
}


Generated by  Doxygen 1.6.0   Back to index