20
edits
(incorporate geo components / flatten into ContactAddress and use same types as Geolocation API, incorporate gender components/flatted into Contact interface) |
No edit summary |
||
| Line 15: | Line 15: | ||
interface ContactsManager | interface ContactsManager | ||
{ | { | ||
void find(options, successCB, errorCB); | |||
Contact create(properties); | |||
void clear(successCB, errorCB); | |||
}; | }; | ||
| Line 22: | Line 24: | ||
The following Contact interface is based [[vCard4]]/hCard properties, flattened for the simple/typical case of one address (adr) based on the [http://microformats.org/wiki/microformats-2#h-card microformats 2.0 hCard] iteration. | The following Contact interface is based [[vCard4]]/hCard properties, flattened for the simple/typical case of one address (adr) based on the [http://microformats.org/wiki/microformats-2#h-card microformats 2.0 hCard] iteration. | ||
interface | interface ContactAddress { | ||
attribute DOMString streetAddress; | |||
attribute DOMString locality; | |||
attribute DOMString region; | |||
attribute DOMString postalCode; | |||
attribute DOMString countryName; | |||
attribute double latitude; | |||
attribute double longitude; | |||
attribute double altitude; | |||
}; | |||
interface ContactProperties { | |||
attribute DOMString[] name; | attribute DOMString[] name; | ||
attribute DOMString[] honorificPrefix; | attribute DOMString[] honorificPrefix; | ||
| Line 43: | Line 56: | ||
attribute DOMString sex; /* new in vCard4, gender sub-component 1 */ | attribute DOMString sex; /* new in vCard4, gender sub-component 1 */ | ||
attribute DOMstring gender-identity'; /* new in vCard4, gender sub-comp 2 */ | attribute DOMstring gender-identity'; /* new in vCard4, gender sub-comp 2 */ | ||
}; | }; | ||
interface ContactsWriter : ContactsProperties | |||
{ | |||
readonly attribute DOMString id; | |||
readonly attribute Date published; | |||
readonly attribute Date updated; | |||
}; | |||
interface Contact : ContactWriter | |||
{ | |||
void save(in SuccessCallback successCb, | |||
in ErrorCallback errorCb); | |||
void remove(in SuccessCallback successCb, | |||
in ErrorCallback errorCb); | |||
Contact clone(); | |||
}; | }; | ||
edits