Add test script for controlling speaker volume

This commit is contained in:
Denis Kenzior 2009-09-29 14:30:15 -05:00
parent b015cd655a
commit 92de0c4693
1 changed files with 18 additions and 0 deletions

18
test/set-speaker-volume Executable file
View File

@ -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])))