Add Interface property for connections
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 31 Dec 2008 08:07:53 +0000 (09:07 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 31 Dec 2008 08:07:53 +0000 (09:07 +0100)
doc/connection-api.txt
src/element.c

index c39c6d2..a0c97da 100644 (file)
@@ -21,6 +21,13 @@ Properties   string Type [readonly]
 
                        The connection type (for example wifi etc.)
 
+               string Interface [readonly]
+
+                       The connection interface (for example "eth0" etc.)
+
+                       This value is for pure informational purposes. It
+                       is not guaranteed that it is always present.
+
                uint8 Strength [readonly]
 
                        Indicates the signal strength of the connection.
index 5e79589..0271107 100644 (file)
@@ -539,6 +539,10 @@ static DBusMessage *connection_get_properties(DBusConnection *conn,
                connman_dbus_dict_append_variant(&dict, "Type",
                                                DBUS_TYPE_STRING, &str);
 
+       if (element->devname != NULL)
+               connman_dbus_dict_append_variant(&dict, "Interface",
+                                       DBUS_TYPE_STRING, &element->devname);
+
        if (element->subtype == CONNMAN_ELEMENT_SUBTYPE_WIFI ||
                        element->subtype == CONNMAN_ELEMENT_SUBTYPE_WIMAX)
                connman_dbus_dict_append_variant(&dict, "Strength",