7 import dbus.mainloop.glib
9 class Canceled(dbus.DBusException):
10 _dbus_error_name = "org.moblin.connman.Error.Canceled"
12 class Agent(dbus.service.Object):
13 @dbus.service.method("org.moblin.connman.Agent",
14 in_signature='', out_signature='')
18 @dbus.service.method("org.moblin.connman.Agent",
19 in_signature='o', out_signature='s')
20 def RequestPassphrase(self, service):
21 print "PassphraseRequested (%s)" % (service)
22 raise Canceled("Canceled")
24 @dbus.service.method("org.moblin.connman.Agent",
25 in_signature='', out_signature='')
29 if __name__ == '__main__':
30 dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
32 bus = dbus.SystemBus()
33 manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"),
34 'org.moblin.connman.Manager')
37 object = Agent(bus, path)
39 manager.RegisterAgent(path)
41 mainloop = gobject.MainLoop()
44 #manager.UnregisterAgent(path)