W3C home > Mailing lists > Public > public-device-apis@w3.org > October 2009

RE: [Device APIs Requirements] Input to Contacts API

From: <richard.tibbett@orange-ftgroup.com>
Date: Wed, 28 Oct 2009 15:58:47 +0100
Message-ID: <355A518BC0575547B2A3D6773AAF8EEF59859D@ftrdmel1>
To: <BS3131@att.com>, <public-device-apis@w3.org>
Hi Bryan,

Since I'm actively working on the Contacts API, I've included some
thoughts below.

On 27th Oct 2009 at 05:44, SULLIVAN, BRYAN L (ATTCINW) wrote:
> * It MUST be possible to discover the supported fields for 
> Contacts entries.

OK. This can be done by enumerating over the resulting properties of a
Contact object:

for(var propertyName in myObject) {
   // propertyName is what you want
   // you can get the value like this: myObject[propertyName]
}

In BONDI this has its own API method: getSupportedPropertyKeys() but
this functionality could be easily be done at runtime by a webapp with
the above code.

So do we want/need a method? I'd suggest not.

> * It MUST be possible to clear a list of Contacts entries.

There may be ambiguity around the term 'clear' here. Perhaps you mean
delete/remove Contact(s) from an address book OR you mean clear
Contact(s) from the web app (i.e. nullifying the resulting
<sequence>Contact object(s) for garbage collection)?

If we're talking about 'delete' then this can currently be done by
passing the required Contact objects sequentially through the
addressbook.remove function.

If we're talking about 'clear' then this can be done in a web app with
the following code:

// throw the Contacts list away and create a new empty one
// (this method should also work for the well-documented poor 
// Garbage Collection of IE6. There are other ways to do this also.)
contacts = {};

> * It MUST be possible to clear all Contacts entries.

Same as 2.) above.

The use case of deleting all contacts should be so rare that I don't
think it warrants its own function. Sequentially deleting contacts
through addressbook.remove should suffice.

> Re "Are there convincing use cases for supporting multiple 
> address books in v1 (as opposed to just a default one, and 
> maybe exposing more later)?": Yes, there are convincing use 
> cases. It has been a standard feature in mobile phones for as 
> long as contacts have been a feature, that there is a 
> phone-based contact list and a SIM-based contact list. These 
> two address books, at least, should be supported.

I agree with this. For me, the outstanding question is to find a way to
allow web apps to identify individual address books: by name, URI, index
or reference, and make that meaningful enough to action by the code/user
of a web app.

I.e. * it MUST be possible to identify and target a specific address
book (e.g. the 'SIM' address book or the 'Device' address book) from a
web app.

This is of course still an open discussion.


Thanks.


Kind Regards,

Richard
Received on Wednesday, 28 October 2009 14:59:31 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:53:39 UTC