[Ocs] Attica patches

Laszlo Papp djszapi at archlinux.us
Fri Apr 8 04:06:31 PDT 2011


Hi Frederik,

On Fri, Apr 8, 2011 at 1:55 PM, Frederik Gladhorn <gladhorn at kde.org> wrote:
> Hi Laszlo,
>
> you reverted the binary incompatible commit, thanks.
>
> If we really want a more restful api, I think that is a big make-over of the
> ocs api. Then we need to go down the V2 route of the plugin interface. I am a
> bit unsure how that would work with supporting both versions.

After discussing with David Faure on #kde-devel last night and this
morning, we can make a second interface (the plugin already uses
Q_INTERFACES anyway, so this is really easy) meaning that we would
have a class, let us call V2, and there would be 3 methods there (2
put, 1 delete http mehods).

We could do dynamic_cast from V1 to V2 since V2 inherits V1. I guess
that's simpler, if the code that needs delete/put is far away from the
plugin-loading code. It should work, since V1, V2 and the cast are all
defined in the same lib. We might want to have a non-inline destructor
in V1 and V2 though, to make sure (and making dynamic_cast only right
before calling put/delete, keep the V1 pointer for everything else).

I think it would not be that intrusive patch then. I can try to make
this patch as soon as possible, any objection to ?

Thank you for your time and help, Frederik ! :-)

Best Regards,
Laszlo Papp


More information about the Ocs mailing list