diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-10-26 22:35:43 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-10-26 22:35:43 +0200 |
commit | 1519c1823ed2e2ed2aafcc4fa9443d1ee573beed (patch) | |
tree | 3e83418e36f7c2e9c01dff544746472a5c5961a0 /test/set-mms-details | |
parent | 88ff795fcb2ad826bb510b7ec95b57dd27f42a76 (diff) | |
download | ofono-1519c1823ed2e2ed2aafcc4fa9443d1ee573beed.tar.gz |
test: Add script to change MMS Proxy and MMSC
Diffstat (limited to 'test/set-mms-details')
-rwxr-xr-x | test/set-mms-details | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/test/set-mms-details b/test/set-mms-details new file mode 100755 index 00000000..7540948f --- /dev/null +++ b/test/set-mms-details @@ -0,0 +1,43 @@ +#!/usr/bin/python + +import sys +import dbus + +bus = dbus.SystemBus() + +manager = dbus.Interface(bus.get_object('org.ofono', '/'), + 'org.ofono.Manager') + +modems = manager.GetModems() + +for path, properties in modems: + if "org.ofono.ConnectionManager" not in properties["Interfaces"]: + continue + + connman = dbus.Interface(bus.get_object('org.ofono', path), + 'org.ofono.ConnectionManager') + + contexts = connman.GetContexts() + path = ""; + + for i, properties in contexts: + if properties["Type"] == "mms": + path = i + break + + if path == "": + print "No MMS context" + exit(1) + + context = dbus.Interface(bus.get_object('org.ofono', path), + 'org.ofono.ConnectionContext') + + if len(sys.argv) < 3: + print "Usage: %s <proxy> <center>" % (sys.argv[0]) + exit(1) + + context.SetProperty("MessageProxy", sys.argv[1]) + print "Setting MMS Proxy to %s" % (sys.argv[1]) + + context.SetProperty("MessageCenter", sys.argv[2]) + print "Setting MMSC to %s" % (sys.argv[2]) |