On Thu, Jun 7, 2012 at 1:31 PM, Anant Narayanan <[email protected]> wrote:
> On 6/7/12 11:15 AM, Ian Bicking wrote: > >> The reuse of getInstalled this way seems like a pun, not a sensible >> extension of the API. getInstalled currently means "apps that this >> origin installed". It has nothing to do with any local installation >> status. mgmt.getLocallyInstalled() or some other new API is more >> sensible. Also there needs to be a way to do something with those >> results, such as an .install() method on app objects, or on some app >> objects. >> > > Sure, that's what it means right now; doesn't mean we can't change what it > means :-) > > I'm just trying to arrive at the simplest possible API to give us what we > need. We can afford to do this at this stage because we're not really going > to break anyone using the API, as the only users right now are us (Mozilla). > There's nothing simpler about taking an existing API and repurposing it for an unrelated use. getInstalled should *either* do what it does now, or do what you describe, it shouldn't do both. And if it does something new, then we just need another name for what it used to do. > And yes, I was thinking that calling mozApps.install() with a manifest URI > extracted from an app object returned by getAll() would result in that app > now appearing in the getInstalled() set - if the installation succeeded, of > course. You'd have to copy the receipts as well, and you'd hit the confirmation even though arguably you shouldn't need confirmation to locally install something that is attained from the cloud. _______________________________________________ dev-webapps mailing list [email protected] https://lists.mozilla.org/listinfo/dev-webapps
