Persistent data with KDED (or KIOD) and a KIO Slave?

Mark Gaiser markg85 at gmail.com
Sun Oct 8 13:22:00 UTC 2017


On Sun, Oct 8, 2017 at 2:34 PM, David Faure <faure at kde.org> wrote:

> On dimanche 8 octobre 2017 13:02:59 CEST Mark Gaiser wrote:
> > What i want is not just some storage. The storage (the data that
> describes
> > the tags and makes the connection to the files) is something you don't
> want
> > to parse on every request.
> > Also, it could get big if you tag thousands (or millions) of files.
> > You want to parse that data (json file) once and keep it in memory for
> > efficient lookup/creation/query purposes.
> >
> > I don't really want nor need it up and running when the user logs in, but
> > having it start up when something from that storage is requested does
> seem
> > like the way to go.
>
> Yes, so use a kiod module, started on demand.
> This way it even works outside a plasma session.
>

That sounds like the way to go :)

But then i still miss one rather important detail that i can't really find
anywhere..
Lets say I have that module and call it "tags2" (as Baloo already has tags,
therefore tags2 to prevent naming issues).

So i make a dbus service file named:
  Name=org.kde.tags2

And in the "tags2.json" i put:

{
    "KPlugin": {
        "Description": "Put tags on files and folders.",
        "Name": "Tags 2",
        "ServiceTypes": [
            "KDEDModule"
        ]
    },

    "X-KDE-DBus-ModuleName": "tags2",
    "X-KDE-DBus-ServiceName": "org.kde.tags2"
}

What do i do in the client side code to start this module?
That "client side" can be an IO slave, but it can also be some special Tags
helper classes to create a new tag name with description and icon or such.
I need to call something to trigger KIOD to start this module, but i can't
figure out what.

How do i see qCDebug output from kiod plugins anyhow?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171008/b5dc2c69/attachment.html>


More information about the Kde-frameworks-devel mailing list