| 1 |
#!/usr/bin/python |
| 2 |
|
| 3 |
import sys |
| 4 |
import dbus |
| 5 |
|
| 6 |
if (len(sys.argv) < 3): |
| 7 |
print "Usage: %s '<number>' <count>" % (sys.argv[0]) |
| 8 |
print "Sample: get-conversation '555-1234' 0" |
| 9 |
sys.exit(1) |
| 10 |
|
| 11 |
bus = dbus.SessionBus() |
| 12 |
|
| 13 |
manager = dbus.Interface(bus.get_object('org.ofono.mms', '/org/ofono/mms'), |
| 14 |
'org.ofono.mms.Manager') |
| 15 |
|
| 16 |
services = manager.GetServices() |
| 17 |
path = services[0][0] |
| 18 |
|
| 19 |
service = dbus.Interface(bus.get_object('org.ofono.mms', path), |
| 20 |
'org.ofono.mms.Service') |
| 21 |
|
| 22 |
messages = service.GetConversation(sys.argv[1], sys.argv[2]) |
| 23 |
|
| 24 |
for entry in messages: |
| 25 |
path = entry[0] |
| 26 |
properties = entry[1] |
| 27 |
|
| 28 |
print "[ %s ]" % (path) |
| 29 |
|
| 30 |
for key in properties.keys(): |
| 31 |
val = str(properties[key]) |
| 32 |
print " %s = %s" % (key, val) |
| 33 |
|
| 34 |
print |