From: "Frédéric Dalleau" <frederic.dalleau@linux.intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: "Frédéric Dalleau" <frederic.dalleau@linux.intel.com>
Subject: [PATCH] test-audio: Add --interface option
Date: Tue, 3 Jul 2012 17:18:31 +0200 [thread overview]
Message-ID: <1341328711-3572-1-git-send-email-frederic.dalleau@linux.intel.com> (raw)
---
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
next reply other threads:[~2012-07-03 15:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-03 15:18 Frédéric Dalleau [this message]
2012-07-04 12:37 ` [PATCH] test-audio: Add --interface option Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1341328711-3572-1-git-send-email-frederic.dalleau@linux.intel.com \
--to=frederic.dalleau@linux.intel.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).