JOLIE and Plasma: status and discussion
Fabrizio Montesi
famontesi at gmail.com
Tue Nov 25 15:09:58 CET 2008
Ulp! Code! ;)
/branches/work/~fmontesi/
I made a first version of the script library for making adaptors.
YahooSearch.ol is an implemented custom adaptor that does the following:
- takes an init parameter at starting;
- composes request data and calls the yahoo web search service converting this
data into a querystring;
- receives an XML document, parses it, takes the first hit of the web search
and returns it to plasma.
That adaptor would be used as follows:
QMap<QString, QVariant> initData;
initData["applicationId"] = my_application_id;
Service::access("YahooSearch.ol", initData);
Btw1: why QMap and not QHash? Probably a newbie question from a non-qt dev,
but I'm interested. It's to avoid the O(n) worst case?
Btw2: I was using QMap for simplicity in the discussion (I couldn't find a
KConfigGroup p::s example after some svn browsing..), but we should use a
KConfigGroup& for initData and equip each adaptor with a .operations file,
right?
In December/January we're going to merge protocol-independent message type
support in JOLIE. So in the future we'd be able to automatically generate a
.operations file from a JOLIE script. We're stuck to making them by hand until
then, though, unless I'm missing something.
More information about the Plasma-devel
mailing list