Make sure favorite setting is properly loaded
[platform/upstream/connman.git] / test / simple-agent
1 #!/usr/bin/python
2
3 import gobject
4
5 import dbus
6 import dbus.service
7 import dbus.mainloop.glib
8
9 class Agent(dbus.service.Object):
10         @dbus.service.method("org.moblin.connman.Agent",
11                                         in_signature='', out_signature='')
12         def Release(self):
13                 print("Release")
14                 mainloop.quit()
15
16 if __name__ == '__main__':
17         dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
18
19         bus = dbus.SystemBus()
20         manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"),
21                                         'org.moblin.connman.Manager')
22
23         path = "/test/agent"
24         object = Agent(bus, path)
25
26         manager.RegisterAgent(path)
27
28         mainloop = gobject.MainLoop()
29         mainloop.run()
30
31         #manager.UnregisterAgent(path)