Home | History | Annotate | Download | only in test-scripts
      1 #!/usr/bin/python
      2 
      3 import dbus
      4 
      5 bus = dbus.SystemBus()
      6 
      7 flimflam_object = dbus.Interface(bus.get_object("org.chromium.flimflam", '/'),
      8                                  "org.freedesktop.DBus.Introspectable")
      9 print flimflam_object.Introspect()
     10 
     11 manager = dbus.Interface(bus.get_object("org.chromium.flimflam", "/"),
     12                          "org.chromium.flimflam.Manager")
     13 properties = manager.GetProperties(utf8_strings = True)
     14 
     15 for path in properties["Devices"]:
     16     device = dbus.Interface(bus.get_object("org.chromium.flimflam", path),
     17                             "org.freedesktop.DBus.Introspectable")
     18     print device.Introspect()
     19 
     20     device_object = dbus.Interface(
     21         bus.get_object("org.chromium.flimflam", path),
     22         "org.chromium.flimflam.Device")
     23     devprops = device_object.GetProperties(utf8_strings = True)
     24     for ipconfig_path in devprops["IPConfigs"]:
     25         ipconfig = dbus.Interface(
     26             bus.get_object("org.chromium.flimflam", ipconfig_path),
     27                            "org.freedesktop.DBus.Introspectable")
     28         print ipconfig.Introspect()
     29