linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] test-audio: Add --interface option
@ 2012-07-03 15:18 Frédéric Dalleau
  2012-07-04 12:37 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Frédéric Dalleau @ 2012-07-03 15:18 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Frédéric Dalleau

---
 test/test-audio |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/test/test-audio b/test/test-audio
index 1ba2042..e302264 100755
--- a/test/test-audio
+++ b/test/test-audio
@@ -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()
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] test-audio: Add --interface option
  2012-07-03 15:18 [PATCH] test-audio: Add --interface option Frédéric Dalleau
@ 2012-07-04 12:37 ` Johan Hedberg
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2012-07-04 12:37 UTC (permalink / raw)
  To: Frédéric Dalleau; +Cc: linux-bluetooth

Hi Frédéric,

On Tue, Jul 03, 2012, Frédéric Dalleau wrote:
> ---
>  test/test-audio |   10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)

Applied. Thanks.

Johan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-04 12:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-03 15:18 [PATCH] test-audio: Add --interface option Frédéric Dalleau
2012-07-04 12:37 ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).