[PATCH] Plugin-like extensions for Amarok

Maximilian Kossick mkossick at gmx.de
Tue Sep 4 13:43:14 UTC 2007


On Tuesday 04 September 2007, Patryk Cisek wrote:
> Hi all,
>
> Recently I decided to write a LIRC client plugin for Amarok. Then I
> ealized, that there's no plugin loader for such external module-like
> plugins, so I embedded it into Amarok.
>
> However this approach is not good -- many people don't care about LIRC and
> don't use it. For them dependency on liblircclient is just a waste of
> resources and time. Well, I decided to write a plugin loader and then
> rewrite LIRC client as a separate plugin.
>
> To avoid confusion with Plugin class (src/plugin/plugin.h/cpp) I called
> hese modules "extensions" (of course name can be changed). I was inspired
> by modules mechanism from Kadu project (http://kadu.net). They load/unload
> these plugins -- which are simply shared libraries -- during runtime. They
> added modules mechanism to Kadu about 2-3 years ago. After that many people
> (including myself) joined project to write their own modules.
>
> My mechanism here is little different -- Kadu has it's own Library class,
> which handles all lower level ldopen stuff it self. Instead I used KDE's
> KPluginLoader schema.
>
> Thanks to installing also all .h files to $KDEDIR/include/amarok one can
> write extensions as a completely separate projects. As an example I wrote
> the LIRC client as part of Amarok (src/lirc directory in the patch file)
> and as a separate project (see patch tarball links below). Code for these
> two is completely the same. I just wanted to show how to write plugins as
> internal" and "external" project.
>
> Extensions manager along with "internal" LIRC client:
> http://kadu.net/~patryk/amarok/extensions-2007-09-04.patch
>
> "External" LIRC client extension:
> http://kadu.net/~patryk/amarok/amarok-lirc-2007-09-04.tar.gz
>
> This is not yet considered finished, but I'd like you guys to take a look
> at this and tell what you think about the whole idea. Also some .h files
> might be missing from src/CMakeLists.txt -- it's not "release version" yet,
> so I wasn't careful to add all for sure. The above patch builds cleanly
> with 708289 revision of Amarok -- due to frequent changes in .h files names
> some tweaks in src/CMakeLists.txt are often needed.

Hi Patryk,
I didn't have time to actually try your patch yet, but it seems very 
interesting and i'm definitely going to give it a try later today. There's 
one important problem with your patch I noticed while reading it: You are 
installing our headers, and we are not going to do that. All plugins would 
have to live in Amarok's source tree. Can you remove those
changes from the patch?

Cheers, Max
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/amarok/attachments/20070904/fc7db078/attachment.sig>


More information about the Amarok mailing list