Open Source Telephony
 help / color / mirror / Atom feed
From: Ronald Tessier <ronald.tessier@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH 3/3] test: Add a test script to get service properties
Date: Thu, 09 Aug 2012 17:51:43 +0200	[thread overview]
Message-ID: <1344527503-9965-4-git-send-email-ronald.tessier@linux.intel.com> (raw)
In-Reply-To: <1344527503-9965-1-git-send-email-ronald.tessier@linux.intel.com>

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

---
 test/get-properties |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100755 test/get-properties

diff --git a/test/get-properties b/test/get-properties
new file mode 100755
index 0000000..8887fcb
--- /dev/null
+++ b/test/get-properties
@@ -0,0 +1,26 @@
+#!/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')
+
+properties = service.GetProperties()
+
+for p in properties:
+	if len(properties[p].__str__()) > 0:
+		print "%s Service Manager rule is: %s" %\
+				(p, properties[p])
+		print "------------------------------------------" \
+			"-----------------"
+	else:
+		print "%s Service Manager rule disabled" % (p)
-- 
1.7.9.5


  parent reply	other threads:[~2012-08-09 15:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-09 15:51 [PATCH 0/3] mmsd: Add GetProperties method Ronald Tessier
2012-08-09 15:51 ` [PATCH 1/3] service: Add DBus method to get service properties Ronald Tessier
2012-08-09  6:43   ` Denis Kenzior
2012-08-09 15:51 ` [PATCH 2/3] doc: Describe GetProperties in service-api Ronald Tessier
2012-08-09  6:43   ` Denis Kenzior
2012-08-09 15:51 ` Ronald Tessier [this message]
2012-08-09  6:44   ` [PATCH 3/3] test: Add a test script to get service properties 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=1344527503-9965-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