Skip to contentSkip to conversation

mmsd: Add list-services script

PATCH New Ronald Tessier 1 participant 2 messages Aug 10, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmsd: Add list-services script

Add list-services script.
This script lists all services with their properties.

Ronald Tessier (1):
test: Add test script to list services properties

 test/list-services |   27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100755 test/list-services

--
1.7.9.5

#1 lore raw

PATCH 1/1 test: Add test script to list services properties

---
 test/list-services |   27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100755 test/list-services
test/list-services new file +27 -0
new file mode 100755
index 0000000..bd52d71
@@ -0,0 +1,27 @@
+#!/usr/bin/python
+
+import dbus
+
+bus = dbus.SessionBus()
+
+manager = dbus.Interface(bus.get_object('org.ofono.mms', '/org/ofono/mms'),
+						'org.ofono.mms.Manager')
+
+services = manager.GetServices()
+
+for path, properties in services:
+	print "[ %s ]" % (path)
+
+	object = dbus.Interface(bus.get_object('org.ofono.mms', path),
+						'org.ofono.mms.Service')
+
+	try:
+		properties = object.GetProperties()
+	except:
+		continue
+
+	for key in properties.keys():
+		val = str(properties[key])
+		print "        %s = %s" % (key, val)
+
+	print
Signature · 1 line
1.7.9.5