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

bool mpd_search_add_tag_constraint ( struct mpd_connection connection,
enum mpd_operator  oper,
enum mpd_tag_type  type,
const char *  value 

Add a constraint to a search limiting the value of a tag.

connection a mpd_connection
oper reserved, pass MPD_OPERATOR_DEFAULT
type The tag type of the constraint
value The value of the constraint
true on success, false on error

Definition at line 237 of file search.c.

References mpd_connection::error, MPD_ERROR_ARGUMENT, and mpd_search_add_tag_constraint().

Referenced by mpd_search_add_tag_constraint().

      const char *strtype;

      assert(connection != NULL);
      assert(value != NULL);

      strtype = mpd_tag_name(type);
      if (strtype == NULL) {
            mpd_error_code(&connection->error, MPD_ERROR_ARGUMENT);
                          "invalid type specified");
            return false;

      return mpd_search_add_constraint(connection, oper, strtype, value);

Generated by  Doxygen 1.6.0   Back to index