Baloo File API Changes

Vishesh Handa me at vhanda.in
Mon Oct 13 16:52:49 BST 2014


Hey guys

I've been trying to make Baloo only be a file indexer, instead of a mix of
File Indexing + old Nepomuk stuff. The change is nearly done, but this will
break the current API. Since we're not yet a framework, we can easily do
that.

Here is what is changing -
1. Baloo is only going to provide read only library. You cannot modify
anything.
2. Tags/Ratings/Comments go through KFileMetaData which provides a
UserMetaData class for it.

Since Dolphin is pretty much the only user of these File based APIs, it
would be sensible for us to discuss the changes and reach a conclusion that
everyone likes. Specially since we're going to have to live with the API
for some time once it becomes a framework.

Code changes -
1. Baloo::FileModifyJob is no more. Dolphin wasn't using this, so it does
not affect you.
2. Baloo::FileFetchJob - For now I've killed it and moved it into the File
class, but I'm not sure if providing a synchronous API is the best idea.
Perhaps we really do need an extra job class. Some input would be nice.

>From a Dolphin point of view, a synchronous API isn't that bad since this
was only being called for one file at a time. Also, we had to employ
certain hacks to incorporate the asynchronous nature, such as initially
doing nothing and then later updating the item.

Dolphin also, has an internal baloorolesprovider. I would like to split
that into usermetadataroleprovider and balooroleprovider. The former just
fetches the tags, ratings, and comments while the latter fetches the actual
data from Baloo.

The code is in a separate branch called `apiRewrite` in Baloo.

-- 
Vishesh Handa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20141013/a24e9d28/attachment.htm>


More information about the kfm-devel mailing list