From c9fb635620bd63ed64b9af6d61828cbc7592971c Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 31 Dec 2008 09:07:53 +0100 Subject: [PATCH] Add Interface property for connections --- doc/connection-api.txt | 7 +++++++ src/element.c | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/doc/connection-api.txt b/doc/connection-api.txt index c39c6d2..a0c97da 100644 --- a/doc/connection-api.txt +++ b/doc/connection-api.txt @@ -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. diff --git a/src/element.c b/src/element.c index 5e79589..0271107 100644 --- a/src/element.c +++ b/src/element.c @@ -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", -- 1.7.9.5