[Kde-pim] Tomboy resource: Questions to the usage of KIO::KJob

Stefan Staeglich staeglis at informatik.uni-freiburg.de
Fri Jun 3 15:37:05 BST 2016


Hello,

I'm developing a Akonadi resource for Tomboy servers like Grauphel[1]. I 
understand the basic stuff now, but in detail it's still complicated.

Daniel Vrátil suggested to use the KIO::KJob stuff. I've  tried to study this, 
but at the moments it's very complex for me. For now I only want to implement 
the basic things. For this we have the necessary following actions:
- Register at the server
- Retrieve all items (I want to use only one collection)
- Get a specific item (full item data!)
- Add a new item
- Delete a item
- Modify a item

My idea was to use the following KJob-Classes:
- TomboyJobBase:
  it should provide the full OAuth stuff using the library o2
- TomboyServerAuthenticateJob:
  It's needed for the configuration it should do the OAuth registration process 
getting the client credentials
- TomboyItemsDownloadJob:
  It should retrieve all items
- TomboyItemDownloadJob:
  It should get the specific item
- TomboyItemUploadJob
 It should can add, delete and modify a item

Eventually the class TomboyItemsDownloadJob needs additional classes for 
adding, deleting and modifying items in the Akonadi cache. But I'm not sure 
about this.

So what do you think about this? What base class should I use? KJob directly?

What features I should use from KJob? So that I can add necessary data, start 
the job and can get the result?

Thanks,
Stefan

[1] https://bugs.kde.org/show_bug.cgi?id=362938
_______________________________________________
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