[Kde-pim] kabc/distributionlist: Entry class returns references

Tobias Koenig tokoe at kde.org
Sat Sep 8 18:48:05 BST 2007


On Sat, Sep 08, 2007 at 07:13:02PM +0200, Kevin Krammer wrote:
> On Thursday 30 August 2007, Tobias Koenig wrote:
Hi Kevin,

> > So we should either keep both or replace the one in kabc by the one in
> > libkdepim. David, any ideas?
> 
> Do we know how "other" PIM frameworks handle distribution lists? Do they also 
> use a custom field inside a "normal" entry?
Every groupware uses it's own way of handling distribution lists, so I
can't see a way to find a common standard here.

Besides we have to differ between 'How distribution lists appear to the
outside' and 'How to handle them in KDE'.

The first one is a task of the Akonadi agents, which have to convert the
distribution lists (as same as the contacts itself) into a special
format, which the groupware server they talk to understands.

So what we really have to do is to find a common format how to store
distribution lists in Akonadi and how to access them from C++ (which
means finding an API).

Storing them in Akonadi should be done by storing an XML document, maybe
finding a common standard here.

This format should support the following distribution list attributes:

  - unique identifier
  - user visible i18n'ed name
  - list of entries
  - custom fields

The entries should have the following attributes:

  - type (contact, contact reference)

  if it is from type contact, it provides
    - name
    - email address
    - custom fields

  if it is from type contact reference, it contains

    - contact uid
    - preferred email
    - custom fields

Distribution lists inside distribution lists are strange and I'd like to
avoid them. They make stuff unecessarily complex.

So every distribution list is stored together with the contacts in the
collection of the groupware server in Akonadi.

The akonadi agents will convert the XML document to the groupware
specific data structures and vice versa.

Now we come to the KDE side. There we need a C++ class to handle
distribution lists. In libkabc they are two completely different
classes, however David Faure provided a hack (KPIM::DistributionLists),
which allows to store distribution lists _inside_ an Addressee object.

This was done to be able to provide resource specific distribution
lists.

For KDE 4 I'd prefer two separated classes again, however this time the
resource api (of course only until Akonadi is in place) will provide
methods for accessing distribution lists as well.

So we can retire KABC::DistributionListManager and let the single
KResources load/store the distribution lists.

Ciao,
Tobias
-- 
Separate politics from religion and economy!
The Council of the European Union is an undemocratic and illegal institution!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20070908/4eb6984b/attachment.sig>
-------------- next part --------------
_______________________________________________
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