/*
 * call-seq:
 *  pl.add_collection(coll [, order]) -> result
 *
 * Adds the collection _coll_ to the playlist.
 */
static VALUE
c_add_collection (int argc, VALUE *argv, VALUE self)
{
        PLAYLIST_METHOD_HANDLER_HEADER

        VALUE rbcoll, order = Qnil;
        xmmsv_t *corder = NULL;
        xmmsc_coll_t *coll;

        rb_scan_args (argc, argv, "11", &rbcoll, &order);

        coll = FROM_XMMS_CLIENT_COLLECTION (rbcoll);

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

        res = xmmsc_playlist_add_collection (xmms->real, pl->name,
                                             coll, corder);

        if (corder)
                xmmsv_unref (corder);

        PLAYLIST_METHOD_HANDLER_FOOTER
}