Skip to contentSkip to conversation

test-audio: Add --interface option

PATCH Applied Frédéric Dalleau 2 participants 2 messages Jul 3, 2012 – Jul 4, 2012 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test-audio: Add --interface option

---
 test/test-audio |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
test/test-audio +8 -2
index 1ba2042..e302264 100755
@@ -13,6 +13,8 @@ manager = dbus.Interface(bus.get_object("org.bluez", "/"), "org.bluez.Manager")
 option_list = [
 		make_option("-i", "--device", action="store",
 				type="string", dest="dev_id"),
+		make_option("-f", "--interface", action="store",
+				type="string", dest="dev_if"),
 		]
 parser = OptionParser(option_list=option_list)
 
@@ -23,6 +25,11 @@ if options.dev_id:
 else:
 	adapter_path = manager.DefaultAdapter()
 
+if options.dev_if:
+	interface = "org.bluez." + options.dev_if
+else:
+	interface = "org.bluez.Audio"
+
 adapter = dbus.Interface(bus.get_object("org.bluez", adapter_path),
 							"org.bluez.Adapter")
 
@@ -35,8 +42,7 @@ if len(args) < 2:
 	sys.exit(1)
 
 device = adapter.FindDevice(args[1])
-audio = dbus.Interface(bus.get_object("org.bluez", device),
-				"org.bluez.Audio")
+audio = dbus.Interface(bus.get_object("org.bluez", device), interface)
 
 if args[0] == "connect":
 	audio.Connect()
Signature · 1 line
1.7.9.5
#1 lore raw

Hi Frédéric,

Quoted 3 lines · Frédéric Dalleau
---
 test/test-audio |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Applied. Thanks.

Johan