Open Source Telephony
 help / color / mirror / Atom feed
From: Ronald Tessier <ronald.tessier@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCHv2 3/3] test: Add a script to set the delivery-report flag
Date: Wed, 08 Aug 2012 15:21:46 +0200	[thread overview]
Message-ID: <1344432106-23105-4-git-send-email-ronald.tessier@linux.intel.com> (raw)
In-Reply-To: <1344432106-23105-1-git-send-email-ronald.tessier@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1415 bytes --]

---
 Makefile.am |    2 +-
 test/set-dr |   25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100755 test/set-dr

diff --git a/Makefile.am b/Makefile.am
index 3ae0749..6130ba2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -52,7 +52,7 @@ CLEANFILES = src/builtin.h

 test_scripts = test/monitor-mms test/get-services test/send-message \
 		test/delete-message test/mark-message-read test/get-messages \
-		test/get-conversation
+		test/get-conversation test/set-dr

 doc_files = doc/architecture.txt doc/consumer.txt doc/manager-api.txt \
 				doc/service-api.txt doc/message-api.txt \
diff --git a/test/set-dr b/test/set-dr
new file mode 100755
index 0000000..2143807
--- /dev/null
+++ b/test/set-dr
@@ -0,0 +1,25 @@
+#!/usr/bin/python
+
+import sys
+import dbus
+
+bus = dbus.SessionBus()
+
+manager = dbus.Interface(bus.get_object('org.ofono.mms', '/org/ofono/mms'),
+					'org.ofono.mms.Manager')
+
+services = manager.GetServices()
+path = services[0][0]
+
+service = dbus.Interface(bus.get_object('org.ofono.mms', path),
+						'org.ofono.mms.Service')
+
+if len(sys.argv) > 1:
+	allowed = dbus.Boolean(int(sys.argv[1]))
+else:
+	allowed = dbus.Boolean(1)
+
+print "Setting delivery report use for %s...(UseDeliveryReports=%d)" %\
+	(path, allowed)
+
+service.SetProperty("UseDeliveryReports", allowed)
--
1.7.9.5


  parent reply	other threads:[~2012-08-08 13:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-08 13:21 [PATCHv2 0/3] mmsd: delivery-report flag Ronald Tessier
2012-08-08 13:21 ` [PATCHv2 1/3] service: Add DBus method to set delivery-report Ronald Tessier
2012-08-08 17:06   ` Denis Kenzior
2012-08-08 13:21 ` [PATCHv2 2/3] doc: Describe " Ronald Tessier
2012-08-08 17:06   ` Denis Kenzior
2012-08-08 13:21 ` Ronald Tessier [this message]
2012-08-08 17:07   ` [PATCHv2 3/3] test: Add a script to set the delivery-report flag Denis Kenzior

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=1344432106-23105-4-git-send-email-ronald.tessier@linux.intel.com \
    --to=ronald.tessier@linux.intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox