/*
 * call-seq:
 * xc.coll_rename(old, new, [ns]) -> result
 *
 * Rename the saved collection from _old_ to _new_ within the namespace _ns_ or
 * all namespaces.
 */
static VALUE
c_coll_rename (int argc, VALUE *argv, VALUE self)
{
        VALUE old, new, ns = Qnil;
        METHOD_HANDLER_HEADER

        rb_scan_args (argc, argv, "21", &old, &new, &ns);

        if (NIL_P (ns))
                res = xmmsc_coll_rename (xmms->real,
                                         StringValuePtr (old),
                                         StringValuePtr (new),
                                         XMMS_COLLECTION_NS_ALL);
        else
                res = xmmsc_coll_rename (xmms->real,
                                         StringValuePtr (old),
                                         StringValuePtr (new),
                                         StringValuePtr (ns));

        METHOD_HANDLER_FOOTER
}