Re: [Evolution-hackers] evolution-kolab: Subclassing and extending IMAPX

2010-09-15 Thread Christian Hilberg
Hi,

On Thursday 09 September 2010 Christian Hilberg wrote:
> [...]
> ANNOTATEMORE and METADATA differ in the syntax they use and they have some 
> minor semantic differences.
> [...]

Just for your reference:


"RFC5464 - The IMAP METADATA Extension"
http://www.faqs.org/rfcs/rfc5464.html

"IMAP ANNOTATEMORE Extension"
(version 05 as implemented by Cyrus imapd)
http://tools.ietf.org/html/draft-daboo-imap-annotatemore-05


So long,

Christian

-- 
kernel concepts GbRTel: +49-271-771091-14
Sieghuetter Hauptweg 48Fax: +49-271-771091-19
D-57072 Siegen
http://www.kernelconcepts.de/


signature.asc
Description: This is a digitally signed message part.
___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
http://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] evolution-kolab: Subclassing and extending IMAPX

2010-09-14 Thread Christian Hilberg
Hi again,

On Thursday 09 September 2010 Christian Hilberg wrote:
> [...]
> PS.:  I will have to check with git-submodule whether we can track just
>   some part of the E-D-S git with that (i.e. IMAPX) ... if we can
>   track the full E-D-S git only, then I will have to think up something
>   else.

Hum, neither submodule nore subtree merging seem to fit the purpose here, 
since in neither case I can refer to a certain part of a git repo but only to 
a complete one (would be evolution-data-server in this case, which does not 
make sense).

New thought: Add a new branch to my project and include camel/providers/imapx 
sources there (a camel/ folder does exist anyway). Alas, in addition to the 
IMAPX headers, I need to duplicate the implementation files as well, since 
neither libcamel nor libcamel-provider do export IMAPX symbols (which is ok).

I'm then able to #include  as if I was 
part of evolution-data-server, and linking against the installed e-d-s (libs) 
works. In my own camel/ tree I will keep the extended functions for IMAPX ... 
not very pretty indeed but maybe good enough for now.

In the event of a new upstream release, I copy the new upstream IMAPX sources 
to the camel-imapx-sources-branch and merge it over into my own development 
branches again. Should not be too much work, but would not be fully automated 
either.

(Bye)^2,

Christian

-- 
kernel concepts GbRTel: +49-271-771091-14
Sieghuetter Hauptweg 48Fax: +49-271-771091-19
D-57072 Siegen
http://www.kernelconcepts.de/


signature.asc
Description: This is a digitally signed message part.
___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
http://mail.gnome.org/mailman/listinfo/evolution-hackers


[Evolution-hackers] evolution-kolab: Subclassing and extending IMAPX

2010-09-09 Thread Christian Hilberg
Hi everyone.

After some time working on different places within our Plugin, I'm back to our 
IMAPX part.



We would like to use the IMAPX implementation for our backends as well as for 
the Evolution Email part when Kolab access is configured.

Thing is, we cannot just use the plain IMAPX implementation since we need to 
support the IMAP ANNOTATEMORE draft to access Kolab's (i.e. Cyrus') folder 
annotations to tell the different folder types apart. Distinguishing between 
the different folder types is vital because it lets us know which entries the 
respective folders hold (Email, Contacts, TODOs, Calendar entries, ...). 
Depending on the folder type, each of our IMAP-Providers (Email in Evolution, 
Address and Calendar in the backends) will care for a given folder type or a 
set of folder types. When in Email context - i.e. within Evolution - our IMAPX 
derivative would not display Address folders or Calendar folders. The Address 
provider will only care for contact folder types, and the Calendar provider 
will take care of TODOs, notes, appointments etc. (in short: all Calendar 
data).

Now, we have several issues here. Presently, this whole folder annotation 
stuff which is implemented in the Cyrus imapd (which is what the Kolab people 
use) is based on version 05(!) of the IMAP ANNOTATEMORE draft and it will stay 
this way for some time. The IMAP ANNOTATEMORE draft is what eventually turned 
into RFC5464 "The IMAP METADATA Extension", but RFC5464 is not what Cyrus 
currently implements. There are efforts to incorporate RFC5464 into a future 
release of Cyrus (its in the plannings for 2.4, current stable is 2.3). It 
will be quite a while, maybe years, before this will happen, and in the 
meantime we will be stuck with this early version of the ANNOTATEMORE draft. 
Up to version 07 of the draft, the old ANNOTATEMORE syntax and semantics are 
used and Cyrus advertises this in it's CAPABILITY response. This was changed 
afterwards and turned into METADATA before the final draft version 10 (the 
intermediate ANNOTATEMORE2 has never been implemented anywhere, AFAIK). 
ANNOTATEMORE and METADATA differ in the syntax they use and they have some 
minor semantic differences.

Why am I writing this: IMAPX supports neither ANNOTATEMORE nor METADATA. My 
initial thought of patching IMAPX directly IMHO does not make too much sense 
presently because there is no imapd as yet which supports RFC5464 (true??) and 
ANNOTATEMORE is a draft and it's already been obsoleted by RFC5464 (so 
littering the IMAPX code with ANNOTATEMORE would not be too nice).
  This made me think whether we could extend IMAPX within our plugin and the 
ANNOTATEMORE (and METADATA) extensions could prove their ground there first, 
before finally being pulled upstream, if the Evolution maintainers would wish 
for that.

Apart from the ANNOTATEMORE/METADATA extensions, which are upstream 
candidates, there are some Kolab-specific extensions, which most probably do 
not make sense upstream. These could be kept within the plugin code, even if 
the ANNOTATEMORE/METADATA should get pulled upstream and subsequently removed 
from our plugin code some day. The Kolab extensions include an API extension 
to IMAPX which enables us to configure a "context" into IMAPX. The "context" 
would be defined by the set of folder type a certain IMAPX instance should 
care for. By default, it would be "every folder but the known Kolab PIM 
folders". This default would be used within Evolution, so Evolution does not 
need to know about an extended API and use the provider as-is (it would then 
not present Kolab PIM folders to the Email frontend). From within our backend 
code, we could re-configure the respective provider instances via the extended 
API as to care for contact folders (EBookBackend) and for calendar data 
(ECalBackend) only. This way, we would still have multiple access to the IMAP 
server, but each mailbox would only be accessed by one IMAPX provider instance 
at a time (left alone the "delete mailbox" part, for which we will have to 
think up a good solution, still). The folder annotations can be retrieved 
without actually SELECTing a mailbox. Each provider instance would keep it's 
own cache, but would cache it's own folder types only. This way, there should 
not occure any duplicate caching.

Does this sound "sound" to you? :-)

IF it does, then the next question would be how to do that technically. From 
within our plugin code, we cannot directly access IMAPX headers, since (for 
good reason) they are not installed (and we would like to be able to link 
against installed Evo and E-D-S libs for user convenience). Still, I would 
like to avoid duplicating all of IMAPX within our plugin, but instead use the 
existing code wherever possible and just redefine the single functions which 
we need to extend or change. This would keep a patchset as small as possible 
while not really diverting from upstream.
  Due to time constraints we cannot currently car