Re: More DataEngines questions
Let's make an example to make things clearer. A user may want to search for the term foo, and another for the term bar, and of course, they would get different results. How can I make the DataEngine aware that the query parameter should be foo in one case, and bar in the other? perhaps what you want is a Service, not a Source. my memory of such things is all fuzzy, though. there should be apidocs for dataservices, and twitter uses them for setting passwords... the other option would be to make the parameter a part of the source name, like twitter can have Timeline:chanika and Timeline:aseigo as sources. depending on what you're doing that might not be the Right approach, though. -- This message brought to you by eevil bananas and the number 3. www.chani3.com signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: More DataEngines questions
On domenica 4 gennaio 2009 10:20:32 Chani wrote: perhaps what you want is a Service, not a Source. my memory of such I'll turn the question to everyone in the list: is Service exposed through the Python API? I can't check myself at the moment because with the new snapshots from trunk I'm using I can't get kdebindings to compile. I've had a look at the API docs and indeed Service would be what I need, from the quick glance I had. As soon as I get PyKDE up and running again I'll make some experiments. sources. depending on what you're doing that might not be the Right approach, though. It would not work, as you hin, because the user can select one from potentially 10,000-30,000 names. signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: More DataEngines questions
On Sunday 04 January 2009, Luca Beltrame wrote: On domenica 4 gennaio 2009 10:20:32 Chani wrote: perhaps what you want is a Service, not a Source. my memory of such I'll turn the question to everyone in the list: is Service exposed through the Python API? it should be; however, there is no scripted Service plugin support like there is for DataEngine, Applet and Runner. i'll be adding a ScriptEngine class for those in 4.3. but you should be able to provide a Service from a DataEngine in Python, though again that may not be exactly what you wanted; a Service without a DataEngine may be more what you're looking for. sources. depending on what you're doing that might not be the Right approach, though. It would not work, as you hin, because the user can select one from potentially 10,000-30,000 names. well, sources are created on demand, though. there are a few million twitter users; we don't load everyone's account in the TwitterEngine ;) when a DataEngine gets a request for a source that does not exist yet, it is given a chance to create that source on deman in sourceRequestEvent. so in such a situation, your DataEngine would only need to create the sources requested. -- Aaron J. Seigo humru othro a kohnu se GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 KDE core developer sponsored by Qt Software signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: More DataEngines questions
On Sunday 04 January 2009 11:29:11 Luca Beltrame wrote: On domenica 4 gennaio 2009 12:03:21 Aaron J. Seigo wrote: - User puts in the term foo as in search term; - The term foo is used as source in the DataEngine, which then fetches the information; - Said information is then presented to the user. Am I correct? And if so, does a DataEngine keep in memory the result of old sources? (asking to evaluate the performnce and resource consumption). That's right. The source is kept around for as long as there are applets requesting it. Once all applets have disconnected from the source, it is discarded. Alex signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: More DataEngines questions
On Sunday 04 January 2009, Alex Merry wrote: On Sunday 04 January 2009 11:29:11 Luca Beltrame wrote: On domenica 4 gennaio 2009 12:03:21 Aaron J. Seigo wrote: - User puts in the term foo as in search term; - The term foo is used as source in the DataEngine, which then fetches the information; - Said information is then presented to the user. exactly .. Am I correct? And if so, does a DataEngine keep in memory the result of old sources? (asking to evaluate the performnce and resource consumption). That's right. The source is kept around for as long as there are applets requesting it. Once all applets have disconnected from the source, it is discarded. ... automatically, of course. the DataEngine author need write no code for this. if you wish to do further cacheing, you can work around this feature, but it's generally not the common case. -- Aaron J. Seigo humru othro a kohnu se GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 KDE core developer sponsored by Qt Software signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: More DataEngines questions
While this is being discussed at length . . . Are there stock data-engines that come with the distributions, things for KDEPIM or even MySQL or pogreSQL? Or need on always roll one's own? ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: More DataEngines questions
On Sunday 04 January 2009, David Baron wrote: Are there stock data-engines that come with the distributions, things for KDEPIM or even MySQL or pogreSQL? Or need on always roll one's own? there are several that come with kdebase/workspace, and a couple more in kdeplasma-addons. we're always looking for more quality engines to provide. (not sure a RDBMS data engine makes any sense, mind you. data engines are meant to be topical, not based on the storage mechanism =) -- Aaron J. Seigo humru othro a kohnu se GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 KDE core developer sponsored by Qt Software signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: More DataEngines questions
On Sunday 04 January 2009, Alex Merry wrote: Generally useful engines will probably be included in kdebase, or maybe kdeplasma-addons. For example, I could see that an email monitoring engine and an address book engine (based on Akonadi) would probably merit yes; there's already one in kdepim/akonadi somewhere iirc but it's fairly basic and could probably use a bit of wrk. inclusion in kdebase (providing the kdepimlibs dependency wasn't an issue). rss aready depends on libsyndicate in kdepimlibs, making kdepimlibs an optional requirement for kdebase-workspace already =) -- Aaron J. Seigo humru othro a kohnu se GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 KDE core developer sponsored by Qt Software signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: More DataEngines questions
On domenica 4 gennaio 2009 18:46:05 Aaron J. Seigo wrote: ... automatically, of course. the DataEngine author need write no code for this. if you wish to do further cacheing, you can work around this feature, but it's generally not the common case. Actually, it's good like this. And I can also say I like the API,so far. As I said previously, getting up a simple DataEngine was a matter of about one hour of coding. Now I'll start looking at how create a proper applet... signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel