[Kde-pim] How Resources and Collections play together
Christian Mollekopf
chrigi_1 at fastmail.fm
Fri Jan 14 13:04:07 GMT 2011
Hi,
I'm a bit confused how akonadi resources and collections play together
exactly.
As far as I understand it, a collection is the akonadi internal container.
While the collection doesn't need a resource to exist, a resource is needed to
make the link to the storage backend (filesystem, google, etc.).
So if i want a new calendar I create a new calendar resource (not a
collection), which will in turn generate a new collection, associated with the
resource.
So I assume normally there is 1 resource with 1 associated collection, but
there can be special resources which have several collections.
What I need to know:
Is the resource responsible for creating/deleting the collections?
So as an application developer, do I always work with resources not
collections (speaking of creating/deleting toplevel collections(respectively
storage locations))?
If I want to make a dialog where the user can choose, where to store his
calendar files, is it ok to display a list of collections with the mimetype
which i need? Or should I somehow list the resources?
In the ChangeRecorder for the EntityTreemodel, should I rather watch the
collections or the resources? Whats the difference?
Can Collections contain items without a resource associated?
If I want to have a trash collections for items of various mimetypes, can I
create a collection directly from my app, without a resource? I just want to
keep the items there for a couple of days and then delete them.
Would it make sense to create a trash resource, which accepts all kinds of
mimetypes, and deletes the items after a configured time, or is that not the
purpose of resources?
Thanks for your help,
Chris
_______________________________________________
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