All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ronald Tessier <ronald.tessier@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCHv2 5/6] test: Add ReportChanged to monitored signals
Date: Wed, 12 Sep 2012 15:55:12 +0200	[thread overview]
Message-ID: <1347458113-29039-6-git-send-email-ronald.tessier@linux.intel.com> (raw)
In-Reply-To: <1347458113-29039-1-git-send-email-ronald.tessier@linux.intel.com>

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

---
 test/monitor-mms |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/test/monitor-mms b/test/monitor-mms
index 188d028..ab77765 100755
--- a/test/monitor-mms
+++ b/test/monitor-mms
@@ -29,6 +29,13 @@ def property_changed(name, value, member, path, interface):
 	iface = interface[interface.rfind(".") + 1:]
 	print "{%s} [%s] %s %s" % (iface, name, member, value)

+def report_changed(type, status, details, path, interface):
+	iface = interface[interface.rfind(".") + 1:]
+	print "{%s} [%s] <%s> : %s" % (iface, path, type, status)
+	for key in details.keys():
+		val = str(details[key])
+		print "    %s => %s" % (key, val)
+
 if __name__ == '__main__':
 	dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)

@@ -75,5 +82,11 @@ if __name__ == '__main__':
 						path_keyword="path",
 						interface_keyword="interface")

+	bus.add_signal_receiver(report_changed,
+					bus_name="org.ofono.mms",
+					signal_name = "ReportChanged",
+						path_keyword="path",
+						interface_keyword="interface")
+
 	mainloop = gobject.MainLoop()
 	mainloop.run()
--
1.7.9.5


  parent reply	other threads:[~2012-09-12 13:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12 13:55 [PATCHv2 0/6] mmsd: support delivery_ind notification Ronald Tessier
2012-09-12 13:55 ` [PATCHv2 1/6] service: Use MMS_META_UUID_SUFFIX Ronald Tessier
2012-09-12 13:55 ` [PATCHv2 2/6] mmsutil: Decode delivery_ind msg Ronald Tessier
2012-09-12 13:55 ` [PATCHv2 3/6] service: Process delivery_ind notification Ronald Tessier
2012-09-12 13:55 ` [PATCHv2 4/6] doc: Add ReportChanged signal description Ronald Tessier
2012-09-12 13:55 ` Ronald Tessier [this message]
2012-09-12 13:55 ` [PATCHv2 6/6] service: Send a delivery changed signal Ronald Tessier

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=1347458113-29039-6-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 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.