Re: renaming updateIce

On 2014-05-01 20:15, cowwoc wrote:
> On 30/04/2014 9:52 PM, Jan-Ivar Bruaroey wrote:
>> On 4/30/14 8:14 PM, Justin Uberti wrote:
>>> Understood. If we want setConfiguration to be appropriate, we would
>>> need to change the behavior from update to overwrite.
>>> so, updateConfiguration SGTM.
>> Reading updateIce it seems like it effectively overwrites all
>> RTConfiguration settings with what's passed in. It is also an
>> operational step in the constructor. That sounds like overwrite to me.
>> What am I missing?
>> .: Jan-Ivar :.
> +1
> It's confusing to getConfiguration() which contains all the keys, but
> then having to pass that into updateConfiguration() which does not use
> all the keys.
> Meaning, either you overwrite the thing using:
> var config = pc.getConfiguration();
> config.changeSomething();
> pc.setConfiguration(config);
> Or introduce a syntax that allows you to make modifications (like the
> Builder pattern) but then any property that wasn't set should be
> undefined to indicate that it isn't being overwritten. Alternatively,
> allow the user to pass in a map that only defines the keys that are
> being changed.

The intention with the current updateIce() (old name) is to, as the name 
suggests, do an update. This behavior was discussed in the ACTION-95 
thread [1].

pc.updateIce({ "iceTransports": newValue });

The above updates single option, and the snippet below, updates 
everything (with is equal to a set).

var config = pc.getConfiguration();
// modify config



Received on Friday, 2 May 2014 10:41:02 UTC