[Kde-pim] Review Request: add AgentInstance::setOption method, to set an option via DBus

Constantin Berzan exit3219 at gmail.com
Fri May 22 09:06:56 BST 2009



> On 2009-05-21 11:58:36, Kevin Krammer wrote:
> > It seems I don't get the general idea about this quite complex approach of constructing D-Bus method names.
> > If we require an interface to set arbitrary options, why not add one setOption(string, variant) method to the D-Bus interface?
> >
> 
> Constantin Berzan wrote:
>     This makes it easier for apps that need to configure an agent/resource, because they no longer have to worry about:
>     * obtaining a dbus interface in the first place
>     * checking for errors
>     These two tasks are instead neatly encapsulated in AgentInstance.
>     
>     My rationale for doing this is that the code for configuring a resource via dbus was pretty hairy without this, so I was looking into nicer ways of doing it.  But if the consensus is that it's unnecessary, I'm more than happy to do it the old way.

One thing I've forgotten to mention:
All of this stemmed from the fact that I needed to get access to the maildir resource's dbus interface from the outboxinterface library (currently in playground). I couldn't use the qdbusxml2cpp-generated class because that would add a dependency from kdepimlibs to kdepim.  (The intention is to move outboxinterface to kdepimlibs when it is ready.)


- Constantin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/734/#review1170
-----------------------------------------------------------


On 2009-05-21 23:45:01, Constantin Berzan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/734/
> -----------------------------------------------------------
> 
> (Updated 2009-05-21 23:45:01)
> 
> 
> Review request for KDE PIM.
> 
> 
> Summary
> -------
> 
> This makes it possible to configure an agent / resource via DBus without having to go through the trouble of creating a QDBusInterface.  The code existed before in Firstrun, an internal class in kdepimlibs/akonadi.
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdepimlibs/akonadi/agentinstance.h 970429 
>   /trunk/KDE/kdepimlibs/akonadi/agentinstance.cpp 970429 
>   /trunk/KDE/kdepimlibs/akonadi/agentinstance_p.h 970429 
>   /trunk/KDE/kdepimlibs/akonadi/firstrun.cpp 970429 
>   /trunk/KDE/kdepimlibs/akonadi/firstrun_p.h 970429 
> 
> Diff: http://reviewboard.kde.org/r/734/diff
> 
> 
> Testing
> -------
> 
> * maildir resource creation and configuration from the outboxinterface lib in playground/pim (not commited to svn yet)
> * maildir resource creation and configuration via Firstrun, by putting a default file in ~/kde/share/apps/akonadi/firstrun.  Settings of type QString and bool have been tested.
> 
> 
> Thanks,
> 
> Constantin
> 
>

_______________________________________________
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