This forum has been archived. All content is frozen. Please use KDE Discuss instead.

dbus instead of internal scripts?

Tags: None
(comma "," separated)
imported4-Sam
Registered Member
Posts
22
Karma
0

dbus instead of internal scripts?

Wed Jul 13, 2011 3:29 pm
Hi George,

You had indicated a desire to dump kross/python for scripting. I was exploring qdbus for my bash script, and noticed there are more APIs and Signals in qdbus than in the scripting API reference.

Any reason to not just use qdbus for scripting? Or could qdbus be used for scripting? Kross, Python, nor qdbus are on my 'known' language list, nor probably anyone who wants to play with this stuff, so if they all can do the same job, and we probably need to learn new syntax anyway....

So, I'll ask this of you, as I want to proceed further with it, but the APIs to do so aren't available in kross, but seem to be in qdbus. Can you re-write the attached for qdbus? (And then point me at your favourite newb's guide for qdbus?)

Thanks,
Sam

Edit:
I started playing, but got stumped quickly.
Code: Select all
$ qdbus org.ktorrent.ktorrent /settings maxSeeds
4
$ qdbus org.ktorrent.ktorrent /settings setMaxSeeds 6

$ qdbus org.ktorrent.ktorrent /settings maxSeeds
6
$ qdbus org.ktorrent.ktorrent /MainApplication reparseConfiguration

$ qdbus org.ktorrent.ktorrent /settings maxSeeds
6


How do you make the setMaxSeeds "stick?"

KT never changed the number of seeds from 4. In config, KT will eventually show 6, but KT itself never increases the number of seeds to 6. Oddly the "Apply" button is greyed and clicking "OK" won't change the Max seeds to 6 either. (Once you manually change the max seed value in config, then "Apply" enables, and "OK" works correctly.)

Last edited by imported4-Sam on Thu Jul 14, 2011 6:46 pm, edited 1 time in total.
George
Moderator
Posts
5421
Karma
1
qdbus org.ktorrent.ktorrent /settings apply
imported4-Sam
Registered Member
Posts
22
Karma
0
Thanks, and I'll post this here since it's dbus related.

$ qdbus org.ktorrent.ktorrent /settings cpuUsage

returns "Network sleep interval." Maybe it's suppose to, but the naming is then circumspect.

Best,
Sam
imported4-Sam
Registered Member
Posts
22
Karma
0
Hi George,

Ignore my original request. dbus is too painful. The needed error handling alone makes it an unviable tool.

So, when ya gonna port scripting to something usable???

:)
Sam


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Google [Bot], Sogou [Bot]