summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKalle Valo <kalle.valo@canonical.com>2010-10-11 15:12:10 +0300
committerSamuel Ortiz <sameo@linux.intel.com>2010-10-11 16:36:03 +0200
commit05becd265667dd8b48c220f6bb1a936ffc0afeb1 (patch)
tree54955b842dc8ebccf143891f1907c044baf6e268 /test
parentc1a99a30b982c3fbbc0483ffb36f167a82324deb (diff)
downloadconnman-05becd265667dd8b48c220f6bb1a936ffc0afeb1.tar.gz
connman-05becd265667dd8b48c220f6bb1a936ffc0afeb1.tar.bz2
connman-05becd265667dd8b48c220f6bb1a936ffc0afeb1.zip
simple-agent: update to new agent api
simple-agent was still using the old agent api and didn't work anymore. Update it to use the new api.
Diffstat (limited to 'test')
-rwxr-xr-xtest/simple-agent23
1 files changed, 8 insertions, 15 deletions
diff --git a/test/simple-agent b/test/simple-agent
index b8e4efc8..7e1ce8b4 100755
--- a/test/simple-agent
+++ b/test/simple-agent
@@ -20,24 +20,17 @@ class Agent(dbus.service.Object):
mainloop.quit()
@dbus.service.method("org.moblin.connman.Agent",
- in_signature='o', out_signature='')
- def RequestPassphrase(self, path):
- print "PassphraseRequested (%s)" % (path)
+ in_signature='oa{sv}',
+ out_signature='a{sv}')
+ def RequestInput(self, path, fields):
+ print "RequestInput (%s,%s)" % (path, fields)
- service = dbus.Interface(bus.get_object("org.moblin.connman",
- path),
- "org.moblin.connman.Service")
+ response = {}
+ response["Passphrase"] = self.passphrase
- try:
- print "setting passphrase (%s)" % (self.passphrase)
+ print "returning (%s)" % (response)
- service.SetProperty("Passphrase",
- dbus.String(self.passphrase,
- variant_level=1))
-
- service.Connect(timeout=60000)
- except dbus.DBusException, error:
- print "%s: %s" % (error._dbus_error_name, error.message)
+ return response
@dbus.service.method("org.moblin.connman.Agent",
in_signature='', out_signature='')