ofono/test/cancel-ussd

25 lines
439 B
Plaintext
Raw Normal View History

#!/usr/bin/python
import sys
import dbus
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
2010-09-09 19:37:37 +00:00
modems = manager.GetModems()
path, properties = modems[0]
ussd = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.SupplementaryServices')
properties = ussd.GetProperties()
state = properties["State"]
print "State: %s" % (state)
if state != "idle":
ussd.Cancel()