From: Marcel Holtmann Date: Wed, 31 Dec 2008 08:07:53 +0000 (+0100) Subject: Add Interface property for connections X-Git-Tag: accepted/2.0alpha-wayland/20121110.002834~4257 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c9fb635620bd63ed64b9af6d61828cbc7592971c;p=profile%2Fivi%2Fconnman.git Add Interface property for connections --- 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",