summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-09-29 14:30:15 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-09-29 14:56:23 -0500
commit92de0c469381526223da065ecb6b28e0ae807864 (patch)
treeaeb554e7a00c79b4106ae1d9159ce68d5afe3d7e
parentb015cd655ae4f061a2162df46d2beb1e17823ef6 (diff)
downloadofono-92de0c469381526223da065ecb6b28e0ae807864.tar.bz2
Add test script for controlling speaker volume
-rwxr-xr-xtest/set-speaker-volume18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/set-speaker-volume b/test/set-speaker-volume
new file mode 100755
index 00000000..38571f27
--- /dev/null
+++ b/test/set-speaker-volume
@@ -0,0 +1,18 @@
+#!/usr/bin/python
+
+import sys
+import dbus
+
+bus = dbus.SystemBus()
+
+manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+ 'org.ofono.Manager')
+
+properties = manager.GetProperties()
+
+path = properties["Modems"][0]
+
+cv = dbus.Interface(bus.get_object('org.ofono', path),
+ 'org.ofono.CallVolume')
+
+cv.SetProperty("SpeakerVolume", dbus.Byte(int(sys.argv[1])))