From: Lucas De Marchi <lucas.demarchi@profusion.mobi>
To: ofono@ofono.org
Subject: [PATCH 3/3] Add script to enable/disable TTY support
Date: Thu, 18 Nov 2010 09:26:56 -0200 [thread overview]
Message-ID: <1290079616-2754-3-git-send-email-lucas.demarchi@profusion.mobi> (raw)
In-Reply-To: <1290079616-2754-1-git-send-email-lucas.demarchi@profusion.mobi>
[-- Attachment #1: Type: text/plain, Size: 935 bytes --]
---
test/set-tty | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
create mode 100755 test/set-tty
diff --git a/test/set-tty b/test/set-tty
new file mode 100755
index 0000000..cbbb043
--- /dev/null
+++ b/test/set-tty
@@ -0,0 +1,25 @@
+#!/usr/bin/python
+
+import dbus
+import sys
+
+bus = dbus.SystemBus()
+
+if len(sys.argv) == 3:
+ path = sys.argv[1]
+ enable = int(sys.argv[2])
+elif len(sys.argv) == 2:
+ manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+ 'org.ofono.Manager')
+ modems = manager.GetModems()
+ path = modems[0][0]
+ enable = int(sys.argv[1])
+else:
+ print "%s [PATH] {0|1}" % (sys.argv[0])
+ exit(1)
+
+print "Setting TTY for modem %s..." % path
+texttelephony = dbus.Interface(bus.get_object('org.ofono', path),
+ 'org.ofono.TextTelephony')
+
+texttelephony.SetProperty("Powered", dbus.Boolean(enable));
--
1.7.3.2
next prev parent reply other threads:[~2010-11-18 11:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-18 11:26 [PATCH 1/3] Add TTY (hearing impaired) support Lucas De Marchi
2010-11-18 11:26 ` [PATCH 2/3] phonesim: implement TTY interface Lucas De Marchi
2010-11-18 11:26 ` Lucas De Marchi [this message]
2010-11-18 11:30 ` [PATCH 1/3] Add TTY (hearing impaired) support Lucas De Marchi
2010-11-22 11:21 ` Denis Kenzior
2010-11-19 22:18 ` Gustavo F. Padovan
2010-11-19 22:26 ` Lucas De Marchi
-- strict thread matches above, loose matches on Subject: below --
2010-11-18 2:50 [PATCH 2/3] phonesim: implement TTY interface Lucas De Marchi
2010-11-18 2:50 ` [PATCH 3/3] Add script to enable/disable TTY support Lucas De Marchi
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=1290079616-2754-3-git-send-email-lucas.demarchi@profusion.mobi \
--to=lucas.demarchi@profusion.mobi \
--cc=ofono@ofono.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.