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

void mpd_enqueue_pair ( struct mpd_connection connection,
struct mpd_pair pair 
)

Unreads a mpd_pair. You may unread only the one pair you just got from mpd_recv_pair(). Unreading the "NULL" pair is allowed, to allow you to call mpd_recv_pair() again at the end of a response.

Definition at line 182 of file recv.c.

References mpd_enqueue_pair(), mpd_pair::name, mpd_connection::pair, mpd_connection::pair_state, and mpd_pair::value.

Referenced by mpd_enqueue_pair(), mpd_recv_directory(), mpd_recv_entity(), mpd_recv_output(), mpd_recv_playlist(), and mpd_recv_song().

{
      assert(connection != NULL);

      if (pair != NULL) {
            /* enqueue the pair which was returned by
               mpd_recv_pair() */
            assert(connection->pair_state == PAIR_STATE_FLOATING);
            assert(pair == &connection->pair);
            assert(pair->name != NULL && pair->value != NULL);

            connection->pair_state = PAIR_STATE_QUEUED;
      } else {
            /* enqueue the NULL pair */
            assert(connection->pair_state == PAIR_STATE_NONE);

            connection->pair_state = PAIR_STATE_NULL;
      }
}


Generated by  Doxygen 1.6.0   Back to index