calIcalProperty::SetParameter(const nsACString &param, const nsACString &value)
calIcalProperty::SetParameter(PRUint32 kind, const nsACString &value)
calIcalProperty::SetParameter(const nsACString &param, const nsACString &value){    icalparameter_kind paramkind =         icalparameter_string_to_kind(PromiseFlatCString(param).get());    if (paramkind == ICAL_NO_PARAMETER)        return NS_ERROR_INVALID_ARG;    // Because libical's support for manipulating parameters is weak, and    // X-PARAMETERS doubly so, we walk the list looking for an existing one of    // that name, and reset its value if found.    if (paramkind == ICAL_X_PARAMETER) {        icalparameter *icalparam = FindXParameter(mProperty, param);        if (icalparam) {            icalparameter_set_xvalue(icalparam,                                     PromiseFlatCString(value).get());            return NS_OK;        }        // If not found, fall through to adding a new parameter below.    } else {        // We could try getting an existing parameter here and resetting its        // value, but this is easier and I don't care that much about parameter        // performance at this point.        RemoveParameter(param);    }    icalparameter *icalparam =         icalparameter_new_from_value_string(paramkind,                                            PromiseFlatCString(value).get());    if (!icalparam)        return NS_ERROR_OUT_OF_MEMORY;    // You might ask me "why does libical not do this for us?" and I would     // just nod knowingly but sadly at you in return.    //    // You might also, if you were not too distracted by the first question,    // ask why we have icalproperty_set_x_name but icalparameter_set_xname.    // More nodding would ensue.    if (paramkind == ICAL_X_PARAMETER)        icalparameter_set_xname(icalparam, PromiseFlatCString(param).get());        icalproperty_add_parameter(mProperty, icalparam);    // XXX check ical errno    return NS_OK;}