This email list is read-only.  Emails sent to this list will be discarded
----------------------------------
 doc/network-api.txt  |    4 ++++
 plugins/wifi.c       |    4 ++--
 test/list-networks   |    2 +-
 test/monitor-connman |    2 +-
 4 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit c634b10c2613e71f2824171b9a42c1728f801c71
Author: Marcel Holtmann <[email protected]>
Date:   Sun Dec 14 02:12:40 2008 +0100

    Add generic signal strength property


Diff in this email is a maximum of 400 lines.
diff --git a/doc/network-api.txt b/doc/network-api.txt
index 8480fcd..b38e122 100644
--- a/doc/network-api.txt
+++ b/doc/network-api.txt
@@ -51,6 +51,10 @@ Properties   string Name [readonly]
                        For manually created networks this is set by
                        default.
 
+               uint8 Strength [readonly]
+
+                       Indicates the signal strength of the network.
+
                array{byte} WiFi.SSID [readonly]
 
                        If the network type is WiFi, then this property is
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 77d8370..70e19e9 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -351,7 +351,7 @@ static void scan_result(struct connman_element *device,
                        element->wifi.security = g_strdup(security);
                }
 
-               connman_element_add_static_property(element, "WiFi.Strength",
+               connman_element_add_static_property(element, "Strength",
                                                DBUS_TYPE_BYTE, &strength);
 
                DBG("%s (%s) strength %d", network->identifier,
@@ -361,7 +361,7 @@ static void scan_result(struct connman_element *device,
        } else {
                data->pending = g_slist_remove(data->pending, element);
 
-               connman_element_set_static_property(element, "WiFi.Strength",
+               connman_element_set_static_property(element, "Strength",
                                                DBUS_TYPE_BYTE, &strength);
        }
 
diff --git a/test/list-networks b/test/list-networks
index 8f7e01b..b446210 100755
--- a/test/list-networks
+++ b/test/list-networks
@@ -42,7 +42,7 @@ for path in properties["Devices"]:
                        if (key == "WiFi.SSID"):
                                ssid = convert_ssid(properties[key])
                                print "        %s = [ %s ]" % (key, ssid)
-                       elif (key == "WiFi.Strength"):
+                       elif (key == "Strength"):
                                print "        %s = %d" % (key, properties[key])
                        else:
                                print "        %s = %s" % (key, properties[key])
diff --git a/test/monitor-connman b/test/monitor-connman
index 0c4a2ef..97d3a6b 100755
--- a/test/monitor-connman
+++ b/test/monitor-connman
@@ -7,7 +7,7 @@ import dbus.mainloop.glib
 
 def property_changed(name, value, path, interface):
        iface = interface[interface.rfind(".") + 1:]
-       if (name == "WiFi.Strength"):
+       if (name == "Strength"):
                val = int(value)
        else:
                val = str(value)
_______________________________________________
Commits mailing list
[email protected]
https://lists.moblin.org/mailman/listinfo/commits

Reply via email to