Gambas Documentation - /comp/gb.dbus/dbusproxy

/comp/gb.dbus/dbusproxy

# DBusProxy (gb.dbus)

This class is a proxy to a D-Bus object exported by another application.

This class is
Create a new proxy on a DBus object from another application.
creatable
.

Properties
Return the names of all current object children. Children

To call a method, read or write a property on the D-Bus object, just apply them on the proxy object:

Beware that method and property names are case sensitive!

### Examples

    ' Lock the screen
    DBus["org.kde.krunner"]["/ScreenSaver"].lock()

    ' Check if compositing is active
    If DBus["org.kde.kwin"]["/KWin"].compositingActive() Then Print "Compositing is active!"

    ' Get a password from KDE wallet
    Dim sLocalWallet As String = DBus["org.kde.kwalletd"]["/modules/kwalletd"].localWallet()
    Dim sWalletId As String = DBus["org.kde.kwalletd"]["/modules/kwalletd"].open(sLocalWallet, Application.Title)
    Dim sPassword As String = DBus["org.kde.kwalletd"]["/modules/kwalletd"].readPassword(Application.Name, sWalletId, "login", Application.Title)

    ' Set the geometry of the KMail window
    DBus["org.kde.kmail"]["/kmail/kmail_mainwindow_1"].geometry = [0, 24, 1024, 768]