test: display more properties in test-modem
authorBertrand Aygon <bertrand.aygon@intel.com>
Tue, 8 Mar 2011 15:08:41 +0000 (16:08 +0100)
committerDenis Kenzior <denkenz@gmail.com>
Tue, 8 Mar 2011 19:34:24 +0000 (13:34 -0600)
This includes Name, Online, Lockdown, etc.

test/test-modem

index 5859ae3..c91caa3 100755 (executable)
@@ -24,6 +24,9 @@ if __name__ == "__main__":
 
        properties = modem.GetProperties()
 
+       if properties.has_key('Name'):
+               print "Name: %s" % (properties['Name'])
+
        if properties.has_key('Manufacturer'):
                print "Manufacturer: %s" % (properties['Manufacturer'])
 
@@ -36,5 +39,27 @@ if __name__ == "__main__":
        if properties.has_key('Serial'):
                print "Serial: %s" % (properties['Serial'])
 
+       if properties.has_key('Powered'):
+               print "Powered: %s" % (properties['Powered'])
+
+       if properties.has_key('Online'):
+               print "Online: %s" % (properties['Online'])
+
+       if properties.has_key('Lockdown'):
+               print "Lockdown: %s" % (properties['Lockdown'])
+
+       if properties.has_key('Emergency'):
+               print "Emergency: %s" % (properties['Emergency'])
+
+       if properties.has_key('Features'):
+               print "Features:"
+               for feature in properties["Features"]:
+                       print "    [ %s ]" % (feature)
+
+       if properties.has_key('Interfaces'):
+               print "Interfaces:"
+               for interface in properties["Interfaces"]:
+                       print "    [ %s ]" % (interface)
+
        mainloop = gobject.MainLoop()
        mainloop.run()