KDE Developer
|
Hi all!!
i'm programming with amarok 2 and dbus. i can call without problem all methods but one: GetStatus in /Player. First of all i don't understand why it returns four values three of which are always 0. but anyway using dbus-send it works, but i can't get it via qtdbus. i tried with qdbusreply i don't know what to do, can you guys help me? |
KDE Developer
|
The qdbus tool cannot yet deal with complex data structures; it can currently only handle strings (support for complex types will be in Qt 4.5).
This means that you will have to use a real D-Bus library to access this function. Such libraries exist for many languages, like C++ (part of Qt), Ruby, etc. PS: Maybe an option for you could be to implement your program as a true Amarok 2 script, in QtScript. Then you don't need to access the D-Bus interface at all.
--
Mark Kretschmann - Amarok Developer |
KDE Developer
|
thanks for the answer. i think i will use qtscript. i can use it to make a plasmoid for the kde desktop, isn't it?
|
KDE Developer
|
No, you can't make a KDE desktop plasmoid with it. It's meant for internal scripting, like Firefox extensions.
http://amarok.kde.org/wiki/Development/ ... _HowTo_2.0
--
Mark Kretschmann - Amarok Developer |
KDE Developer
|
ok, but if i want i can do a script that provides some d-bus methods that i need and that are absent in the mpris standard, right?
|
KDE Developer
|
Interesting idea It might be possible. Worth a try.
--
Mark Kretschmann - Amarok Developer |
KDE Developer
|
mmh, as i can see in the wiki entry the amarok api for the scripts isn't so big, or has the page to be completed? for example i can't see calls for the title, album and so on. but i was thinking: instead of a script can i write a plasma dataengine for amarok that takes the infos and provides them through dbus or another way to my kde plasmoid?
|
Registered users: bancha, Bing [Bot], daret, Evergrowing, Google [Bot], lockheed, sandyvee, Sogou [Bot]