Closed Bug 860559 Opened 7 years ago Closed 7 years ago

Contacts API: add pref field

Categories

(Core :: DOM: Device Interfaces, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: gwagner, Assigned: reuben)

References

Details

(Whiteboard: [fixed-in-birch])

Attachments

(1 file)

From:
https://wiki.mozilla.org/ContactsAPI

We should add the pref field:
 interface ContactField : nsISupports
 {
   attribute DOMString[] type;   // "home", "work", etc.
   attribute DOMString   value;
   attribute integer     pref; // 0 = no pref, 1 = preferred (vCard3 type:PREF)
 };

Reuben can you take this?
Also in interface ContactAddress.
Assignee: nobody → reuben.bmo
Status: NEW → ASSIGNED
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
Attached patch Add pref fieldSplinter Review
Holding up on the review until bug 856358 lands to avoid rebase hell.
Attachment #736472 - Flags: review?(anygregor)
Comment on attachment 736472 [details] [diff] [review]
Add pref field

Review of attachment 736472 [details] [diff] [review]:
-----------------------------------------------------------------

Adding Jonas for the IDL review.

::: dom/interfaces/contacts/nsIContactProperties.idl
@@ +8,4 @@
>  interface nsIContactAddress : nsISupports
>  {
>    attribute DOMString type;
> +  attribute integer   pref; // 0 = no pref, 1 = preferred (vCard3 type:PREF)

We should change it to a bool because the sysapps group is in favor of a bool pref.

@@ +23,2 @@
>    attribute DOMString value;
> +  attribute integer   pref; // 0 = no pref, 1 = preferred (vCard3 type:PREF)

bool as well
Attachment #736472 - Flags: superreview?(jonas)
Attachment #736472 - Flags: review?(anygregor)
Attachment #736472 - Flags: review+
Spec updated accordingly as well for a boolean pref:

https://wiki.mozilla.org/WebAPI/ContactsAPI#ContactField
Blocks: b2g-contact
Comment on attachment 736472 [details] [diff] [review]
Add pref field

Review of attachment 736472 [details] [diff] [review]:
-----------------------------------------------------------------

sr=me if you use bool
Attachment #736472 - Flags: superreview?(jonas) → superreview+
https://hg.mozilla.org/mozilla-central/rev/9ae254158eae
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.