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

mpd_malloc struct mpd_song* mpd_song_begin ( const struct mpd_pair pair  )  [read]

Begins parsing a new song.

pair the first pair in this song (name must be "file")
the new mpd_entity object, or NULL on error (out of memory, or pair name is not "file")

Definition at line 338 of file song.c.

References mpd_song_begin(), mpd_pair::name, and mpd_pair::value.

Referenced by mpd_recv_song(), and mpd_song_begin().

      assert(pair != NULL);
      assert(pair->name != NULL);
      assert(pair->value != NULL);

      if (strcmp(pair->name, "file") != 0)
            return NULL;

      return mpd_song_new(pair->value);

Generated by  Doxygen 1.6.0   Back to index