modem: move GetInfo from GsmCard -> Modem interface

It's generic, everything implements some variant of +GMM, +GMR, and +GMI.
This commit is contained in:
Dan Williams
2009-06-19 12:43:37 -04:00
parent 88bdb5d29a
commit 6d4616c1d3
9 changed files with 218 additions and 124 deletions

View File

@@ -71,9 +71,6 @@ def inspect_gsm(proxy):
pass
print "IMSI: %s" % card.GetImsi()
info = card.GetInfo()
print "Vendor: '%s' Model: '%s' Version: '%s'" % info
# Gsm.Network interface
net = dbus.Interface(proxy, dbus_interface=MM_DBUS_INTERFACE_MODEM_GSM_NETWORK)
print "Signal quality: %d" % net.GetSignalQuality()
@@ -130,6 +127,11 @@ for m in modems:
modem = dbus.Interface(proxy, dbus_interface=MM_DBUS_INTERFACE_MODEM)
modem.Enable(True)
info = modem.GetInfo()
print "Vendor: %s" % info[0]
print "Model: %s" % info[1]
print "Version: %s" % info[2]
if type == 1:
inspect_gsm(proxy)
elif type == 2: