W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > October 2012

[Bug 18531] Consider renaming addKey method

From: <bugzilla@jessica.w3.org>
Date: Fri, 19 Oct 2012 06:55:25 +0000
To: public-html-bugzilla@w3.org
Message-ID: <bug-18531-2486-3oxZ1lKB7j@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=18531

Yang Sun <eric.sun@huawei.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eric.sun@huawei.com

--- Comment #3 from Yang Sun <eric.sun@huawei.com> ---
I think key or license is very similar, and even you want to update a license
or key, you still need to provide a new key or license.addKey() is very clear
about proivide key or license to CDM, what the confusion comes from?

So I think addKey() is clear enough to express its functionality, using
update() seems confusing me more than addKey(), because app developer will not
clearly know what can be "update" by update().

What's more, in webrtc, we have updateIce(), we also use update, but we know
that we are update configuration of ICE agent.






(In reply to comment #0)
> The addKey method can be used for more than just providing a key.
> Specifically it can be used for
> - providing a key
> - providing a license
> - updating a license or other CDM session state
> 
> As a result the addKey name is confusing.
> 
> In general, the purpose of this method is to provide a message to the CDM
> that updates the session state in some CDM-specific way. With the
> object-oriented model, sessions are explicitly represented by session
> objects and addKey is a method on that object. With that context we could
> rename the method to something as simple as update() - it is a method on the
> session object so the implication is that it updates the session somehow.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Friday, 19 October 2012 06:55:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 19 October 2012 06:55:27 GMT