This email list is read-only.  Emails sent to this list will be discarded
----------------------------------
 src/element.c        |    5 ++++-
 test/Makefile.am     |    2 +-
 test/monitor-connman |   23 +++++++++++++++++++++++
 3 files changed, 28 insertions(+), 2 deletions(-)

New commits:
commit a1953b25126c327c1bbfeb351b8649c1c1f82c0a
Author: Marcel Holtmann <[email protected]>
Date:   Fri Dec 12 23:06:02 2008 +0100

    Add script to monitor property changes

commit b44bcd75905003183c1d5d352315b8a0f3f10e34
Author: Marcel Holtmann <[email protected]>
Date:   Fri Dec 12 23:03:55 2008 +0100

    Send signal when network got removed


Diff in this email is a maximum of 400 lines.
diff --git a/src/element.c b/src/element.c
index 31c4560..1dd9c61 100644
--- a/src/element.c
+++ b/src/element.c
@@ -1948,9 +1948,12 @@ static gboolean remove_element(GNode *node, gpointer 
user_data)
                                                CONNMAN_CONNECTION_INTERFACE);
        }
 
-       if (element->type == CONNMAN_ELEMENT_TYPE_NETWORK)
+       if (element->type == CONNMAN_ELEMENT_TYPE_NETWORK) {
+               emit_networks_signal(connection, element->parent);
+
                g_dbus_unregister_interface(connection, element->path,
                                                CONNMAN_NETWORK_INTERFACE);
+       }
 
        if (element->type == CONNMAN_ELEMENT_TYPE_DEVICE &&
                        element->subtype != CONNMAN_ELEMENT_SUBTYPE_NETWORK) {
diff --git a/test/Makefile.am b/test/Makefile.am
index 1e38eff..e4ea64f 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -3,6 +3,6 @@ EXTRA_DIST = get-state list-profiles list-connections \
                list-devices enable-device disable-device start-scanning \
                list-networks select-network disable-network create-network \
                set-passphrase simple-agent show-introspection \
-               test-manager test-compat
+               test-manager test-compat monitor-connman
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/test/monitor-connman b/test/monitor-connman
new file mode 100755
index 0000000..86c7d42
--- /dev/null
+++ b/test/monitor-connman
@@ -0,0 +1,23 @@
+#!/usr/bin/python
+
+import gobject
+
+import dbus
+import dbus.mainloop.glib
+
+def property_changed(name, value, path):
+       print "[%s] %s = %s" % (path, name, str(value))
+
+if __name__ == '__main__':
+       dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
+
+       bus = dbus.SystemBus()
+       manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"),
+                                               "org.moblin.connman.Manager")
+
+       bus.add_signal_receiver(property_changed,
+                                       signal_name = "PropertyChanged",
+                                                       path_keyword="path")
+
+       mainloop = gobject.MainLoop()
+       mainloop.run()
_______________________________________________
Commits mailing list
[email protected]
https://lists.moblin.org/mailman/listinfo/commits

Reply via email to