$system.dbus

Performs a DBus call
Usage
$system.dbus(<service>,<path>,<interface>,<method>[,<parameter1>[,<parameter2>[,...]]])
Description
This function allows performing simple Dbus calls without executing an external process. This feature is available ONLY when KDE support is compiled in the executable: this means that this function is absolutely non portable (don't use it in scripts that you're going to distribute). <application> is the name of the application being called, <objectid> is the identifier of the object called, <function> is the function to be executed on the remote object and <parameter1>,<parameter2>,... is the list of parameters to be passed. The <function> name must contain the trailing parenthesis and parameter specification (see examples). The parameters MUST be in the form "type=value" where "type" is the C++ type of the parameter and value is the string rappresentation of the parameter data. Currently KVIrc supports only QString,QByteArray,bool,int and uint data types.
The returned value is the string rappresentation of the returned data if the return type is known, otherwise it is the name of the data type returned.
If the application name is prefixed with "?" then the call is performed in "remote test" mode: no "remote" errors are printed and the function returns 1 if the call executed successfully and 0 if the call failed. This can be used with the very first call to programmaticaly test if the remote application is running.
Syntax Specification
<variant> $system.dbus(<service:string>,<path:string>,<interface:string>,<method:string>[,<parameter1:string>[,<parameter2:string>[,...]]])
Examples

    #get a string list of torrents currently in queue in ktorrent
    echo $system.dbus("org.ktorrent.ktorrent","/KTorrent", "org.ktorrent.KTorrent","torrents")
    #stop a torrent in ktorrent by its name
    echo $system.dbus("org.ktorrent.ktorrent","/KTorrent", "org.ktorrent.KTorrent","stop","QString=Torrent Name")
    #start the kde task manager
    echo $system.dbus("org.freedesktop.ScreenSaver","/App", "org.kde.krunner.App","showTaskManager")
    #get the clipboard contents using dbus
    echo $system.dbus("org.kde.klipper","/klipper", "org.kde.klipper.klipper","getClipboardContents")


Index, Functions
KVIrc 4.0.0 Documentation
Generated by mockbuild at Sun Apr 18 14:58:16 2010