test: Update simple-agent to handle RequestBrowser method
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Tue, 14 Feb 2012 10:05:47 +0000 (12:05 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 14 Feb 2012 13:55:56 +0000 (14:55 +0100)
test/simple-agent

index cda9693..38b6e41 100755 (executable)
@@ -97,6 +97,22 @@ class Agent(dbus.service.Object):
        @dbus.service.method("net.connman.Agent",
                                        in_signature='os',
                                        out_signature='')
+       def RequestBrowser(self, path, url):
+               print "RequestBrowser (%s,%s)" % (path, url)
+
+               print "Please login through the given url in a browser"
+               print "Then press enter to accept or some text to cancel"
+
+               args = raw_input('> ')
+
+               if len(args) > 0:
+                       raise Canceled("canceled")
+
+               return
+
+       @dbus.service.method("net.connman.Agent",
+                                       in_signature='os',
+                                       out_signature='')
        def ReportError(self, path, error):
                print "ReportError %s, %s" % (path, error)
                retry = raw_input("Retry service (yes/no): ")