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.
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.
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.
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 :)
“oab_offline” – says if oab is marked for offline.
“oal_selected” – contains the selected “oal id:oal name”
“oaburl” – contains the oab url
“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.