Editing Documentation/Maemo 5 Developer Guide/Using Generic Platform Components/Using Address Book API

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.

Warning: This page is 37 kilobytes long; some browsers may have problems editing pages approaching or longer than 32kb. Please consider breaking the page into smaller sections.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
-
The [[Open development/Maemo roadmap/Fremantle|Maemo 5]] Address Book is a fully-featured address book software stack. This includes the Contacts application (process name [http://maemo.org/packages/view/osso-addressbook/ osso-addressbook]), a support library which implements most of its functionality ([http://maemo.org/packages/view/libosso-abook/ libosso-abook]), and contact storage via Evolution Data Server ([http://maemo.org/packages/view/evolution-data-server-addressbook/ EDS]). As with any address book program, the Contacts application allows you to add, edit and delete contacts. But beyond basic contacts, the Address Book supports browsing and importing SIM card contacts and tightly integrates VoIP and IM contacts provided by the Telepathy communications framework.
+
The Maemo 5 Address Book is a fully-featured address book software stack. This includes the Contacts application (process name "osso-addressbook"), a support library which implements most of its functionality (libosso-abook), and contact storage via Evolution Data Server (EDS). As any address book program, the Contacts application allows you to add, edit and delete contacts. But beyond basic contacts, the Address Book supports browsing and importing SIM card contacts and tightly integrates VoIP and IM contacts provided by the Telepathy communications framework.
This allows Contacts and your application to automatically add IM contacts to your account when adding an IM username to a contact or add a dialog to initiate phone calls, VoIP calls, text messages, emails, or chats with a single tap, and much more.
This allows Contacts and your application to automatically add IM contacts to your account when adding an IM username to a contact or add a dialog to initiate phone calls, VoIP calls, text messages, emails, or chats with a single tap, and much more.
Line 9: Line 9:
The main components in the Maemo Address Book stack are the Contacts application (osso-addressbook), support library (libosso-abook), and Evolution Data Server.
The main components in the Maemo Address Book stack are the Contacts application (osso-addressbook), support library (libosso-abook), and Evolution Data Server.
-
[[Image:abook-components.png|frame|center|alt=Diagram of address book components|Address book components]]
+
[[Image:abook-components.png]]
=== The Contacts application (osso-addressbook) ===
=== The Contacts application (osso-addressbook) ===
Line 89: Line 89:
==== Additional API ====
==== Additional API ====
-
Because images can take a relatively long time to process and are inconvenient to compare, it's often easiest to compare simple, unique values to determine image equality. This is especially useful when caching avatar images. In this snippet, <code>image_token</code> is a hashable value:
+
Because images can take a relatively long time to process and are inconvenient to compare, it's often easiest to compare simple, unique values to determine image equality. This is especially useful when caching avatar images. In this snippet, image_token is a hashable value:
<source lang="c">
<source lang="c">
gpointer image_token = osso_abook_avatar_get_image_token (OSSO_ABOOK_AVATAR (contact));
gpointer image_token = osso_abook_avatar_get_image_token (OSSO_ABOOK_AVATAR (contact));
Line 96: Line 96:
==== Notable Signals ====
==== Notable Signals ====
-
* <code>notify::avatar-image</code>
+
* notify::avatar-image
==== Complete API Documentation ====
==== Complete API Documentation ====
Line 172: Line 172:
===== Printing out basic contact details =====
===== Printing out basic contact details =====
-
This example is meant to show off a few functions that you may want to use to get specific, basic Contact details. If you would like to get its avatar, see the documentation on <code>OssoABookAvatar</code>; for its IM presence or capabilities, see <code>OssoABookPresence</code> and <code>OssoABookCaps</code>.
+
This example is meant to show off a few functions that you may want to use to get specific, basic Contact details. If you would like to get its avatar, see the documentation on <code>OssoABookAvatar</code>; for its IM presence or capabilities, see <code>OssoABookPresence</code> and OssoABookCaps.
Also note that, for most cases of displaying an avatar, presence icon, etc., libosso-abook provides widgets. See <code>OssoABookAvatarImage</code>, <code>OssoABookPresenceIcon</code>, and <code>OssoABookTouchContactStarter</code>.
Also note that, for most cases of displaying an avatar, presence icon, etc., libosso-abook provides widgets. See <code>OssoABookAvatarImage</code>, <code>OssoABookPresenceIcon</code>, and <code>OssoABookTouchContactStarter</code>.
Line 215: Line 215:
</source>
</source>
-
In case you need to sort some contacts, <code>osso_abook_contact_collate()</code> is a <code>strcmp()</code>-like function that does just that. So, to sort a <code>GList</code> of contacts:
+
In case you need to sort some contacts, <code>osso_abook_contact_collate()</code> is a strcmp()-like function that does just that. So, to sort a <code>GList</code> of contacts:
<source lang="c">
<source lang="c">
Line 422: Line 422:
==== Additional API ====
==== Additional API ====
-
The example above shows how to compare the basic <code>TpConnectionPresenceType</code> return value of <code>osso_abook_presence_get_presence_type()</code>. At a higher level, if you want to compare the relative availability of two <code>OssoABookPresences</code> (e.g., <code>OssoABookContacts</code>), you can use the convenience function <code>osso_abook_presence_compare()</code>. It works like most <code>strcmp()</code>-like functions, except that it returns a value < 0 is the first presence is more online than the other, and vice versa.
+
The example above shows how to compare the basic <code>TpConnectionPresenceType</code> return value of <code>osso_abook_presence_get_presence_type()</code>. At a higher level, if you want to compare the relative availability of two <code>OssoABookPresences</code> (e.g., <code>OssoABookContacts</code>), you can use the convenience function <code>osso_abook_presence_compare()</code>. It works like most strcmp()-like functions, except that it returns a value < 0 is the first presence is more online than the other, and vice versa.
<source lang="c">
<source lang="c">

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)