[Kde-pim] Exchange (MAPI) akonadi resource for calendar and GAL

Shaheedur Reza Haque srhaque at theiet.org
Wed Dec 7 21:31:37 GMT 2011


rgruber at users.sourceforge.net wrote:

Hi Robert,

> Brad Hards <bradh at frogmouth.net> wrote:
>> You really should use the spec - [MS-OXCPROPS].pdf, and the documents
>> that are outreferenced from that. Let me know if you have problems.
> Thanks for the info. I think I used the online version of that PDF for
> some research
> (http://msdn.microsoft.com/en-us/library/cc433490%28v=EXCHG.80%29.aspx).
> But this seams to be just a sheer endless list of all MAPI tags. What I'm
> kind of missing is a structured list which tags apply to which kind of
> message. Is there something like: for a calendar message the following
> tags exists, for a mail message the following tags exists, and so on...
> 
> 
>> You need to resolve them. There is API for that.
> I'm using the libmapi functions GetRecipientTable() and then
> ResolveNames() to do that. It sometimes just does not work. I've not yet
> found a pattern when it does not work, I'll just need to look into it
> again. Or is there an other API to retrieve the attendees that I'm just
> not aware of?

OK, I went back to first principles, and added a bunch of debug stuff which 
made mapibrowser easier to use. Using that, I tracked down a whole lot of 
corner cases in my dataset. The end result is that Exchange seems to end up 
with an inconsistent bunch of stuff, presumably because there are a variety 
of client writing to it.

The logic now roughly looks like this:

	1. Read the RecipientsTable.

	2. Add in the contents of the DisplayTo tag.

	3. Add in the sent-representing values.

Naturally, that results in a whole lot of duplication as well as bringing in 
the missing items. So then, there is a whole lot of work to resolve things:

	- For anything we get from 1, 2 and 3 (mostly 2 and 3, but also 1)
	try hard to get an email address. Whenever I find one, I compare
	the "quality" of the address, and keep the best one.

	- For all but the best quality addresses, call ResolveNames. Again,
	keep the best value seen.

	- For those that are left, wing-it.

There is also a load of cruft data elimination along the way.

The current status is that it reliably catches every address in every item 
in my calendar where Exchange has the data. The code in mapiconnector has 
also been refactored significantly - I hope you like the changes!

As time permits, I plan to work on some combination of:

	- the GAL (I never did get your original support working, but I
	didn't try that hard either).

	- the Update and Create support (I'm sort of waiting for a buglet
	in libmapi to get sorted).

Please do let me know if you plan to work on stuff so we don't collide.

Thanks, Shaheed
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list