A drop in the ocean

Exchange WebServices Offline AddressBook

with 3 comments

It is now possible to download GAL contents for offline usage through exchange web services in Evolution. Offline GAL is termed as Offline Address-book (OAB) in Exchange WebServices and it may contain one or more Offline Address-lists (OAL).

The check-box, ‘Cache offline address-book’ would be sensitive if the OAB url is discovered using the AutoDiscover service from the previous page (‘Receiving’). On clicking the fetch buton, the available offline address-lists would be displayed in the combo box.  The user can select the address-list which he is interested in.

If the GAL is not selected for offline usage.  A GAL folder would be created in Contacts component and would be used just for auto-completion when Evolution is online.

To change an offline address-list, one just needs to go back to ‘Receiving page’ in preference and select a different address-list. This would remove the old OAL folder and its contents and create a new OAL folder.  At the moment, evolution-ews supports caching only one OAL, though it is very easy to extend it to support many. I feel it would sufficient to have one at the moment, but if a need arises, the plugin can be extended to create new OAL folders on demand.

If an address-list is chosen for offline usage, one CAN auto-complete while the caching is in progress!! All operations are asynchronous and cancellable.

Internals

OAL’s would be listed in the link  <OABUrl> + ‘oab.xml’. They would be available as compressed files, compressed using LZXD format.  There are three versions of OAB ‘2, 3, 4′ and Evolution supports downloading, version 4 OAB Full Details file.

LZXD

To put it simply, lzxd extends the lzx decompression format adding support for differential updates. I have picked up the lzx decompression code from libmspack and modified it to make it decompress the lzxd file. The support for differential update is yet to added.

OAB

The format for the uncompressed OAB Version 4 file is available at http://msdn.microsoft.com/en-us/library/cc463914%28v=EXCHG.80%29.aspx . Evolution-ews has the decoder which decodes the oab file, converts to EContact and then we  populates the address-book sqlitedb in chunks of 1000 contacts.

And now the contents are available for offline use :)

CamelUrl props

“oab_offline” – says if oab is marked for offline.

“oal_selected” – contains the selected “oal id:oal name”

“oaburl” – contains the oab url

ESource props

“hosturl” – contains the host url, used for auto-completion.

“oaburl” – contains the oab url.

“oalid” – id of the OAL.

“gal” – a boolean that it indicates that its gal folder.

About these ads

Written by chenthill

July 15, 2011 at 3:40 pm

Posted in evolution, gnome, suse

3 Responses

Subscribe to comments with RSS.

  1. Great work Chen !

    lakhil

    July 15, 2011 at 3:43 pm

  2. Excellent work! I’m sure a ton of people welcome this feature. Now if only Evolution would get multiple identities like TB…

    Pieter

    July 15, 2011 at 4:14 pm

  3. Thanks!!

    @Peter what do you mean by multiple identities ?

    chenthill

    July 18, 2011 at 3:00 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 746 other followers

%d bloggers like this: