/*
 * call-seq:
 * xc.coll_query_ids(coll, [order], [start], [len]) -> result
 *
 * Retrieves a list of all the ids of media matched by the collection. _order_
 * specifies a list of properties to order by or no order if omitted. _start_
 * and _len_ determine the offset at which to start retrieving ids and the
 * maximum number of ids to retrieve, respectively.
 */
static VALUE
c_coll_query_ids (int argc, VALUE *argv, VALUE self)
{
        VALUE coll, order = Qnil, start, len = Qnil;
        xmmsv_t *corder = NULL;
        METHOD_HANDLER_HEADER

        rb_scan_args (argc, argv, "13", &coll, &order, &start, &len);

        if (!NIL_P (order))
                corder = parse_string_array2 (order);

        res = xmmsc_coll_query_ids (xmms->real,
                                    FROM_XMMS_CLIENT_COLLECTION (coll),
                                    corder,
                                    NIL_P (start) ? 0 : NUM2UINT (start),
                                    NIL_P (start) ? 0 : NUM2UINT (len));

        xmmsv_unref (corder);

        METHOD_HANDLER_FOOTER
}