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

mpd_pure enum mpd_idle mpd_idle_name_parse ( const char *  name  ) 

Parses the name of an idle event.

name an idle event name
the id, or 0 if that event is not known

Definition at line 68 of file idle.c.

References mpd_idle_name_parse().

Referenced by mpd_idle_name_parse(), and mpd_idle_parse_pair().

      assert(name != NULL);

      for (unsigned i = 0; idle_names[i] != NULL; ++i)
            if (strcmp(name, idle_names[i]) == 0)
                  return 1 << i;

      return 0;

Generated by  Doxygen 1.6.0   Back to index