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

bool mpd_output_feed ( struct mpd_output output,
const struct mpd_pair pair 

Parses the pair, adding its information to the specified mpd_output object.

true if the pair was parsed and added to the output (or if the pair was not understood and ignored), false if this pair is the beginning of the next output

Definition at line 69 of file output.c.

References mpd_output::enabled, mpd_output_feed(), mpd_output::name, mpd_pair::name, and mpd_pair::value.

Referenced by mpd_output_feed(), and mpd_recv_output().

      if (strcmp(pair->name, "outputid") == 0)
            return false;

      if (strcmp(pair->name, "outputname") == 0) {
            if (output->name != NULL)

            output->name = strdup(pair->value);
      } else if (strcmp(pair->name, "outputenabled") == 0)
            output->enabled = atoi(pair->value) != 0;

      return true;

Generated by  Doxygen 1.6.0   Back to index