Access contact name and address book via DBus

Bug #678040 reported by Danielle Foré
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Dexter - Old
Fix Released
Critical
Allen Lowe
Postler
Fix Released
High
Cris Dywan

Bug Description

On its own, Dexter is a great contacts app. But, if it could share with everyone else, it would be a killer app.

Dexter should have a dbus api that other developers can use to pull contact data.

Revision history for this message
Allen Lowe (lallenlowe) wrote :

this is what Postler will use

Changed in dexter-rolodex:
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
Allen Lowe (lallenlowe) wrote :

I started the module, and I now have one dbus service method to get a contacts name from an email address

Changed in dexter-rolodex:
assignee: nobody → Allen Lowe (lallenlowe)
status: Confirmed → In Progress
Revision history for this message
Allen Lowe (lallenlowe) wrote :

I have a method to get a list of emails from a contact's full name

summary: - Make Dexter accessible via dbus
+ access Dexter via dbus
Revision history for this message
Cris Dywan (kalikiana) wrote : Re: access Dexter via dbus

If Dexter is opened from the 'addressbook' button in Postler's composer, I would love to see a dialogue, from Dexter, where I can click contacts and have them inserted into the composer as recipients. Perhaps by generating an ID randomly for the composer, and then Dexter sends a dbus signal with ID and name & address for each inserted contact.

Allen Lowe (lallenlowe)
Changed in postler:
importance: Undecided → High
milestone: none → beta
Revision history for this message
Cris Dywan (kalikiana) wrote :

So we have these:

I org.elementary.dexterservice
 M get_emails (in v full_name)
 M search_contacts (in v search_string)
 M get_name (in v emailstring)

Problems:
- methods need to be CamelCased like other services
- get_emails is ambiguous → GetEMailAddresses
- ultimately we need a service file in case Dexter isn't running

Revision history for this message
Allen Lowe (lallenlowe) wrote :

ok, fixed the first 2 problems. I just have no idea how to create a service file.... yet

Cris Dywan (kalikiana)
Changed in postler:
assignee: nobody → Christian Dywan (kalikiana)
status: New → Confirmed
Cris Dywan (kalikiana)
Changed in postler:
status: Confirmed → In Progress
Revision history for this message
Cris Dywan (kalikiana) wrote :

I wrote a small Vala class representing Dexter and using the DBus service transparently. The class takes care of error handling and I plan to cache values on the client side to avoid redundant DBus calls. It might be good once finished to document the class as a reference or example for other applications on using Dexter.

I thought of using NewContactDialog via an icon next to contact names in the content view, so the user can directly add or edit contacts without interruption. For that, a method that does "add or edit contact, with email address and name (may be empty)" would be helpful. I think this should be one method for both to save Postler having to check the existence of a contact first. What do you think?

Revision history for this message
Cris Dywan (kalikiana) wrote :

More thoughts: NewContactsDialog is synchronously opening the dialogue, so without special handling Postler either freezes or asynchronously sends methods, which Dexter will collect and open one contact editor after another.

To make behaviour consistent with any client of Dexter, the method should return immediately while keeping the contact editor open. If invoked a second time, it should focus the existing contact editor. This I think would be most predictable for the user and match behaviour inside Dexter.

I'm uncertain regarding Postler's side since one window can't be modal in two places. Either subsequent clicks simply focus the existing editor. Or I could try to make the window react as if modal, though that needs testing.

Revision history for this message
Allen Lowe (lallenlowe) wrote :

ok, I will make these changes the next time I work on the dbus api

Revision history for this message
Allen Lowe (lallenlowe) wrote :

maybe we should close this bug in Dexter and start logging individual bug for each change needed??

Revision history for this message
Cris Dywan (kalikiana) wrote :

I filed bug 685537 for the above described feature.

Let's regard this as fixed in Dexter and I will take care of GetName and ShowWindow as the hsort-term goal on Postler's side.

Changed in dexter-rolodex:
status: In Progress → Fix Committed
summary: - access Dexter via dbus
+ Access contact name and address book via DBus
Changed in dexter-rolodex:
milestone: none → 0.12
Revision history for this message
Cris Dywan (kalikiana) wrote :

Initial Dexter class committed. Sender addresses with no name in the message overview will use Dexter to find out a name. And the address book button in the composer opens Dexter now.

Changed in postler:
status: In Progress → Fix Committed
Changed in dexter-rolodex:
milestone: none → 0.13
status: Fix Committed → Fix Released
Cris Dywan (kalikiana)
Changed in postler:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.